Skip to content

Commit c426547

Browse files
authored
Merge pull request #1013 from AdaWorldAPI/claude/phase2-r2il-frontier
Phase 2: R2IL typed receipts — happy-path RL would have learned the clobber
2 parents 794598a + ef91b30 commit c426547

3 files changed

Lines changed: 490 additions & 0 deletions

File tree

.claude/board/EPIPHANIES.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
1+
## 2026-08-23 — E-HAPPY-PATH-RL-WOULD-HAVE-LEARNED-THE-CLOBBER-1 — R2IL machine-state receipts are the falsification substrate the toy Phase-1 world could not provide
2+
3+
**Status:** FINDING — [MEASURED] (`PROBE-R2IL-FRONTIER-PHASE2-1`, 7/7).
4+
**Phase 2 of 2** — Phase 1 is `E-THE-FRONTIER-LEARNER-IS-ALREADY-SHIPPED-1`
5+
(the loop = shipped `revise` + `Stamp` + CHOICE, nothing new). This entry
6+
lifts that loop onto R2IL-shaped typed behavior ops and measures what the
7+
richer vocabulary BUYS.
8+
**Confidence:** High for the mechanism; the machine is a 4-register toy and
9+
both oracles are probe-local (stated) — no claim about real binaries until
10+
real `FunctionBehavior` episode streams are measured.
11+
12+
**The headline (gate R6):** a "reckless" candidate macro computes the RIGHT
13+
value into the WRONG register, clobbering callee-saved `r3`. The deliberately
14+
sloppy happy-path oracle ("the doubled sum exists in SOME register") rewards
15+
it until its NARS expectation reaches **e = 0.812 — ABOVE the 0.75 trust
16+
bar** — and it is refused ONLY by the falsification intervention that checks
17+
the actual contract (result in `r2` AND `r3` bit-preserved). Happy-path RL
18+
would have learned the clobber. The falsification-first admission predicate
19+
(`LearnedSurvivedTests`, #1011 F6) is not a nicety at the R2IL level — it is
20+
the difference between a learned macro and a learned bug.
21+
22+
**Why R2IL is richer (gate R1, measured not asserted):** Phase 1's op
23+
vocabulary was style-local labels; R2IL's `FactKind` discipline
24+
(Op / OperandIn / OperandOut / Edge / MemUse / MemDef / Predicate /
25+
CallSite, mirrored from `ruff_r2il` at ruff `origin/main`) gives every op a
26+
typed operand signature over Varnodes (space→offset→size). That is what
27+
makes BEFORE + TYPED EDIT = AFTER checkable at the MACHINE-STATE level
28+
(gate R2: `(7+5)*2 = 24` lands in `r2`, `r3 = 0xDEAD` preserved,
29+
byte-identical replay) — the #1001 typed-receipt law extended to behavior.
30+
31+
**The other gates:** R3 arms the trap (the sloppy signal raises BOTH
32+
explorers' trust — reckless reaches e > 0.9); R4 the intervention admits
33+
the lean macro and refuses the reckless one; R5 dispatch flips to the
34+
cheaper PROVEN macro (2 ops); R7 fences with MEASURED sizes — `Vn` = 8 B,
35+
`R2Op` = 28 B, `MachState` = 32 B. The R7 sizes are measured, not guessed:
36+
the gate's first run FAILED on hand-guessed sizes (12/40), which is the
37+
gate working.
38+
39+
**Honesty box:** toy 4-register machine; both oracles probe-local; the
40+
R2IL shapes are a cited probe-local MIRROR (ruff is a separate cargo
41+
workspace — never imported); real-corpus `FunctionBehavior` episode streams
42+
are NAMED, NOT BUILT (absent from this checkout); the V4 plane classid
43+
remains provisional (O5 gate); the widened R2IL × BPE / OGAR-loco / V4
44+
synthesis stays a three-IF hypothesis — nothing here mints, reserves, or
45+
decides it.
46+
47+
**Files:** `crates/lance-graph-planner/examples/probe_r2il_frontier_phase2.rs`.
48+
149
## 2026-08-23 — E-THE-FRONTIER-LEARNER-IS-ALREADY-SHIPPED-1 — thinking styles are microcode; Autopoiesis-frontier reinforcement is NARS revise + CHOICE, and needs no new subsystem
250

351
**Status:** FINDING — [MEASURED] (`PROBE-STYLE-MICROCODE-FRONTIER-1`, 9/9).

.claude/board/INTEGRATION_PLANS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## 2026-08-23 — STYLE-MICROCODE FRONTIER, PHASE 2 (R2IL typed ops; the falsification intervention is load-bearing)
2+
3+
`PROBE-R2IL-FRONTIER-PHASE2-1` (7/7) lifts the Phase-1 frontier loop
4+
(revise + Stamp + CHOICE — nothing new) onto R2IL-shaped typed behavior
5+
ops (probe-local mirror of `ruff_r2il` FactKind/Varnode discipline; ruff
6+
never imported). Result: typed operand signatures make BEFORE + TYPED
7+
EDIT = AFTER checkable at machine-state level, and the headline R6 gate
8+
shows a reckless macro (right value, wrong register, clobbers callee-saved
9+
r3) driven to e=0.812 — above the trust bar — by a sloppy happy-path
10+
oracle, refused ONLY by the falsification intervention. Happy-path RL
11+
would have learned the clobber. Sizes in the fence gate are MEASURED
12+
(Vn=8B, R2Op=28B, MachState=32B; first run failed on guesses — the gate
13+
working). Next measurement (named, not built): real FunctionBehavior
14+
episode streams from the ruff-side corpus. Entry:
15+
`E-HAPPY-PATH-RL-WOULD-HAVE-LEARNED-THE-CLOBBER-1`.
16+
117
## 2026-08-23 — STYLE-MICROCODE FRONTIER, PHASE 1 (learner = revise + CHOICE; Phase 2 = R2IL, recorded)
218

319
`PROBE-STYLE-MICROCODE-FRONTIER-1` (9/9) maps the operator's intent —

0 commit comments

Comments
 (0)