RQ-59-FRESHNESS (#977): all 48 named stale-artifact sites converted — freshness coverage 7/58 -> 58/58 - #1028
Merged
Merged
Conversation
…y gates Convert the 10 highest-stakes remaining compile-then-parse sites — the flip-gate family whose assertions COMPARE two artifacts (off vs on): a stale read there does not fail, it re-confirms last run's golden as this run's rollback evidence. Converted through artifact_guard (unique-per-call path + remove-first + status/exists/non-empty, #1006 — no second guard written): base_cse_flip_468.rs, const_cse_reduction_242.rs (2 sites), flag_flip_wave_242.rs, spill_realloc_242.rs, rv32_cmp_select_flip_472.rs, rv32_local_promo_flip_472.rs, volatile_segment_flag_543.rs, volatile_segment_phase2_543.rs, vcr_ver_001_gate_242.rs. artifact_guard grows compile_artifact_with_output (compile_artifact now delegates to it) for spill_realloc_242's SYNTH_SPILL_REPORT stderr asserts — same guard, same order, one implementation. Oracle: all 9 files' gates pass with their pinned goldens UNCHANGED (base_cse sha256 pair, const_cse FNV pair) — the artifacts read are byte-identical to pre-conversion, so no emitted byte moved. Silent-direction demonstration (freshness_guard_refuses_stale_flip_artifact_977): a planted VALID ELF parses and carries .text (the old shape WOULD have passed), then a failing compile at that path must be refused naming the compile — not the parser — and must leave nothing at the path. Refs #977 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
…tion gates Convert 9 sites across 6 files whose stale read would re-certify validator or attestation evidence: vcr_ver_003_addr_777.rs (gale #757 regression gate + a new compile_read for the three RV32 .wasm_data read-back tests; section_bytes(path) became section_from_bytes(bytes) so nothing parses a path a previous run may have populated; the stderr-only compile() stays for refusal tests that never read an artifact), proven_safe_bounds_901.rs (3 sites — the elision ATTESTATION sidecar derives its path from the elf path, so the unique elf path makes the sidecar fresh by construction; per-call artifacts removed after read), size_attribution_390.rs, parity_benchmark_735.rs, promotion_exhaustion_fallback_474.rs, wsc_facts_ingestion_494.rs. Oracle: all 6 files green with their MEASURED pins unchanged (parity 84 B / 232 B pins, size-attribution pins, proven-safe partition costs 138/80/50, promotion-off byte-identity) — the artifacts read are the same bytes as before the conversion. Silent-direction demonstration (freshness_guard_refuses_stale_validator_artifact_977): a planted VALID RV32 object parses and carries .wasm_data (the old path-based shape WOULD have re-confirmed last run's records), then a failing compile at that path must be refused naming the compile and must leave nothing behind. Refs #977 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
…lity gates
Convert 14 sites across 10 files whose stale read would re-confirm ELF
structure, DWARF, linkability, or provenance evidence:
dwarf_debug_line_emit_394.rs (2 — the shared compile helper keeps its
fixed-path signature but goes remove-first + guarded, leaving the
artifact in place for the llvm-dwarfdump oracle; the self-contained
honest-fail site gets a unique path),
elf_tooling_637_656.rs (guard inside the path-returning helper — the
co-link test's REAL linker consumes the returned path, so the artifact
is proven fresh before it is handed out and stays in place),
multi_memory_406.rs (new guarded compile_read for the two green
structure tests; the refusal-only compile() stays),
heterogeneous_table_676.rs, cabi_arena_bind_418.rs (2 + mixed inline),
cabi_arena_realloc_linkability_418.rs, call_indirect_275_selfcontained.rs
(3 read-back sites; the two refusal sites never read an artifact),
async_intrinsics_gate.rs, provenance_reconciliation_396.rs,
provenance_introduced_origin_944.rs (the provenance SIDECAR derives its
path from the now-unique elf path, so it is fresh by construction).
Oracle: all 10 files' gates green — symbol/section/DWARF/provenance
assertions unchanged, and the llvm-dwarfdump independent-parser gate still
verifies the emitted DWARF. Silent-direction demonstration
(freshness_guard_refuses_stale_structure_artifact_977): a planted VALID
relocatable object parses and carries .synth.wasm_mem_1 (the old shape
WOULD have passed), then a failing compile at that path must be refused
naming the compile and must leave nothing behind.
Refs #977
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
…plit trio The three files #1006 named as structurally resistant — compile and read split across helpers taking a &str path, so no scan could attribute a read to its compile — turn out to be threadable as a small contained change: convert every reader (bss_size, global_slots, max_wasm_data_addend, wasm_data_addends, has_baked_pair_in_window) to take BYTES, and hand those bytes out only from a guarded compile. After this the split shape cannot recur in these files: a reader physically cannot open a path a previous run populated. multi_sp_rebase_707.rs — compile() now returns guarded bytes (both tests are read-backs); 1 site. static_downshift_678.rs — new guarded compile_read for the three read-back tests; the straddle refusal keeps the Output-returning compile() (it never reads an artifact); 1 site. static_above_sp_739.rs — compile_read + the #746 i64 inline site; the flag-honesty refusal keeps compile(); 2 sites. Oracle: all 12 tests green with their pinned structure numbers unchanged (addends 576/616/4200/2060/0x10000C, bss 584/512/4096, slot vectors). Silent-direction demonstration (freshness_guard_refuses_stale_reloc_artifact_977): a planted VALID object carries the asserted __synth_wasm_data addend (the old path-based readers WOULD have re-confirmed it), then a failing compile at that path must be refused naming the compile and must leave nothing behind. Refs #977 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
… (wast_compile.rs) The one file the v0.58 survey found already checking .exists() — but that check only ever covered the MISSING-file half of the failure; a stale valid ELF at the fixed temp path passed every structural check. Convert all 10 sites: compile_wast (the helper behind 20 conformance tests, now returning guarded bytes) and the nine inline sites (unique-per-call paths + the guarded read; each site's own status assert stays in place ahead of it). Oracle: all 32 tests green — magic/e_machine/e_type/BL-resolution assertions unchanged. Silent-direction demonstration (freshness_guard_refuses_stale_conformance_artifact_977): a planted VALID ELF passes the file's own magic and ARM e_machine checks (the old shape WOULD have passed), then a failing compile at that path must be refused naming the compile and must leave nothing behind. Refs #977 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
…ate site
fact_spec_{clamp,bounds,div}_494.rs (3 sites): same contained conversion as
the other attestation gates — unique elf path + compile_artifact_with_output
(stderr keeps feeding the certificate/decline assertions). Verified with the
fact-spec CI job's own invocation: cargo test -p synth-cli --features verify
--test fact_spec_* — all 12 tests green, including the byte-identity gates
(flag-off ≡ baseline), so no emitted byte moved.
linker_integration_test.rs (synth-backend, 1 site): NOT a compile-then-parse
— the library API generate_to_file writes /tmp/test_linker.ld and the test
reads it back, so there is no Command for the guard to wrap and no helper
was duplicated. The class is closed with the same discipline the guard
encodes: per-process-unique path + remove-first ahead of the write, so the
read can only see this invocation's output.
Refs #977
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
Refs #977 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
RQ-58-FLAKE's stated residual, closed: the 48 sites #1006 named as unable to notice a stale artifact are all converted (or, for shapes the guard does not fit, closed with the same discipline). Freshness coverage over the survey's 58 compile-then-parse sites goes 7/58 -> 58/58. No second guard was written — every conversion routes through
artifact_guard(#1006), which grew exactly one delegating variant (compile_artifact_with_output, for gates that assert on the compiler's own stderr;compile_artifactnow delegates to it).How the sites were ranked
By what a stale read would RE-CERTIFY, the way
frozen_codegen_bytes.rsre-certified the SHA-256 anchors:offvson). A stale arm silently reduces the gate to comparing last run's bytes with itself: the rollback proof for a default-on lever is re-confirmed by evidence this run never produced. These are the CI-pinned opt-out proofs the North Star table leans on.wast_compile.rswas the one file already checking.exists()(loud on the missing-file half), and the fact_spec trio needs the--features verifybuild to run its own oracle.Batches, each with its oracle and the SILENT-direction demonstration
Every batch ends green with its own pinned evidence unchanged — that is the byte-identity oracle: the artifacts the gates read after conversion are the same bytes the pinned goldens describe. Nothing the compiler EMITS changed; frozen anchors are 10/10 in the full workspace run.
freshness_guard_refuses_stale_flip_artifact_977(base_cse_flip_468.rs).wasm_datarecord bytes)freshness_guard_refuses_stale_validator_artifact_977(vcr_ver_003_addr_777.rs)freshness_guard_refuses_stale_structure_artifact_977(multi_memory_406.rs)freshness_guard_refuses_stale_reloc_artifact_977(static_above_sp_739.rs)freshness_guard_refuses_stale_conformance_artifact_977(wast_compile.rs)--features verify): 12/12 green incl. the flag-off ≡ baseline byte-identity gatesartifact_guard_*demos; the linker site is not a compile-then-parse (see below)Each demonstration proves the counterfactual the way #1006 did: (1) plant a VALID artifact minted by that batch's own compile shape and assert it parses and carries the very thing the batch's gates assert on (
.text,.wasm_data,.synth.wasm_mem_1, the__synth_wasm_dataaddend, the ARMe_machine) — i.e. the pre-conversion shape WOULD have passed on last run's bytes; (2) run a FAILING compile at that exact path; (3) require the guard to refuse naming the COMPILE (never the parser) and to leave NOTHING at the path. All five run in CI on every push, alongside the fourartifact_guard_*guard-observation tests from #1006.The structurally-resistant shape dissolved
#1006 left the trio (
multi_sp_rebase_707,static_above_sp_739,static_downshift_678) because compile and read were split across helpers taking a&strpath. The small contained change that closes it: every reader (bss_size,global_slots,wasm_data_addends,max_wasm_data_addend,has_baked_pair_in_window) now takes BYTES, and bytes are only handed out by a guarded compile. After this the split cannot recur in these files — a reader physically cannot open a path a previous run populated. No gate file was restructured beyond its own helpers.Stated remaining boundary
Output-returning helpers (multi_memory refusals, the static_* straddle/flag-honesty refusals, cabi bad-sig, call_indirect imports/skip-target, vcr_ver_003 span refusals). A few still name fixed/tmppaths, at which nothing is produced or read.linker_integration_test.rsis not a compile-then-parse — a library API (generate_to_file) writes the file; there is noCommandfor the guard to wrap and duplicating the guard was refused. Closed with the same discipline the guard encodes: per-process-unique path + remove-first ahead of the write.bash -eon ephemeral runners.Gates
cargo fmt --allclean ·cargo clippy --workspace --all-targets -- -D warningsclean ·cargo clippy -p synth-cli --features verify --all-targetsclean ·cargo test --workspaceTRUE exit 0 (146 green result lines; frozen anchors 10/10) ·cargo test -p synth-cli --features verify --test fact_spec_*12/12 ·python3 scripts/claim_check.py claims.yaml50/50 ·python3 scripts/model_coverage_audit.py --checkok. No.watadded; no compiler source touched — only how harnesses READ artifacts changed, never what the compiler emits.Refs #977
🤖 Generated with Claude Code
https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L