Repository navigation
Release tooling: same-release access metadata, normalized canonical, approval fixtures, safe worktrees - #43
Merged
Conversation
added 5 commits
October 23, 2026 17:24
build.py writes api/v1/meta.json modelAccess from model-identity-registry.json, but the release pipeline ran it before generate_pricing_v2_preview.py updates that registry, so every new model reached modelAccess (and the Website pricing-meta) one release late. Add build.py --meta-only and rewrite the meta after the generator. Replaying the Voxtral TTS 3 release now yields 107 modelAccess entries including voxtral-mini-tts-3-0 instead of 106.
The only record serialized at column 0; content and key order are unchanged and every generated artifact rebuilds byte-identical.
scripts/format_canonical.py writes data/canonical/models.json as two-space indented UTF-8 JSON in its original key order (--check to verify). Validate and prepare refuse a canonical edit that is not normalized, and a test keeps the committed file normalized, so release diffs show only the changed records.
scripts/update_release_approvals.py records the approved canonical and projection digests for every model the source commit changes and adds the stand-in Website row for added models; replaying the Voxtral TTS 3 release reproduces the hand-written fixtures exactly (as JSON). The Website model count in test_website_projection_v2 now follows the fixture. Price-change event approvals and model-specific assertions stay manual and are listed.
scripts/release_worktree.py creates a worktree on a new branch from origin/main (optionally linking node_modules from another checkout) and removes one by refusing uncommitted work, unlinking every directory link inside it without following it, then deleting the worktree with a long-path fallback. Python 3.11 rmtree and os.walk follow Windows junctions and would delete linked dependencies.
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.
Items 12, 13, 6 and 9 of the release-chain hardening. No pricing data changes.
12. Access metadata arrived one release late (bug fix) —
build.pywritesapi/v1/meta.jsonmodelAccessfrommodel-identity-registry.json, but the release pipeline ran it beforegenerate_pricing_v2_preview.pyupdates that registry. Every new model therefore reachedmodelAccess(and the Websitepricing-meta) one release later, bound to the previous source sha. Addsbuild.py --meta-onlyand rewrites the meta right after the generator. Replaying the Voxtral TTS 3 prepare: 107 entries includingvoxtral-mini-tts-3-0(bound to that release's source commit) instead of 106. A pipeline-order test locks it. Note: the next real release will also backfill TTS 3's entry.13. One normalized canonical form —
scripts/format_canonical.py [--check](two-space indent, UTF-8, original key order, LF). Separate commit re-indents the one odd record (gemini-4-argon, column 0): parsed content and key order identical,validate.pypasses,data/andapi/v1prices rebuild byte-identical. Validate/prepare refuse a non-normalized canonical; a test keeps it normalized (CRLF checkouts tolerated).6. Approval fixtures —
scripts/update_release_approvals.py, run after prepare: writes the canonical/projection digests for every changed model intoofficial-pricing-repair-scope.jsonand adds Website stand-in rows for added models towebsite-model-pricing.json; lists what stays manual (price-event extensions, model-specific assertions, Website pins → rehearse). Replaying TTS 3 from the pre-release fixtures reproduces Codex's hand-written fixtures (JSON-equal; only insertion order differs) and the approval suites pass (67 tests / 2917 subtests).test_website_projection_v2now derives the Website model count from the fixture.9. Release worktrees —
scripts/release_worktree.py create|remove: create on a new branch fromorigin/main(optional node_modules link); remove refuses uncommitted work, unlinks every directory link without descending into it (Python 3.11 rmtree/os.walk follow junctions), then removes the worktree with a long-path fallback. Tests use real junctions and check the linked files survive.Docs:
docs/daily-pricing-release.md(worktrees, formatter, approvals). Checks: 744 unittests OK.