coreapi: land vendored Core spec refresh before #2561 - #2575
Merged
Merged
Conversation
Refresh spec/core.openapi.json from the control plane and regenerate the
client. The spec has moved on since the last vendor: it adds the org
invitation routes COR-1744 needs, and it also reshapes surfaces the CLI
already calls.
What changed on the wire, and what each needed here:
- create and delete now return an X-Entire-Commit-Token response header,
so ogen wraps their results. Unwrap at the call sites; `org create` and
`project create` keep printing the object, whose --json now also carries
the deprecated commitToken field the server sends.
- CreateRepo returns CreatedRepo, a twin of Repo with that extra field.
The readiness poll and the creation report both work on Repo, so convert
once at the boundary.
- GrantProjectAccessInputBody and GrantRepoAccessInputBody collapsed into
one GrantAccessBody whose provider pair is optional, because the route
now also takes an accountId. The CLI always sends the pair.
- BranchRule split into a read model and BranchRuleUpdate for patches.
- createMirror and getPermissions are gone. The mirror flow already posts
to the async createMirrorRequest route and only borrowed CreatedMirror
to carry three fields home; MirrorRequestResult already holds them.
Membership and Invitation ship role and status as enums, and the create
responses repeat their read models' required capabilities. Both are the
cases readModelEnumFields and readModelOptionalFields exist for: the CLI
only prints these values, so a value added later must display rather than
fail the whole listing. Add the entries and lock them in with tests.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PLWcdMjoLpAaiATYzY3v74
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The broad generated API refresh affects multiple CLI flows, and a documentation correction remains outstanding.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Refreshes the vendored Core API specification and generated client, with required CLI updates for new response and request types.
Changes:
- Regenerates the Core API client and compatibility normalization.
- Updates create/delete, grants, mirrors, and branch protection flows.
- Refreshes related tests and generated API metadata.
| File | Description |
|---|---|
internal/coreapi/UPSTREAM.md |
Documents compatibility workarounds; correct the documented grant command. |
internal/coreapi/spec/normalize.go |
Adds enum and optional-field normalization. |
internal/coreapi/repo_readiness_test.go |
Adapts repository creation tests. |
internal/coreapi/oas_validators_gen.go |
Regenerates schema validators. |
internal/coreapi/oas_security_gen.go |
Regenerates security mappings. |
internal/coreapi/oas_request_encoders_gen.go |
Regenerates request encoders. |
internal/coreapi/oas_parameters_gen.go |
Regenerates request parameters. |
internal/coreapi/oas_operations_gen.go |
Regenerates operation definitions. |
internal/coreapi/oas_interfaces_gen.go |
Adds refreshed response interfaces. |
internal/coreapi/oas_defaults_gen.go |
Regenerates request defaults. |
internal/coreapi/oas_cfg_gen.go |
Updates generated configuration. |
internal/coreapi/client_test.go |
Tests forward-compatible enum decoding. |
cmd/entire/cli/repo.go |
Adapts repository create/delete handling. |
cmd/entire/cli/repo_readiness.go |
Converts created repositories to read models. |
cmd/entire/cli/repo_protection.go |
Uses updated branch-rule models. |
cmd/entire/cli/repo_protection_test.go |
Updates protection test fixtures. |
cmd/entire/cli/repo_mirror.go |
Uses refreshed mirror request types. |
cmd/entire/cli/repo_mirror_test.go |
Updates mirror provider tests. |
cmd/entire/cli/repo_mirror_request_test.go |
Updates mirror request assertions. |
cmd/entire/cli/repo_mirror_probe.go |
Returns refreshed mirror results. |
cmd/entire/cli/project.go |
Adapts project create/delete responses. |
cmd/entire/cli/org.go |
Adapts organization create/delete responses. |
cmd/entire/cli/grant.go |
Uses the shared grant request body. |
cmd/entire/cli/grant_test.go |
Updates grant role tests. |
Files not reviewed (8)
- internal/coreapi/oas_cfg_gen.go: Generated file
- internal/coreapi/oas_defaults_gen.go: Generated file
- internal/coreapi/oas_interfaces_gen.go: Generated file
- internal/coreapi/oas_operations_gen.go: Generated file
- internal/coreapi/oas_parameters_gen.go: Generated file
- internal/coreapi/oas_request_encoders_gen.go: Generated file
- internal/coreapi/oas_security_gen.go: Generated file
- internal/coreapi/oas_validators_gen.go: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Entire-Checkpoint: 01M38NDB76KW0RBGCKX7CX1742
Contributor
Author
|
bugbot run |
Entire-Checkpoint: 01M39JB34RP7Q4EFVK1ADWYVBD
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 53c5a26. Configure here.
gtrrz-victor
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

https://entire.io/gh/entireio/cli/trails/1415
Why
COR-1947 splits the vendored Core API spec/client refresh out of #2561. Merge this PR first, then #2561's diff against main shrinks by itself; do not rebase or force-push #2561.
What
Cherry-pick of
7bcc02f3b(coreapi: refresh the vendored core spec) onto main. The commit is 30 files: 18 underinternal/coreapi(vendored spec, normalized spec, generated ogen client, normalization/docs/tests) at +45,144/−20,249, and 12 handwritten CLI files at +72/−36 (net +36). The CLI changes are required adaptations to generated response/request types; separating them would not compile.Most caller changes unwrap create/delete response wrappers, use the shared grant body, distinguish branch-rule update from read models, and use
MirrorRequestResult. Observable compatibility changes are intentional: org/project create JSON can include the server's deprecatedcommitToken; read models tolerate new invitation/member enums and missing capabilities fields from older Core deployments. The other three commits on #2561 (org invite/accept commands and token disclosure fixes) are not included.Verification
GOFLAGS=-p=2 go generate ./internal/coreapi/...against the committed vendored spec: exit 0, zero working-tree/index diff. No fresh upstream spec download and no manual merge of generated code.MISE_GLOBAL_CONFIG_FILE=/tmp/cor-1947-mise-global.toml GOFLAGS=-p=2 mise run check: exit 0 (fmt, lint, race unit/integration, Vogon 56/56, Roger Roger 4/4). Temporary external mise config activates the already installedgotestsum1.13.0 for nested canary invocations; no repo config change.mise run linton the final formatted tree: 0 issues;git diff --checkand working tree clean.A textually merged generated
openapi.jsonon entire.io#4693 passed review but failed CI as out of date; regenerating changed it by +37/−1. The zero-diff idempotence check above is specifically to avoid that failure mode here.Review order
Merge this before #2561. No changes to #2561's branch or PR are made here.
Note
Medium Risk
Touches create/delete/grant and repo provisioning paths against a large regenerated client; risk is mitigated by normalization and tests for unknown read-model enums and optional fields.
Overview
Vendored Core OpenAPI refresh with regenerated
internal/coreapiogen client (new routes for invitations, people rosters, Depot CI, CI deliveries, and more) plus spec normalization so mixed-version servers still decode.Handwritten CLI follow-ups keep existing commands compiling and behaving: org/project/repo create unwrap
Created*Headers.Response; delete ignores new no-content return types; project/repo grants sharegrantAccessBody/GrantAccessBody; repo create mapsCreatedRepo→Repovia JSON for readiness polling; branch protection patches useBranchRuleUpdate; mirrors useMirrorRequestResultand renamed mirror-request provider enums (legacyCreateMirrordropped from the client).Forward-compat extends
spec/normalize.goand tests so invitation/member role/status enums and create-responsecapabilities/providerfields do not break listings or creates against older Core.Reviewed by Cursor Bugbot for commit 53c5a26. Configure here.