fix: report receipt-less ok observations as unverifiable in receipts mode - #57
Open
Abhishek-B-R wants to merge 1 commit into
Open
Abhishek-B-R wants to merge 1 commit into
Abhishek-B-R wants to merge 1 commit into
Conversation
…mode The as-published day files currently carry an empty receipts array on every observation, so `./reproduce --receipts` rebuilt zero passing sources and reported each printed value as a MISMATCH with exit 1. An empty receipts array is not evidence that a value is wrong; it means nothing was disclosed to recompute from. An ok observation with no receipts now gets its own unverifiable verdict. The CLI prints UNVERIFIABLE with the reason, adds an unverifiable count to the summary only when there is one, and exits 2 like the other could-not-verify outcomes. Without --version it also points at the versioned record, whose day files keep the receipts and verify. Validation: ruff passes and the offline suite passes; the two new tests fail on main. Signed-off-by: Abhishek B R <byteblaster1468@gmail.com>
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.
Problem
The as-published day files currently carry
receipts: []on every observation, for example:The same holds for B200 on 2026-09-01, 2026-09-10 and 2026-09-23. The versioned day files (
H100/v7/observations/2026/09/23.json) andlatest.jsonstill carry receipts../reproduce --receiptsreads the as-published files by default, rebuilds zero passing sources and reports every printed value as a mismatch. Re-checked today on main (0530437):Expected: no MISMATCH. The published values are fine:
./reproduce --receipts --version 7 h100 2026-09-23T12reads the versioned file and gives 4 MATCH, exit 0 (and--version 5 b200 2026-09-10T03the same). An empty receipts array means nothing was disclosed to recompute from, which is a could-not-verify outcome rather than a disagreement.Fix
published/verify.py: anokobservation with an empty receipts array gets a new unverifiable verdict with the message "observation carries no receipts". No-print observations and every matching path are unchanged.scripts/verify_published_record.py: printsUNVERIFIABLEfor it, appends, N unverifiableto the summary only when N > 0 (so the summary of every passing run, and the live test regex that parses it, stay byte-identical), and exits 2 like the other could-not-verify outcomes. Without--versionit also suggests rerunning with the version shown on each line.--receiptsparagraph.A question for you: would you rather
--receiptsread the versioned receipts instead, the way #54 made--fullfall back to them? That would verify these rows rather than report them as unverifiable. It is a larger change to the reader routing, so this PR keeps to the minimum, and I am happy to take it that way if you prefer. If omitting receipts from the as-published rows is not intended, the verdict change still seems right for any future receipt-less row.Tests
tests/unit/test_published_verify.py: the verdict for a receipt-less ok observation.tests/unit/test_published_reader_cli.py: exit code, summary and message. Both fail on main.pytest: 1711 passed, 22 deselected (live).ruff check src tests scripts: clean../reproduce --receipts h100 2026-09-23T12reports0 MATCH, 0 MISMATCH, 0 degraded, 4 unverifiable, exits 2, and prints the--versionhint.The commit is signed off per CONTRIBUTING.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.