diff --git a/.claude/board/AGENT_LOG.md b/.claude/board/AGENT_LOG.md index c934024c3..f88d1413e 100644 --- a/.claude/board/AGENT_LOG.md +++ b/.claude/board/AGENT_LOG.md @@ -1,3 +1,9 @@ +## 2026-10-15 — ledger-correction batch: two Haiku harvest runs + +- Card `harvest-scout` over ndarray `src/hpc/*cascade*` + blackboard (O20): hits at `cascade.rs:270-276`, `:813`, blackboard `:84-90` read and confirmed; 0 wrong, 0 missed. Earlier in the session the doc scout returned counts without hits (one miss on that kind of task). +- General-purpose on Haiku, PR bodies #1494–#1504 verbatim (N3): 11/11 fetched; merge SHAs absent from the fetch and taken from `git log`; 2 deletions counts missing. Bodies used as written; 0 wrong. +- Cost: about 338k and 425k subagent tokens. No conclusion came from a card. + ## 2026-10-14 — D-MTP-0 harvest: six substrate-mapper runs, one reply each - Card `substrate-mapper` (run as a general-purpose agent with the card pasted; the card is not registered in this session), six units: `hyperon-atom`, `hyperon-space`, the minimal-MeTTa interpreter, the grounded stdlib, lance-graph `nal`/`r2il`/`relalg`, `quack`. diff --git a/.claude/board/PR_ARC_INVENTORY.md b/.claude/board/PR_ARC_INVENTORY.md index f76fc2981..d48e36a6b 100644 --- a/.claude/board/PR_ARC_INVENTORY.md +++ b/.claude/board/PR_ARC_INVENTORY.md @@ -174,6 +174,83 @@ - **Confidence:** high for the flags; the CI regression is the caveat above. - **Correction (2026-10-13, from the full PR body and commit `12cdfde`):** the PR body's "every workflow sets `RUSTFLAGS` with an explicit `-C target-cpu=x86-64-v3`" was false: `dir-sim-persist.yml` and `identity.yml` set none, and that is where the SIGILL appeared. The wheel pin is not in the body; it came in the second commit `12cdfde` (Codex P1 on `make publish`), as did replacing the global Docker `ENV RUSTFLAGS` with `config-v3.toml` / `CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS` so arm64 builds are untouched (Codex P2). Not recorded before: the two thinking-engine images had been building at generic x86-64 (SSE2) and now build at v3. +## 2026-10-12 — lance-graph PR #1504 (merged `c853cffa`, branch `ccr-9f3b8075-74u47l`, 12 commits) — D-CMH-1: class-qualified methods compile into Quack algebra, with no Rust per method + +- **Added:** `glove-parity/src/method.rs` (`MethodSpec`, `Glove`, `MethodTable`, `PreparedMethod`, `GroupSum`, `Law::NarsRevision`, `SchemaSeal` / `ReadingId` / `Universe`), `glove-parity/src/call.rs` (`resolve_call`), `examples/method_cost.rs`; R2IL `select_u32` + `count`; `POP_COUNT` / `SUM` / `GROUP_SUM` / `KEEP` read a resident plane as their mask. No new mask-risc or R2IL op. +- **Locked:** a prepared method's `programs()` equals `lower(direct query)`; Quack, R2IL and a row loop agree at n ∈ {1, 64, 65, 4097}; `NarsRevision` matches OpenNARS's three reference revisions; repeated stamps leave truth unchanged. Cost on 1,048,576 rows (v3): method warm call 600 µs vs direct Quack 599 µs vs scalar loop 366 µs. +- **Deferred / open:** `FirstOfRun` over an ordered key; retraction by semijoin (typed insufficiency today); three-valued conditions; method-key mint in OGAR (#357); compute-DAG at 256 positions (done in #1506); a fused filter + fold terminal. +- **Confidence:** high; 13 disable runs red. Board entry `2026-10-12-class-method-polyfill-ledger.md`. + +## 2026-10-12 — lance-graph PR #1501 (merged `ec3fee7d`, branch `docs/class-method-hotplug-activation-rfc`, 7 commits) — docs: class-method HotPlug activation across Quack and R2IL (D-CMH-0) + +- **Added:** plans `class-method-schema-hotplug-v1.md` (D-CMH-0..12) and `class-method-hotplug-falsifiers-v1.md` (CMH-P01..P24); knowledge `class-method-hotplug-existing-contracts.md`; board entry D-CMH-0. +- **Locked:** `ogar-loco::Inventory`, `VecInventory::push_keyed` and `Interpreter::with_inventory` already exist; the gap is their link to OGAR `MethodDecl`, Quack bindings and R2IL procedures. OGAR stays the only DO authority; one `mask-risc → ndarray` executor. +- **Deferred / open:** where the `PreparedClass` sidecar lives (not in `lance-graph-contract`); implementation went to #1504. +- **Confidence:** n/a (docs; no tests run). + +## 2026-10-12 — lance-graph PR #1499 (merged `060e8e63`, branch `docs/ce64-nars-evidence-primary-excerpts-20261012`, 2 commits) — docs: NARS internal evidence, fission and snapshot excerpts (follow-up #1496) + +- **Added:** `.arxiv/2026-10_nars_self_epistemic_needs_evidence_primary_excerpts.md` (Wang, Li & Hammer 2018; Jøsang 2007; Goertzel 2021) and a board entry. +- **Locked:** nothing; five proposed red tests (same observation in two layers must not raise confidence; contributor removal; separate source / derivation / attention roles; version-k fold replays during k+1 append; appraisal ablation never rewrites truth). +- **Deferred / open:** all five tests unrun. +- **Confidence:** n/a (docs). + +## 2026-10-12 — lance-graph PR #1500 (merged `f746e634`, branch `docs/rubicon-gollwitzer-volition-research-20261012`, 3 commits) — docs: Rubicon volition source excerpts and falsifiable agent mapping (D-RV-0..9) + +- **Added:** `.arxiv/2026-10_rubicon_gollwitzer_volition_source_excerpts.md` (9 sources) and plan `rubicon-volition-v1.md` (D-RV-0..9). +- **Locked:** NARS and CE64 evidence never become desire or action authority; bits 59..63 are not reassigned to volition. +- **Deferred / open:** the A–E falsifier (deliberate each step / committed goal / + if-then / + counterfactual revision and disengagement / + mental contrasting) unrun; OGAR ActionDef / ONA / RIG mapping pending a source census. +- **Confidence:** n/a (docs). + +## 2026-10-12 — lance-graph PR #1498 (merged `c73acbc2`, branch `docs/hyperon-metta-to-lg-parity-20261012`, 3 commits) — docs: Hyperon/MeTTa → lance-graph semantic projection and fold parity + +- **Added:** `.arxiv/2026-10_hyperon_metta_to_lance_graph_parity_map.md` (HY-Q01..15, candidate lowering matrix) and a board entry. +- **Locked:** a row mask representing two matching rows is not equivalent to `b4_nondeterm.metta`'s four alternatives; a column SUM does not prove a metagraph fold law. +- **Deferred / open:** upstream interpreters not run; later taken up as D-MTP (#1553). +- **Confidence:** n/a (docs). + +## 2026-10-12 — lance-graph PR #1497 (merged `e323b918`, branch `docs/opencog-pln-shannon-entropy-research-20261012`, 3 commits) — docs: OpenCog PLN × Shannon attention research map and falsifiers + +- **Added:** `.arxiv/2026-10_opencog_pln_shannon_attention_research_map.md` (OC-Q01..13) and a board entry. +- **Locked:** NARS frequency and PLN strength are not silently read as calibrated probabilities; PLN priority, ECAN and Staunen/Moore are three mechanisms. +- **Deferred / open:** the scheduler swap (FIFO / confidence / naive Shannon / EIG / Moore-Staunen at fixed rules and budget) unrun. +- **Confidence:** n/a (docs). + +## 2026-10-12 — lance-graph PR #1503 (merged `60255ec6`, branch `ccr-0455e606-wmtsor`, 1 commit) — dir-sim: membership path witness and role evidence before/after + +- **Added:** `membership_path` / `membership_path_through` → `MembershipPath` (BFS, shortest chain, lowest ordinal on ties); `GroupRoles::role_evidence` → `Held` / `NotHeld` / `Undetermined { unread }` / `NotDeclared`; `RoleImpact::between`. Identity CI runs dir-sim with `--features rbac`. +- **Locked:** each version is decided on its own, so an alternative chain is not a loss; `is_lost` / `is_gained` need a known `NotHeld` on the other side; roles come only from read, declared grants. +- **Deferred / open:** which policy version granted a role; device memberships; proposal export. +- **Confidence:** high; 11 tests, 7 disable runs red. + +## 2026-10-12 — lance-graph PR #1502 (merged `40409589`, branch `ccr-0455e606-wmtsor`, 4 commits) — docs: policy baseline plan (GPO, Intune, Linux) and visualization prompts (D-PBL-0..7) + +- **Added:** plan `policy-baseline-integration-v1.md` (D-PBL-0..7: configured / assigned / observed kept apart; read-only encoders in `ogar-ad` / `ogar-az`; GPO↔CSP mapping read as data) and `visualization-prompts-v1`. +- **Locked:** GPO has no central observed state, so a GPO column never shows drift. +- **Deferred / open:** everything past D-PBL-0 waits on the operator (setting key, home crate, Linux source). +- **Confidence:** n/a (docs). + +## 2026-10-12 — lance-graph PR #1496 (merged `349e63af`, branch `ccr-9f3b8075-74u47l`, 9 commits) — docs: CE64 hypothesis-layers plateau, plans D-HL-0..10 and D-NALP-0..11, research map + +- **Added:** `.claude/knowledge/ce64-reasoning-substrate-plateau.md`, plans `ce64-hypothesis-layers-v1.md` (D-HL-0..10) and `nal-polyfill-v1.md` (D-NALP-0..11), `.arxiv/2026-10_ce64_hypothesis_layers_research_map.md`, board rows. +- **Locked:** no stored bit changes meaning; 8 design-vs-code disagreements recorded, each with the decision it needs (bits 46..49 opcode vs activation; 50..52 plasticity; 10 rung lanes, not 64; overlay rows discarded, not persisted). +- **Deferred / open:** D-HL-1 operator decisions; per-class reading of 40..63 (H-1) — withdrawn 2026-10-15 by the wire-contract ruling (`entries/2026-10-15-ledger-correction-wire-contract.md`). +- **Confidence:** n/a (docs). + +## 2026-10-12 — lance-graph PR #1495 (merged `43000203`, branch `ccr-9f3b8075-74u47l`, 6 commits) — NAL-1..9 × 34 recipes audit: MCP receipt probe, revision laws against OpenNARS (D-NAL-MCP-0, D-NAL-REV-0) + +- **Added:** `planner/tests/mcp_receipt_probe.rs`, `planner/tests/nal_revision_oracle.rs`, `.claude/knowledge/nal-recipe-audit/` (34-row recipe table, 115-row NAL inventory, schedule-depth scan, Narsese fixture, Java runner). +- **Locked:** MCP (recipe 10) cannot tell a calibrated past from an overconfident one (`wave_dispatch.rs` discards `run_recipes`); revision paths A/C/D/E match 3/3 OpenNARS points, B1 (replay) 0/3, B16 2/3, `grammar::revise_truth` 0/3; 64 of 256 masks schedule at depth 2. +- **Deferred / open:** D-NAL-RCPT-1 (a receipt a recipe can read), design only. +- **Confidence:** high; 8 disable runs red. + +## 2026-10-11 — lance-graph PR #1494 (merged `3f8d13c4`, branch `ccr-b2e415d9-4jfvyk`, 8 commits) — planner: residue fixed point + Maslov Pyramid of Cognition probe (D-RESIDUE-FP-0, D-MATURATION3-0) + +- **Added:** `planner/tests/residue_fixed_point.rs`, `planner/tests/maturation_ladder.rs`, `.claude/knowledge/maslov-pyramid-of-cognition.md`, two board entries. No production code. +- **Locked:** `pearl::hydrate` reaches a fixed point (extra passes bit-identical; only bits 59..60 change); derived relations carry their parents' root union and add none; two paths from one observation count 2, not 4; cycles cannot ground themselves; `mature` 1.99–2.83 ns median, 0 allocations. +- **Deferred / open:** production feedback needs D2 provenance ids; recipe-output → stage mapping; the stage reading of bits 50..52 (ruled 2026-10-15: the pyramid IS the plasticity ladder, pending a global version gate). +- **Confidence:** high; 14 disable runs red (2 residue, 12 maturation). + ## 2026-10-09 — lance-graph PR #1432 (merged `d29d0aa`, branch `ccr-edc85bd9-89tiwe`, head `669fc42`, 7 commits) — D-SCF-CARE-PAIR-0: crossing counterfactuals, pairwise nogoods, folded chain relations - **Added:** `cognitive-shader-driver/examples/crossword_crossing_care_probe.rs` (`test = true`; 10 tests) over the unchanged `shared/crossword_core.rs`: letter support, single- and two-crossing counterfactuals, pairwise nogoods, existential elimination of internal slots into a canonical reusable 31×31 count relation. diff --git a/.claude/board/STATUS_BOARD.md b/.claude/board/STATUS_BOARD.md index bd0c62540..794d0326d 100644 --- a/.claude/board/STATUS_BOARD.md +++ b/.claude/board/STATUS_BOARD.md @@ -124,7 +124,7 @@ Plan: `.claude/plans/nal-polyfill-v1.md`. Template: D-SQLP. No opcode, tenant or | D-id | scope | status | gate / falsifier | |---|---|---|---| -| **D-NALP-0** | Plan, board rows | In PR | docs only | +| **D-NALP-0** | Plan, board rows | Shipped (#1496) | docs only | | **D-NALP-1** | Statement layout + declared ClassView reading; additive `WideFieldMask` projection path on `ClassView`; binder's mask; term width decision | Partial: #1525 merged `08635ed` (NodeGuid reading `nal-statement-v1`, term width u16, aperture selection); ClassView wide projection and binder mask Queued | only the mask's lanes are read; undeclared reading and masked-out field refuse; Small = Wide answers | | **D-NALP-2** | Query procedures: select, truth threshold, choice by confidence, support count | Shipped #1525 `08635ed` (`crates/lance-graph-nal`: NodeGuid key, byte apertures; 7 oracle tests, 7 disable runs red; 19–248 ns at 1,048,576 rows); support count and argmax not built | equal to a row-at-a-time oracle; one-pattern threshold disable red; no new opcode | | **D-NALP-3** | Revision as `GroupCrossPowerSumsI32` over stored `w`/`f` | Shipped #1538 `4ceaab3` (`nal::Revision`, key = evidence class from the stamps; refuses overlap and missing provenance; 11 tests, 7 disable runs red; ONA's mid-fold saturation is a documented divergence, the fold keeps the exact sum) | equal to exact integer revision; OpenNARS revision points; duplicate evidence counts once | @@ -143,7 +143,7 @@ Plan: `.claude/plans/ce64-hypothesis-layers-v1.md`. Plateau: `.claude/knowledge/ | D-id | scope | status | gate / falsifier | |---|---|---|---| -| **D-HL-0** | Plateau, plan, research map, board entry | In PR | docs only; every claim cites a file or entry | +| **D-HL-0** | Plateau, plan, research map, board entry | Shipped (#1496) | docs only; every claim cites a file or entry | | **D-HL-1** | Decisions O1 (46..49), O2 (50..52), O3 (W), O5 (lane budget), O6 (what persists) | Queued (operator) | stored-meaning changes ship behind a version gate | | **D-HL-2** | Merge-on-read vs in-place revision | Queued | merge-on-read within 1 code of exact on every cell where in-place is not; ≥ 1 cell differs by ≥ 2 codes | | **D-HL-3** | Per-delta evidential base as the independence test (layer ≠ source) | Queued | sd ratio within 10 % of 1.0 on all four cases, incl. a cross-layer duplicate (counts once) and two independents in one layer (count twice); a layer-keyed rule must fail those two | @@ -170,6 +170,16 @@ Plan: `.claude/plans/policy-baseline-integration-v1.md`. | **D-PBL-6** | Console projection; empty where no source | Queued | each cell names its source | | **D-PBL-7** | Linux source | Parked (D-PBL-0) | — | +## D-RESIDUE-FP / D-MATURATION3 — hydrate fixed point and the Maslov pyramid (2026-10-11) + +Knowledge: `.claude/knowledge/maslov-pyramid-of-cognition.md`. Test-only (#1494). + +| D-id | scope | status | gate / falsifier | +|---|---|---|---| +| **D-RESIDUE-FP-0** | `planner/tests/residue_fixed_point.rs`: production `pearl::hydrate` to a fixed point | Shipped (#1494) | extra passes bit-identical; only bits 59..60 change; 2 disable runs red | +| **D-MATURATION3-0** | `planner/tests/maturation_ladder.rs`: stages 7..0, feedback, ablation, no self-support | Shipped (#1494) | 12 disable runs red; the stage reading of 50..52 is test-local | +| **D-MATURATION3-1** | The pyramid as the plasticity ladder in bits 50..52, one global meaning | Queued (operator) | needs a global version gate for old codes; `learn`, `MooreNars16` and `CausalEdgeV3` byte 3 move in lockstep | + ## D-NAL — NAL-1..9 × 34 recipes against OpenNARS and ONA (2026-10-11) Audit: `.claude/knowledge/nal-recipe-audit/README.md`. Entry: diff --git a/.claude/board/entries/2026-10-15-ledger-correction-wire-contract.md b/.claude/board/entries/2026-10-15-ledger-correction-wire-contract.md new file mode 100644 index 000000000..9dff11724 --- /dev/null +++ b/.claude/board/entries/2026-10-15-ledger-correction-wire-contract.md @@ -0,0 +1,29 @@ +# 2026-10-15 — Ledger correction: CE64 is one wire contract; first counterfactual verdict + +**Status:** DECISION (operator rulings R-a..R-e) + TEST-PINNED (O22, R1). + +`.claude/research/2026-10-recovery/LEDGER-CORRECTION-2026-10-15.md` corrects +the 2026-10-14 ledger revision. + +- **DECISION:** CausalEdge64 is a global wire format and ISA register; every + header bit means the same thing everywhere. K1 (per-class readings of + 40..63) is withdrawn. Bits 40..42 = method (Pearl), 50..52 = the plasticity + ladder (the Maslov pyramid), 59..63 = licence. SCOPE: every CE64 producer and + reader. REVISIT WHEN: a measured case needs two meanings for one bit. +- **O25** is a defect with a known fix: replay composes within a trajectory; + revision runs only across distinct `temporal.rs` coordinates. K2 narrows to + that coordinate as the provenance root. +- **O22 done (one step):** `pearl::Reaction::verdict`, + `Measured::counterfactual_verdict`; the first end-to-end + `RevisionVerdict::is_acceptable()`. 3 disable runs red. +- **R1 pinned** in `kanban.rs`; disable run red. +- **Closed:** O20 (ndarray `1ecbccb`), N10 (clippy clean on `main`), N3/N4. +- **O26 downgraded:** `causal_bridge` sits behind a `wip` feature that does + not compile; the mapping cannot reach a caller. +- **N15:** Pearl × Wang NAL S-P × OpenNARS, ONA, PLN, Jøsang, Hyperon/MeTTa as + views on the one wire; home D-HOLO H12. + +53..58 is already the witness handle in code (`w_slot`). + +OPEN: 46..49 meaning; per-tenant vs global readings in `docs/architecture/ce64-semantic-upper-half.md`; the derived-packet rule; the ladder's entry +code; `learn`'s rule; the migration gate for old codes 1..6; O23. diff --git a/.claude/board/entries/README.md b/.claude/board/entries/README.md index b575ceba5..a73d115fd 100644 --- a/.claude/board/entries/README.md +++ b/.claude/board/entries/README.md @@ -25,10 +25,11 @@ 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. -334 entries, 2026-08-06 .. 2026-10-14. +335 entries, 2026-08-06 .. 2026-10-15. | date | entry id | finding | file | |---|---|---|---| +| 2026-10-15 | `ledger-correction-wire-contract` | | [2026-10-15-ledger-correction-wire-contract.md](2026-10-15-ledger-correction-wire-contract.md) | | 2026-10-14 | `revision-layer-invariants` | | [2026-10-14-revision-layer-invariants.md](2026-10-14-revision-layer-invariants.md) | | 2026-10-14 | `D-MTP-0` | where Hyperon/MeTTa attaches to the masking-algebra polyfill | [2026-10-14-metta-polyfill-map.md](2026-10-14-metta-polyfill-map.md) | | 2026-10-14 | `ledger-revision-after-1553` | | [2026-10-14-ledger-revision-after-1553.md](2026-10-14-ledger-revision-after-1553.md) | diff --git a/.claude/knowledge/maslov-pyramid-of-cognition.md b/.claude/knowledge/maslov-pyramid-of-cognition.md index 9fd3a212d..29037108c 100644 --- a/.claude/knowledge/maslov-pyramid-of-cognition.md +++ b/.claude/knowledge/maslov-pyramid-of-cognition.md @@ -89,6 +89,7 @@ Going round a grounded cycle adds nothing. | anchor ablation measures dependence (impact 2 on the chain) | EXPERIMENTAL (probe) | | an anchor turns a neutral observation into new Astonishment; the anchor stays at 0 | EXPERIMENTAL (probe) | | `mature`: ~2–3 ns median, 0 allocations (release, one container) | MEASURED | -| bits 50..52 carry the code in production | BLOCKED — they are plasticity (`learn`, `MooreNars16`, `CausalEdgeV3`) | +| bits 50..52 carry the code in production | DECISION 2026-10-15: the pyramid IS the plasticity ladder (how free an edge still is to change), not a second field beside it. ⊘ was "BLOCKED — they are plasticity". Pending: one global version gate, since the bits are a wire contract read the same everywhere; `learn`, `MooreNars16` and `CausalEdgeV3` byte 3 move in lockstep (D-MATURATION3-1) | +| per-plane granularity (S/P/O hot flags in today's encoding) | belongs to the SPO mask (40..42, Pearl method), not to the ladder | | production feedback | BLOCKED — needs D2 provenance ids | -| bit migration and where plasticity lives | CONTRACT DECISION (operator) | +| entry code, `learn`'s rule, migration of codes 1..6 | OPEN (operator); see `entries/2026-10-15-ledger-correction-wire-contract.md` | diff --git a/.claude/research/2026-10-recovery/LEDGER-CORRECTION-2026-10-15.md b/.claude/research/2026-10-recovery/LEDGER-CORRECTION-2026-10-15.md new file mode 100644 index 000000000..773db1583 --- /dev/null +++ b/.claude/research/2026-10-recovery/LEDGER-CORRECTION-2026-10-15.md @@ -0,0 +1,137 @@ +# Ledger correction, 2026-10-15 + +Corrects `LEDGER-REVISION-2026-10-14.md` (merged #1554, fixed in `e7d2cb5b`). +That file is not edited; this one supersedes the rows named below. +Board entry: `.claude/board/entries/2026-10-15-ledger-correction-wire-contract.md`. + +## 1. Operator rulings (2026-10-15) + +| # | ruling | consequence | +|---|---|---| +| R-a | O25's "refuse vs choice" was a category error. `temporal.rs` already gives every row a unique coordinate `(owner, cast_seq)`. | O25 is a defect with a known fix, not a policy decision. | +| R-b | CausalEdge64 is a global wire format and ISA register ("TCP/IP for thoughts", "like BF16 mantissa bits"). | Every header bit means the same thing everywhere. K1 (per-class readings of 40..63) is withdrawn. | +| R-c | Bits 50..52 are the Maslov pyramid as the plasticity version of 59..63: a discrete plasticity dependency ladder. | The pyramid IS the plasticity field, not a second field beside it. | +| R-d | The SPO mask (40..42) is the separation of concerns for Pearl's ladder, a fixed hydration method in the pyramid's dependencies. | Per-plane granularity belongs to 40..42, not to 50..52. | +| R-e | Pearl's ladder is later wired with Pei Wang's NAL S-P and ALL others, as views on the same substrate. | New item N15. | +| R-f | Bits 40..42 do for Pearl what bits 50..52 do for the plasticity pyramid. | Two 3-bit ladders side by side: 40..42 is how far up the causal ladder the edge has been interrogated (association → intervention → counterfactual), 50..52 is how far the edge has matured (Staunen 7 → wisdom 0). Both feed 59..63, which says what may be claimed. | + +## 2. The header after R-b..R-d + +| bits | field | question it answers | +|---|---|---| +| 0..23 | S, P, O | which three things | +| 24..39 | f, c | how much evidence (fixed codes, one global quantizer) | +| 40..42 | Pearl ladder (`CausalMask`) | which causal question: `SO` association, `PO` intervention, `SPO` counterfactual, `SP` confounder test, plus the marginals. Ablation has no mask of its own; it is the counterfactual cut | +| 43..45 | orientation | which way the relation is read (code: direction triad, `DIR_SHIFT = 43`, sign per S, P, O) | +| 46..49 | OPEN | opcode (code) vs activation (design); one global meaning still to choose | +| 50..52 | plasticity ladder (the pyramid) | how free the edge still is to change; freezing is earned by dependency or ablation, not by confidence | +| 53..58 | witness handle (`w_slot`, 0..=63, 0 = no anchor) | which record changed this state; the W1 → W2 → W3 history lives outside the edge | +| 59..63 | `EpistemicState5` | what the edge is licensed to claim (moved by `hydrate`) | + +Three fields, three concerns: method (40..42), maturity (50..52), licence +(59..63). The first two are parallel ladders (R-f). Caveat: the pyramid is an +ordinal code, but `CausalMask` encodes a rung as a plane subset (`SO`, `PO`, +`SPO`, `SP`), and `SO` and `PO` are not ordered by inclusion. The rung order +association < intervention < counterfactual must therefore be declared, never +read off bit inclusion; confounder detection (`SP`) and the marginals sit +beside the ladder, not on it. Today's plasticity encoding (`plasticity.rs`: `S_HOT`, `P_HOT`, +`O_HOT`) mixes the first two; that is the cost of the migration. + +## 3. Rows corrected + +| row | was | now | +|---|---|---| +| **O25** | fix OPEN; operator picks refuse (NAL) or choice (`BeliefArena`) | **DEFECT, fix known.** Replay composes along one trajectory and never revises within it; revision runs only across distinct `temporal.rs` coordinates (the shape `nal::Revision` already has). The pinned tests in `planner/tests/chain_confidence.rs` (`replay_step_raises_confidence_along_a_deduction_chain`, `self_revision_raises_confidence_on_the_replay_path`) flip, with this entry as the recorded reason. Not done here. | +| **K1** | declare 40..63 per class through the ClassView | **WITHDRAWN** (R-b). Replaced by the remaining header decisions in §4. | +| **K2** | four provenance carriers to make one | **NARROWED:** the root is the `temporal.rs` coordinate. `nars::belief::Stamp`, `nal::Evidence.stamp`, contract `revision` `independent_roots` and the probe's roots key on it. | +| **N1** | derived edges inherit no hydration, witness or maturation | **PARTLY DISSOLVED:** a derived edge born at `0b111` (most plastic) is right under R-c. Still open: witness (53..58) and epistemic state (59..63) zeroed on derivation. | +| **O22** | nothing computes `CounterfactualVerdict` | **DONE (one step).** `Reaction::verdict` and `Measured::counterfactual_verdict` in `pearl.rs`: LoadBearing from a consistent chain → Necessary; LoadBearing from an inconsistent chain (the cut repairs it) → Dispensable (Codex P1 on #1560); Inert → Dispensable; TruthOnly → NotRun; no cut → NotRun. First end-to-end `RevisionVerdict::is_acceptable()` over a real replay; 5 disable runs red. Scope: one cut judges one step; a multi-step claim still needs the claim ↔ step map. | +| **O23** | DECISION: fourth reading or remap | unchanged, still the operator's. Caveat now concrete: at the verdict level TruthOnly and "no cut ran" both read `NotRun`; they stay distinguishable only through `Measured::reaction()`. A fourth verdict variant would make the docket itself tell them apart. | +| **O26** | the pin at `causal_bridge.rs:450` asserts the defect as correct | **DEAD CODE, downgraded.** `mod causal_bridge` is behind `feature = "wip"`, which does not compile (unresolved `crate::container`, `crate::cognitive`, `search`), and nothing outside the file refers to it. The mapping cannot reach a caller and its test never runs. The ruling (an intention is a Rubikon commitment, never `Causes`) stands for whoever revives the module. | +| **O20** | verify Stroke-1 drop against ndarray `main` | **CLOSED.** ndarray `1ecbccb`: `Cascade::query` documents that recall is not guaranteed; pinned by `stroke1_drops_a_prefix_heavy_true_hit` (blackboard 2026-10-08). | +| **N3** | no arc entries for #1494–#1504 | **DONE:** 11 entries in `PR_ARC_INVENTORY.md`, written from the merged PR bodies. | +| **N4** | no STATUS rows for D-RESIDUE-FP-0, D-MATURATION3-0 | **DONE:** new section, plus D-MATURATION3-1 (the global migration). D-HL-0 and D-NALP-0 moved from "In PR" to "Shipped (#1496)". | +| **N9 (R1)** | test that goal revision is refused in `CognitiveWork` | **DONE:** `kanban::tests::r1_goal_revision_is_refused_inside_cognitive_work`. The DAG already enforced it; disable run (a `Plan` exit from `CognitiveWork`) red. R2–R4 stay open. | +| **N10** | `causal-edge` fails `clippy -D warnings` | **CLOSED on `main`:** `cargo clippy -p causal-edge --all-targets -- -D warnings` exits 0 at `4e386f26`. | + +## 4. Header decisions still open (replacing K1) + +1. One global meaning for 46..49: opcode (code) or activation (design). +2. The derived-packet rule: what a syllogism writes into 53..63. +3. The pyramid's entry code: 7 (Astonishment) at birth, or a separate "new". +4. `learn`'s rule under R-c: a plane changes only if it is in the SPO mask AND the ladder stage permits change; the threshold is the operator's. +5. The migration gate: old plasticity codes 1..6 need one global version gate; `learn`, `MooreNars16` and `CausalEdgeV3` byte 3 move together. + +6. **Ablation on the Pearl ladder? (operator: "probably part of it")** Two + different operations carry the name today: + - the counterfactual cut (`SPO`, `pearl.rs`): remove one step from one + chain; does THIS conclusion still hold? It looks upstream (necessity). + - the anchor ablation (`maturation_ladder.rs`, `Executed::Ablated { impact }`): + remove a relation from an isolated copy of the population; how many + OTHER relations reopen? It looks downstream (dependence), and it is what + earns the pyramid's Wisdom stage (impact ≥ 1 from Integration). + Room exists: the four single-plane codes (`None`, `S`, `P`, `O`) select no + operator today. Undecided: whether ablation takes one of them as its own + rung, or stays the pyramid's operation that 40..42 only feeds. + **Operator, 2026-10-15:** ablation will be detailed through the N15 families + (NAL, Hyperon/MeTTa, PeTTa, CE64, ONA, OpenNARS / Pei Wang's Java), not + decided here. Existing anchors to start from: + - OpenNARS Java runner and fixture: `.claude/knowledge/nal-recipe-audit/` (#1495); + - removing a contributor from fused evidence (Jøsang fission, #1499 red test 2); + - NARS retraction, a typed insufficiency today (#1504; needs a semijoin onto asserted stamps); + - Hyperon/MeTTa over the mask polyfill (D-MTP, #1553); PeTTa is not pinned yet (#1497, #1498). + Until then no code reserves a 40..42 code for ablation. + +## 4a. Reconciled against the README diagram (2026-10-15) + +The README diagram and `docs/architecture/ce64-semantic-upper-half.md` are +the reference. Against them: + +- 40..42 and 59..63 match the code; 53..58 is already the witness handle in + code. Both rows above now say so (this file first left 53..58 open). +- 43..52 are a proposed re-reading (orientation, activation, novelty) of bits + the code writes as direction triad, inference mantissa and plasticity. The + doc lists this as open behind a version gate; so does §4 here. +- **Tension to resolve:** the doc's "Encoding, reading, operation" section + lets each tenant declare its own reading through a versioned binding. Ruling + R-b says every bit means the same thing everywhere. Both hold only if the + versioned binding is global (one wire version), not per tenant. The doc's + wording is not changed here. + +## 5. N15 — Pearl × Wang S-P × all others, as views on one wire + +**Ruling:** Pearl's ladder is later wired with Pei Wang's NAL S-P and with +the other reasoning families, all as views over the same CE64 substrate. +Because the wire means the same everywhere (R-b), each family is a reading +of the same bytes, never a second encoding. + +| family | what it reads from the wire | existing anchor | +|---|---|---| +| Pearl (see / do / imagine) | method from 40..42; truth from 24..39 | `pearl.rs`, `Reaction` | +| Wang NAL (S-P, copulas, NAL-1..9) | S, P from 0..23; truth codes from 24..39 | `lance-graph-nal`, `nal-statement-v1`, exact codes from #1548 | +| OpenNARS, ONA | revision and stamps | `nal_revision_oracle.rs` (#1495) | +| OpenCog PLN | strength/confidence; never read as calibrated probability | #1497 research map | +| Jøsang subjective logic | fusion and fission as an ablation control | #1499 excerpts | +| Hyperon / MeTTa | pattern matching with binding multiplicity | D-MTP (#1553), #1498 | + +Home: D-HOLO H12 (semantic map of the stacked bricks). + +Ablation (§4 item 6) is defined through these families, each with its own +oracle, before it gets a place on the wire. + +Caveats, stated so the wiring does not overclaim: + +- Pearl's rungs and NAL's figures may be orthogonal axes, not one ladder; + wiring them as one would collapse two concerns. +- NAL copulas (inheritance, similarity, implication, equivalence) have no slot + in the SPO mask; where they live on the wire is undecided. +- PLN strength and NARS frequency share a range, not a meaning. +- Each view needs an executable oracle before it is called equivalent + (the D-NAL / D-MTP pattern), never mask equality alone. + +## 6. Agent ledger (Haiku harvest tier) + +| card | runs | items checked | wrong | missed | +|---|---|---|---|---| +| harvest-scout (ndarray cascade) | 1 | 3 (`cascade.rs:270-276`, `:813`, blackboard `:84-90`) | 0 | 0 | +| general-purpose on Haiku (PR bodies #1494–#1504) | 1 | 11 bodies used verbatim; merge SHAs taken from `git log` (not in the fetch) | 0 | 0 | diff --git a/crates/lance-graph-contract/src/kanban.rs b/crates/lance-graph-contract/src/kanban.rs index 436f32030..87b36722b 100644 --- a/crates/lance-graph-contract/src/kanban.rs +++ b/crates/lance-graph-contract/src/kanban.rs @@ -422,6 +422,34 @@ const _: () = assert!(core::mem::size_of::() <= 16); #[cfg(test)] mod tests { use crate::revision::CounterfactualVerdict; + + /// R1 (entry 2026-10-14-revision-layer-invariants §3): a goal is revised + /// only outside `CognitiveWork`, where the intention is shielded. Revision + /// from `CognitiveWork` is refused whatever the verdict; `Evaluation` + /// reopens the goal through `Plan → Planning`. + #[test] + fn r1_goal_revision_is_refused_inside_cognitive_work() { + use KanbanColumn::*; + assert_eq!(CognitiveWork.revise(), None); + for effect in [ + EvidentialEffect::NoIncrease, + EvidentialEffect::IncreaseEligible, + ] { + assert_eq!( + CognitiveWork.advance_on_revision(RevisionVerdict::unadjudicated(effect)), + None, + "{effect:?} must not revise inside CognitiveWork" + ); + } + // Silence twin: the same revision IS admitted pre- and post-action. + assert_eq!(Evaluation.revise(), Some(Plan)); + assert_eq!(Plan.advance(), Some(Planning)); + assert_eq!( + Evaluation + .advance_on_revision(RevisionVerdict::unadjudicated(EvidentialEffect::NoIncrease)), + Some(Plan) + ); + } /// `Plan` was DECLARED with semantics and structurally unreachable: from /// `Evaluation`, `advance()` takes the first non-`Prune` (always `Commit`) /// and `veto()` takes `Prune`. This is the route that closes diff --git a/crates/lance-graph-planner/src/pearl.rs b/crates/lance-graph-planner/src/pearl.rs index 5598ddc5d..7786dff5b 100644 --- a/crates/lance-graph-planner/src/pearl.rs +++ b/crates/lance-graph-planner/src/pearl.rs @@ -52,8 +52,9 @@ use lance_graph_contract::epistemic_state5::{ Certification3, Epi5Declarations, Epi5Gen, Epi5ReadError, EpistemicState5, Topology2, }; use lance_graph_contract::rail_geometry::RailAxis; +use lance_graph_contract::revision::CounterfactualVerdict; -use crate::chain_counterfactual::{counterfactual_replay, CutContext}; +use crate::chain_counterfactual::{counterfactual_replay, CutContext, Verdict}; use crate::chain_replay::ChainStep; /// The operator bits 40..42 select. @@ -136,6 +137,34 @@ impl Reaction { Reaction::Inert { frequency: f } } } + + /// The counterfactual verdict this cut supports for the CUT STEP, the + /// middle leg of the Gadamer docket (`revision::RevisionVerdict`). + /// `factual_consistent` is the verdict of the uncut chain. + /// + /// - `LoadBearing` from a consistent factual chain → `Necessary`: the + /// conclusion breaks without the step. + /// - `LoadBearing` from an inconsistent factual chain → `Dispensable`: + /// removing the step REPAIRS the chain, so it is not needed for a + /// consistent conclusion. Never `Necessary`, or a harmful step would + /// make a revision acceptable. + /// - `Inert` → `Dispensable`: removing it changed nothing. + /// - `TruthOnly` → `NotRun`: the truth moved but the verdict did not. + /// How that maps is an open decision (O23); until it is made the docket + /// stays incomplete, so this never reads as `Necessary` or `Dispensable`. + /// + /// Scope: one cut judges one step. A claim resting on several steps needs + /// the claim ↔ step map before a step's verdict becomes the claim's. + #[must_use] + pub fn verdict(self, factual_consistent: bool) -> CounterfactualVerdict { + match self { + Reaction::LoadBearing { .. } if factual_consistent => CounterfactualVerdict::Necessary, + Reaction::LoadBearing { .. } | Reaction::Inert { .. } => { + CounterfactualVerdict::Dispensable + } + Reaction::TruthOnly { .. } => CounterfactualVerdict::NotRun, + } + } } /// A counterfactual edit. The base chain is never modified; the operator @@ -178,6 +207,8 @@ pub struct Measured { earned: Option, ungrounded: Option, reaction: Option, + /// Whether the uncut chain was consistent (set with `reaction`). + factual_consistent: Option, confounded: Option, counterfactual_terminal: Option, } @@ -190,6 +221,7 @@ impl Measured { earned: None, ungrounded: None, reaction: None, + factual_consistent: None, confounded: None, counterfactual_terminal: None, } @@ -221,6 +253,15 @@ impl Measured { pub fn reaction(&self) -> Option { self.reaction } + /// The counterfactual verdict for the cut step: [`Reaction::verdict`], + /// or `NotRun` when no cut ran (another operator, or ungrounded). + #[must_use] + pub fn counterfactual_verdict(&self) -> CounterfactualVerdict { + match (self.reaction, self.factual_consistent) { + (Some(r), Some(consistent)) => r.verdict(consistent), + _ => CounterfactualVerdict::NotRun, + } + } /// Whether the observational and interventional directions disagree /// (`SP` only). #[must_use] @@ -285,6 +326,7 @@ pub fn reason(edge: CausalEdge64, ev: &Evidence<'_, M>, edit: (f, conf(&cf.factual)), (c, conf(&cf.counterfactual)), )); + out.factual_consistent = Some(cf.role.factual == Verdict::Consistent); out.counterfactual_terminal = cf.counterfactual.last().map(|r| r.edge); } } @@ -684,6 +726,95 @@ mod tests { ); } + /// O22: the cut's reaction is the docket's counterfactual leg, so an + /// eligible revision reaches `is_acceptable()` end to end only when the + /// cut step was load-bearing. + #[test] + fn o22_a_load_bearing_cut_is_the_only_route_to_acceptance() { + use lance_graph_contract::revision::{EvidentialEffect, RevisionVerdict}; + let d = declarations(); + let rp = Replay::new(); + let model = with_trial(related_population()); + let ev = rp.evidence(&model); + let e = query( + CausalMask::SPO, + Certification3::Causes, + Topology2::IndirectKnown, + ); + let accept = |m: &Measured| { + RevisionVerdict { + effect: EvidentialEffect::IncreaseEligible, + counterfactual: m.counterfactual_verdict(), + } + .is_acceptable() + }; + + // Cutting B → Y changes the verdict: Necessary, acceptable. + let (_, m) = step(e, CausalMask::SPO, &ev, Edit::CutStep(1), &d); + assert!(matches!(m.reaction(), Some(Reaction::LoadBearing { .. }))); + assert_eq!(m.counterfactual_verdict(), CounterfactualVerdict::Necessary); + assert!(accept(&m)); + + // Cutting A → B moves only the truth: undecided (O23), not acceptable. + let (_, m) = step(e, CausalMask::SPO, &ev, Edit::CutStep(0), &d); + assert!(matches!(m.reaction(), Some(Reaction::TruthOnly { .. }))); + assert_eq!(m.counterfactual_verdict(), CounterfactualVerdict::NotRun); + assert!(!accept(&m)); + + // No cut asked for: the attack did not run. + let (_, m) = step(e, CausalMask::SPO, &ev, Edit::None, &d); + assert!(m.reaction().is_none()); + assert_eq!(m.counterfactual_verdict(), CounterfactualVerdict::NotRun); + assert!(!accept(&m)); + + // Another operator ran: no counterfactual verdict. + let (_, m) = step(e, CausalMask::PO, &ev, Edit::None, &d); + assert_eq!(m.counterfactual_verdict(), CounterfactualVerdict::NotRun); + assert!(!accept(&m)); + } + + /// O22: an inert cut makes the step dispensable, which never accepts. + #[test] + fn o22_an_inert_cut_is_dispensable() { + use lance_graph_contract::revision::{EvidentialEffect, RevisionVerdict}; + let r = Reaction::classify(false, (180, 200), (180, 200)); + assert_eq!(r, Reaction::Inert { frequency: 180 }); + assert_eq!(r.verdict(true), CounterfactualVerdict::Dispensable); + assert!(!RevisionVerdict { + effect: EvidentialEffect::IncreaseEligible, + counterfactual: r.verdict(true), + } + .is_acceptable()); + } + + /// O22 (Codex P1 on #1560): a cut that turns an inconsistent chain into a + /// consistent one is load-bearing but the step is harmful, not needed. + /// It must never read as `Necessary`, through `Reaction` or `Measured`. + #[test] + fn o22_a_cut_that_repairs_the_chain_is_not_necessary() { + use lance_graph_contract::revision::{EvidentialEffect, RevisionVerdict}; + let r = Reaction::classify(true, (100, 200), (200, 200)); + assert!(matches!(r, Reaction::LoadBearing { .. })); + assert_eq!(r.verdict(true), CounterfactualVerdict::Necessary); + assert_eq!(r.verdict(false), CounterfactualVerdict::Dispensable); + + let mut m = Measured::new(CausalEdge64(0), Operation::Counterfactual); + m.reaction = Some(r); + m.factual_consistent = Some(false); + assert_eq!( + m.counterfactual_verdict(), + CounterfactualVerdict::Dispensable + ); + assert!(!RevisionVerdict { + effect: EvidentialEffect::IncreaseEligible, + counterfactual: m.counterfactual_verdict(), + } + .is_acceptable()); + // Silence twin: the same reaction from a consistent chain accepts. + m.factual_consistent = Some(true); + assert_eq!(m.counterfactual_verdict(), CounterfactualVerdict::Necessary); + } + /// F1. Observation alone never reaches `Causes`, even when the sealed /// model also holds a positive trial the SO operator could have read. #[test]