Repository navigation
The ABI vocabulary gates — build-time floor derivation + publish-time continuity (the darwin-24 drift window) - #399
Merged
Conversation
…+ publish-time continuity The registry's `abi` segment is resolution truth for native-extension payloads (spec 05 §5; mirrored verbatim by tools/registry_update.rb since registry MINOR 11, tebako#1047), yet nothing asserted the vocabulary's continuity or its derivation: - The 0.17.14/0.17.15 darwin-24 drift window (the macos-15 fleet's kernel release baked in by config.guess since the fleet move in 1cca8848) let a shard publish an abi the contract never spelled. - The 0.17.16 triplet pin (e21ac53) restored the contract floor's darwin-23 spelling (#317) — a patch line that silently broke every darwin-24-pressed native payload (the metanorma smoke's "Could not find 'ox' (>= 0) among 316 total gem(s)", tebako-packages/packed-metanorma#313). This change closes the window with two fail-closed layers: 1. Build time — Builder#write_abi_sidecar now asserts the shard's abi equals the contract floor's derivation: Contract#darwin_kernel_major (the macOS N ↔ darwin N+9 SSOT, owned here and flowed into configure_triplet) against macos_deployment_target. A host-kernel leak fails the leg with exit 134 naming got/want/floor before any publish. 2. Publish time — publish.yml gains a gate step (tools/registry_abi_gate.rb) comparing the render's darwin rows against the previous line's rows on origin/main, failing closed naming every (line, platform, old → new) tuple unless the run carries the deliberate abi_bump dispatch input, whose text is recorded into the registry bot PR body. Scope is MECE: darwin rows only, introductions pass, withdrawn rows are dead vocabulary, pre-MINOR-11 rows declare no vocabulary. Evidence: 453 examples / 0 failures (50 pending = the opt-in published-pair network acceptance); the gate simulated live against main's registry (10 darwin rows stable, exit 0) and against a flipped fixture (fail-closed without the knob naming both macos tuples; acknowledged with it, exit 0). Rubocop diff-clean (the 4 remaining offenses pre-date this change).
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:04 — with
GitHub Actions
Inactive
ronaldtse
had a problem deploying
to
windows-signing
November 27, 2026 10:08 — with
GitHub Actions
Failure
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:08 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:08 — with
GitHub Actions
Inactive
ronaldtse
temporarily deployed
to
windows-signing
November 27, 2026 10:58 — with
GitHub Actions
Inactive
ronaldtse
marked this pull request as ready for review
November 27, 2026 11:36
This branch was previously deployed
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.
What
Two fail-closed gates for the ABI vocabulary (
abisegment of a platform triplet — resolution truth for native-extension payloads per spec 05 §5, mirrored verbatim intotpkg-registry.yamlsince registry MINOR 11 / tebako#1047):Builder#write_abi_sidecarnow asserts each darwin shard's abi equals the contract floor's derivation —Contract#darwin_kernel_major(the macOS N ↔ darwin N+9 SSOT, now owned by the contract and flowed intoconfigure_triplet) againstmacos_deployment_target. A host-kernel leak fails the leg with a named error (exit 134) naming got / want / floor before anything publishes.publish.ymlgains a gate step runningtools/registry_abi_gate.rb, which compares the rendered registry's darwin rows against the newest non-withdrawn same-(line × platform) row onorigin/main. Any move fails closed naming every(line, platform, old → new)tuple (::error::prefixed) — unless the run carries the deliberateabi_bumpworkflow_dispatchinput, whose text is then recorded into the registry bot PR body alongside onebump acknowledged:line per tuple. The publish step itself additionally requires the gate step's success.Why
The darwin-24 drift window: 0.17.14 / 0.17.15 shards published
*-darwin-24abis — the macos-15 fleet's kernel release baked in by config.guess after the fleet move in 1cca8848 — an abi the contract never spelled. The 0.17.16 triplet pin (e21ac53) restored the contract floor's darwin-23 spelling (#317), and that deliberate patch-line move silently broke every darwin-24-pressed native payload: the packed-metanorma smoke failed with "Could not find 'ox' (>= 0) among 316 total gem(s)" (tebako-packages/packed-metanorma#313; payload-side fix at tebako-packages/metanorma#176).Nothing between the shard and the registry mirror ever asserted the vocabulary, so a fleet move could leak a host kernel into a published abi, and a vocabulary restoration could ship as a silent patch. A vocabulary move is legitimate only as a deliberate act — the same treatment an era boundary gets. These gates make both classes impossible to miss.
Scope rules (MECE — the gates own what they own, nothing else)
status: withdrawnrows are dead vocabulary: newest means newest non-withdrawn on both sides.<ruby>-<tebako>, dotted) is enforced upstream by the product reader'sregistry validatein the same job; rows outside it do not participate here.write_abi_sidecar), so a leak fails the build before any artifact exists.The knob
abi_bump(string,workflow_dispatchonly, default''). When a deliberate vocabulary move is intended (e.g. a fleet move adopting a newer darwin), dispatch with a reason; the gate then passes and the publish step records thebump acknowledged:tuples plus the knob text into the registry bot PR body under a dedicated heading, so the deliberate act is visible in the merge record. Without the knob, any move is an error; with an empty registry diff (no move), the knob is inert.Evidence
spec/builder_spec.rb— 5#write_abi_sidecartests (bump-proof: floor derived from the repo'scontract.yml, off-floor failure asserts the rewrapped named message);spec/registry_abi_gate_spec.rb— 8 tests (stable pass, fail-closed tuple naming, knob acknowledgment recording, new-line introduction, new-platform introduction, withdrawn-newest continuity, grammar-outside skip, both-arch ordering);spec/build_workflow_spec.rb— structural locks for the knob declaration, gate step wiring/ordering, publishifrequiringsteps.abi-gate.outcome == 'success', and the PR-body recording.ruby tools/registry_abi_gate.rb tpkg-registry.yaml tpkg-registry.yaml→abi continuity gate: 10 darwin row(s) stable vs the previous line — no bump, exit 0. Against a fixture with main's 0.17.16 macos rows flipped to darwin-24: fail-closed exit 1 naming both(4.0.9 × {aarch64,x86_64}-macos, darwin-24 → darwin-23)tuples; with the knob → exit 0 withbump acknowledged:lines and the knob echoed. Missing-file input fails cleanly (message + exit 1, no stack trace).contract.rb:65LineLength;builder.rb:58redundant disable;builder.rb:63AbcSize/MethodLength onrun_stages); this change adds none.Notes
docs/build-chain.mdgains "The abi gates" section and the macOS N ↔ darwin N+9 SSOT entry.Contract#darwin_kernel_majoralso deduplicates the previously inlinesplit.to_i + 9inconfigure_triplet(SSOT law: one owner, everything else flows).