Skip to content

Release tooling: same-release access metadata, normalized canonical, approval fixtures, safe worktrees - #43

Merged
linqiang-max merged 5 commits into
mainfrom
fix/release-access-metadata-and-tooling
Oct 23, 2026
Merged

linqiang-max merged 5 commits into
mainfrom
fix/release-access-metadata-and-tooling

Conversation

@linqiang-max

Copy link
Copy Markdown
Member

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.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. Every new model therefore reached modelAccess (and the Website pricing-meta) one release later, bound to the previous source sha. Adds build.py --meta-only and rewrites the meta right after the generator. Replaying the Voxtral TTS 3 prepare: 107 entries including voxtral-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.py passes, data/ and api/v1 prices 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 into official-pricing-repair-scope.json and adds Website stand-in rows for added models to website-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_v2 now derives the Website model count from the fixture.

9. Release worktrees — scripts/release_worktree.py create|remove: create on a new branch from origin/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.

AICostBudget 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.
@linqiang-max
linqiang-max merged commit 273b08e into main Oct 23, 2026
1 check passed
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