fix: auto-update rollback_version during finalize - #142
Merged
Conversation
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).
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.
Summary
scripts/finalize-update-docs.shoverwrotelatest_audited_versionon every release finalize but never touchedrollback_version, so the README/docs Rollback section drifted stale (stuck at0.144.1since 2026-07-11 whilelatest_audited_versionadvanced through 0.144.3 → 0.145.0)scripts/finalize-audited-version.js(matching the existingupdate-codex-candidate-manifest.jspattern: pure function + CLI wrapper + test file), capturing the pre-overwritelatest_audited_versionas the newrollback_versionlatest_audited_versionto matchprevious_stable_versionbefore finalizing, so a manually-drifted manifest fails loudly at finalize time instead of silently producing a wrong rollback target.github/workflows/npm-package.yml's explicit check/test list (previously not auto-detected)rollback_version(0.144.1→0.144.6) via the normalsync-public-release-from-manifest.jsgeneratorTest plan
node --test scripts/finalize-audited-version.test.js— 6/6 PASS (normal case, idempotent rerun, missingprevious_stable_versionguard, mismatchedprevious_stable_versionguard, tracked_versions dedup/append)packages/codex-termux(npm-package.yml's working-directory):node --testacrossfinalize-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 PASSnode scripts/check-public-release-skeleton.js(manifest/README drift check) — PASSnode scripts/sync-public-release-from-manifest.js --check— PASS (no drift after regeneration)sh -n scripts/finalize-update-docs.sh— syntax OKGenerated 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).