Skip to content

fix: auto-update rollback_version during finalize - #142

Merged
bash0816 merged 2 commits into
mainfrom
fix/rollback-version-auto-update
Jul 22, 2026
Merged

fix: auto-update rollback_version during finalize#142
bash0816 merged 2 commits into
mainfrom
fix/rollback-version-auto-update

Conversation

@bash0816

Copy link
Copy Markdown
Owner

Summary

  • scripts/finalize-update-docs.sh overwrote latest_audited_version on every release finalize but never touched rollback_version, so the README/docs Rollback section drifted stale (stuck at 0.144.1 since 2026-07-11 while latest_audited_version advanced through 0.144.3 → 0.145.0)
  • Extracted the inline manifest-mutation logic into scripts/finalize-audited-version.js (matching the existing update-codex-candidate-manifest.js pattern: pure function + CLI wrapper + test file), capturing the pre-overwrite latest_audited_version as the new rollback_version
  • Added a guard requiring latest_audited_version to match previous_stable_version before finalizing, so a manually-drifted manifest fails loudly at finalize time instead of silently producing a wrong rollback target
  • Wired the new script/test into .github/workflows/npm-package.yml's explicit check/test list (previously not auto-detected)
  • Corrected the currently-stale rollback_version (0.144.10.144.6) via the normal sync-public-release-from-manifest.js generator

Test plan

  • node --test scripts/finalize-audited-version.test.js — 6/6 PASS (normal case, idempotent rerun, missing previous_stable_version guard, mismatched previous_stable_version guard, tracked_versions dedup/append)
  • Full test suite from packages/codex-termux (npm-package.yml's working-directory): node --test across finalize-audited-version.test.js, update-codex-candidate-manifest.test.js, sync-public-release-from-manifest.test.js, bin/magi-node-launcher.test.js — 38/38 PASS
  • node scripts/check-public-release-skeleton.js (manifest/README drift check) — PASS
  • node scripts/sync-public-release-from-manifest.js --check — PASS (no drift after regeneration)
  • sh -n scripts/finalize-update-docs.sh — syntax OK

Generated with G1 design review (GPT-5.6-terra, Go after 3 rounds — round 1/2 raised semantic + CI-wiring + branch-safety concerns, all addressed; see review transcripts).

github-actions Bot added 2 commits July 23, 2026 05:18
finalize-update-docs.sh overwrote latest_audited_version on every
release but never touched rollback_version, so the README/docs
Rollback section drifted stale (stuck at 0.144.1 while
latest_audited_version advanced through 0.144.3-0.145.0).

Extract the inline manifest-mutation logic into
scripts/finalize-audited-version.js (matching the existing
update-codex-candidate-manifest.js pattern), and capture the
pre-overwrite latest_audited_version as the new rollback_version.
Add a guard requiring latest_audited_version to match
previous_stable_version before finalizing, so a manually-drifted
manifest fails loudly instead of producing a wrong rollback target.

Also corrects the currently-stale rollback_version (0.144.1 -> 0.144.6)
via the normal sync-public-release-from-manifest.js generator, since
canonical_package_status is already "published" on main.
The version-bump check short-circuited on a falsy latest_audited_version,
silently skipping the previous_stable_version safety guard instead of
failing loudly (G3 review finding).
@bash0816
bash0816 merged commit 568bb89 into main Jul 22, 2026
5 checks passed
@bash0816
bash0816 deleted the fix/rollback-version-auto-update branch July 22, 2026 20:27
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