19 KiB
19 KiB
Verification: Rust R5.4 review files (2026-10-23)
Contract .claude/tasks/contracts/2026-10-23-rust-r5-review.md. Fresh verifier, report-only (persisted by the orchestrator).
Round 1 on 0a79c52: verifier ECARTS(2), security PASS (1 MEDIUM, 4 LOW)
- Verifier: C1, C4 to C9 MET (30 tests,
--check0/12 + 1 declared,--out×2 identical, anatomy 143, floor clean; 140 targeted + 10,500 random changesets). C2 NOT MET:format_markdownreproduces only Prettier's table alignment; authored Markdown syntax or whitespace (*,_, double spaces, tabs, line breaks in list items, stray backticks,\|) is rewritten by Prettier and not by the port (931 accepted / 909 differing in formatted Markdown on a special-character alphabet, 0 on a safe alphabet); a row with an extra cell lost a cell silently. C3 NOT MET: a CR in a label gives an undeclared tree difference (xmldom raw CR vs core ). Notes: emoji refusal set wider than emoji; tree fallback ignores prolog/comments/PIs; stale test comment; quadratic renderers. - Security (
.claude/audits/2026-10-23-rust-r5-review-security.md): MEDIUM tree fallback too wide (stylesheet PI, comments, encoding change accepted as "declared"); LOW XML-invalid characters reach the drawings unchecked; LOW Markdown structure injection (rationale forging a section, CR,\|); LOW quadratic renderers; LOW test allow (context). - Fixed: Markdown guard (
UnsupportedMarkdown) built from a TypeScript sweeporacles/r5/markdown-sweep.json(220 probes: 187 identical, 33 refused, 0 silent; equine-safe probes never refused;**strong**spans kept as the import report needs), single-line check of list-item fields, table cell-count check; strict drawing comparison (committed file must rebuild from its tree, rule must change it, produced equals rebuilt-after-rule byte for byte; attack test); drawings refuse XML-invalid characters and CR; renderers indexed; stale comment; docs §11.14-11.15 (guard rules, declared table, emoji breadth, residual risks).
Round 2
Fresh verifier and security on the fixed commit: below.
Round 2 on 68dec25: verifier ECARTS(2), security PASS (3 MEDIUM, 2 LOW)
- Verifier: C1, C3 to C6, C8, C9 MET. C2: silent Prettier rewrites the guard missed (inline link destinations and titles, autolinks with an entity,
[[ a ]], character references decoding to*/_), shown end to end on the equine pipeline with one appended change; §11.15 sentence on links wrong. C7:markdown-sweep.jsonnot excepted by the contract. Differential: 2,430 targeted + 4,500 random cases, 0 raw-text or drawing differences. - Security (
.claude/audits/2026-10-23-rust-r5-review-security-2.md): MEDIUM ids with line breaks (added then removed, renamed, nested, field segments) forging report sections through code spans, raw CR in code spans; MEDIUM uncapped roxmltree parse of the committed drawing before the prescan (stack overflow at depth 100,000); MEDIUM中_中/[a]( x )silent and §11.14-11.15 overstated; LOW Infinity printednull; LOW test allows (context). - Fixed: construct rules (
](,][, padded[[ ]], autolinks, character references) from new sweep probes; underscore rule ASCII-only (the sweep showedé_érewritten too); CR/TAB refused anywhere in a line; ids validated at the op (add, nested, rename) and field segments without control characters or backticks; core reader before roxmltree in the comparison;Infinity; contract clarification for the second oracle; docs (counts 247/187/60, declared rows, §11.15). Tests: forged ids, field segments, 100,000-level drawing.
Round 3
Fresh verifier and security on the fixed commit: below.
Round 3 on 077d91b: verifier ECARTS(2), security BLOCK(2)
- Verifier: C1, C3 to C8 MET; C2: 57 synthetic + 5 equine end-to-end silent cases (37,510 + 20 probed): touching strong pairs
**a****b**, bare URLs next to strong spans; C9: §11.14/11.15 claims contradicted, line and test counts, NUL exemption. - Security (
.claude/audits/2026-10-23-rust-r5-review-security-3.md) BLOCK(2): HIGH strong-span model (whitespace-only, backslash before a delimiter, touching pairs, underscore next to a delimiter), HIGH underscore glued to a bare URL; LOW NUL mid-segment, LOW trailing space latent, LOW test allows. - Root change: the denylist leaked every round → allowlist guard
curation/report_guard.rs(format_report, the draft's two reports only; the import report keepsformat_markdown): letters, digits, single spaces, a fixed punctuation set, ASCII intraword_not glued to a URL,\"and\|,**word**between spaces, no construct; everything else refused. Sweep regrown: 762 probes incl. the new families, a label alone (cell start) and 400 seeded random strings, digests only: 304 identical, 458 refused, 0 silent. NUL refused anywhere in a field segment; misplaced comment fixed; docs rewritten as an empirical guarantee.
Round 4
Fresh verifier and security on the fixed commit: below.
Round 4 on 6d4fdd6: security BLOCK(3) (verifier pending at fix time)
- Security (
.claude/audits/2026-10-23-rust-r5-review-security-4.md): HIGH non-terminated / long character references (* b→\*,< x &→< x <), HIGH image references, HIGH nested padded wiki links ([[ a [[b]]); MEDIUM §11.14/§11.15 overstated ("unknown form refused by default", "refused whole", "found none"); LOW quadratic underscore check. Control: 3,000 random strings without&,![,[[: 0 silent. - Fixed:
&admitted only before a space or as a URL query separator&name=(name not a legacy-reference prefix, the 106 HTML legacy names);![refused; padded[[/]]refused when the matching half exists; URL checks without allocation; sweep 782 probes (new families, random alphabet with&#,&,<,![,[[,]]): 279 identical, 503 refused, 0 silent; docs restated exactly. - Verifier round 4 (on
6d4fdd6, arrived after the security fixes): C2 cross-code-span families: a plain_paired by remark with a closing_in a later code span (to_do … \ref_`,a_b `c_`; reachable without authored backticks through a reference idref_), a link bracket and a bare URL running into an authored code span; C9 docs (code spans "generated", "refused by default"); floor.skip(1)` hit in a test. 555,646 Prettier context docs: all pairs and triples of admitted characters 0 silent; 1,080 silent with authored code spans. - Fixed: authored backticks refused in every authored field (
report_guard::assert_authored, CHANGELOG cells and review list items); a plain_followed by a closing_in a later code span refused (the equine{"min_x":…,"min_y":…}stays admitted); sweep: referenceprobe_ref, three probes citingprobe_ref_, five cross-span probes: 790 probes, 279 identical, 511 refused, 0 silent; floor hit rewritten (match_indices); CLAUDE.md folder line; docs and module header restated.
Round 5
Fresh verifier and security on the fixed commit: below.
Round 5 on 1b12d90: verifier ECARTS(2), security PASS (2 MEDIUM, 3 LOW)
- Verifier: C1, C3 to C8 MET. C2: 59 silent of 306,192 probes, all one class: a wiki link opened in one list-item field and closed in another of the same line (code spans between). C9: draft line count (4,376, gain 1,468), report_guard.rs line count, wiki rule wording.
- Security (
.claude/audits/2026-10-23-rust-r5-review-security-5.md): MEDIUM F2 the same wiki link across fields; MEDIUM F1 an authored field segment (name.x]) inside a generated code span closing an author's[; LOW docs "code spans are the generator's alone" wrong (segments are authored); LOW quadraticin_url_tokenand padded-wiki scans; LOW test allows (context). - Fixed: field segments limited to
[A-Za-z0-9_-]at the op (declared refusal; TypeScript accepted any); code spans admit only the generator alphabet[A-Za-z0-9_:/. -]; list-item fields refuse[[,]],{%,%}whole; plain parts refuse{%/%}; URL-token membership in one pass, padded wiki through one find/rfind; sweep 798 probes (eight cross-field construct pairs): 268 identical, 530 refused, 0 silent; segment refusal test with its reason; docs counts (draft 4,385, gain 1,477, report_guard.rs 258) and rules restated.
Round 6 on aeb5050: verifier C1 to C8 MET (C9 unverifiable: gates run in parallel; 8 FLOOR lines = keywords quoted in audit prose), security PASS (1 MEDIUM, 6 LOW); pnpm check:all green 14:02:00
- Verifier: 0 silent over 100,000 guard probes × 3 contexts, 45,000 cross-field pairs (28 guard-level, all stopped first by
assert_single_line), 32,000 end-to-end changesets TS vs Rust, 148,921 letter/digit code points in a cell. Observations: staledraft/mod.rsheader; RUST.md:format_markdowngained the cell-count refusal (import report too), "combining marks" wording (alphabetic marks pass, aligned alike); declared emoji case skipped its review report and drawings; TODO R5.4a citesformat_markdown. - Security (
.claude/audits/2026-10-23-rust-r5-review-security-6.md): MEDIUM CHANGELOG table amplification (rows × widest cell: +155 KB changeset → 1.09 GB, 2.2 GB RSS; TypeScript alike); LOW per-view drawings bounded only by the value bound (≈2 GB estimate); LOWunderscore_pairs_laterO(parts × length) in isolation, unreachable (≤2 authored parts per line); LOW invisible Hangul fillers admitted (Prettier keeps them); LOW unpadded[[x]]in a cell by design; LOW test allows (convention). - Fixed: aligned table bounded at 32 Mi display columns before any row is built (
Guard, testan_aligned_table_past_the_bound_is_refused_before_it_is_built; equine widest ≈0.5 MB), declared in §11.14; residual risks (drawings bound, Hangul fillers) in §11.15;draft/mod.rsheader; RUST.md wording (format_markdown shared refusals, alphabetic marks); declared emoji case now holds its review report (same text or declared refusal) and drawings; TODO R5.4a.
Round 7 on 777c800: security BLOCK(2) (verifier pending at fix time); pnpm check:all green 14:43:14
- Security (
.claude/audits/2026-10-23-rust-r5-review-security-7.md): HIGH output amplification: the CHANGELOG raw table (rows × authored rationale) built whole before the round-6 bound (1.9 MB changes.json aborts at 3 GB), RUST.md "refused before any row is built" false; HIGH record amplification: rename/remove records deep-copy the whole item and clone the change texts, no total bound (400 renames of a 5,000-child item → 4.3 GB). LOW test allows, bin allow (context), error echo size, subfolder race (declared out of model). - Fixed: records bounded in total (
apply::MAX_RECORDED_WEIGHT16 Mi units,records::record_weight, checked after every op; equine 1,084,422), testthe_records_cannot_outgrow_their_bound; CHANGELOG tables projected from their cells before the raw table is joined (markdown::assert_table_bound), pipeline-level testa_changelog_whose_alignment_would_explode_is_refused_before_it_is_built; RUST.md rows rewritten exactly, residual risk (one op's copies before the check).
Round 8 on 5880dfa: security BLOCK(1) (verifier pending at fix time); pnpm check:all green 15:02:04
- Security (
.claude/audits/2026-10-23-rust-r5-review-security-8.md): HIGH records bound checked only after a whole op and after the B/C marking: one op records once per item, each record cloning the change texts and the op value (B add of 10,000 children + 128 KiB rationale → 1.37 GB; subtree set 64 KiB → 2.0 GB; subtree cite 4,000 refs → 2.1 GB); RUST.md "tens of MB at most" false. MEDIUM review drawings per view (≈273 KB each view, 2,000 views → 547 MB). LOWrecord_weightignored the op for cite/rename/remove/move; LOWTriggerNames::applylinear view search; LOW test allows, bin allow (context). - Fixed: the records weight charged at each record before the change and the op are cloned (
records::charge,RecordParts;Recorder::recordandmark_to_confirmreturn the refusal; op weight for every kind; equine 1,195,000), testthe_records_bound_holds_inside_one_op_and_the_marking; document bound test from a padded baseline (the records bound now stops a growing changeset first); review drawings projected and bounded at 64 MiB before rendering (pipeline::MAX_REVIEW_DRAWINGS_BYTES), testreview_drawings_past_their_bound_are_refused_before_rendering; RUST.md rows and residual risks rewritten exactly.
Round 9 on 8bdb079: security BLOCK(1) (verifier pending at fix time); pnpm check:all green 15:24:59
- Security (
.claude/audits/2026-10-23-rust-r5-review-security-9.md): HIGH records weight undercount: the change's reference ids at one unit per byte while each cloned id costs ≈56 bytes (200,000 one-character ids × 100 set ops: 948 MB before the bound; 16.4 MB file: 1.67 GB). MEDIUMparse_changeset≈65× the input (1.075 GB at 16.4 MB; R5.3, outside the diff); MEDIUM guardrails WARN in a migration outside the diff; LOW test allows. Not covered: markers and labels bound of the drawings. - Fixed: every cloned string (texts, ids, op strings, object keys) weighs 64 + its bytes (
records::text_weight; equine 1,965,944, bound 8.5× above); ids case added tothe_records_bound_holds_inside_one_op_and_the_marking; parse amplification declared in §11.15 (owner decision on a lower input cap); RUST.md row updated.
Round 10 on 29eb499: verifier C1 to C8 MET, C9 NOT-MET (stale counts) + 10 FLOOR (audit prose), security BLOCK(1); pnpm check:all green 15:38:01
- Verifier: 47,470 TS-vs-Rust Markdown cases 0 silent (the unguarded aligner gave 34 on the same inputs), 117 SVG label cases bytes or declared rule. C9: RUST.md counts stale (review tests 9 → 10, suites, draft lines 4,385 → 4,532) and the
report_guard.rsheader ("anything but CR or tab" inside code spans). Info: "<before a letter" means an ASCII letter; number cells 24 bytes where a JS number prints 25. - Security (
.claude/audits/2026-10-23-rust-r5-review-security-10.md): HIGH the drawings bound counted the cleaned drawing only: an unnamed trigger copies the opened view's names four times (485 KB changeset → 131 MBapp-main.svg; 1.2 MB → abort at 3 GB). LOW tables bound per table (three level tables ≈97 MB together); LOW stalereport_guard.rsheader; LOW add/move position anchor not charged; LOW test allows. - Fixed: drawings projected as an upper bound per annotation (
pipeline::review_drawings_bytes: 1,024 + 24 × (JSON text + longest view name) per annotation of the view, overlay's two documents and the app drawing; equine 1,390,428), testunnamed_triggers_repeating_a_long_view_name_are_refused_before_rendering; CHANGELOG tables bound summed over the three level tables (assert_table_boundwith a running total), number cells 25; position anchor charged (equine records 1,966,163);report_guard.rsheader; RUST.md counts (draft 4,600 lines, tests 11/2/18/5/3/7), ASCII letter wording, rows rewritten.
Round 11 on 411e105: verifier C1 to C8 MET, C9 NOT-MET (2 gaps) + 10 FLOOR (audit prose), security PASS (2 LOW); pnpm check:all green 16:02:45
- Verifier: own differential 64,000 changesets TS + Prettier vs Rust, 0 silent, 0 raw mismatch; bounds far below their limits on equine and synthetic oracles; adversarial projections held except one. C9: (a) draft line count 4,600 → 4,601; (b)
review_drawings_bytes477 bytes under what is written for a change removing every annotation (fixed parts of each drawing, layer group, overlay group and legend, never charged). Obs: test comment cites §11.12 for the emoji refusal (§11.10/§11.14). - Security (
.claude/audits/2026-10-23-rust-r5-review-security-11.md): PASS. 146,000 random cases vs Prettier, 44,330 admitted, 0 differ; drawings wrote 0.12 to 0.41 of the projection on hostile documents. LOW test allows (convention); LOW bare URLs autolinked in any authored field (visible text = target, TypeScript alike: owner choice). - Fixed: 4,096 bytes per drawing for its fixed parts (
pipeline::DRAWING_FIXED_BYTES; equine projection 1,406,812 for 564,239 written), testthe_drawings_projection_bounds_what_is_written(equine and no annotations); RUST.md counts (4,606 lines, review 12 tests); test comment sections.
Round 12 on c4e717d: verifier C1 to C8 MET, C9 NOT-MET (1 doc gap) + 12 FLOOR (audit prose, reported apart); pnpm check:all green 16:41:34
- Verifier: own differential 37,264 cases (32,000 random biased to the admitted alphabet, 5,264 handcrafted placements), 0 silent, 0 raw difference; drawings projection ≥ written on 8 adversarial drafts (tightest margin 15,477 B, no annotations); every figure of §11.14/§11.15 checked exact. C9: the emoji refusal is named at the aligner (
UnsupportedWidth) in RUST.md (synthetic case line, pictograph row) and the TS generator comment, while the report guard refuses first (UnsupportedMarkdown);UnsupportedWidthapplies in the draft reports only to alphanumeric candidates (Ⓜ, 🅰) and in IMPORT-REPORT. - Fixed: the two RUST.md passages and the generator comment (oracle unchanged, generator green in check mode).
- Security (
.claude/audits/2026-10-23-rust-r5-review-security-12.md): PASS. 7,200 random changesets through both real pipelines (898 admitted, 0 raw and 0 formatted differences), 73,000 template cases (38,378 admitted, 0 differ), display width on every code point U+0020 to U+10FFFF, guard linear on stress lines. LOWunderscore_pairs_laterquadratic, unreachable (≤2 authored plain parts per line); LOWreview_drawings_bytesviews × annotations (≈2 s at the value bound); LOW test allows (convention); LOW §11.15 parse residual nameschanges.jsononly (references.jsonsame parser). - Declared: the four LOWs in §11.15 (no code change: a fix would restart the gates; owner decision).
Round 13 on 88e4274: verifier C1 to C8 MET, C9 NOT-MET (doc wording) + 13 FLOOR (audit prose, product paths clean)
- Verifier: 2,290 new probes TS + Prettier vs Rust, 0 silent; widths of 149,106 alphanumeric code points equal Prettier's (123 refused); drawings bound held on escape probes; every figure exact. C9: §11.14 says the synthetic oracle covers "references with URL and DOI" and "a level C question per priority" (no URL, no medium priority there; both covered by the equine report);
&name=admitted only when the name starts with an ASCII lowercase letter. Notes:markdown.rscomment "the one glyph wider than its bytes" inaccurate;scripts/import-equine.shheader "(R5.2, R5.3)". - Fixed: the three wordings, the comment, the script header.
Round 14 on eb667ad: verifier C1 to C9 MET, ECARTS(13) = FLOOR only (audit prose quoting suppression keywords; product paths clean on c6e0d85 and develop)
- Verifier: own differential 17,634 changesets TS + Prettier vs Rust, 12,212 report pairs identical, 22,928 refused, 0 silent, 0 raw difference (planted mutation detected); SVG differential 65 changesets, 236 drawings byte-identical, 4 under the R3 rule, 0 undeclared; every figure exact;
git diff c4e717d..HEADchanges no executable line. Notes: emoji test accepts either refusal kind (code gives UnsupportedMarkdown); CLAUDE.md "Next: R4, R5" stale (pre-existing); RUST.md §11 heading lists up to R5.3. - Closing the 13 FLOOR lines needs a contract Clarification (owner); audit records stay append-only.