Repository navigation
docs(test): pin the vendored vectors to their merged upstream commit - #111
Merged
Merged
Conversation
`test/shared/README.md` pinned `assets/test_vectors.json` to commit `37e06a829178` on `corelib-c-cpp`'s `poc/omit-all-default-sequences` branch, with a note to re-pin "once that lands". It landed — and two further commits have touched the file since — so the record named a branch that no longer exists and a SHA that is no longer the file's upstream state. The bytes on disk were never wrong (they are identical to upstream `main`), but nobody re-syncing could tell: there was no merged SHA to diff against. CORELIB_PLAN §8 makes `test_vectors.json` a copy of `corelib-c-cpp`, the authoritative source; the provenance record is the only thing that makes that copy checkable. Re-pin the row at `f30244e3f29e` (2026-07-28), the last merged commit touching the file upstream, and record every vendored file's `md5` next to its pin so verifying a checkout needs neither the network nor a guess. `test_vectors` cannot notice any of this — it replays whatever bytes are on disk — so add `test_vendored_provenance`, wired into CTest next to the other document-level checks. It reads the provenance tables and fails on a pin that is not a bare merged commit (the defect above), on a recorded checksum that no longer matches the file (a re-sync that skipped the table), and on a vendored file with no row at all. It skips (77) in a tree that vendored only the header. Closes #92
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.
The finding (#92)
test/shared/README.mdpinnedassets/test_vectors.jsonto commit37e06a829178oncorelib-c-cpp'spoc/omit-all-default-sequencesbranch, with a note to "re-pin to the merged SHA once that lands". It landed, and two further commits (c56ccf5d4f88,f30244e3f29e) have touched the file upstream since. The vendored bytes were never wrong —assets/test_vectors.jsonis byte-identical to upstreammain(md5 f542c66bfa6aecb3636282ec6e802a1b) — but the record named a branch that no longer exists and a SHA that is no longer the file's upstream state, so nobody re-syncing had anything valid to diff against.CORELIB_PLAN §8 makes
test_vectors.jsona file "generated by and copied fromcorelib-c-cpp(the authoritative source)"; the provenance record is what makes that copy checkable.The fix
f30244e3f29e(2026-07-28) — the last merged commit touching the file upstream — and drop the provisional note.md5alongside its pin (both JSON-reader rows too; those pins were already correct ate149c218cdbb), so verifying a checkout needs neither the network nor a guess.The regression test
test_vectorscannot notice any of this — it replays whatever bytes are on disk, pinned or not. Newtest/test_vendored_provenance.sh, wired into CTest beside the other document-level checks (test_ci_workflows,test_readme_structure, sameSKIP_RETURN_CODE 77convention). It reads the provenance tables and re-hashes the files, failing on:maintoday;Verified by mutation: on
mainthe check reports 4 failures (the branch pin + three missing checksums); appending a byte tosofab_test_json.creports the md5 mismatch; deleting a table row reports the uncovered file; a tree withouttest/shared/README.mdskips.Suite
Full
ctestgreen in Debug and Release (6/6,CXXFLAGSper the repo's GCC-15 note). README's "Build & test" test list documents the new check.Closes #92