Repository navigation
test(atlas-embed): Gate A refuses mismatched ONNX Runtime versions (#6663) - #6764
Merged
developing-today[bot] merged 1 commit intoNov 7, 2026
Merged
Conversation
…6663) Bit-identity is a version-matched claim: the fixtures were recorded under ONNX Runtime 1.31.1 (atlas venv, provenance in embed-probes.json), and Gate A passed against that build. Against the nix closure's 1.27.1 the same code and fixtures produce ~1e-7 deltas on ~740-757 of 768 components of every probe — kernel/fusion differences between runtime versions, not a parity verdict (controlled re-run on amd-6: 1.31.1 = 0 bitdiffs on all 11 probes, single and batch; 1.27.1 = the reported deltas). The gate now reads the provenance version and the loaded runtime's version (from the versioned SONAME both layouts carry) and panics NOT APPLICABLE on a mismatch, instead of printing a parity table for a comparison that cannot hold. Helper covered by a non-ignored unit test. fixtures/README records the version-matched requirement.
developing-today
Bot
requested review from
a team and
dezren39
as code owners
November 7, 2026 04:18
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
developing-today
Bot
deleted the
fallback/6663-gate-a-ort-version-guard
branch
November 7, 2026 04:24
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.
Closes the investigation leg of #6663; the production runtime-alignment call is filed separately (see below).
Root cause (proven by controlled re-run, amd-6, 2026-11-07)
Gate A is a version-matched claim that was run cross-version:
fixtures/embed-probes.jsonprovenance): recorded 2026-11-04 under ONNX Runtime 1.31.1 (production Python pipeline, atlas venv), intra 8 / inter 2 threads.libonnxruntime.so.1.31.1from the atlas venv — version-matched.pkgs/atlas-search/default.nixbakes that store path as the service default since step 5, Atlas step 5: nix packaging (pkgs/atlas-search) + amd deploy #5355).Controlled re-run this shift, same laptop/CPU/code/fixtures, only the loaded runtime varied:
Eliminated hypotheses: thread counts (the crate defaults intra 8 / inter 2, exactly the provenance values —
atlas-embed/src/lib.rs), tokenizer/model drift (token ids exact; model rev + hashes match provenance), CPU kernel change (same CPU passes under 1.31.1; kernel selection differences are a function of the runtime version).This PR
gate_a.rs: before loading, compare the fixture provenanceonnxruntime_versionwith the loaded runtime's version — read from the versioned SONAME both layouts carry (the venv lib ISlibonnxruntime.so.<x.y.z>; the nixlibonnxruntime.sohas the versioned sibling). On mismatch the gate panics NOT APPLICABLE naming both versions, instead of printing a parity table for a comparison that cannot hold. Undeterminable version → guard stays silent (never a false failure).fixtures/README.md: records the version-matched requirement.Verified on the laptop: unit test passes; gate passes under 1.31.1; guard fires with the NOT APPLICABLE message under 1.27.1.
Not in this PR
The remaining decision from #6663 — the production corpus was embedded under 1.31.1 while the live service's baked default is the nix 1.27.1 — is a runtime-alignment call (bump the nix runtime, or deliberately re-embed + re-record). Filed as a follow-up issue with the evidence and a recommendation; this PR is compatible with either outcome (a re-record updates the provenance and the guard follows it).
🤖 Lane M queue worker (fallback mode, code#6619)
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.