Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .claude/board/LATEST_STATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2026-10-07 — lance-graph #1381 MERGED (`7334ae9`)

The D-EPI-CANON-0 / D-EPI-MIG-0 section below is now on `main`, together with
D-EPI-POP-0 (`facts_population`) and D-EPI-LEGACY-DEPROJECT-0
(`EdgeRole::band` removed). `main` is `7334ae9`.

## 2026-10-07 — D-EPI-CANON-0 / D-EPI-MIG-0: CE64 bits 59..63 = `EpistemicState5` (branch `claude/epistemicstate5-ce64-bits-3oe0dq`, unmerged)

### Current Contract Inventory — net delta (`epistemic_state5.rs`, `class_view.rs`, `causal-edge`)
Expand Down
8 changes: 8 additions & 0 deletions .claude/board/PR_ARC_INVENTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2026-10-07 — lance-graph PR #1381 (merged `7334ae9`, branch `claude/epistemicstate5-ce64-bits-3oe0dq`, head `0ba5d24`, 17 commits) — CE64 bits 59..63 = `EpistemicState5 = Topology2 × Certification3`; facts populations; legacy deprojection

- **Added:** `lance_graph_contract::epistemic_state5` — `Topology2`, `Certification3`, per-factor facts, `EpistemicState5` (`raw5 = topology | certification << 2`, 24 meaningful / 8 reserved), `Epi5Reading`, `Epi5Declarations::project_state5`, `facts_population` / `Population` / `bit()`; `ClassView::epistemic_reading`; `CausalEdge64::{epistemic_raw5, with_epistemic_raw5}`, `EPISTEMIC_MASK`.
- **Locked (test-pinned):** #1378 conformance 24 agree / 0 disagree / 8 reserved; populations exact sets + code-by-code vs `facts_v1` over 2048 requirements; factor updates move only their factor's membership. Each falsifier disable-verified.
- **Removed / deprecated:** the #1370 ten-code codebook (replaced, not versioned); `EdgeRole::band`; half-field writers deprecated (`with_truth`, `with_routing`, `with_reasoning_band`, `with_spare`, …).
- **Deferred / open:** no production class declares the canonical reading (no OGAR mint); `facts_population` has no production caller; four-plane and `reasoning_band_probe` stay as records (`ISS-LEGACY-59-63-READINGS-REMAIN`).
- **Confidence:** high for the contract (exhaustive tests). Merged before CI on `0ba5d24` and CodeRabbit's review of the last five commits finished; the previous head `47bd36b` was green.

## 2026-09-23 — lance-graph PR #1271 (merged `d90600d`, branch `claude/brave-mayer-65y3cy`, head `d4dd251`, 1 commit) — ReportPlan fold substrate, zero-copy pivot, reports as OGAR projection sources

- **Added:** `crates/lance-graph-report` (member): `ReportPlan` lowering into
Expand Down
12 changes: 6 additions & 6 deletions .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ Plan: `.claude/plans/2026-10-06-global-sudoku-replayable-orchestration-v1.md`. O
| **D-CE64-NEXTSTATE-0** | EpistemicState5 as a sparse next-state mutation of the CE64 register | In PR | `cognitive-shader-driver/examples/ce64_nextstate_probe.rs`: N1 only bits 59..63 move, all 32 codes on an edge with every field set; N2 written in cycle k through `MailboxSoA::write_row`, read in k+1 through `MailboxSoaView`; N3 the mailbox does not double-buffer (a same-cycle read sees the write), and next-cycle authority is a read discipline: start-of-cycle copy plus `last_write_cycle == cycle` treated as pending; N4 canonical LE round trip (bits 59..63 in byte 7, bits 3..7); N5 a fresh mailbox from the persisted word continues identically; N6 the shipped `with_spare` + `with_truth` compile to `bzhi; shl; or`, identical to the masked insert (LLVM folded the two), so no 5-bit writer is added. Production change: `CausalEdge64::to_le_bytes` / `from_le_bytes` (mirroring `EpisodicEdges64`) and the register contract on the type. 6 tests, 7 disable runs red |
| **D-ANCESTRY-K1-0** | StreamDto / PerturbationDto / BusDto / p64 / shader-driver ancestry vs code | Shipped (this PR) | `entries/2026-10-06-streamdto-circuit-ancestry.md`: v3 docs first, then code (git history is shallow at #1327). The k → k+1 loop was intended (`EmitMode::Persist`, `persist_cycle`, `mailbox-thoughtspace` read shim, W4a cast pairing) and left open: the driver owned its mailbox read-only. Path B |
| **D-STREAMDTO-0** | A real `StreamDto` through the shipped path to next-cycle #1370 eligibility | In PR | `cognitive-shader-driver/examples/streamdto_circuit_probe.rs`: `StreamDto` → the new `ingest_codebook_indices_soa` (straight into the SoA, cycle-gated `write_row`, encoding shared with the superseded BindSpace arm) → `dispatch` k → `persisted_row` gets `emitted_edges[0]` via the new `ShaderDriver::mailbox_mut` → `tick` → `dispatch` k+1 reads it and changes → `measure`. The edge steers k+1 only through `s_idx / 4`; the shader writes code 0, so eligibility is unchanged by the circuit (`0x20`, same as an unwritten word; code 7 gives `0x24`). Timestamp ≠ cycle; restart from LE bytes reproduces k+1. CI step added (feature-gated targets incl. `w2_differential` were never run). 6 tests + 1 lib test, 9 disable runs red |
| **D-EPI-MIG-INVENTORY** | Every reader/writer of CE64 bits 59..63 classified before migration | Shipped (this PR) | `entries/2026-10-07-epi-mig-inventory.md` |
| **D-EPI-CANON-0** | Canonical joint `EpistemicState5` reading of bits 59..63 in the contract | In PR | `contract::epistemic_state5`: Cartesian `Topology2 × Certification3`, `raw5 = t \| c << 2`, 24 meaningful / 8 reserved; per-factor facts; declarations + `project_state5`; `CausalEdge64::{epistemic_raw5, with_epistemic_raw5}`; non-declared-reading writers deprecated |
| **D-EPI-POP-0** | Facts → 32-state population: the missing operator between one edge's coordinate (u5) and a semantic condition over all coordinates (u32) | In PR | `contract::epistemic_state5::{Population, facts_population, EpistemicState5::bit}`: `const fn`, no DSL / query object / planner. Tests pin exact sets (`CAUSES` = {20..23}, `IND_UNKNOWN \| RELATED` = {10,14,18,22}, `IND_KNOWN \| SUPPORTS` = {13,17,21}, `RELATED` = 8..23), operator == state enumeration over all 2048 requirements with no reserved code, conjunction == intersection; 2 disable runs red (any-of semantics; reserved read as fact-less) |
| **D-EPI-LEGACY-DEPROJECT-0** | Deproject the remaining `ReasoningBand` / CE64-`TrustTexture` consumers: each goes to an exact coordinate, a `facts_population(..)`, MUL, or another subsystem (e.g. counterfactual context) — never a 1:1 replacement enum | In PR | `entries/2026-10-07-epi-legacy-deprojection.md`: 6 ReasoningBand caller sites (1 certification question, 1 non-interference witness → both exact coordinates; 2 context/obsolete → compat; 2 refusal witnesses), 0 production CE64 `TrustTexture` consumers, 4 `TrustTexture` types with no bridge; `EdgeRole::band` removed; hinge + V3 lift migrated; 4 code loops → `facts_population` |
| **D-PUZZLE-0** | Sudoku / crossword / chess on the same population algebra under domain laws | Queued | after D-EPI-LEGACY-DEPROJECT-0 |
| **D-EPI-MIG-0** | Migrate readers/writers to the canonical reading; #1378 → conformance | In PR | `entries/2026-10-07-epi-mig-0.md`: affordance law (per-factor compile) + P7a (identity packing) + 6 probes + dismech + V3 lift; conformance census 24/0/8 (was 3/5/16); 3 historical-band probes cannot migrate without invention |
| **D-EPI-MIG-INVENTORY** | Every reader/writer of CE64 bits 59..63 classified before migration | Shipped (#1381) | `entries/2026-10-07-epi-mig-inventory.md` |
| **D-EPI-CANON-0** | Canonical joint `EpistemicState5` reading of bits 59..63 in the contract | Shipped (#1381) | `contract::epistemic_state5`: Cartesian `Topology2 × Certification3`, `raw5 = t \| c << 2`, 24 meaningful / 8 reserved; per-factor facts; declarations + `project_state5`; `CausalEdge64::{epistemic_raw5, with_epistemic_raw5}`; non-declared-reading writers deprecated |
| **D-EPI-POP-0** | Facts → 32-state population: the missing operator between one edge's coordinate (u5) and a semantic condition over all coordinates (u32) | Shipped (#1381) | `contract::epistemic_state5::{Population, facts_population, EpistemicState5::bit}`: `const fn`, no DSL / query object / planner. Tests pin exact sets (`CAUSES` = {20..23}, `IND_UNKNOWN \| RELATED` = {10,14,18,22}, `IND_KNOWN \| SUPPORTS` = {13,17,21}, `RELATED` = 8..23), operator == state enumeration over all 2048 requirements with no reserved code, conjunction == intersection; 2 disable runs red (any-of semantics; reserved read as fact-less) |
| **D-EPI-LEGACY-DEPROJECT-0** | Deproject the remaining `ReasoningBand` / CE64-`TrustTexture` consumers: each goes to an exact coordinate, a `facts_population(..)`, MUL, or another subsystem (e.g. counterfactual context) — never a 1:1 replacement enum | Shipped (#1381) | `entries/2026-10-07-epi-legacy-deprojection.md`: 6 ReasoningBand caller sites (1 certification question, 1 non-interference witness → both exact coordinates; 2 context/obsolete → compat; 2 refusal witnesses), 0 production CE64 `TrustTexture` consumers, 4 `TrustTexture` types with no bridge; `EdgeRole::band` removed; hinge + V3 lift migrated; 4 code loops → `facts_population` |
| **D-PUZZLE-0** | Sudoku / crossword / chess on the same population algebra under domain laws | In progress | step 1 Sudoku at scale (`cognitive-shader-driver/examples/sudoku_population_fold_probe.rs`, `entries/2026-10-07-puzzle-0-sudoku-population-fold.md`): 1,000,066 claim edges, counts equal 3 ways + solver counters; filter fold 0.35–0.39 ns/edge, 32-bin histogram 0.93–1.07, decode oracle 3.8–4.0 (one machine). Next: crossword (lance-graph), chess (`stockfish-rs`, GPL) |
| **D-EPI-MIG-0** | Migrate readers/writers to the canonical reading; #1378 → conformance | Shipped (#1381) | `entries/2026-10-07-epi-mig-0.md`: affordance law (per-factor compile) + P7a (identity packing) + 6 probes + dismech + V3 lift; conformance census 24/0/8 (was 3/5/16); 3 historical-band probes cannot migrate without invention |
| **D-EPI-CONFLICT-0** | (superseded by D-EPI-MIG-0: probe converted to conformance) Pin the disagreement between the D-ACR-7-declared P7a band and the affordance law on CE64 bits 59..63 | Superseded | **Current:** the same probe is the conformance test, census 24 agree / 0 disagree / 8 reserved under the Cartesian V1 (D-EPI-MIG-0). **HISTORICAL — the pre-Cartesian pins below no longer describe the code:** `cognitive-shader-driver/examples/epistemic_reading_conflict_probe.rs`: contract-projected `Causes` reads as affordance code 20 `Related` (topology 0) or refuses (1..3), `COUNTERFACTUAL_PROBE` never eligible; `CAUSES` codes 1 and 17 sit on P7a `Open` / `CausalCandidate`; codes 25, 30 on P7a reserved bands; census over 24 cells = 3 agree, 5 disagree, 16 refuse; the affordance law measures where the contract refuses (undeclared / band `Absent`). Both readings run from shared code (`shared/affordance_law.rs`, and P7a's reading moved unchanged into `shared/certification_reading.rs`, used by `relational_certification_probe` too), never copied. Pins of current state, to become agreement tests when the issue closes (`ISS-EPISTEMIC-READINGS-DISAGREE-ON-BITS-61-63`); 5 tests, 6 disable runs red (3 on the affordance codebook, 3 on P7a's: `Contributes` entailment, a reserved code admitted, `Causes` recoded) |
| **D-MBX-CUTOVER-0** | ShaderDriver on MailboxSoA without BindSpace | In PR | `entries/2026-10-06-shaderdriver-bindspace-cutover.md`: every ShaderDriver → BindSpace edge classified (production state / shared resource / fallback / test oracle / fossil / dead). In `run()` the only mailbox-mode BindSpace read was the ontology; outside it, metrics and the builder read the singleton and `backing()` silently fell back for any mailbox not under id 0. Cutover: optional BindSpace, explicit mailbox selection with no fallback, ontology on the driver, metrics from the selected substrate; no temporal change. `tests/mailbox_cutover.rs` 8 tests, 8 disable runs red |
| **D-GSO-8** | P8: seal boundary | Shipped (#1363) | `lance-graph-planner/examples/seal_boundary_probe.rs`: internal events change only working rows; a declared `Boundary` event freezes the changed rows with the shipped `DetachedCycleBatch::freeze` into a local ledger (no `WalSink`); an unchanged boundary writes nothing; replaying the persisted events from each prior seal reproduces the next seal exactly (frame, landings, image, hash); wrong base, dropped event and swapped order each change the seal; tie limit handled by plan option 1: the key is the event's own durable unique `seq`, a tied batch is refused, and a test shows on the real `freeze` that tied keys make the seal arrival-dependent; 6 tests, 5 disable runs red. Follow-up: `apply` refuses a `seq` not greater than the last (a reuse on one row or across seals escaped `first_tie`), `resume_after` restores the top persisted key; 7 tests, 2 more disable runs red |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# 2026-10-07 — D-PUZZLE-0 step 1: Sudoku at scale on the population algebra

**Probe:** `cognitive-shader-driver/examples/sudoku_population_fold_probe.rs`.
**Status:** MEASURED (this machine), TEST-PINNED (7 tests, 3 disable runs red).

The question D-PUZZLE-0 opens: do Sudoku, crosswords and chess run on the same
`EpistemicState5` population algebra under their own domain laws? Step 1 is
Sudoku at scale, the hot path the other two would share:

```
one edge raw5 coordinate (bits 59..63)
one question facts_population(required) : u32
many edges declaration checked once per lane → population filter → fold
```

## Corpus and reading

1,000,066 claim edges ("cell c holds digit d", eliminated claims are not
edges) from 8,790 symmetry copies of the Sudoku Wikipedia puzzle (digit
relabel, band/stack and within-band/stack permutations, transpose). Each copy
is snapshotted after a random number of naked-single placements. Each copy's
full solve is checked against the transformed base solution, independently of
propagation order.

The reading is a probe-local declaration under class `0x0906`, not canon:

| claim | coordinate | raw5 |
|---|---|---|
| given | `Direct × Causes` | 20 |
| placed by a naked single | `IndirectKnown × Causes` | 21 |
| true digit, not yet derived | `IndirectUnknown × Causes` | 22 |
| other surviving candidate | `Direct × Associated` | 4 |

Row three is the state the Cartesian layout kept on purpose: the value is
entailed (unique solution, checked) but its derivation has not been produced.
The 5-bit state has no "refuted" coordinate, so eliminations are absences, not
edges. `Unknown × Causes` (23) is never emitted here. As populations, the
three placement states miss exactly that code, and the lane holds none of it.

## Measured

Counts (equal by the population filter, the 32-bin histogram, the per-edge
decode through the declaration, and the solver's own counters):

| question | population | edges |
|---|---|---|
| every placed digit | `CAUSES` = 0x00F00000 | 711,990 |
| givens | `DIRECT \| CAUSES` | 263,700 |
| derived, chain known | `IND_KNOWN \| CAUSES` | 227,189 |
| entailed, chain not derived | `IND_UNKNOWN \| CAUSES` | 221,101 |
| live candidates | `(DIRECT \| ASSOCIATED) & !RELATED` | 288,076 |

Group fold: every copy holds exactly 81 placed-digit claims and 30 givens.

Timing, release, `avx2=true avx512f=false`, 4-core shared Xeon @ 2.80 GHz,
median of 7 per run, three runs:

| path | ns / edge |
|---|---|
| one population, filter fold | 0.35 – 0.39 |
| 32-bin histogram (answers every question) | 0.93 – 1.07 |
| per-edge decode + asserts (oracle) | 3.8 – 4.0 |

The filter is about 10× cheaper per question than decoding each edge. The
histogram costs about 2.7 filters and then answers any population in 32
additions. With three or more questions per lane it is the cheaper fold. These
are one machine's numbers; no SIMD is claimed (plain loops; whether the
compiler vectorized them was not checked).

## Falsifiers

- Three-way count agreement for every question, and histogram == filter for
all 2,048 requirements over the declared facts.
- The four states partition the lane (disjoint populations whose union covers
every edge).
- Group fold: 81 placed and 30 givens per copy; depths actually vary.
- An undeclared class is refused before any edge is read.
- Disable runs: the fold reading bits 58..62 (3 tests red); a gate admitting
any class (1 red); "live candidates" without `!RELATED` (3 red).

## Next (not started)

- Crossword in lance-graph: claims "slot s holds word w" / "cell holds letter",
the crossing constraint as the domain law, the same lane and folds.
- Chess in `stockfish-rs` (GPL-3.0; shakmaty supplies legality and must not
enter Apache lance-graph). It consumes `lance-graph-contract`, which it
already dev-depends on.
- What would falsify "same algebra": a domain whose question cannot be
written as a fact conjunction, or whose fold needs per-domain code in the
shared path.
3 changes: 2 additions & 1 deletion .claude/board/entries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ index row, (3) no duplicate entry id. Checks 1 and 2 are deliberately
opposite directions; the stranding this convention prevents shows up in
exactly one of them, never both.

246 entries, 2026-08-06 .. 2026-10-07.
247 entries, 2026-08-06 .. 2026-10-07.

| date | entry id | finding | file |
|---|---|---|---|
| 2026-10-07 | `tinker-janus-fold-harvest` | TinkerPop bulk = K (GroupReduce), ONE_BULK = S, GValue pinning = bundle invalidation; JanusGraph slice = OrderedLaneWitness→Range (30–38×); no new V4 op | [2026-10-07-tinker-janus-fold-harvest.md](2026-10-07-tinker-janus-fold-harvest.md) |
| 2026-10-07 | `selector-seq-aware-coverage` | | [2026-10-07-selector-seq-aware-coverage.md](2026-10-07-selector-seq-aware-coverage.md) |
| 2026-10-07 | `D-PUZZLE-0` | | [2026-10-07-puzzle-0-sudoku-population-fold.md](2026-10-07-puzzle-0-sudoku-population-fold.md) |
| 2026-10-07 | `gated-gather-bit-schedule` | Production gather is 3.8× slow from a per-row branch; bit-gated visitation wins or ties at every density; ordinal vectors never win (R1 holds) | [2026-10-07-gated-gather-bit-schedule.md](2026-10-07-gated-gather-bit-schedule.md) |
| 2026-10-07 | `D-EPI-MIG-INVENTORY` | | [2026-10-07-epi-mig-inventory.md](2026-10-07-epi-mig-inventory.md) |
| 2026-10-07 | `D-EPI-CANON-0` | | [2026-10-07-epi-mig-0.md](2026-10-07-epi-mig-0.md) |
Expand Down
6 changes: 6 additions & 0 deletions crates/cognitive-shader-driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ required-features = ["with-engine", "mailbox-thoughtspace"]
name = "epistemic_reading_conflict_probe"
test = true

# D-PUZZLE-0 step 1: Sudoku at scale on the EpistemicState5 population
# algebra; tests run under `cargo test`.
[[example]]
name = "sudoku_population_fold_probe"
test = true

[dependencies]
lance-graph-contract = { path = "../lance-graph-contract" }
# Read-only ontology registry (Phase 7, v4 plan). default-features = false so the
Expand Down
16 changes: 16 additions & 0 deletions crates/cognitive-shader-driver/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,3 +397,19 @@ rendered witnesses never move it.
```bash
cargo run -p cognitive-shader-driver --example revision_epistemic_writer_probe
```

## sudoku_population_fold_probe.rs

D-PUZZLE-0, step 1. A million claim edges ("cell c holds digit d") from
symmetry copies of the Sudoku Wikipedia puzzle, snapshotted at random
naked-single depths, each carrying an `EpistemicState5` coordinate under a
probe-local declared reading (given = `Direct × Causes`, derived =
`IndirectKnown × Causes`, entailed but not yet derived =
`IndirectUnknown × Causes`, live candidate = `Direct × Associated`). One
question is one `u32` population (`facts_population`); the declaration is
checked once per lane. Every count agrees three ways — population filter,
32-bin histogram, per-edge decode — with the solver's own counters.

```bash
cargo run --release -p cognitive-shader-driver --example sudoku_population_fold_probe
```
Loading
Loading