Skip to content

Reuse JSON parses in the complete T16 boundary audit - #3209

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
thakrarsagar:loop9963/iteration-01
Oct 17, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
thakrarsagar:loop9963/iteration-01

Conversation

@thakrarsagar

Copy link
Copy Markdown
Contributor

The T16 invoice boundary audit repeatedly parses the same restored fixtures after PR #3009's compression improvement. This adds an opt-in, source-bound reader adapter in research/t16-invoice-read-cache; the original audit, frozen inputs and selected frontier remain unchanged.

Each read checks current file bytes. Byte-identical contents reuse a private serialized JSON value, returning a fresh mutable value; changed contents are parsed normally. All 54 mutation cases and every existing boundary-audit predicate still execute.

On one shared Linux host with CPython 3.12.15, four fresh processes in baseline/cached/cached/baseline order took 179.276 / 170.213 / 179.694 / 197.756 seconds. Mean runtime decreased 7.19% (188.516 → 174.954 s); mean peak RSS increased 29.8 MiB. Timing ranges overlap, so this is a local observation, not a portable speed guarantee. Each cached run reused 488 of 628 reads. RESULT.json retains all measurements, exact commands, environment and the measured verifier hash.

Validation:

  • All four complete emitted receipts are byte-identical to the unchanged original EXPECTED.json (SHA256 e3c0e3c93fbbc6a63e43502dbb98b9e6556abe6c412e0c142f7a202f0e420541).
  • Ten controls cover byte invalidation with preserved metadata, fresh nested values, repeated changed contents/restoration, malformed or missing inputs, source tampering and rejection of -O.
  • Registered replay passed: python3.12 -B scripts/research_package.py --package research/t16-invoice-read-cache (outcome=completed).
  • Package metadata/source pins, git diff --check, and scripts/check_research_commit.py passed; the publication-byte check covered all 21 package/input files at 8c62e5f52f1d172bb8c95e795449205015bb5143.

Task: replay-runtime, priority revision 6; base 463113d675af7410ac91d53a4fed51ec6494eb9a. Canonical investigation. Submission overlap refresh covered 253 open PRs and 2,017 Discussion records with complete pagination, finding no competing T16 reader-cache work; this is not a novelty certificate.

Credit Tairitsu-Aya's audit/PR #2081, Josie Elliston's PR #1959 handoff, Kumagi's PR #3009 (95568ae83a73ace578e3972a01aef55c889e58a2), and jackmgaller's predecessor copying technique. Prepared by thakrarsagar with substantial OpenAI Codex assistance, including separate code review and test implementation. Apache-2.0.

Limitations: no full selected cold replay, new kappa, supplier admission, all-size theorem or independent host timing replication. The cache retains first-seen contents for this audit's restoration pattern; it is not a general-purpose workload cache. The README records the next independent-host check.

@Mister-Meeseeks
Mister-Meeseeks merged commit 87866a0 into CrocSwap:main Oct 17, 2026
2 checks passed
@thakrarsagar
thakrarsagar deleted the loop9963/iteration-01 branch October 18, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants