Skip to content

Commit 4ec1e1b

Browse files
authored
Merge pull request #1014 from AdaWorldAPI/claude/r2il-real-episodes
Real FunctionBehavior episodes: opcode matching over-admits 99.7% on real code
2 parents c426547 + 61df907 commit 4ec1e1b

3 files changed

Lines changed: 552 additions & 0 deletions

File tree

.claude/board/EPIPHANIES.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
1+
## 2026-08-23 — E-REAL-CODE-INTERLEAVES-THE-OPCODE-MACRO-IS-NOT-A-DATAFLOW-PIPE-1 — the real FunctionBehavior episode measurement: 99.7% over-admission by opcode matching, and three structural facts the toy could not show
2+
3+
**Status:** FINDING — [MEASURED] (`PROBE-R2IL-REAL-EPISODES-1`, 5/5, run
4+
against the REAL ruff-side R2IL pass-1 harvest: 143 functions from real
5+
x86-64 ELF64 binaries, 17,557 typed FlatFact rows, provenance FNV-pinned in
6+
ruff's committed `.claude/harvest/r2il/PROVENANCE.md`; bulk stream from the
7+
ruff GitHub Release `r2il-harvest-pass1`).
8+
**This closes the named-not-built item** from
9+
`E-HAPPY-PATH-RL-WOULD-HAVE-LEARNED-THE-CLOBBER-1` — the corpus was fetched,
10+
never fabricated; the probe is env-gated (`R2IL_ORE_TSV`) and exits CORPUS
11+
ABSENT rather than synthesize.
12+
**Confidence:** High for these binaries at the pass-1 seven-opcode
13+
convention; a 2-binary/143-function corpus is not "all real code."
14+
15+
**Headline (E5):** of 380 real occurrences of the top recurring opcode
16+
trigram `(int_add, copy, store)`, exactly **1 is dataflow-chained** and 379
17+
are NOT — a happy-path opcode matcher over-admits **99.7%** on real code.
18+
Context base rate: 31.5% of ALL adjacent op pairs are def-use linked (SSA
19+
coverage is total — 0 of 11,653 operand rows lack a ValueId — so this is a
20+
dataflow fact, not missing coverage). The top idiom chains far BELOW base
21+
rate: it is an ADDRESSING idiom (address computed, value staged, store
22+
issued to memory), not a dataflow pipe. Real code interleaves independent
23+
chains; **sequential adjacency is not composition**. The Phase-2 R6 toy
24+
result (happy-path RL learns the clobber) is thus confirmed at real scale
25+
and sharpened: on real machine code the macro carrier must be the DEF-USE
26+
CHAIN, never the linear opcode window.
27+
28+
**Refuted pre-registration, recorded (E3):** "real top-1 trigram count >
29+
shuffled" FAILED (380 vs 387) — shuffling a copy/int_add-dominated marginal
30+
CREATES monotone `(copy,copy,copy)` runs. The real structure is
31+
TYPE-COLLAPSE: 97 distinct trigram types vs 264 under shuffle (>2.7x), and
32+
the top-10 types carry 50.5% of real occurrences vs 33.6% shuffled.
33+
Recurring idioms are real; top-1 occurrence count was the wrong statistic.
34+
35+
**The stamp ceiling BINDS at real scale (E4):** with 143 episodes and
36+
`Stamp`'s 64 bits, every widely-recurring macro measurably drops evidence —
37+
`(int_add,copy,store)`: 64 revised, 23 CHOICE-dropped (e=0.999). The
38+
modulo-64 conservatism is no longer a footnote: at real corpus size it
39+
discards ~26% of the evidence for the widest idiom. Conservative (never
40+
double-counts), but a real capacity note for Step-2's stamp residue item.
41+
42+
**Reader validity (E1/E2):** the probe-local TSV reader is cross-validated
43+
against ruff's INDEPENDENTLY COMMITTED census — 17,557 rows, 5 kinds, 9
44+
opcodes, all counts exact; 143 episodes across 2 binaries, 5,340 ops
45+
partitioned. One misread caught by the gate: the TSV's kind column carries
46+
CamelCase variant names, not Census's snake_case (the first E1 run failed —
47+
the gate working).
48+
49+
**Fences:** no `ruff_r2il` import (separate cargo workspace; schema cited,
50+
E1 catches misreads); reading the evidence TSV here is a measurement, not a
51+
re-ingest into ruff's pipeline; no mint, no BPE, no learner subsystem; the
52+
R2IL x BPE / OGAR-loco / V4 synthesis remains a three-IF hypothesis.
53+
54+
**Files:** `crates/lance-graph-planner/examples/probe_r2il_real_episodes.rs`.
55+
156
## 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
257

358
**Status:** FINDING — [MEASURED] (`PROBE-R2IL-FRONTIER-PHASE2-1`, 7/7).

.claude/board/INTEGRATION_PLANS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 2026-08-23 — R2IL REAL-EPISODE MEASUREMENT (closes the Phase-2 named-not-built item)
2+
3+
`PROBE-R2IL-REAL-EPISODES-1` (5/5) runs the frontier loop against the REAL
4+
ruff-side harvest (143 functions, 17,557 typed facts, Release
5+
`r2il-harvest-pass1`; env-gated, never fabricated). Measured: opcode
6+
matching over-admits 99.7% on the top real idiom (1/380 dataflow-chained vs
7+
31.5% adjacency base rate) — the macro carrier must be the def-use chain,
8+
never the linear opcode window; real streams collapse to 97 trigram types
9+
vs 264 shuffled (the top-1-count pre-registration was refuted and is
10+
recorded in place); the Stamp mod-64 ceiling BINDS at 143 episodes
11+
(~26% evidence CHOICE-dropped for the widest idiom — feeds the Step-2 stamp
12+
residue item). Reader cross-validated against ruff's committed census,
13+
exact. Entry: `E-REAL-CODE-INTERLEAVES-THE-OPCODE-MACRO-IS-NOT-A-DATAFLOW-PIPE-1`.
14+
115
## 2026-08-23 — STYLE-MICROCODE FRONTIER, PHASE 2 (R2IL typed ops; the falsification intervention is load-bearing)
216

317
`PROBE-R2IL-FRONTIER-PHASE2-1` (7/7) lifts the Phase-1 frontier loop

0 commit comments

Comments
 (0)