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
1 change: 1 addition & 0 deletions .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +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-PEARL-IO-0** | Pearl's ladder executed in and out of `CausalEdge64`: bits 40..42 select the operator, the measurement revises bits 59..63 | In PR | `cognitive-shader-driver/examples/pearl_ladder_probe.rs`, `entries/2026-10-07-pearl-io-0-ladder-in-and-out-of-ce64.md`: SO → P7a observational folds, PO → P7a executed arms (only path to `Causes`), SPO → `counterfactual_replay` (reaction, never a certification), SP → SO-vs-PO direction; `hydrate` gates `IndirectUnknown → IndirectKnown` on both bindings. CUI BONO script: `IndirectUnknown × Related` → `IndirectKnown × Related` → `IndirectKnown × Causes`. 14 tests, 12 disable runs red. P7a model moved to `examples/shared/certification_model.rs` unchanged |
| **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) |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 2026-10-07 — D-PEARL-IO-0: Pearl's ladder executed in and out of CausalEdge64

**Probe:** `cognitive-shader-driver/examples/pearl_ladder_probe.rs`
(`--features with-planner`), over `examples/shared/certification_model.rs`
(the P7a model, moved unchanged) and `lance_graph_planner::dismech_counterfactual`.
**Status:** TEST-PINNED (14 tests; 12 disable runs, one per falsifier, all red).

## Question

Can an edge enter with one `EpistemicState5`, run the operator its Pearl
projection selects, and leave with a different state only because the
measurement earned it?

## Inventory (before code)

| need | existing | verdict |
|---|---|---|
| Pearl input | `CausalMask`, bits 40..42; `simpsons_paradox_risk` | used; nothing dispatched on it before |
| observational / intervention obligations | P7a `Model` folds (`relational_certification_probe`, #1369) | moved to `examples/shared/certification_model.rs`; `certify` split into `causes` + new `certify_observational` |
| counterfactual | `dismech_counterfactual::counterfactual_replay` (one replay path, −6 tag) | used as is |
| epistemic output | `EpistemicState5`, `Epi5Declarations::project_state5`, `stamp` | used |
| missing | dispatch on bits 40..42; write-back rule; topology gate | added in the probe (`pearl::{reason, revise, hydrate}`) |

## The seam

- `reason(edge, evidence, edit) -> Measured` reads bits 40..42 only. SO → P7a
observational folds (at most `CausalCandidate`); PO → P7a `causes` on the
executed arms; SPO → `counterfactual_replay` with one route cut; SP → SO vs
PO direction. `Measured` has private fields: only an operator produces one.
- `revise` raises the certification to what the operator earned when that is
strictly stronger, never lowers it, and writes bits 59..63 only. SPO and SP
earn nothing.
- `hydrate` moves `IndirectUnknown` to `IndirectKnown` only when both bindings
`A → B` and `B → Y` are in the sealed chain; certification never moves there.

## Measured (CUI BONO script)

| step | state |
|---|---|
| start, SO | `IndirectUnknown × Related` (SO earned `Related`, no change) |
| propose unbound candidate | unchanged (`ProposedOnly`) |
| hydrate `A → B → Y` | `IndirectKnown × Related` |
| PO, executed arms | `IndirectKnown × Causes` |
| SPO, cut `B → Y` | `LoadBearing` (frequency 185 → 120), state unchanged |
| SPO, cut `A → B` | `TruthOnly` (185 → 225), state unchanged |

- The replay's verdict is a NARS revision over the steps' frequencies, so a cut
can raise the terminal frequency (cutting the weak step). The reaction keeps
both frequencies. In the sweep that chose the fixture, endpoints did not
change the frequency.
- Y = A or B: removing A where B holds shows no reaction; with B disabled it
does; the randomized arms certify `Causes`. The chain replay is linear and
cannot express the OR, so the contingency is a mask over the unit population.

## Falsifiers (disable-verified red)

F1 SO reads the trial (`certify` instead of `certify_observational`); F2 SPO
certifies without evidence; F3 a load-bearing cut earns `Causes`; F4 the
counterfactual terminal edge written back; F5 hydration without bindings; F6
confounding demotes `Causes`; F7 a null reaction demotes; F8 revision clears
the mantissa; F9 nondeterministic dispatch; F10 intervention receipts without
arms earn `Causes`; F11 bits 59..63 select the operator; F12 the mantissa
selects the operator.

## Open

- Production placement of `reason` / `revise` / `hydrate`.
- Whole-node removal of B (only route cuts run; in a two-step chain they are
B's only mechanisms).
- Contingency search beyond one disabled cause; no responsibility framework.
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.

254 entries, 2026-08-06 .. 2026-10-07.
255 entries, 2026-08-06 .. 2026-10-07.

| date | entry id | finding | file |
|---|---|---|---|
Expand All @@ -35,6 +35,7 @@ exactly one of them, never both.
| 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 | `D-PEARL-IO-0` | | [2026-10-07-pearl-io-0-ladder-in-and-out-of-ce64.md](2026-10-07-pearl-io-0-ladder-in-and-out-of-ce64.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
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[![Rust Tests](https://github.com/AdaWorldAPI/lance-graph/actions/workflows/rust-test.yml/badge.svg)](https://github.com/AdaWorldAPI/lance-graph/actions/workflows/rust-test.yml) [![Style Check](https://github.com/AdaWorldAPI/lance-graph/actions/workflows/style.yml/badge.svg)](https://github.com/AdaWorldAPI/lance-graph/actions/workflows/style.yml) [![Build](https://github.com/AdaWorldAPI/lance-graph/actions/workflows/build.yml/badge.svg)](https://github.com/AdaWorldAPI/lance-graph/actions/workflows/build.yml)

[![CausalEdge64 semantic upper half: Pearl ladder, orientation, activation, entropy, belief-state update, epistemic state](docs/architecture/img/ce64-semantic-upper-half.png)](#the-causal-edge-register)

A Rust workspace for graph and columnar query execution over Arrow and Lance. It has:

- a Cypher and SQL engine on DataFusion;
Expand Down Expand Up @@ -62,6 +64,18 @@ What this means:
and parses Gremlin and SPARQL into its own `Arena<LogicalOp>`. It does not
execute queries.

## The causal edge register

`CausalEdge64` (`crates/causal-edge`) packs one relation into 64 bits: the
S, P, O palette indices, frequency and confidence in bits 0..39, and the
reasoning fields in bits 40..63.

The diagram at the top of this page is a working model of bits 40..63, not
the layout's definition. Bits 0..42 and 59..63 match the code. The code reads
bits 43..52 differently (direction triad, inference mantissa, plasticity), and
bits 53..58 hold one witness handle. The band-by-band comparison is in
[`docs/architecture/ce64-semantic-upper-half.md`](docs/architecture/ce64-semantic-upper-half.md).

## Workspace

59 crate directories under `crates/`: 22 are workspace members and 37 are
Expand Down
8 changes: 8 additions & 0 deletions crates/cognitive-shader-driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ test = true
name = "relational_certification_probe"
test = true

# D-PEARL-IO-0: Pearl's ladder executed in and out of CausalEdge64 — bits
# 40..42 select the operator (P7a folds, P7a trial, dismech counterfactual
# replay, SO-vs-PO confounder check); the measured result revises bits 59..63.
[[example]]
name = "pearl_ladder_probe"
test = true
required-features = ["with-planner"]

# D-GSO-AFF-0 affordance-measurement probe; tests run under `cargo test`.
[[example]]
name = "affordance_measurement_probe"
Expand Down
14 changes: 14 additions & 0 deletions crates/cognitive-shader-driver/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,17 @@ claim lane the shared three ways. German needs `DEREKO_PATH`. Board:
cargo run --release -p cognitive-shader-driver --example crossword_mask_propagation_probe
```

## pearl_ladder_probe.rs

D-PEARL-IO-0. Pearl's ladder executed in and out of `CausalEdge64`. Bits
40..42 select an existing operator: SO runs the P7a observational folds, PO
the P7a executed randomized arms, SPO `dismech_counterfactual::counterfactual_replay`
with one route cut, SP the SO-vs-PO direction check. `revise` raises bits
59..63 only to what the operator earned; `hydrate` moves `IndirectUnknown`
to `IndirectKnown` only when both bindings of the path are sealed.

```sh
cargo run -p cognitive-shader-driver --features with-planner --example pearl_ladder_probe
cargo test -p cognitive-shader-driver --features with-planner --example pearl_ladder_probe
```

Loading
Loading