feat: flag audit flip-wave — RV shift-fold / dead-frame / uxth (evidence-gated)#611
Merged
Conversation
…nce-gated) Three flag audits (#242 hub lane D; gale's shift-fold discrepancy 2026-07-03 + the #592 audit's two ARM levers), all three confirmed TRUE default OFF (opt-in is_some()/is_ok() reads) and all three flipped default-on with =0 escape hatches — every gate green: - SYNTH_RV_SHIFT_FOLD (RV32): gale was right — the fold was still flag-off (the v0.11.x default-on belief was the ARM SYNTH_NO_IMM_SHIFT_FOLD lever, a different flag). Corpus sweep: 0 grow / 20 shrink (control_step 492->484 -8 B — exactly gale's esp32c3 number; flat_flight -36; flight_seam controller_step -36). RV32 anchor re-pinned 6ac5d7f9/484; signed_div_const unchanged. - SYNTH_DEAD_FRAME_ELIM (ARM, VCR-RA-002): 2-path corpus sweep 0 grow / 58 shrink (flight_seam controller_step -8, filter_step -12). ARM anchors re-pinned: flight_seam 92fd6863/706, flight_seam_flat 660c3fbc/846. - SYNTH_UXTH_FOLD (ARM, #428): 2-path corpus sweep 0 grow / 13 shrink (control_step_decide -6, uxth_fold pack -12). ARM anchor re-pinned: control_step d0907e02/294. Combined ARM sweep exactly additive (71=58+13). Refreeze ritual honored: full scripts/repro differential sweep re-run green on the new default bytes BEFORE any pin moved (55/56 PASS; sret_decide is a pre-existing flip-neutral harness discrepancy — fixture bytes identical default vs opt-out). Per-flag =0 escape hatches restore the exact prior goldens (CI-gated); older stack-fwd/spill-realloc/const-CSE/rv32-cmp-select hatches gained the composing opt-outs. New per-flag no-grow corpus gates in flag_flip_wave_242.rs; RV selector unit tests reworked to pin the folded default + drive the fold mechanism on hand-built unfolded streams. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
#242 hub lane D — three flag audits with evidence gates; all three flipped default-on.
Per-flag verdict
1.
SYNTH_RV_SHIFT_FOLD— FLIPPED (gale's discrepancy confirmed)True prior default: OFF (
env::var_os(..).is_some()opt-in insynth-backend-riscv/src/selector.rs). gale was right (#242 comment 2026-07-03) — the prior lane's "v0.11.x folds default-on" belief conflated this with the ARMSYNTH_NO_IMM_SHIFT_FOLDimm-shift fold (default-on since v0.15.0), a different flag on a different backend.--relocatable, 143 function comparisons): 0 grow / 20 shrink — control_step 492→484 (−8 B, exactly gale's esp32c3 number), flat_flight 732→696 (−36), flight_seam controller_step 452→416 (−36), call_6_7args −20/−24.shift_fold_riscv_differential.py: 21/21 vs wasmtime,.text168→148 B, 5 folds — PASS on new default bytes.6ac5d7f9…/484(was780e427a…/492); signed_div_const byte-identical (fold-inert). Escape hatchSYNTH_RV_SHIFT_FOLD=0CI-gated to restore the pre-flip bytes; the olderSYNTH_RV_CMP_SELECT=0hatch gained the composing opt-out.2.
SYNTH_DEAD_FRAME_ELIM(ARM, VCR-RA-002 #390) — FLIPPEDTrue prior default: OFF (
is_ok()opt-in inarm_backend.rs).--relocatable/direct; path-agnostic post-pass): 0 grow / 58 shrink — flight_seam controller_step 250→242 (−8), filter_step 180→168 (−12), native_pointer frame_roundtrip 46→34, leaf_caller_saved leaf3 36→28.leaf_dead_frame_differential.py: 10/10 off==on==wasmtime, frame elided 36→28 B — PASS.92fd6863…/706(was 726), flight_seam_flat660c3fbc…/846(was 866).SYNTH_DEAD_FRAME_ELIM=0alone restores the exact prior goldens (CI-gated; the sibling uxth lever is inert on these fixtures).3.
SYNTH_UXTH_FOLD(ARM, #428) — FLIPPEDTrue prior default: OFF (
is_ok()opt-in).uxth_fold_differential.py: 7/7 off==on==wasmtime — PASS.d0907e02…/294(was 300).SYNTH_UXTH_FOLD=0alone restores the prior golden (CI-gated; dead-frame inert on control_step).Combined ARM sweep is exactly additive (71 = 58 + 13): no lever interaction. The #601 local-promo HOLD precedent did not trigger — no function grew anywhere.
Refreeze ritual
Execution differentials re-ran green on the new default bytes BEFORE any golden was pinned. Full
scripts/repro/*_differential.pysweep (56 scripts): 55 PASS — 3 initially failed on missing external inputs (call_indirect_594/597 ELFs regenerated per script header, wake_path gist fetched) then passed; sret_decide is a pre-existing, flip-neutral harness discrepancy (script needs an externally supplied ELF with an undocumented invocation; with--native-pointer-abiit runs but vector (3,8,8) mismatches — and the fixture's bytes are byte-identical default vs opt-out, so not this wave's doing; worth its own follow-up issue).Gates
cargo test -p synth-synthesis -p synth-backend-riscv -p synth-cli(+-p synth-backend): 1526 passed / 0 failed — includes the newflag_flip_wave_242.rsper-flag no-grow corpus gates, the re-pinned frozen anchors, and the three new escape-hatch gates.fold_const_shifton hand-built unfolded streams (coverage independent of the wiring).cargo fmt --checkclean; clippy-D warningsclean on all touched crates.🤖 Generated with Claude Code