Skip to content

Commit beac5de

Browse files
AdaWorldAPIclaude
andauthored
rowstore: generate_with_edges — the graph-consumer wave's real, measured blocker, cleared (#13)
* Core vertical slice: docs/abi.md contract, native/lgj-abi, Java facade Ships the fully verified core of the Panama x ndarray::simd x Valhalla vertical slice (Phases A-E of the mission plan): - docs/abi.md: the normative Rust<->Java ABI contract, written before either side was implemented so both could be checked against one frozen doc instead of each other. - Five new ndarray::simd primitives (eq_u32_to_mask, gt_i32_to_mask, mask_and/mask_or(_assign), masked_sum_i32), added under ndarray's own W1a consumer contract. - native/lgj-abi: the Rust ABI crate. Generation-checked handle registry, generic SoA fixture, bulk kernels routed exclusively through ndarray::simd, 14-symbol extern "C" surface. 72/72 tests green, clippy/fmt clean, and the registry's core safety check was disable-verified (short-circuited, confirmed exactly the two guarding tests go red, restored). - java/: the Panama membrane (internal/ffm, never exposed publicly) and the public semantic facade (NativePattern/View/Predicate/ Pattern/Mask). 132/132 checks green across 8 suites, including a reflection-enforced ApiSurfaceTest that mechanically proves zero FFM types ever reach a public signature, and a LazinessTest that empirically proves the thesis: building a chain costs zero crossings, evaluating it costs exactly one, independent of row count up to 1,000,000. - .claude/: a 6-agent ensemble, 6 knowledge docs, and a full board (LATEST_STATE/STATUS_BOARD/AGENT_LOG/EPIPHANIES/TECH_DEBT/ISSUES/ PR_ARC_INVENTORY/INTEGRATION_PLANS/CODEX_REVIEW_CHECKLIST), all scoped to this repo's actual seams. A mechanical audit (D-LGJ-AUDIT) found and fixed the one real rule violation before this commit: kernels.rs::simd_popcount was calling the internal ndarray::hpc::bitwise path instead of the sanctioned ndarray::simd re-export. Deliberately NOT included: the Valhalla lab (valhalla-lab/) and the Vector API benchmark harness (bench/) — still in flight, tracked as open STATUS_BOARD.md rows, to land in a follow-up PR once reviewed with the same rigor as this slice. Generated by [Claude Code](https://claude.ai/code) * Valhalla lab: three-truths method, causal isolation, 3 real reproducers Completes D-LGJ-F. One experiment source (src/shared/), compiled twice against real JDKs -- stable JDK 26 GA (record) and the official JEP 401 early-access binary (value record) -- via a self-verifying run.sh that mechanically diffs the two Vocab.java files modulo the 'value' keyword before trusting the A/B is honest. Experiments: IdentityExperiment (semantic truth -- is identity actually unobservable), FootprintExperiment (real per-object/array/field bytes via allocation-delta + JOL where available), FfmAddressingExperiment (is the wrapper free where it touches native memory), ThesisExperiment (the mandatory headline: 65,536 rows as one native lane vs hydrated Java objects, on both platforms). Causal isolation via three additional run.sh passes: escape analysis off, and UseArrayFlattening/UseFieldFlattening toggled independently -- isolates which flag actually drives the measured difference rather than inferring it. Three real Valhalla limitations reproduced and filed under reproducers/, none of which changed the production API: - R1: @NullRestricted field on an identity class is a VerifyError (javac's fault -- no source form expresses the required strict-field init order relative to super()) - R2: array flattening has a hard 8-byte payload cliff, confirmed via -XX:+PrintFlatArrayLayout. LaneId/Ordinal/MaskId (<=8B) flatten; RowRange/Row (16B) do not. This turns "Valhalla helps descriptors, not entities" from a hand-wave into a measured VM cutoff -- and RowRange landing on the wrong side is flagged as the one place the expectation was too optimistic. - R3: the densest null-restricted array form is jdk.internal-only and generics erase flattening entirely; Foo! null-restricted type syntax confirmed not to parse, matching the earlier archaeology finding. One real defect found and fixed before landing: IdentityExperiment and the stable Platform called Class::isValue() directly on four vocabulary types with a comment incorrectly claiming it was "final API on JDK 26" -- it does not exist there at all, confirmed by a real javac failure. Fixed by routing every query through Platform.isValueClass(Class<?>), answered honestly per platform. Generated by [Claude Code](https://claude.ai/code) * Vector API bench: real JMH, cross-checked; the crossing does not always win Completes D-LGJ-G, the mission's mandated "where does execution belong" comparison -- measured, not assumed to favor the Rust crossing. Real JMH 1.37 (fork+warmup+compiler-blackholes confirmed in the log, not a hand-rolled loop -- that lives in valhalla-lab and is labelled as such there). Four components, cost kept strictly separate per the mission brief: A_DowncallOverhead (bare crossing, no work), B_SegmentAccess (raw native-memory read throughput), C_ExecutionBoundary (native fused plan vs Java Vector API vs Java scalar, swept 64 to 4,194,304 rows), E_FusionAndPlanning (fused vs unfused vs the scalar reference kernel vs plan-construction-only, swept 1-8 predicates). 50/50 rows, 0 failures. Data.crossCheck() runs in @setup and throws if the three kernels disagree on count or sum, so a faster-but-wrong Vector kernel could not have won the comparison undetected. The headline complicates the thesis honestly: for a single predicate over one native lane, the Java Vector API -- reading the SAME native MemorySegment zero-copy via IntVector.fromMemorySegment, no byte[], no bounce buffer -- beats the native crossing at EVERY row count tested, 56.4x at small sizes down to 1.3-1.4x at 4M rows. A second crossover is also real: native beats a plain Java scalar loop only past roughly 4,096-16,384 rows. Component E shows why this doesn't overturn the project's premise: SIMD-vs-scalar is the largest lever measured anywhere in this suite (10.8x-31.1x, growing with predicate count), and fused/unfused land within this harness's own ~10% noise floor of each other at 65,536 rows -- the fused plan's real value is the structural one-crossing guarantee (already proven by LazinessTest), not a large measured time saving at this scale. Verdict: the crossing is worth paying for composed, multi-predicate work, not for reading one predicate off one lane, where Java on the same memory is simply faster. RESULTS.md was hand-written from the raw CSV, then independently cross-checked against summarise.sh -- a script the same PR ships that mechanically regenerates every table from results/jmh-results.csv, so a re-run's numbers can never silently drift from a hand-transcribed table. Both productions agreed to 3 decimal places on every cell checked. Generated by [Claude Code](https://claude.ai/code) * Phase I synthesis docs + fusion-sweep 256-row re-run + board hygiene Four synthesis docs close D-LGJ-I: architecture.md (the four layers and what each is provably responsible for), panama.md (manifest-over-header, belt-and-braces ownership, restricted-method discipline), valhalla-lab.md (three-truths synthesis, the 8-byte flattening cliff, zero API adoption), execution-boundary.md (the measured crossover picture + three structural hot-path facts, each checked rather than assumed). The fusion sweep was re-run with a 256-row arm after the first pass's 'fusion does nothing' finding proved true only at 65,536 rows: at 256 rows x 8 predicates unfused/fused reaches 2.99x. RESULTS.md is rewritten from jmh-results-merged.csv; TABLES.md is mechanically generated from the same file so the two cannot drift. MultiLaneColumn (ndarray::simd_soa) evaluated for the fixture kernels and declined on two concrete API mismatches (64-byte-multiple constraint, no u32 lane); earmarked for the future 512-byte row-store slice where it fits by construction. Operator layout reference recorded on the board. PR_ARC_INVENTORY backfilled for merged PRs 1-3; the lapse is owned in the file itself. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Board: PR #4 arc entry (post-merge) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * SoA row store: 512B rows, 32 facet lanes, ABI minor 2 (W1+W2) The lance-graph-shaped substrate, wired end to end. The flat three-lane fixture was always scaffolding (docs/abi.md 10, architecture.md said so from PR #1); this is the layout the stack actually converges on: 64K x 512-byte rows, 32 facet lanes of 16 bytes = 4-byte LE classid + 12-byte payload, the V3 content-blind facet. Rust (native/lgj-abi): - rowstore.rs: one Arc<[u8]>, two readings (row-major chunks and strided facet columns), zero copies, normative SplitMix64 generator. - LGJ_RESOURCE_ROWSTORE + lgj_rowstore_open; facet lanes described through the UNCHANGED LgjLaneDesc (stride_bytes carried this since minor 1); lgj_op_eq_classid produces ordinary masks that compose with the existing algebra; lgj_row_facet_match writes per-row 32-bit facet sets into a caller-owned buffer via MultiLaneColumn (Arc refcount bump, no copy). - byte_len tightened to the exact covered span (len-1)*stride + elem_bytes: a full-stride final window would let Java bound a segment past the allocation's end on a facet lane. - ABI minor 1 -> 2; docs/abi.md gains 11 and its symbol count is corrected (the 14 was drift; the list already enumerated 15, and the real number is now 18 per nm -D). Gates: cargo test 84/84, clippy -D warnings clean, fmt clean, release build exports 18/18 symbols. Both new kernels are parity-checked against independent scalar references over 10 row counts x 2 seeds x 4 facets x 4 needles, then cross-checked a third way against RowStore::classid_at; a two-sided falsifier proves payload bytes never satisfy a classid match and that a real match does fire. Docs: .claude/plans/lgj-soa-substrate-v1.md (W1-W5 waves) + one plan per consumer example (world-trades / bricks-analytics / graph-traversal), .claude/knowledge/soa-row-store-layout.md, and the board triple ledger. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Board: PR #5 arc entry (post-merge) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Knowledge: assess the archived layout-bridge discussion; name W6 The operator's pre-build ChatGPT discussion is assessed once, in .claude/knowledge/prior-art-and-the-layout-bridge-claim.md, so it is never re-mined or cited naively. Verdict: it converged independently on the architecture this repo then built and measured. Kept: the callability-vs-shared-executable-layout positioning, the schema-key-as- join-point extractable (now the named W6 consideration: an explicit schema/classid field on the descriptors when ClassView lands), and the baseline-dependent claims discipline for W5 comparisons. Pinned: its page-descriptor sketch has no liveness story (the registry's whole job), its native-always-wins assumption is measured false (Component C), and its ndarray paragraph describes upstream crates.io ndarray, not the AdaWorldAPI fork whose ndarray::simd polyfill this stack mandates. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Plans: OGAR Machine (exploratory) + lance-graph-hydrate dependency note Captures the operator's second archived context as .claude/plans/ogar-machine-v1.md — a genuinely new workload for the shipped substrate, not convergent confirmation: one row = one machine STATE, control flow as population masks over 64K execution contexts, Ghidra P-code as the normalized guest ISA (repo attached and cloned), differential migration testing (legacy XOR replacement across 65,536 worlds) as the killer demo, Lance as the time machine. Strong claim vs weak claim separated per the discussion's own discipline; gated on W3 + one W5 example + Ghidra archaeology + a tiny falsifiable probe (P-M1). Also records lance-graph #957 (merged: lance-graph-hydrate, the generic SoA->S3->volume->Lance hydration crate minted for consumers to inherit) and #958 (its open hardening fast-follow) in the substrate plan: when this repo's persistence slice arrives, hydration is inherited from lance-graph-hydrate, never re-derived here. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Board: PR #6 arc entry (post-merge) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Waves calcified: dispatch maps for every plan; Ghidra plan from real archaeology Operator ruling: calcify, don't execute. .claude/waves/ holds one dispatchable map per plan — README with the standing rules and the verbatim worker preamble, substrate W3+W4 (the only READY wave), three consumer waves stamped DO-NOT-DISPATCH, Ghidra G1+G2, and OGAR-Machine P-M1 (BLOCKED behind a 4-condition gate including an explicit operator go). Each map carries disjoint worker scopes, orchestrator-only steps, exact gate commands, disable-runs, and STOP triggers. ghidra-integration-v1.md is written from archaeology against the real clone, not the sketch: 74 P-code opcodes (CPUI_MAX=75), 12.2 DEV / Java 25+, analyzeHeadless entry, and Ghidra's own PcodeEmulator as the reference-implementation parity oracle (the tesseract-rs method). The ogar-machine plan is cross-updated to cite it. Mapping-time catches that would have burned a dispatch: the graph consumer needs a deliberate edge-bearing generator arm (today's payload is PRNG noise) - a substrate change, flagged in the wave; the hop has a real D1a/D1b design fork with ruling guidance recorded. Muscle memory pinned as E-LGJ-CALCIFY-THEN-DISPATCH-1: the eight earned-this-session rules and the plan->wave->shelf->dispatch rhythm. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Board: PR #7 arc entry (post-merge) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Plan: lance-graph #958 merged (was open at last check) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Java RowStore facade: W3 shipped (185/185, one bug found+fixed) First real dispatch of the calcified wave system (wave-substrate-w3-w4.md Dispatch 1) — 3 Sonnet workers on disjoint scopes, Opus orchestrator integration and central gating, per the standing rules in .claude/waves/README.md. New public surface: RowStore (open/rowCount/isOpen/maskOfFacetClass/ facetMatches/close), FacetMatchView (rowCount/matchesOf/cardinality), FacetId (0..31-checked record) -- zero java.lang.foreign types in any public signature, ApiSurfaceTest passed unmodified. Mask.source() retyped NativePattern -> NativeResource (new minimal interface) so a mask parents onto either a pattern or a row store with the existing algebra unchanged; verified zero call-site breakage before the retype. One real bug caught by the test suite itself: FacetMatchView.rowCount() was missing the closed-store guard its sibling accessors both had -- found by RowStoreLifetimeTest on the first real run, fixed, re-verified. Gate: javac -Xlint:all clean (7 pre-existing [restricted] warnings, 0 new); AllTests 132 -> 185 (+53 checks: 29 parity + 24 lifetime). Both mandated disable-runs ran red-then-green with the exact expected blast radius: (1) Abi.requireMinor inflated by 1 -> exactly the two RowStore suites failed, 8 others stayed green; (2) the generator's a/b draw order swapped -> exactly RowStoreParityTest broke (17/29), the generator-independent RowStoreLifetimeTest stayed green. Board: STATUS_BOARD D-LGJ-W3 DONE, LATEST_STATE, and E-LGJ-WAVE-DISPATCH-VALIDATED-1 -- the wave system's first real dispatch, including an orchestrator-side false alarm (wrong env var name guessed instead of read from source) recorded so it isn't repeated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Board: PR #8 arc entry (post-merge) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Plan: r2sleigh recorded as third lift path + decompiler candidate Operator-flagged: AdaWorldAPI/r2sleigh (read-only clone verified, HEAD 60942f6) is a Rust workspace lifting Ghidra .sla specs to P-code via libsla, with typed IR, SSA, Z3 symbolic execution, and a P-code-to-C decompiler. The honest FFI fact is pinned: libsla-sys means the SLEIGH runtime underneath is Ghidra's C++ via FFI, not pure Rust -- acceptable on the same lift-time-only footing as running Ghidra itself. G1 gains candidate C (r2sleigh-cli lift, no JVM in the loop, and a STRONGER falsifier: cross-implementation P-code agreement between two independent consumers of one .sla spec); r2dec is named as the engine candidate for the semantic-shim direction; r2sym joins SymbolicSummaryZ3 as branch-population prior art. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Bench Component F: the boundary re-asked on the real row-store layout (W4) One Sonnet worker per wave-substrate-w3-w4.md Dispatch 2, orchestrator- run JMH (9/9 combos), the cross-check discipline intact: both Java facet-match kernels verified row-by-row against the native FacetMatchView in @setup at every row count before anything was timed. The finding: Component C's direction survives, its margin collapses. The Vector API wins the per-row 32-facet strided scan at every row count measured, but by 2.51x / 1.92x / 1.14x (4K / 65K / 1M rows) against C's 56x -- and at 512 MiB traversed all three arms converge on memory bandwidth. More work per byte narrows the boundary exactly as execution-boundary.md predicted; it now records that as measurement. Disclosed, not hidden: the native arm allocates its output segment per call where the Java arms reuse a @setup buffer; facetMatchesInto is the named follow-up if the small-row gap ever matters. Java kernels mirror the Rust chunk algorithm line-for-line (VectorMask.toLong() & 0x1111, same four-term fold) so the comparison is between implementations of ONE algorithm, not two algorithms. Mechanics: summarise.sh gains the F table (and its old 'E/F' section title -- a genuine collision with the new component -- is corrected to 'E'); TABLES.md regenerated from the merged CSV; RESULTS.md gains provenance-table update + full F section; RowStore gains a package-private handle() mirroring NativePattern's for the bench's split-package NativeAccess bridge; main suite re-verified 185/185 against the fresh minor-2 .so in the bench's expected location. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Board: PR #9 arc entry (post-merge) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Parity: the third independent read path (ROW_LAYOUT segment reads) Closes the gap the W3 dispatch honestly flagged: the wave file specified a raw-lane segment-read parity arm that my worker brief dropped. Section added to RowStoreParityTest: every classid of a 1000-row store read DIRECTLY from the raw lane-0 segment, addressed through Layouts.ROW_LAYOUT's own byteOffset arithmetic (sequenceElement + groupElement, not hand-multiplied constants) -- no native kernel, no mask, no FacetMatchView on the path. Three independent routes now reach the same numbers: the native kernels, the pure-Java generator transcription, and the structured-layout segment read. This is also ROW_LAYOUT's first real consumer; before this it was defined and size-checked but read by nothing. Plus the raw lane's own description pinned (byteLength == n*512, contiguous flag set). AllTests 185 -> 188. Also records the operator handoff boundary in the ghidra plan: r2sleigh/ruff/R2IL integration arrives from another session -- this session does not build toward it, and lift-candidate C is frozen until the handoff lands. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Board: PR #10 arc entry (post-merge) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Consumer example: World/Trades — the zero-object fluent domain API (W5a) The One-Billion-Objects poster made runnable, on the shelf-calcified wave map (wave-consumer-trades.md): two Sonnet workers, disjoint scopes, orchestrator-gated. consumers/trades/ is its own compile unit consuming com.adaworldapi.lancegraph exactly as a third-party developer would -- zero new membrane surface, zero core-API changes. Trade is a schema, not an entity: static U32Field VENUE / I32Field PRICE over the existing lanes, venue constants, and a private unconditionally-throwing constructor -- the test forces it accessible via reflection and proves construction STILL fails, plus zero public ctors and zero instance fields by reflection walk. The measured thesis: TradesAllocationTest's steady-state floor is 240 bytes per count() query, IDENTICAL at 64,000 and 1,000,000 rows -- allocation does not scale with rows (the assertion), with a 64 KiB absolute backstop. Laziness holds through the domain vocabulary: 0 crossings composing a 4-predicate Trade chain, exactly 1 at count(). Parity: the fluent chain equals a pure-Java transcribed-generator recomputation at both sizes, anti-vacuity guarded. Disable-run (green-red-green): VENUE pointed at the wrong lane -- the membrane's own LANE_KIND_MISMATCH rejected the misbinding outright, proving the schema binding is checked by the ABI, not trusted. Restored, both suites re-verified (12/12 + 3/3). QUANTITY is honestly absent (the flat fixture has two data lanes); its arrival is the ClassView/W6 slice, stated in Trade's Javadoc rather than faked. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Board: PR #11 arc entry (post-merge) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Pud4qpxFHwqyqDjSabQbs * Consumer example: Bricks — mask-first authorization, fail-closed, aggregates only (W5b) The second consumer proof over the unchanged core: authorization is a predicate in the same lazy chain as where(...), composed before execution and evaluated natively — never a Java-side post-filter. Role.EU_ONLY folds REGION.eq(EU) into the plan; DENY_ALL is a genuine impossible predicate (REGION.eq(0xFFFF)) that pays a real crossing and counts zero; a chain that never called authorize() throws UnauthorizedQueryException before any crossing happens (fail-closed, no default-allow path). Aggregate-only egress is structural: every public BricksQuery method returns BricksQuery, long, or Map — no row-shaped public type exists. BricksAuthTest 62/62: generator parity at 1K+64K rows; EU_ONLY equivalence vs GLOBAL+explicit-where; DENY_ALL counts 0 through a real crossing; crossing arithmetic — count()=1, sumBy()=32 (16 groups x 2: plan eval + lgj_reduce_sum_i32), identical at both row counts, which is the thesis (crossings scale with groups, never rows). The measured 32 corrected the worker's "one crossing per group" Javadoc — a real finding about sum-terminal cost, recorded in the doc and asserted in the test. Disable-run: requireAuthorized short-circuited -> exactly the three can-fire fail-closed checks went red (59 green), restored, 62/62. Core suite unaffected (188/188). Zero new membrane surface, per the consumer iron rule. Boards: STATUS_BOARD D-LGJ-W5 bricks DONE; LATEST_STATE dispatch-4 entry (owning that W5a shipped without one). * Board: PR #12 arc entry (post-merge) * Board: record the C-band ruling — the classid domain byte carries ALTITUDE Operator ruling, 2026-08-18: "Java is an entire different layer that's why I chose another higher level." The classid domain byte is stratified by layer, not a flat namespace where placement is mnemonic or next-free. The C-band is the stratum above the Rust substrate: C0 Java/Panama/Valhalla (the membrane, and the FLOOR of that layer), C1 ogar-bricks + Databricks (the analyst estate), C4 Ghidra (a tenant of C0's layer -- Ghidra is itself a JVM application per this repo's own G0 archaeology -- and explosive, for the blast radius of turning any binary into addressable rows). The entry also records, as storno, three of my own proposals the ruling corrects: seating P-code at 0x1718 as an ogar-loco consumer slot (wrong tier -- 0x17 is lance-graph's internal orchestration: elixir-on-rails, rs-graph-llm, Rig marking the replayability boundary), putting P-code at 0x18 beside Blocks (same error one slot over), and proposing a separate substrate/layout-contract domain (not separate -- it is C0's content). Root cause, which recurred three times in one session: clustering by SHAPE (everything becomes (function : value) calls in a 512-byte node) when the real axis is ALTITUDE. Shape-similarity is not domain-identity. What survives: reuse loco's node shape, own your own domain -- loco's own doc says the FunctionBody classid belongs at the substrate and a frontend references it rather than minting its own. Borrowing the container is not joining the domain. One consequence for code here: W6's schema/classid field on LgjResourceInfo/LgjLaneDesc carries a C0 concept; the substrate plan's W6 line now says so. Nothing on the wave list is blocked -- the reservation is OGAR-side and operator-gated. * Board: reconcile Ghidra G1/G2 -- superseded by ruff_r2il, not built Checked what "the other session writing the autoadapting drill-down proposer" actually unblocks here, against the merged PR rather than the summary. AdaWorldAPI/ruff PR #94 shipped crates/ruff_r2il -- a typed intake arm (ore/furnace/slag) reading r2sleigh's R2IL/SSA directly, in-process, ~43s, no JVM roundtrip. Its residual ledger is deliberately left non-empty (B3's own falsifier makes residual == 0 a KILL) for a follow-on pass. That follow-on IS the drill-down proposer: PR2 in the R2IL plan's own wave ladder, reading ResidualLedger::by_address and proposing finer convention rows at each address, converging pass over pass. Not landed yet -- gated on PR1's corpus numbers. PR3 (the classid mint in lance-graph-contract::ogar_codebook, item O5) is gated on PR2. So there is nothing new to consume here today. What there is: ghidra-integration-v1.md's G1 (a bespoke analyzeHeadless lift script) and G2 (a hand-rolled LE image format) are superseded, not merely lower-priority -- the R2IL plan's own stop condition already answers the question those waves existed to answer ("direct r2il/r2ssa consumption solves the upstream seam -- YES, 43s"). Marked superseded in place per that plan's own HANDOFF BOUNDARY note, which asked for exactly this reconciliation once R2IL landed. wave-ogar-machine-pm1.md's gate #3 repointed from "Ghidra G1+G2 merged" to "ruff_r2il PR2+PR3 merged" so the next session checking the gate finds the real dependency instead of a dead one. A separate, independently-found gap flagged (not fixed): lance-graph's ogar_codebook wire-mirror of OGAR's ConceptDomain is already missing Ontology and Blocks (pre-existing drift, not caused here) and will also lack the new C0/C1/C4 domains once PR3 needs to route on them. No code changed. The C-band ruling (OGAR PR #276) is unaffected -- its 0xC4 BinaryLifting fence ("Ghidra and r2sleigh are two consumers of the same SLEIGH specs over ONE vocabulary") is now literally true in code rather than anticipated, since ruff_r2il path-deps r2sleigh directly. Full record: .claude/board/EPIPHANIES.md E-LGJ-GHIDRA-G1-G2-SUPERSEDED-BY-R2IL-1. * Board: ruff #96 is a different arm; read the real staging guide + ran S1 Checked "ruff 96 merged" against the actual PR. It's ruff_python_spo's plain-Python residual ledger (dismech/CURIE-constant harvest, ontology- shaped -- MONDO/KISAO/infores prefixes) -- a sibling drill-loop, but a DIFFERENT crate and DIFFERENT consumer than ruff_r2il, and unrelated to this repo's C-band/Ghidra/JavaRuntime track. Recorded so the two arms aren't confused later just because they share vocabulary ("residual ledger", "drill loop", "proposer"). The genuinely relevant find, unrelated to #96, was already on ruff main: .claude/harvest/r2il/STAGED-CODEGEN-GUIDE.md (commit bbaebda, pushed directly to main between PR #94 and #95), explicitly addressed to "the sibling session ... (the Ghidra console work)" -- this repo, by description. It confirms PR2 (routes -> V3) still hasn't landed and adds what the prior reconciliation lacked: a 5-stage staging order (S1 ledger- read -> S2 ore-join -> S3 additive codegen -> S4 one consumer -> S5 target-profile fork), explicit "do not skip to S3", and a stability table per artifact (FlatFact's payload slots and the placeholder VarnodeFacet classid are NOT stable yet; slag/census/provenance/convention are). Ran S1 -- read-only, no codegen, no PR2 dependency -- against the real in-tree harvest artifacts (gitignored but present in the ruff checkout): B1 conservation PASS (dropped=0, harvested=classified+residual); B2 at 91.30% (inside the declared 90-99% INVESTIGATE band, not a KILL); B3 PASS (43 distinct residual shapes, dominant_share 0.215, every non-trivial bucket carries an address); and the pre-registered 60-80%-classified prediction MISSED at a measured 14.15%, recorded honestly rather than hidden -- which is the point of pre-registering it. Dominant residual is opcode_not_in_convention, expected: pass 1 deliberately classifies only 7 of P-code's 74 opcodes. Corpus is r2sleigh's own e2e stress-test fixtures (143 functions, x86-64), not yet a Ghidra-shaped real binary. No code changed, no wave-gate change -- PR2/PR3 remain unmerged, so wave-ogar-machine-pm1.md's gate #3 stands as previously repointed. Next unblocked step, available whenever there's a reason to spend it: S2 (join ore rows to native addresses), still read-only. * Board: R2IL handshake outcomes + the Valhalla-premise storno (operator-caught) The R2IL session answered all five cross-session questions; outcomes and ownership recorded (mirror sync now owned here; consumers/ghidra is the expected end-state, gated on PR2's layout doc + PR3's classids). The entry's core is a storno of my own handoff premise: 'Valhalla was a laboratory phase, not a door' was right about addressability and wrong about integration -- the shipping descriptor vocabulary is value-record- ready by design (one word per type) and the A/B ran on a real EA build with measured numbers. The ruling (0xC0 = Panama alone) survives on the corrected premise: Valhalla is a designed PROPERTY of the C0 concepts, and properties of concepts do not get domains. OGAR PR #277 (merged) carries the canonical corrected text. * rowstore: generate_with_edges -- the graph-consumer wave's real, measured blocker, cleared Asked what could be built while ruff_r2il's PR2/PR3 are blocked. Nearly dispatched the graph consumer (W5c) on the strength of D1a's mechanism (writable masks, existing facet-match) being sufficient -- claimed twice in earlier turns -- before re-reading wave-consumer-graph.md's own STOP condition in full and catching a real, different blocker: plain RowStore::generate()'s payload is uniform random noise, so a decoded 1-2 hop BFS over it saturates to nearly every row regardless of decode convention -- vacuous under the wave's own anti-vacuity falsifier ("seed/1-hop/2-hop must be three different, non-empty, non-total sizes"). A data-shape problem, not a mechanism problem. Caught before any workers spawned. RowStore::generate_with_edges(n_rows, seed, edge_classid, edge_gate_mask, edge_radius) is the fix -- additive, generate() untouched. Classid assignment is byte-identical to generate() (same SplitMix64 draws, same formula; the classid formula's otherwise-unused high bits of the per-facet `a` draw become an independent sparsity gate, so edge_classid=16, out of range, reproduces generate() exactly -- pinned by test). A sparse, gated subset of edge_classid-matching facets get a bounded local-neighbourhood target row instead of raw noise, which is what keeps a 1-2 hop BFS non-vacuous. Parameters chosen from a real measurement sweep (examples/graph_density_probe.rs), not guessed: a first pass at n_rows= 1000 was too small (avg degree < 1, everything collapsed to zero); widened to n_rows=20_000 for usable numbers, then re-measured at a test-suite-sized n_rows=2000 for the pinned regression: a 10-row seed reaches exactly 19 rows at 1 hop, 29 at 2 hops -- three different, non-empty, non-total sizes, matching the wave's own falsifier shape exactly, pinned as measured_hop_counts_are_three_distinct_non_empty_ non_total_sizes. Two disable-runs: breaking the radius-wrap formula turned exactly the three tests touching the target formula red (transcription test, in-bounds/radius invariant, the pinned regression), leaving the seven tests that don't touch it green. Ignoring the sparsity gate mask turned only the transcription test red -- the in-bounds/radius invariant correctly stayed green, verified as the right outcome rather than a vacuous test: geometry validity is orthogonal to which facets get the treatment, only to the treatment's correctness once applied. wave-consumer-graph.md updated in place: the STOP condition marked RESOLVED with the measured numbers, and the stale "calcify, do not dispatch" header corrected (that gate was already lifted session-wide when W5a/W5b shipped under the identical wording). The graph consumer is now genuinely dispatchable -- not dispatched in this same pass; this change is scoped to the substrate-tier generator only, per the wave file's own rule that a generator extension is not a consumer hack. Gates: lgj-abi 90/90 (was 84, +6 new tests), fmt clean, clippy --all-targets --all-features clean. Board: EPIPHANIES + LATEST_STATE entries prepended in the same commit. --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 8f16e8d commit beac5de

9 files changed

Lines changed: 923 additions & 16 deletions

File tree

.claude/board/EPIPHANIES.md

Lines changed: 375 additions & 0 deletions
Large diffs are not rendered by default.

.claude/board/LATEST_STATE.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,111 @@
1+
## 2026-08-18 (measured) — W5c's real blocker found + cleared: RowStore::generate_with_edges
2+
3+
Asked what was buildable while ruff_r2il PR2/PR3 are blocked. Was about to
4+
dispatch the graph consumer (W5c) on the strength of D1a's mechanism
5+
(writable masks, existing facet-match) being sufficient -- twice claimed
6+
this in earlier turns -- before re-reading `wave-consumer-graph.md`'s own
7+
STOP condition in full and catching a real, different blocker: plain
8+
`RowStore::generate()`'s payload is uniform noise, so any 1-2 hop BFS over
9+
it saturates to nearly every row regardless of decode convention --
10+
vacuous under the wave's own anti-vacuity falsifier. A data-shape problem,
11+
not a mechanism problem; caught before any workers spawned.
12+
13+
Fixed with `RowStore::generate_with_edges` (native/lgj-abi) -- additive,
14+
`generate()` byte-identical for out-of-range `edge_classid` (pinned).
15+
Parameters chosen from a real measurement sweep
16+
(`examples/graph_density_probe.rs`), not guessed: at `n_rows=2000,
17+
gate_mask=0x0, radius=25`, a 10-row seed reaches 19 rows at 1 hop, 29 at 2
18+
hops -- pinned as a regression test. Two disable-runs (radius-wrap
19+
formula; sparsity gate) both went red exactly where expected, including
20+
one case (the gate disable) correctly NOT failing an orthogonal geometry
21+
test -- verified as the right outcome, not a vacuous one.
22+
23+
`wave-consumer-graph.md` updated: STOP condition marked RESOLVED with the
24+
measured numbers; the file's stale "calcify, do not dispatch" header
25+
corrected (that gate was already lifted session-wide). **The graph
26+
consumer is now genuinely dispatchable** -- not dispatched in this pass,
27+
scoped to the generator only. Gates: lgj-abi 90/90 (+6), fmt/clippy clean.
28+
Full record: `EPIPHANIES.md`, the entry above the R2IL handshake one.
29+
30+
## 2026-08-18 (even later) — ruff #96 is a different arm; found + read the REAL staging guide
31+
32+
Checked "ruff 96 merged." It's `ruff_python_spo`'s plain-Python residual
33+
ledger (dismech/CURIE-constant harvest, ontology-shaped) — a sibling
34+
drill-loop, but a DIFFERENT crate and consumer than `ruff_r2il`, and
35+
unrelated to this repo's C-band/Ghidra/JavaRuntime track. No action needed
36+
here; recorded so the two arms aren't confused later since they share
37+
vocabulary.
38+
39+
The genuinely relevant find was already on `ruff` main, unrelated to #96:
40+
`.claude/harvest/r2il/STAGED-CODEGEN-GUIDE.md`, explicitly addressed to
41+
"the sibling session ... (the Ghidra console work)" — this repo. It
42+
confirms PR2 (routes→V3) still hasn't landed and gives a 5-stage staging
43+
order (S1 ledger-read → S2 ore-join → S3 additive codegen → S4 one
44+
consumer → S5 target-profile fork) that does NOT wait on PR2 for its first
45+
two stages. Ran S1 against the real in-tree harvest artifacts: B1
46+
conservation PASS (dropped=0), B3 addressed-slag PASS (43 shapes,
47+
dominant_share 0.215), B2 at 91.30% (INVESTIGATE band), and the
48+
pre-registered 60-80%-classified prediction MISSED at a measured 14.15% —
49+
recorded honestly, which is the point of pre-registering it. Dominant
50+
residual is `opcode_not_in_convention`, expected: pass 1 only classifies 7
51+
of P-code's 74 opcodes by design. Full record + the stability table
52+
(FlatFact payload bytes and the placeholder VarnodeFacet classid are
53+
explicitly NOT stable yet): `EPIPHANIES.md`, the entry above
54+
`E-LGJ-GHIDRA-G1-G2-SUPERSEDED-BY-R2IL-1`.
55+
56+
No wave-gate change — PR2/PR3 still unmerged, `wave-ogar-machine-pm1.md`
57+
gate #3 stands as previously repointed. Next unblocked step (not scheduled,
58+
available when there's a reason to spend it): S2, still read-only.
59+
60+
## 2026-08-18 (later) — Ghidra G1/G2 waves reconciled: superseded by ruff_r2il, not built
61+
62+
Checked what "the other session writing the autoadapting drill-down proposer"
63+
(ruff/r2sleigh) actually unblocks here, against the merged PR rather than the
64+
summary. `AdaWorldAPI/ruff` PR #94 shipped `crates/ruff_r2il` — a typed
65+
intake arm (ore/furnace/slag) reading r2sleigh's R2IL/SSA directly, with an
66+
addressed residual ledger deliberately left non-empty for a follow-on pass.
67+
That follow-on IS the drill-down proposer: PR2 in the R2IL plan's own wave
68+
ladder, reading `ResidualLedger::by_address` and proposing finer convention
69+
rows, converging pass over pass. **Not landed yet** — gated on PR1's corpus
70+
numbers. PR3 (the classid mint in `lance-graph-contract::ogar_codebook`,
71+
item O5) is gated on PR2. So there is nothing new to CONSUME here today.
72+
73+
What there IS: `wave-ghidra-g1-g2.md` (a bespoke `analyzeHeadless` lift
74+
script + a hand-rolled LE image format) is now superseded, not merely
75+
lower-priority — the R2IL plan's own stop condition already answers the
76+
question those waves existed to answer ("direct r2il/r2ssa consumption
77+
solves the upstream seam — YES, 43s"). Marked superseded in place;
78+
`wave-ogar-machine-pm1.md`'s gate #3 repointed from "Ghidra G1+G2 merged" to
79+
"ruff_r2il PR2+PR3 merged" so the real dependency is visible instead of a
80+
dead one. Full record + a separately-found, pre-existing `ogar_codebook`
81+
mirror-drift gap (flagged, not fixed): `EPIPHANIES.md`
82+
`E-LGJ-GHIDRA-G1-G2-SUPERSEDED-BY-R2IL-1`.
83+
84+
No code changed; C-band ruling (`E-LGJ-THE-DOMAIN-BYTE-CARRIES-ALTITUDE-1`,
85+
merged as OGAR PR #276) is unaffected — its `0xC4` fence is now literally
86+
true in code rather than anticipated.
87+
88+
## 2026-08-18 — C-band ruling recorded: the domain byte carries ALTITUDE
89+
90+
Operator ruling (*"Java is an entire different layer that's why I chose
91+
another higher level"*): the classid domain byte is **stratified by layer**,
92+
not a flat namespace. The C-band is the stratum ABOVE the Rust substrate —
93+
**C0** Java/Panama/Valhalla (the membrane, and the FLOOR of that layer),
94+
**C1** ogar-bricks + Databricks (the analyst estate), **C4** Ghidra (a tenant
95+
of C0's layer — Ghidra is itself a JVM application per this repo's G0
96+
archaeology — and explosive, for the blast radius of turning any binary into
97+
addressable rows).
98+
99+
Full entry, including the three of my own proposals it corrects and the
100+
root-cause (I clustered by SHAPE — everything becomes `(function : value)`
101+
calls in a 512-byte node — where the real axis is ALTITUDE):
102+
`EPIPHANIES.md` `E-LGJ-THE-DOMAIN-BYTE-CARRIES-ALTITUDE-1`.
103+
104+
**Consequence for this repo, and it is the only one:** W6's schema/classid
105+
field on `LgjResourceInfo`/`LgjLaneDesc` carries a **C0** concept. Nothing on
106+
the current wave list is blocked by the allocation — the reservation is
107+
OGAR-side and operator-gated (reserving costs nothing; minting is 5+3-gated).
108+
1109
## 2026-08-17 (dispatch 4) — W5b bricks shipped: authorization IS a mask, measured
2110

3111
`wave-consumer-bricks.md` executed (2 Sonnet workers K1/K2, disjoint main/test

.claude/board/PR_ARC_INVENTORY.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,40 @@
88
> anti-pattern the imported board rules name. Backfilled below in one
99
> pass rather than left stale; PR #4 onward gets its entry at merge time.
1010
11+
## PR #12 — consumer example: Bricks, mask-first authorization (merged 2026-08-17, squash `8f16e8d`)
12+
13+
- **Added:** `consumers/bricks/` — the second consumer proof over the
14+
unchanged core. `Bricks`/`BricksSession`/`BricksQuery`/`Role`/`Orders`/
15+
`UnauthorizedQueryException`; `BricksAuthTest` 62/62. Wave
16+
`wave-consumer-bricks.md`, 2 Sonnet workers (K1 main / K2 test,
17+
disjoint), orchestrator-gated.
18+
- **Locked:** authorization is a **predicate in the same lazy chain** as
19+
`where(...)`, composed before execution and fused into the same single
20+
crossing — not a post-filter. `Role.EU_ONLY` = `REGION.eq(EU)`;
21+
`DENY_ALL` = `REGION.eq(0xFFFF)`, a real impossible predicate that pays
22+
a real crossing and counts 0; fail-closed throws BEFORE any crossing
23+
(no default-allow path exists); aggregate-only egress is **structural**
24+
(`BricksQuery`/`long`/`Map` are the only public return types — asserted
25+
by reflection, so no row-shaped type can be added without breaking the
26+
test). Disable-run: `requireAuthorized` short-circuited → exactly the
27+
3 can-fire fail-closed checks red, 59 green; restored 62/62.
28+
- **A measured correction, recorded rather than smoothed over:** a **sum
29+
terminal costs 2 crossings** (plan eval into the mask +
30+
`lgj_reduce_sum_i32`), unlike `count()`'s 1 — so `sumBy()` is **32
31+
crossings (16 groups × 2), IDENTICAL at 1K and 64K rows**. K1's Javadoc
32+
claimed one crossing per group; the measurement corrected the doc. The
33+
thesis assertion is the shape (crossings ∝ groups, never rows), which
34+
is why the same literal is pinned at both row counts.
35+
- **Deferred:** a native grouped-aggregate kernel (one crossing, 16
36+
buckets) — named in the Javadoc as the W6-tier follow-up, deliberately
37+
not built because nothing has measured a need; W5c graph (shelved on
38+
the D1 ruling + the edge-bearing generator substrate change).
39+
- **Docs:** STATUS_BOARD D-LGJ-W5 → bricks DONE; LATEST_STATE dispatch-4
40+
entry, which also owns that W5a (#11) shipped without one.
41+
- **Confidence:** High — zero new membrane surface, zero core changes,
42+
core suite unaffected at 188/188; every falsifier disable-verified.
43+
Both bot reviewers at usage limits (no human or bot review obtained).
44+
1145
## PR #11 — consumer example: World/Trades (merged 2026-08-17, squash `db7bdf1`)
1246

1347
- **Added:** `consumers/trades/` — own compile unit, core consumed as a

.claude/plans/lgj-soa-substrate-v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
| **W3** | Java `RowStore` facade: no FFM in public signatures; structured `MemoryLayout` (`sequence(32, struct(u32 classid, 12B payload))`); minor-≥2 gate; `FacetMatchView` zero-copy accessor over a Java-arena segment; `RowStoreParityTest` transcribing the generator | OPEN — next |
3333
| **W4** | Bench Component F: Java Vector API per-row facet scan (one `IntVector` 16-lane chunk = 4 facets, same algorithm as the Rust kernel) vs `lgj_row_facet_match` crossing vs scalar VarHandle walk — the "where does execution belong" question re-asked on the REAL layout | OPEN |
3434
| **W5** | The three consumer examples (own plan files, below) | PLANNED |
35-
| **W6** *(named, not scheduled)* | ClassView wiring — and with it an explicit **schema/classid field** on `LgjResourceInfo`/`LgjLaneDesc` (additive, one minor bump), so a resource names WHICH layout contract its bytes obey instead of implying it via `kind`. Provenance + rationale: `.claude/knowledge/prior-art-and-the-layout-bridge-claim.md` §3 ("one key, many projections" made literal at the membrane). Also the `align(64)` base guarantee (real `NodeRow`) and, only if measurement asks, fused plans over facet lanes | NAMED |
35+
| **W6** *(named, not scheduled)* | ClassView wiring — and with it an explicit **schema/classid field** on `LgjResourceInfo`/`LgjLaneDesc` (additive, one minor bump), so a resource names WHICH layout contract its bytes obey instead of implying it via `kind`. Provenance + rationale: `.claude/knowledge/prior-art-and-the-layout-bridge-claim.md` §3 ("one key, many projections" made literal at the membrane). **The classid that field carries is a C0 concept** — the Java/Panama/Valhalla layer naming itself from inside its own stratum, not a substrate concept borrowed downward; see `.claude/board/EPIPHANIES.md` `E-LGJ-THE-DOMAIN-BYTE-CARRIES-ALTITUDE-1` (the reservation is OGAR-side and operator-gated, and W6 is not blocked on it). Also the `align(64)` base guarantee (real `NodeRow`) and, only if measurement asks, fused plans over facet lanes | NAMED |
3636

3737
Wave rule (house style): one wave = one reviewable PR; gates run centrally
3838
(orchestrator only — agents never run cargo); every safety property lands

.claude/waves/wave-consumer-graph.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Wave: consumer example — graph traversal (facet edges, crossings ∝ hops)
22

3-
> Executes `consumer-graph-traversal-v1.md`. **DO NOT DISPATCH**
4-
> operator ruling 2026-08-17: calcified, not executed, until called.
5-
> Gates: W3 merged AND the hop-decode capability question resolved (see
6-
> Decision D1 below — this wave has a genuine open design decision the
7-
> other two consumer waves do not).
3+
> Executes `consumer-graph-traversal-v1.md`. Gates: W3 merged (DONE) AND
4+
> the hop-decode capability question resolved (Decision D1 below — ruled
5+
> D1a) AND the edge-bearing generator STOP condition resolved (DONE,
6+
> `RowStore::generate_with_edges`, see below). **DISPATCHABLE** — the
7+
> calcify-only gate ("2026-08-17: calcified, not executed, until called")
8+
> was lifted session-wide once autonomous dispatch was authorized (W5a/W5b
9+
> both shipped under it); this wave's own, GENUINE extra gate (the
10+
> generator) is what actually held it back, and is now cleared.
811
912
## Decision D1 (orchestrator resolves BEFORE any worker spawns)
1013

@@ -59,8 +62,22 @@ offset by 4 bytes → hop-correctness must go red (proves the decode is
5962
load-bearing); restore. Board + PR per rhythm; if D1b was chosen, the
6063
membrane PR merges FIRST and this wave's PR references it.
6164

62-
**STOP conditions:** payload reading ambiguity (→ orchestrator, possibly
63-
a generator extension in a substrate-plan PR — the fixture's payload
64-
today is PRNG noise, so this wave NEEDS a deliberate edge-bearing
65-
generator arm: that is a substrate change, not a consumer hack — flagged
66-
here so nobody discovers it mid-dispatch).
65+
**STOP condition RESOLVED (2026-08-18):** the deliberate edge-bearing
66+
generator arm this wave's STOP condition named now exists —
67+
`RowStore::generate_with_edges(n_rows, seed, edge_classid, edge_gate_mask,
68+
edge_radius)` (native/lgj-abi, landed as its own substrate-tier change,
69+
NOT a consumer hack, per this file's own rule). It reuses `generate()`'s
70+
classid stream byte-for-byte (an out-of-range `edge_classid` reproduces
71+
`generate()` exactly — pinned by test) and, for a SPARSE, gated subset of
72+
`edge_classid`-matching facets, writes a bounded-local-neighbourhood
73+
target row instead of raw noise — the mechanism that keeps a 1-2 hop BFS
74+
non-vacuous. Measured (`examples/graph_density_probe.rs`, not guessed):
75+
plain `generate()`'s uniform-random payload saturates a 2-hop BFS to
76+
nearly every row (the ORIGINAL problem this STOP condition named); at
77+
`n_rows=2000, edge_classid=0, edge_gate_mask=0x0, edge_radius=25`, a
78+
10-row seed set reaches exactly 19 rows at 1 hop and 29 at 2 hops — three
79+
different, non-empty, non-total sizes, pinned as a regression test
80+
(`measured_hop_counts_are_three_distinct_non_empty_non_total_sizes`).
81+
**G1's payload-reading-convention documentation task now has real,
82+
measured ground to document** rather than an open question — this wave
83+
is dispatchable.

.claude/waves/wave-ghidra-g1-g2.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
# Wave: Ghidra G1 (lift proof) + G2 (program image format)
22

3-
> Executes `ghidra-integration-v1.md` G1 then G2. **DO NOT DISPATCH**
3+
> **SUPERSEDED — 2026-08-18, do not dispatch under any circumstance.**
4+
> `AdaWorldAPI/ruff` PR #94 (`crates/ruff_r2il`) merged a typed intake arm
5+
> that consumes r2sleigh's R2IL/SSA DIRECTLY — in-process, ~43s, no JVM
6+
> roundtrip, no bespoke text-dump format to invent and parse. That plan's
7+
> own stop condition already closed the question this wave existed to
8+
> answer: *"§22.1: direct r2il/r2ssa consumption solves the upstream seam
9+
> — YES."* Building G1 (an `analyzeHeadless` post-script emitting a custom
10+
> P-code text dump) or G2 (a second, bespoke LE image format) now would be
11+
> a competing, throwaway lift path duplicating work already merged and
12+
> typed. Full reconciliation record:
13+
> `.claude/board/EPIPHANIES.md` `E-LGJ-GHIDRA-G1-G2-SUPERSEDED-BY-R2IL-1`.
14+
> This file is kept for its archaeology (G0's real 74-opcode/`PcodeEmulator`
15+
> findings still stand as reference) — never dispatch the two waves below.
16+
17+
> ~~Executes `ghidra-integration-v1.md` G1 then G2. **DO NOT DISPATCH**
418
> shelved with the consumer waves per the operator's calcify-first ruling;
519
> G1 is technically independent of W3 but momentum stays on the substrate
620
> waves until called. Cross-repo: G1's script lands in `AdaWorldAPI/ghidra`
721
> (cloned at `/workspace/ghidra`, 12.2 DEV, Java 25+); G2's loader lands
8-
> here. One PR per repo; ghidra PR merges first.
22+
> here. One PR per repo; ghidra PR merges first.~~ *(pre-supersession text,
23+
> kept for the record.)*
924
1025
---
1126

.claude/waves/wave-ogar-machine-pm1.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@
77
> 1. W3 merged (Java facade — the consumer workflow exists).
88
> 2. At least ONE W5 consumer example shipped (the
99
> consumer-never-grows-the-membrane rule has a proven round-trip).
10-
> 3. Ghidra G1+G2 merged (a real program image format exists — P-M1 must
11-
> consume the REAL format, not a probe-local sketch that would become
12-
> a second format).
10+
> 3. **[RECONCILED 2026-08-18 — was "Ghidra G1+G2 merged"]** `ruff_r2il`
11+
> PR2 (route→V3 projection + codebook wiring, `AdaWorldAPI/ruff`) AND
12+
> PR3 (the classid mint for the R2IL container concept in
13+
> `lance-graph-contract::ogar_codebook`, O5) merged — a real,
14+
> already-typed program image exists on THAT path. `wave-ghidra-g1-g2.md`
15+
> is superseded and will never satisfy this gate; do not dispatch it to
16+
> try. PR1 (ore/furnace/slag intake + the addressed residual ledger) is
17+
> already merged; PR2 is explicitly gated on PR1's corpus numbers and is
18+
> the in-flight "drill-down proposer" work — check
19+
> `AdaWorldAPI/ruff/.claude/plans/r2il-behavioral-ir-v1.md`'s Wave plan
20+
> section before re-deriving this gate's status.
1321
> 4. An explicit operator go (this direction is exploratory by ruling).
1422
1523
## What P-M1 is (and is deliberately not)

0 commit comments

Comments
 (0)