7.5 KiB
7.5 KiB
Verification: Rust R5.3 draft pipeline (2026-10-22)
Contract .claude/tasks/contracts/2026-10-22-rust-r5-draft.md. Fresh verifier, report-only (persisted by the orchestrator: the agent has no write tool).
Pass 1: ECARTS(1)
- C1 to C12 MET, each with code references and proofs run by the verifier:
cargo test --features curation --test curation_draft6/6,curation_legacy5/5, the whole crate with--features curation --locked22 suites green, clippy-D warningsclean, fmt clean,import-equine --check12 files 0 differences (git status unchanged),--outinto amktemp -dfolder thendiff -r(legacy identical; draft identical but the three R5.4 entries), produceddocument_sha256=27c7383c…2660= sha256 of the produceddocument.json, 8 refusal and success probes of--out, anatomy 142/142, domain 262/262,tsc --noEmitclean. - C13 partial by design:
pnpm check:alland the security gate were the orchestrator's (both green / PASS); docs present (RUST.md §11.12 and §11.13, CHANGELOG, CLAUDE.md). - Gap: the floor scan flagged the plan heading of §B.3.5 (
.claude/tasks/plans/2026-10-22-rust-r5-pipeline-core.md:94, pre-existing at HEAD, R5.1), whose status words read as an unfinished marker. Resolved: heading reworded to "(approved at A.5, applied at R5.6)", the status BDR-068 records. - Semantic fidelity (beyond the declared
setwithoutvalue): no reachable divergence. Four unreachable ones: (1)id_textprinted a non-string id as JSON text; aligned onjs_string(String()); (2)trimEndstripped U+0085; aligned on the core's exact JavaScript white-space set (is_js_space); (3) an added item with anullchild: TypeScript throws at the op, Rust refuses at the shape gate (both refuse; kept, declared in RUST.md §11.12); (4) a position beyond 2^64: both refuse "out of range", the printed number differs (kept, declared). - Reproduced quirks:
stripslices eight UTF-16 units ofop.to;apply_recordreadsrecord.opwhatever the record target (declared observation, RUST.md §11.12).
Pass 2: ECARTS(3)
- C1, C3 to C12 MET (proofs rerun: fmt, clippy, curation_draft 6 + curation_legacy 5,
--check12 files 0 differences, 11--outprobes incl. a symlinked parent printing the canonical path and a dangling symlink refused,diff -r, anatomy 142, domain 262). - C2 NOT MET: JSON
nullon the optionalscope(set, cite),position(add, move) andfield(add) parsed as absent by serde; Zod.optional()refused it. Not reached by the committed changeset. C13 NOT MET on the same root (undeclared). Fixed: those fields deserialised throughjs::present(absent accepted,nullrefused); three refused synthetic casesschema-null-{scope,position,field}added to the generator (58 cases: 9 compared, 49 refused alike). - Floor: the pass 1 record above quoted the flagged words; reworded.
- Fidelity details, outcome-identical: re-homing candidates on a
Vecwhere TS used aSet(aligned: deduplicated);annotation_namesreads a non-string name as empty, duplicate ids first-wins (kept: the legacy import writes strings and unique ids); unlisted counter keys keep insertion order (kept: enum strings);parseViewBoxerror quoting (kept: both refuse). - Doc line count corrected (2,689).
Pass 3: ECARTS(4) (first attempt stopped by an API credit error before any check; rerun on Opus)
- C1, C4 to C10, C12 MET (fmt, clippy, curation_draft 6 + curation_legacy 5,
--check12/0,--out+diff -r, anatomy 142, floor clean, a TypeScript probe of 14 changesets and 2 references files). - C2: three accept/refuse splits at parse, undeclared: (a) a repeated key outside
opsrefused by serde's derive whereJSON.parsekeeps the last value; (d) a lone surrogate escape; (e) nesting deeper than 128. Fixed (a): both files parsed throughjs::parse_jsonthen read into the typed shape (testa_repeated_key_keeps_its_last_value_as_json_parse_does); declared (d), (e) in RUST.md §11.12. - C3: (b) a field path ending in
__proto__: TypeScript swallowed the write, Rust refuses at the gate: declared. (c) an authored"\u0000touched"key: TypeScript refused at the gate, Rust took it for a touch mark and the cleanup dropped it silently: a defect, fixed by refusing any NUL-prefixed key in the changeset at parse (testa_reserved_touch_mark_key_in_an_authored_value_is_refused). - C11:
--out <symlink>/(trailing slash) followed the link into an empty folder: fixed, the destination is rebuilt from its components before the symlink check (probed:alink/andalink//refused, rc 2, target left empty). - C13: the splits above undeclared, and §11.13 claimed a leftover mark would be refused by the gate while the cleanup removed it: both corrected.
- The verifier asked the orchestrator to run a probe harness it had written in the scratchpad (its own run was refused by the permission layer); not run: the cases are covered by the tests above and the declared table.
Pass 4: ECARTS(1), on C13 only
- C1 to C12 MET (fmt, clippy, curation_draft 8 + curation_legacy 5,
--check12/0,--out+diff -r, refusal probes incl.symlink/andsymlink/.rc 2,pnpm r5:import-equine --checkrc 0, anatomy 142, floor clean). - C13: undeclared (a) invalid UTF-8 in changes.json / references.json: TS lossy, Rust refused. Fixed:
read_textlossy, as R5.2 kept for the catalog. Declared: (b)1e400in a discarded value, (c) an inheritedObject.prototypemember in a field path; corrected (c') the NUL-key row, (d) test and line counts (8 tests, 2,718 lines). - Notes kept: synthetic refusals assert
is_erronly (the contract asks no reason);scripts/import-equine.shcalled directly without INIT_CWD resolves a relative--outfrom the repository root (pnpm sets INIT_CWD). - Not re-verified by a fresh verifier after these corrections (docs plus the one-line lossy read);
pnpm check:allrerun green on the final code (00:10:03),--check12 files 0 differences.
Final round on 8654905 (owner 2026-10-23: fresh verifier on C1 to C13 + fresh security)
- Verifier ECARTS(2): C3 and C13, one defect. A
setfield path whose segment starts with NUL (name.\u0000touched, any settable holder, self or subtree) was written and then stripped with the touch marks: author value lost, a record claiming the write; TypeScript refused it at the gate. C1, C2, C4 to C12 MET (15 + 200 tests,--check0/12, 14 destination probes, floor clean). - Security PASS (
.claude/audits/2026-10-23-rust-r5-draft-security-final.md): MEDIUM-1 a 20,000-segment field path (40 KB changes.json) overflowed the stack; MEDIUM-2--outwrites not exclusive after the claim; LOW-1 the NUL field path (same as the verifier); LOW-2..and parents created before a failed claim; LOW-3 a destination inside the seed accepted; LOW-4 INIT_CWD and direct-run base; LOW-5 non-UTF-8 argument panic; LOW-6 clippy disallowed list partial (pre-existing); LOW-7 the test allow line (convention). - Fixed: NUL segment refused at the op (
reserved key); field paths capped at 8 segments; document depth capped at 64 levels after every op (iterative walk);--out:..refused, parent must exist, destination inside the seed refused, destination printed before writing, every foldercreate_dir, every filecreate_new;args_os. Documented: direct-run base (LOW-4). Kept: LOW-6 (pre-existing lint scope, out of R5.3), LOW-7 (test convention). Tests added: field-path refusals and 20,000 segments refused without crash, 40 nested adds refused at the bound, 8--outrefusals against the built binary with nothing written. - Next: a fresh verifier and a fresh security audit on the fixed commit.