[P3] Committed comparison-v2.json predates #20's key reordering, so the README's documented cmp reproduction step fails at HEAD #122
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Priority: P3
Type: bug
Source: full codebase review requested 2026-10-31 (independently reproduced against
2cac7cf)Location:
docs/qa/decompression/comparison-v2.json:2597,docs/qa/decompression/comparison-v2.json:2733,docs/qa/decompression/comparison-v2.json:2874,scripts/reference-validation/compare-extended.ts:75,scripts/reference-validation/compare-extended.ts:76,scripts/reference-validation/README.md:106Problem and evidence
compare-extended.ts lines 75-76 build
demandUsageby copyingdemandDive.gasUsageand then addingOxygenfromoxygenUsage. Commit #20 introduced this split. Because of it,Oxygenis now serialized afterCCR:180:450in thedemandLitresof the three ccr-cap rows. The committed docs/qa/decompression/comparison-v2.json was last written inefc5d97, before #20, and hasOxygenfirst. The values are identical and every check still passes. Only the key order differs. Even so, the byte-level step in scripts/reference-validation/README.md:106-107 (cmp docs/qa/decompression/comparison-v2.json /tmp/comparison-v2.json) fails on HEAD, so anyone following the documented reproduction sees a spurious mismatch.I ran
node --import tsx scripts/reference-validation/compare-extended.ts <tmpdir>/comparison-v2.jsonfrom the checkout. It exited 0 with {"nativeControlPass":16,"nativeControlDiscrepancy":0,"ccrPointPass":18,"ccrPointDiscrepancy":0,"total":21,"pass":21,"discrepancy":0}. Thencmp docs/qa/decompression/comparison-v2.json <tmp>reported "differ: byte 63183, line 2597".diffshowed exactly 3 hunks, at lines 2597-2598, 2733-2734 and 2874-2875. Each swaps the order of "Oxygen" (53.444/52.444/52.444) and "CCR:180:450" (31.5815…) with identical values.git logon the report shows its last change wasefc5d97.Suggested correction
Regenerate docs/qa/decompression/comparison-v2.json with the current harness (
node --import tsx scripts/reference-validation/compare-extended.ts docs/qa/decompression/comparison-v2.json). This is a derived report, not a frozen oracle. Optionally, make the harness serializedemandLitres(or the whole report) with sorted keys, so future accounting refactors that only reorder keys do not change the byte output.Acceptance criteria
On HEAD with the fix, running compare-extended.ts to /tmp/comparison-v2.json and then
cmp docs/qa/decompression/comparison-v2.json /tmp/comparison-v2.jsonsucceeds with exit 0. The summary stays at 21/21 rows, 18/18 CCR points and 16/16 native controls. Optional regression guard: a test that regenerates the report in memory and compares it byte-for-byte with the committed file, or with key-sorted canonical JSON. pnpm verify passes.Scope: maintenance of the educational simulator. Preserve historical R1 acceptance and operational-validation limits.