Repository navigation
IR-746: route generated JSON and corpus names through the canonical encoder - #356
Merged
Merged
Conversation
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.
Boolean source maps and Kani proof graphs previously emitted struct-order JSON, and corpus case names hashed non-canonical JSON. This change routes the three typed artifact records through
core::canonicalfor RFC 8785 bytes and one trailing newline, with a counted 16 MiB projection limit. Corpus names now hash a separate counted 1 MiB canonical preimage that preserves fulli128values as decimal strings. Encoding refusals remain typed and occur before any corpus identity is claimed.The change also removes duplicate JSON and artifact wrappers and the dated panic-scan exception. The corpus preimage takes foreign record fields from their owning serializers, preserving only the existing three input key aliases, order-independent object/reference tuples, and CG-owned request representation; this resolved a preparatory high-severity schema-drift finding. Tests check exact canonical key order, a generated name against a hand-authored preimage and fixed SHA-256 digest, wide-integer distinction, both size limits, typed refusals, and the single encoder boundary. Independent code/Rust, gap, and spec reviews are recorded in SR-7200–SR-7203; both unique findings were fixed on this branch. Two later test assertions were corrected without weakening their source-scan, schema, or trace checks.
The initial pre-PR validation ran on clean head
8f7ec72354ed453e845ac2085d6538ddfc6ac42aand Cargo.lock blobc188e43f68bf23138088a8acb8c5dd2bdfa339c8: formatting, spec validation, Clippy, MSRV, and ordinary tests passed (221 library, 443 integration with 27 intentional real-Kani ignores, one doctest). The sandboxedmake cistopped only whencargo denycould not write its advisory database lock; an elevated same-head tail passed deny, the one-copy check, unsafe audit, and rustdoc. The separate realmake kani-gatepassed all 27 Kani/replay cases with Kani 0.68.0 and CBMC 6.11.0, peak 7,478,013,952 bytes under the 20 GiB cap.A final-diff review (SR-7688/7689) found that a 1 MiB preflight on the verbose owning
FiniteInputcould refuse a case whose normalized identity fits. The fix uses a derived 4 MiB bound only for that intermediate projection; the final canonical preimage retains its 1 MiB limit. Focused positive admission and existing over-limit refusal tests pass. The same reviewer confirmed the fix and the final trace-only delta, including correction of an overbroad FR-015-AC-94 test tag. The reviewed public head is9b5638be11ec2a856309a000f520ac9aa122bc26; final-head native validation is complete: formatting, Quire spec validation, Clippy, both MSRV and ordinary full tests, deny, one-copy, unsafe audit, and rustdoc passed on the clean head.make cireached deny and stopped only because the sandbox made the advisory database lock read-only; an elevated same-head tail passed the remaining targets. The second real Kani gate passed on the reviewed9b5638be11ec2a856309a000f520ac9aa122bc26head: 27/27 Kani/replay cases,kani-gate: result=passed, Kani 0.68.0, clean tree and unchanged lockfile. The final merge-resolution head40509e4805fedaa31af3c58a1a3a50c539b17349incorporates CG main9ca8759and resolves one spec matrix conflict, preserving both TC-042 and TC-052. Itssrc,tests, andCargo.locktree objects are byte-identical to reviewed and proved9b5638b;make specandgit diff --checkpass on40509e4.