Repository navigation
feat(release): extension release --changed with the date version - #456
Merged
Merged
Conversation
Each extension of a repo (the root or extensions/*) changed since its last <id>@* tag gets YYYY.MDD.N, its tag on the commit, images, the record on a release made with --target, and npm. The v* mode stays. Claude-Session: https://claude.ai/code/session_01XQkodgygL4W8UcLQDwC212
Contributor
|
🎉 PR Validation ✅ PASSED Commit: Checks:
Ready to merge! ✨ 🔗 View workflow run |
vreshch
marked this pull request as ready for review
November 22, 2026 04:42
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.
Problem
Stage 3 row R4: a merge to master is the release for a repo with one or more extensions. Today
extension releaseonly takes av*tag equal topackage.json.Change
agentage extension release --changed(and--dry-run, which needs--changed).extensions/<name>with anagentagepackage, else the root package.<id>@*tag (highest by number, not the push range, so a run thereleaseconcurrency group dropped is caught up), or no tag yet, or the last tag has noagentage-extension.jsonrecord (a release that failed after its tag). Last tag on this commit (a re-run): that version is resumed.YYYY.MDD.N(UTC; month x 100 + day; N = highest N of that id that day + 1).versionandrepository(the releasing repo, read by theorg.opencontainers.image.sourcelabel and npm provenance) inpackage.jsonandpackage-lock.json, plus the contractscheck --writewrites (openapiinfo.version, mcpcserverInfo.version, whichcheckcompares). Never committed; the build allows only these files to differ.<id>@<version>created on the commit before the build (a tag on another commit is refused), so a failed build uses up its N. Same guard, images, records and npm asv*; the release gets--target <commit>.release.tstorelease-steps.tswithout change;release.test.tsis not edited.docs/reference.md.Review round 1
FAIL history:) when the commit of its last<id>@*tag is not an ancestor of the commit being released (git rev-list --count <sha>..<tagCommit>is not 0;rev-listinstead ofmerge-base --is-ancestorbecause its exit 1 cannot be told from a git error). A shallow checkout is deepened with--unshallowfirst, so a depth-1 checkout still works.FAIL stuck:, naming the tags) until a release of the last tag succeeds or a human removes them. Only where a new N would be made; a resume makes no tag.publishstill reads "already on npm"). Cost: after an npm failure, a re-run of that commit is refused by the unchanged guard (images pushed, no record); the next commit takes a new N, and the limit of 3 counts it.id,version,result) and exit 1 when any failed or was refused; the error names each<id>: FAIL ...and keeps the first code. A dry run with a refused id also exits 1.docs/reference.md: each extension keeps its ownpackage-lock.json; shared root files do not trigger a release.release-changed-safety.test.ts(real git: a full checkout of an older commit, depth-1 clones). Each test was seen red with its fix removed; removing--unshallowturns 12 tests red.release.test.tsandrelease-guard.tsare unchanged.How verified
npm run verifyandnpm run test:coveragegreen locally.git status, no new tag on origin, no create, push or publish call), a real run of the same, no tag yet, the root layout, the second release of a day, a tag with no record, a resume, a moved tag, a dirty tree, the template id, an api part (contracts and the one image).extension-probe(api, mcp), built, thenwriteCiCopy+ the kit'swriteContracts+check: conforms;git statusshows only the four written files.v*form: all ofrelease.test.tsunchanged and green.What the reviewer must check
fetch-depthany (the command fetches tags),contents: write,packages: write,id-token: write, annpm cithat installs each extension, apackage-lock.jsonin eachextensions/<id>(the kit image build needs it), and a build of each extension before the command (writeContractsneedsdist/).fixture,market,cloudandplatformare linked to their old repos: a release from the host repo is refused by the ownership guard until the owner relinks them (renamed repos keep the link).https://claude.ai/code/session_01XQkodgygL4W8UcLQDwC212