Skip to content

fix(release): keep package-lock in sync with package.json so make-live stops needing --force (v0.331.2) - #606

Merged
vikasprogrammer merged 1 commit into
mainfrom
feat/lock-sync
Aug 10, 2026
Merged

fix(release): keep package-lock in sync with package.json so make-live stops needing --force (v0.331.2)#606
vikasprogrammer merged 1 commit into
mainfrom
feat/lock-sync

Conversation

@vikasprogrammer

Copy link
Copy Markdown
Owner

The bug

package-lock.json was stuck at 0.330.0 while package.json had moved to 0.331.1 — recent bumps
edited package.json directly instead of running npm version. The lock records the root version in
two places (.version and .packages[""].version) and npm rewrites both on the next
npm install.

That install happens on the deploy box. So scripts/make-live.sh found ~/agent-os-live dirty on
every run and had to be re-run with --force. The guard exists to catch someone having edited the
live checkout by hand — turning it into a routine --force is how a real signal gets trained away.

The fix

  • Re-sync the lock via npm version 0.331.2 --no-git-tag-version (updates both fields).
  • scripts/version-sync-test.cjs — new, runs first in npm run test:governance, reads the two
    JSON files (no build needed), fails with the exact one-line remedy. Since make-live.sh gates on
    that suite, the drift can no longer reach a deploy.
  • CLAUDE.md → Versioning now states the rule (bump with npm version, never by hand) and explains
    the deploy-box consequence, so it survives the next person.

Verification

npm run build · npm run test:governance → exit 0, 18 suites green, version-sync check passing.
Falsified: hand-drifting the lock to 0.0.1 makes the new test exit 1 and name both mismatched fields.

🤖 Generated with Claude Code

https://claude.ai/code/session_015ZUfffxY4hKv7M6wMCcaTz

…e stops needing --force (v0.331.2)

The lockfile had drifted to 0.330.0 while package.json moved on, because recent
bumps edited package.json directly instead of running `npm version`. The lock
records the root version in both `.version` and `.packages[""].version`, and npm
rewrites both on the next `npm install` — which is exactly what the deploy box
does. So every `scripts/make-live.sh` run found the live checkout dirty and had to
be re-run with `--force`: a guard meant to catch someone editing the live checkout,
reduced to noise, with force-deploying past it becoming the habit.

Re-syncs the lock via `npm version`, and adds `scripts/version-sync-test.cjs` as the
falsifier — it runs first in `npm run test:governance` (reads the two JSON files, no
build needed), so drift fails the deploy's own gate and prints the one-line fix.
CLAUDE.md → Versioning now states the rule instead of leaving it implied.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ZUfffxY4hKv7M6wMCcaTz
@vikasprogrammer
vikasprogrammer merged commit 7c06998 into main Aug 10, 2026
1 check passed
@vikasprogrammer
vikasprogrammer deleted the feat/lock-sync branch August 10, 2026 11:42
vikasprogrammer added a commit that referenced this pull request Aug 11, 2026
…e stops needing --force (v0.331.2) (#606)

The lockfile had drifted to 0.330.0 while package.json moved on, because recent
bumps edited package.json directly instead of running `npm version`. The lock
records the root version in both `.version` and `.packages[""].version`, and npm
rewrites both on the next `npm install` — which is exactly what the deploy box
does. So every `scripts/make-live.sh` run found the live checkout dirty and had to
be re-run with `--force`: a guard meant to catch someone editing the live checkout,
reduced to noise, with force-deploying past it becoming the habit.

Re-syncs the lock via `npm version`, and adds `scripts/version-sync-test.cjs` as the
falsifier — it runs first in `npm run test:governance` (reads the two JSON files, no
build needed), so drift fails the deploy's own gate and prints the one-line fix.
CLAUDE.md → Versioning now states the rule instead of leaving it implied.


Claude-Session: https://claude.ai/code/session_015ZUfffxY4hKv7M6wMCcaTz

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant