Skip to content

converge: sync repo contract in release.sh with a post-bump re-gate#55

Merged
MCamner merged 1 commit into
mainfrom
converge/release-sh-sync-contract
Jul 17, 2026
Merged

converge: sync repo contract in release.sh with a post-bump re-gate#55
MCamner merged 1 commit into
mainfrom
converge/release-sh-sync-contract

Conversation

@MCamner

@MCamner MCamner commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Part of v1.23.0's release-path convergence.

Problem

release.sh bumped VERSION, the README badge and CHANGELOG.md but never .mq/repo-contract.json. So a release shipped the contract one version behind — v1.0.1 was tagged with VERSION=1.0.1, contract=1.0.0. The drift then failed the stack contract gate in mq-agent's CI instead of here.

Fix (correct-by-construction)

  • sync_contract_version bumps .mq/repo-contract.json alongside VERSION; the contract is added to the release commit, to rollback, and to the required-files and diff-preview steps.
  • verify_contract_matches_version runs after the bump — a post-bump re-gate. If the contract does not match VERSION, the release aborts rather than committing a drifted tag. Silent drift becomes a hard stop.

Verified

./release.sh --dry-run 1.0.2: contract synced 1.0.1 → 1.0.2, re-gate verified the match, diff shown, dry-run rolled everything back cleanly. The re-gate exits 1 on an injected mismatch. bash -n clean.

🤖 Generated with Claude Code

…re-gate

release.sh bumped VERSION, the README badge and CHANGELOG but never the repo
contract, so tags shipped with the contract one version behind — v1.0.1 was
tagged VERSION=1.0.1, contract=1.0.0. The stack contract gate then failed in
mq-agent's CI rather than here.

Two changes make release.sh produce an in-sync state or refuse:
- sync_contract_version bumps .mq/repo-contract.json alongside VERSION, and the
  contract is added to the release commit and to rollback.
- verify_contract_matches_version runs after the bump (post-bump re-gate): if
  the contract does not match VERSION, the release aborts instead of committing
  a drifted tag.

Verified with ./release.sh --dry-run 1.0.2: the contract is synced and verified,
the diff shows the bump, and dry-run rolls everything back. The re-gate exits 1
on an injected mismatch. bash -n clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@MCamner
MCamner merged commit ba49485 into main Jul 17, 2026
3 checks passed
@MCamner
MCamner deleted the converge/release-sh-sync-contract branch July 17, 2026 19:32
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