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
5 changes: 5 additions & 0 deletions .claude/board/LATEST_STATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2026-10-07 — lance-graph #1382 and #1384 MERGED; D-PUZZLE-0 step 3 on branch

- #1382 (`bccc46e`): Sudoku population-fold probe. #1384 (`23e8d93`): shared fold module + crossword probes (steps 2/2b). No contract change in either.
- Step 3 (branch `claude/epistemicstate5-ce64-bits-3oe0dq`, unmerged): `crossword_mask_propagation_probe.rs`, four representations of one fold; `deepnsm-v2` is now a dev-dependency of `cognitive-shader-driver`. No contract type added: `MooreSymbol8` is probe-local.

## 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
Expand Down
13 changes: 13 additions & 0 deletions .claude/board/PR_ARC_INVENTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 2026-10-07 — lance-graph PR #1384 (merged `23e8d93`, branch `claude/epistemicstate5-ce64-bits-3oe0dq`, head `94499c3`, 9 commits) — D-PUZZLE-0 steps 2/2b: crosswords on the Sudoku population fold

- **Added:** `examples/shared/population_fold.rs` (the domain-free half: propagation reading, five `facts_population` questions, three folds, declaration gate; a fence test bans domain words); `crossword_population_fold_probe.rs` (synthetic 3-letter alphabet); `crossword_real_words_probe.rs` (DeepNSM v1 4096 + `academic_20k`, DeReKo top 20k from `DEREKO_PATH`; NYT-rule grids; Down-and-Across answers from `XWORD_ANSWERS_DIR`).
- **Locked (test-pinned):** Sudoku counts unchanged after the refactor (1,000,066 edges); every crossword count equal three ways; disable runs red.
- **Deferred / open:** the 2b NYT-grid and crossword-answer modes (`94499c3`) were never run end to end; step 3 supersedes the grid generator.
- **Confidence:** high for the shared-fold claim; the 2b real-word numbers are one run each.

## 2026-10-07 — lance-graph PR #1382 (merged `bccc46e`, branch `claude/epistemicstate5-ce64-bits-3oe0dq`, head `55f2d0f`, 3 commits) — D-PUZZLE-0 step 1: Sudoku at scale on the EpistemicState5 population fold

- **Added:** `sudoku_population_fold_probe.rs`: ~1M claim edges in the propagation reading (GIVEN 20 / FORCED 21 / ENTAILED 22 / CANDIDATE 4); five questions as `facts_population` masks, counted by filter, histogram and per-edge decode.
- **Locked (test-pinned):** all counts equal three ways and to the generator's counters; the probe is a registered test target (Codex P2).
- **Confidence:** high; timings one machine.

## 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`.
Expand Down
2 changes: 1 addition & 1 deletion .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Plan: `.claude/plans/2026-10-06-global-sudoku-replayable-orchestration-v1.md`. O
| **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 shipped (#1382). Step 2 crossword (`crossword_population_fold_probe.rs`, `entries/2026-10-07-puzzle-0-crossword-same-algebra.md`): domain-free half moved to `examples/shared/population_fold.rs` (fence test, Sudoku counts unchanged); 1,000,052 crossword edges, counts equal 3 ways; filter 0.30–0.43 ns/edge in both domains. Step 2b real words (`crossword_real_words_probe.rs`, `entries/2026-10-07-puzzle-0-crossword-real-words.md`): English = DeepNSM v1 4096 + academic_20k (committed), German = DeReKo top 20k only from `DEREKO_PATH` (CC BY-NC, nothing committed); ~1.0M edges each, counts equal 3 ways. Next: chess in `stockfish-rs` (GPL) — how it reaches the shared half is open |
| **D-PUZZLE-0** | Sudoku / crossword / chess on the same population algebra under domain laws | In progress | step 1 Sudoku shipped (#1382). Step 2 crossword (`crossword_population_fold_probe.rs`, `entries/2026-10-07-puzzle-0-crossword-same-algebra.md`): domain-free half moved to `examples/shared/population_fold.rs` (fence test, Sudoku counts unchanged); 1,000,052 crossword edges, counts equal 3 ways; filter 0.30–0.43 ns/edge in both domains. Step 2b real words (`crossword_real_words_probe.rs`, `entries/2026-10-07-puzzle-0-crossword-real-words.md`): English = DeepNSM v1 4096 + academic_20k (committed), German = DeReKo top 20k only from `DEREKO_PATH` (CC BY-NC, nothing committed); ~1.0M edges each, counts equal 3 ways. Steps 2/2b merged (#1384). Step 3 (`crossword_mask_propagation_probe.rs`, `entries/2026-10-07-puzzle-0-crossword-mask-propagation.md`): Morton cell + `(slot:offset)` lanes, DeepNSM-v2 `WordId` masks, `MooreSymbol8` letters; four arms on identical puzzles (EN 5×5: token 3.0 µs ≈ hybrid 2.9, Cartesian 5.1, literal ~1,045); with no repeated words, creation stops at 5×5 with the 18–20k vocabularies; cui-bono ablation of givens. Next: chess in `stockfish-rs` (GPL) — how it reaches the shared half is open |
| **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 |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# 2026-10-07 — D-PUZZLE-0-XWORD-MASK (D-PUZZLE-0 step 3): crossword propagation as Cartesian-addressed masking

**Probe:** `cognitive-shader-driver/examples/crossword_mask_propagation_probe.rs`,
over `examples/shared/population_fold.rs` (unchanged).
**Status:** MEASURED (one machine, release, `avx2=true avx512f=false`),
TEST-PINNED (20 tests; 13 disable runs, listed below, all red).

## Question

Once a crossword is compiled, is propagation the Sudoku operation
(`mask → intersect → popcount → promote → expose → adjacent masks → repeat`),
with nothing crossword-shaped on the hot path? And which physical
representation of that one logic is best, on identical puzzles?

## Inventory (read-only, before any code)

| need | existing facility | verdict |
|---|---|---|
| cell (WHERE) | `Morton8x8::from_xy(col,row)`, u16 | used |
| slot position | `FacetTier{hi: slot, lo: offset}.as_u16()` | used |
| crossing | no stored relation (`morton8x8.rs`: "no stored edge"); equality of cell codes, compiled once into `cross[slot:offset]` and `occupant[cell]` lanes | used |
| word (WHAT) | DeepNSM-v2 `PaletteVocab::from_frequency_ranked`, `WordId = u16` | used |
| masks | `ndarray::simd::{mask_and_assign, popcount_batch_u64}` (already a dependency) | used |
| `MaskOp::Gather` (#1383) | foreign-key semijoin | not needed: elimination is an AND within one WordId space |
| letter | no canonical Moore symbol space: every Moore in the repo is a direction table, a grid-edge validity byte or a palette-law operand | declared probe-local `MooreSymbol8` |

No new primitive and no contract change. `deepnsm-v2` became a dev-dependency
of the driver (its `guid-v3-tail` is already a default contract feature).

## Encodings

- `MooreSymbol8` (u8): `0` unknown, `1..=26` a–z, `27` ä, `28` ö, `29` ü,
`30` ß, `31..=255` reserved. Accented Latin letters fold to the base letter
(`cliché` is spelled `cliche`); ä ö ü ß are letters of their own. A word with
any other character keeps its `WordId` and is not a crossword word.
Promoting this reading to a canonical value tenant is a contract decision,
not taken here.
- English vocabulary: `academic_20k.csv`, lowercased, through
`from_frequency_ranked`, exactly as `deepnsm-v2/examples/genre_shapes.rs`
builds it: **18,555** ids (`vocab.rs` quotes 18,559 distinct surfaces; four
collapse when lowercased), 17,548 crossword words.
- German vocabulary: no German vocabulary is committed and DeepNSM-v2 builds
none. With `DEREKO_PATH`, the 20,000 most frequent DeReKo-2014 forms
(lowercased, `NE` and non-alphabetic forms dropped, frequencies summed),
19,835 crossword words. CC BY-NC 3.0; counts only here, nothing derived
committed.
- Candidates: `P(L, i, x)` bitsets over a language's `WordId`s; a slot starts
at `P_all(L)`. 16.4 MB (EN) / 17.7 MB (DE) of populations for L = 3..=21.
- State: CE64 bits 59..63 only, the shared GIVEN 20 / FORCED 21 / ENTAILED 22
/ CANDIDATE 4. Slot and word sit in separate content lanes.

## The four arms (same puzzles, same givens; equal fixed points asserted)

| arm | content | addressing | propagation |
|---|---|---|---|
| A token | `WordId` masks | `cross` | letter at offset `i` ANDs `P(L,j,x)` into the crossing slot |
| B Cartesian | `MooreSymbol8` board | `occupant` | symbols written; affected slots recompute from all their cells |
| C literal | strings | cell array | every unplaced slot re-scans vocabulary strings each round (steps 2/2b) |
| D hybrid | `WordId` masks + board | `occupant` | each new symbol ANDs one `P` into the cell's other slot |

## Measured

Final run at `2bdb50b` (both review fixes in). One machine, release,
`avx2=true avx512f=false`.

Filter, 2000 patterns (length + 1–3 revealed symbols):

| | EN | DE |
|---|---|---|
| mask AND chain + popcount | 775 ns/pattern, 11.2 ns/claim | 543 ns/pattern, 6.0 ns/claim |
| direct spell-lane scan | 35,755 ns/pattern | 42,124 ns/pattern |

Solve, median over puzzles of each arm's best of 5 warm runs, rotated order,
one warm-up per arm; the literal arm's word list is built once per language,
outside the timing (µs):

| | A token | D hybrid | B Cartesian | C literal | ANDs A / B | bytes A / B |
|---|---|---|---|---|---|---|
| EN 5×5 (30) | 3.0 | 2.9 | 5.1 | 1,045 | 11.3 / 20.4 | 23,220 / 2,381 |
| DE 5×5 (30) | 2.3 | 2.3 | 3.7 | 986 | 7.6 / 11.4 | 25,060 / 2,568 |

- A and D cost the same: routing letters through the Morton board adds no
measurable time. B does about twice the ANDs (it recomputes) and is ~1.6×
slower, but holds ~10× fewer bytes (one board instead of a full WordId
mask per slot). C, the string method, is ~350–430× slower than A.
- Two earlier timing methods were wrong and are superseded by the table
above: timing each arm once, cold, A first (A showed 16.6 µs against D's
6.9 µs at an equal AND count: cache warm-up), and timing the literal arm
once including the rebuild of its word list (~5,200 µs; Codex review).
- The shared fold on a 5×5 lane (~1.0M claims, EN and DE): every count equal
three ways; filter 0.34–0.35 ns/edge, histogram ~2.0, decode oracle ~3.6 —
the same costs as Sudoku and steps 2/2b.

Creation (budget 100,000 tried words per step, 30 s per size), NYT-rule
grids, **no word used twice in one fill**:

| side | EN made / misses | DE made / misses |
|---|---|---|
| 5 | 30 / 1 | 30 / 4 |
| 7–21 | 0 (all misses are fill, none uniqueness) | 0 (same) |

The no-repeat rule (CodeRabbit review) changed the 7×7 result. Before it,
EN made 5 / 175 and DE 2 / 163 boards at 7×7; with it, none. Those fills
reused a word across slots, which a crossword does not allow. So with the
18–20k general vocabularies, creation stops at 5×5. Solving is not the limit
at any size measured; creation is. The likely cause is vocabulary density
(crosswords are built from answer lists with many short fill words); not
measured here.

Cui bono, each given removed in turn (fixed point re-run + uniqueness count),
5×5 only (no larger board was created):

| | givens | Redundant | ShortcutOnly | SilentlyNecessary | Necessary | out of budget |
|---|---|---|---|---|---|---|
| EN 5×5 | 116 | 28 | 40 | 0 | 48 | 0 |
| DE 5×5 | 74 | 14 | 25 | 0 | 35 | 0 |

Mean slots lost from the fixed point per removed given: EN 1.26, DE 0.20.
`SilentlyNecessary` (a given propagation never used but search needs) did not
occur in the 190 ablations. The readout nominates; it does not prove cause: a
given necessary in one set can be replaced by another set.

## Falsifiers (disable-verified red)

Arm A ignores crossings (4 tests); letters a/b swapped (codebook, decode);
index drops offset 0 (5, incl. index-vs-scan); no promotion at popcount 1 (2);
first crossing only (every-crossing test); zero candidates not a contradiction;
language gate removed; word bits written into the edge (CE64 test); crossings
rediscovered from the cell lane (compiled-lanes test); ablation ignores
uniqueness, and ablation removes nothing (both ablation tests); no-repeat
rule removed (fills-never-repeat test).

## Open

- Creation beyond 5×5 with these vocabularies (try a crossword answer list
at runtime).
- Whether `MooreSymbol8` (and a `MooreLearn8` companion) become canonical
value tenants: a contract decision.
- The step-2b NYT-grid + crossword-answer mode (#1384, `94499c3`) was never run
end to end; this probe supersedes its grid generator.
3 changes: 2 additions & 1 deletion .claude/board/entries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ 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.

252 entries, 2026-08-06 .. 2026-10-07.
253 entries, 2026-08-06 .. 2026-10-07.

| date | entry id | finding | file |
|---|---|---|---|
Expand All @@ -34,6 +34,7 @@ exactly one of them, never both.
| 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 | `D-PUZZLE-0-XWORD` | | [2026-10-07-puzzle-0-crossword-same-algebra.md](2026-10-07-puzzle-0-crossword-same-algebra.md) |
| 2026-10-07 | `D-PUZZLE-0-XWORD-REAL` | | [2026-10-07-puzzle-0-crossword-real-words.md](2026-10-07-puzzle-0-crossword-real-words.md) |
| 2026-10-07 | `D-PUZZLE-0-XWORD-MASK` | | [2026-10-07-puzzle-0-crossword-mask-propagation.md](2026-10-07-puzzle-0-crossword-mask-propagation.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
7 changes: 7 additions & 0 deletions crates/cognitive-shader-driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ test = true
name = "crossword_real_words_probe"
test = true

[[example]]
name = "crossword_mask_propagation_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 Expand Up @@ -233,3 +237,6 @@ lab = ["serve", "grpc", "with-engine", "with-planner"]
# D-CTX-0: the one Fisher-Z calibrator, for the probe only. Production code
# borrows the calibrated bytes; it never depends on the calibrator.
bgz-tensor = { path = "../bgz-tensor" }
# D-PUZZLE-0 step 3: crossword candidates are DeepNSM-v2 `WordId`s, assigned by
# its own `PaletteVocab::from_frequency_ranked`. Probe-only.
deepnsm-v2 = { path = "../deepnsm-v2" }
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 @@ -442,3 +442,19 @@ edges per language; every count agrees three ways. Board:
cargo run --release -p cognitive-shader-driver --example crossword_real_words_probe
DEREKO_PATH=/path/DeReKo-2014-II-MainArchive-STT.100000.freq cargo run --release -p cognitive-shader-driver --example crossword_real_words_probe
```

## crossword_mask_propagation_probe.rs

D-PUZZLE-0 step 3. Is crossword propagation the Sudoku operation, and which
representation of it is best? Cells are `Morton8x8` codes, slot positions
`(slot:offset)` tiles, crossings two compiled u16 lanes, letters a declared
`MooreSymbol8` byte, candidates DeepNSM-v2 `WordId` bitsets. Four arms (token,
Cartesian board, literal strings, hybrid) solve the same created puzzles to the
same fixed point; the run also ablates each given (cui bono) and folds a ~1M
claim lane the shared three ways. German needs `DEREKO_PATH`. Board:
`.claude/board/entries/2026-10-07-puzzle-0-crossword-mask-propagation.md`.

```
cargo run --release -p cognitive-shader-driver --example crossword_mask_propagation_probe
```

Loading
Loading