chore: enforce version sync in release workflows - #11
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fcdd92186e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "uninstall:codex": "node scripts/installer-cli.mjs uninstall", | ||
| "update:codex": "node scripts/installer-cli.mjs update" | ||
| "update:codex": "node scripts/installer-cli.mjs update", | ||
| "version": "npm run sync:plugin-version && npm run check:version-sync" |
There was a problem hiding this comment.
Stage plugin manifest in npm version lifecycle
The new version lifecycle script updates .codex-plugin/plugin.json but never stages it, so npm version will create a commit/tag that bumps package.json while leaving the plugin manifest change unstaged. npm's own command docs (.../npm/docs/content/commands/npm-version.md, lifecycle steps 2/4) state files changed by lifecycle scripts must be explicitly added with git add; without that, a normal npm version patch release flow can produce a tagged commit that immediately fails check:version-sync in CI/publish.
Useful? React with 👍 / 👎.
|
|
||
| describe("version sync", () => { | ||
| it("asserts the live repo versions match", () => { | ||
| assert.equal(assertVersionsMatch(), "1.0.0"); |
There was a problem hiding this comment.
Remove hardcoded repo version from sync test
This test locks the expected live version to 1.0.0, so any legitimate future version bump (for example to 1.0.1) will fail even when package.json and .codex-plugin/plugin.json are correctly synchronized. Because npm run test is part of the required checks, every release version change will require touching this test or CI will break.
Useful? React with 👍 / 👎.
Summary
This adds a hard version-sync guarantee between
package.jsonand.codex-plugin/plugin.jsonso release packaging cannot drift.Changes
versionlifecycleprepackwhen manifest versions divergeVerification
npm run check:version-syncnode --test tests/version-sync.test.mjsnpm pack --dry-run