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
14 changes: 14 additions & 0 deletions .claude/board/EPIPHANIES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 2026-09-02 — E-THE-CALIBRATION-GATE-REVERSED-THE-DECLARED-FLOOR-1 — D-TEH-2: the ghost prior landed in the planner, and the pre-registered gate overruled the floor its author had declared

**Status:** FINDING (measured, `crates/lance-graph-planner/src/nars/ghost_prior.rs`, test `calibration_gate_picks_the_default_floor`). **Confidence:** High on the fixture; the fixture is one recurrence shape (256 atoms, a 3-atom pattern, 0–30 stale patterns, ages 0–60).

**What landed.** `thinking_engine::ghosts::GhostField` is harvested as planner `nars::ghost_prior::GhostPrior` — per-thought / per-mailbox, never a singleton — over the contract's `WisdomMarker` / `GhostEcho`. `ghosts.rs` and its only consumer, `examples/think.rs`, are deleted; the lab crate's `persona` / `world_model` / `awareness_dto` now import `GhostEcho` from the contract, which closes `TD-GHOST-ECHO-DUP-1` (one declaration of the eight echoes remains). The lab `Agent` no longer OWNS a trace field; DTO builders take the thought's prior summary as an argument — the V3 ownership rule applied to a process-wide field.

**The finding.** The closure plan's §1c row said the port must declare which floor it adopts — the source's (drop below 0.001, prune) or the contract's (clamp at 0.1 forever) — and let a calibration gate decide: free-energy discrimination between a RECURRENCE and a SHIFT after the prior has aged. The first declaration was the source's `Trace` floor. The gate rejected it. Discrimination (`fe_shift − fe_recurrence`), Trace vs Marker: with no stale memory the two are identical (0.0188); with 30 stale patterns and age 0, 0.0002 vs 0.0026; with 30 stale patterns and age 20 or 60, **0.0000 vs 0.0188**. Under the Trace floor the remembered pattern is pruned once older than ~42 cycles (`0.8·0.85ᵏ < 0.001`) and the prior can no longer tell familiar from new at all. Under the Marker floor it survives at 0.1 and the discrimination holds — at the price of a noisier baseline (absolute free energy 0.35 vs 0.07 with 30 stale patterns). The anchoring alarm (D-HOUSE-4) reads the difference, not the level, so the default is `Marker`: the contract's `felt_parse:70` semantics ("never fully vanishes"), now measured rather than inherited.

**Why it is worth an entry.** The author of the port had a preference (the bias-semantics floor) and wrote the gate before running it; the gate's assertion is on the DECLARED default, so the preference could not survive the fixture without the test going red. That is the falsifiability rule doing what it exists for — a knob that is set by a measurement it can lose, not by the name of whoever set it. The shape generalises: when two shipped sources disagree on a constant, encode the disagreement as a parameter and let a pre-registered fixture pick, with the assertion on the pick.

**Fences carried forward.** Lingering trace ≠ counterfactual rung (`E-A-GHOST-TRACE-IS-NOT-THE-COUNTERFACTUAL-LANE-1`): nothing in `ghost_prior` reads or writes the −6 lane. The floor decision is scoped to this fixture; D-HOUSE-4 should re-run `calibration::discrimination` on its own recurrence shape before trusting the default there.

Refs: `thinking-engine-harvest-closure-v1` §1c (ghost row), §3 W2 result, §5 D-TEH-2; `house-differential-style-v1` D-HOUSE-4; `contract::escalation::{GhostEcho, WisdomMarker}`; `TD-GHOST-ECHO-DUP-1` (resolved); `TD-GHOST-TIER-NAME-COLLISION-1` (still open, pays when `counterfactual.rs` is next touched).

## 2026-09-02 — E-PILLAR-11-PUBLISHED-BOUND-NEEDS-ITS-OWN-NUMERIC-GUARD-1

**Status:** FINDING (measured) — closes the Hambly-Lyons edition-constant arc.
Expand Down
8 changes: 8 additions & 0 deletions .claude/board/LATEST_STATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2026-09-02 — branch (D-TEH-2, after #1141 merged): ghost prior harvested into the planner — INVENTORY DELTA

- MERGED #1141 (D-HOUSE-1, `3102776`): no contract type; planner example `house_differential.rs` + plan/board records (see PR_ARC).
- ADDED planner `lance_graph_planner::nars::ghost_prior` — `GhostPrior` (per-thought Friston prior over atoms: `imprint` / `bias` / `prediction` / `free_energy` / `active_count` / `prune` / `summary` / `tick` / `echo_for`), `PriorFloor { Marker, Trace }` with `DEFAULT = Marker` (decided by the calibration gate, see EPIPHANIES `E-THE-CALIBRATION-GATE-REVERSED-THE-DECLARED-FLOOR-1`), `Trace` (atom + `WisdomMarker` + birth cycle), `calibration::{recurrence_fixture, discrimination}` (library code so a consumer can re-run the gate on its own fixture). Re-exported as `nars::{GhostPrior, PriorFloor}`. 15 tests (incl. the Codex-review pair: summary per-atom-max-before-sort, fixture refuses an atom space below `calibration::FIXTURE_MIN_ATOMS` = 63 — `recurrence_fixture` / `discrimination` return `Option`; and the CodeRabbit boundary: `calibration::FIXTURE_MAX_STALE_PATTERNS` = 21_812 refuses a stale-pattern count whose atom id would wrap `u16`). Consumes contract `escalation::{GhostEcho, WisdomMarker}` only; no new dependency, no new contract type, no tenant, no layout change.
- REMOVED (lab crate, excluded from the workspace) `thinking_engine::ghosts` (`GhostType`, `Ghost`, `GhostField`) and `examples/think.rs` (its only consumer). `persona::Agent` lost its `ghosts` field; `Agent::to_dto(ghost_count)`, `Agent::self_model(.., ghost_count, dominant_ghost)` and `WorldModelDto::build(.., trace_count, dominant_trace)` take the thought's prior summary as arguments; the `A2AMessage::{thought, knowledge, persona_exchange}` constructors take the sender's `AgentDto` snapshot (built by the caller via `to_dto(ghost_count)`) instead of hardcoding a zero count; `SelfModelDto::dominant_ghost_type`, `GestaltState::dominant_trace`, `QualiaDto::traces` are typed over `contract::escalation::GhostEcho`. Lab crate: `cargo check --lib --examples` clean (pre-existing warnings only), persona/world_model/awareness_dto tests 14/14.
- RESOLVED `TD-GHOST-ECHO-DUP-1` (one declaration of the eight echoes remains — the contract's).
- UNCHANGED: `contract::escalation` shapes (`GhostEcho`, `WisdomMarker::{FLOOR, DECAY, intensity_at}`) — only a doc comment; the ALU artery files (`dto.rs`, `engine_bridge.rs`, `cognitive_shader.rs`, `mailbox_soa.rs`) untouched.

## 2026-09-02 — branch (D-TEH-1, first code wave after #1138): `bridge_gate` moved to the contract — CONTRACT INVENTORY DELTA

- ADDED `lance_graph_contract::bridge_gate` — the cross-tenant authorization injection point, moved from `thinking_engine::bridge_gate` with all seven public items together and identical shapes: `CognitiveOpKind` (4 variants, `repr(u8)`), `CognitiveAuthResult { Allow, Deny, Escalate }` + `is_allowed/is_denied`, `CognitiveBridgeError { Denied, Escalation }`, `auth_to_result`, the `CognitiveBridgeGate: Send + Sync` trait (3 sync methods), `PassthroughGate`, `DenyAllGate`. Zero-dep (std only). Its 9 unit tests moved with it; the engine-side `pure_ops_dont_touch_gate` stays in thinking-engine next to the lens modules it calls.
Expand Down
10 changes: 10 additions & 0 deletions .claude/board/PR_ARC_INVENTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
> census §8.3 trap 10: read the body FIRST, then open for write — never
> inline both in one expression.

## 2026-09-02 — lance-graph branch `claude/medcare-rs-continue-6nhbxn` (D-TEH-2 PR, after #1141) — ghost prior harvested into the planner; `ghosts.rs` deleted

- **Added:** `crates/lance-graph-planner/src/nars/ghost_prior.rs` — `GhostPrior`, `PriorFloor`, `Trace`, `calibration::{recurrence_fixture, discrimination}` (both `Option` below `FIXTURE_MIN_ATOMS` and above `FIXTURE_MAX_STALE_PATTERNS`), 15 tests (monotone decay to each floor with the inert cycle derived from the constant, decay-constant load-bearing both ways, two-sided free energy under both floors, the calibration gate on the declared default, anti-vacuity that the floors differ, prediction shape, imprint cap, echo rule, independence of two priors); `pub mod ghost_prior` + re-export in `nars/mod.rs`. EPIPHANIES `E-THE-CALIBRATION-GATE-REVERSED-THE-DECLARED-FLOOR-1`.
- **Removed:** `crates/thinking-engine/src/ghosts.rs`, `crates/thinking-engine/examples/think.rs`; `pub mod ghosts` from the lab `lib.rs`.
- **Changed (lab crate):** `persona.rs` (`Agent` without a trace field; `to_dto` / `self_model` take the prior summary; `A2AMessage` constructors take the sender's `AgentDto`; `SelfModelDto` over `GhostEcho`), `world_model.rs` (`build` takes `trace_count` + `dominant_trace`; `GhostEcho`), `awareness_dto.rs` (`GhostEcho`), `domino.rs` (doc). Contract `escalation.rs`: `GhostEcho` doc comment (retired-mirror note). TECH_DEBT `TD-GHOST-ECHO-DUP-1` → RESOLVED. Plan §5 D-TEH-2 → Shipped, §3 W2 result; STATUS_BOARD D-TEH-2 Shipped, D-HOUSE-4 unblocked.
- **Measured:** calibration gate rejected the first-declared `Trace` floor — discrimination 0.0000 vs `Marker` 0.0188 at 30 stale patterns / age 20 and 60 (equal at 0.0188 with no stale memory); absolute baseline 0.35 vs 0.07. Default = `Marker`. Planner clippy `-D warnings` + fmt clean; lab `cargo check --lib --examples` clean; lab tests 14/14.
- **Locked:** per-thought ownership (no singleton field); the lingering-trace / counterfactual-lane fence; the floor as a measured parameter, not an inherited constant.
- **Deferred:** D-HOUSE-4 (unblocked, not started — should re-run `calibration::discrimination` on its own fixture); D-TEH-3 (math → jc), D-TEH-4/5; `TD-GHOST-TIER-NAME-COLLISION-1` waits for the next touch of `counterfactual.rs`.
- **Confidence:** High.

## 2026-09-02 — lance-graph branch `claude/medcare-rs-continue-6nhbxn` (D-HOUSE-1 PR, after #1139) — PROBE-HOUSE-DIFFERENTIAL-1 run and reported

- **Added:** `crates/lance-graph-planner/examples/house_differential.rs` (the probe; no library surface): fixture, arms A0 / A1 / A1c / A2-S0 / A2-S3 / A2 (variant 1) / A2' (variant 2), size-preserving null with far-parent re-owning, guards G1–G4, per-variant verdict. Plan §4 RESULT; EPIPHANIES `E-THE-PERIPHERY-OF-A-STRATUM-IS-THE-OTHER-STRATA-1`.
Expand Down
4 changes: 2 additions & 2 deletions .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| D-HOUSE-1d | aperture hypothesis (the "humor" label): incongruity → `k` across passes; a hypothesis until its operator is defined and measured (plan §4b) | Not scheduled — re-scoped 2026-09-02: the knob is the strata budgets, not `k` over an excluded set |
| D-HOUSE-2 | discriminating-evidence readout (clone arena, observe hypothetical premise, report largest rank displacement) | Unblocked by the D-HOUSE-1 base-path PASS (2026-09-02); not started |
| D-HOUSE-3 | elimination predicate over `truth`/`contradiction`/`stamp` + never-re-enter falsifier | Unblocked by the D-HOUSE-1 base-path PASS (2026-09-02); not started |
| D-HOUSE-4 | anchoring alarm (free energy between wisdom-marker prior and evidence) | Gated on `thinking-engine-harvest-closure-v1` D-TEH-2 |
| D-HOUSE-4 | anchoring alarm (free energy between wisdom-marker prior and evidence) | Unblocked 2026-09-02 (D-TEH-2 shipped: planner `GhostPrior::free_energy` is the alarm's input); not started |
| D-HOUSE-5 | the style→recipe edge (O2) with House as its first program | D-HOUSE-1 half unblocked (2026-09-02, base-path PASS; the edge selects STRATA, CAS-down as the board's feeder); still gated on the D-TSC-2/3 mint |
| D-HOUSE-6 | consumer pointer: `DiffRow` READ fields `eliminated` / `discriminator` (MedCare-rs) | pointer only, out of scope here |

Expand All @@ -19,7 +19,7 @@
|---|---|---|
| D-TEH-0 | census: live footprint measured (one required consumer via `bridge_gate`; one optional via `with-engine`), 51-file fate table, open-row reconciliation, four-wave closure, idea harvest, four rulings asked | **Shipped (plan-only, this PR)** |
| D-TEH-1 | W1: `bridge_gate` (seven items) → `lance_graph_contract::bridge_gate`; callcenter re-imports and drops the path dep; thinking-engine keeps a re-export shim | **Shipped 2026-09-02** (before: required dep, 6 crossing sites, dep-drop alone fails 6 × E0433; after: zero thinking-engine deps in callcenter metadata, contract 1303/1303, callcenter 156/156, driver default + `with-engine` green, ALU artery files byte-identical). `with-engine` re-point deferred by stop condition: D-TTV-1 not landed |
| D-TEH-2 | W2: ghost prior → planner `nars/ghost_prior.rs` over `WisdomMarker`, per-thought, two-sided falsifiers; crate `ghosts.rs` deleted | Queued — consumer D-HOUSE-4 |
| D-TEH-2 | W2: ghost prior → planner `nars/ghost_prior.rs` over `WisdomMarker`, per-thought, two-sided falsifiers; crate `ghosts.rs` deleted | **Shipped 2026-09-02** — `GhostPrior`/`PriorFloor` in planner `nars/ghost_prior.rs`, 14 tests incl. the calibration gate (default floor = `Marker`, the gate reversed the first declaration); `ghosts.rs` + `think.rs` deleted; TD-GHOST-ECHO-DUP-1 resolved; consumer D-HOUSE-4 unblocked |
| D-TEH-3 | W2: calibration MATH → `jc` (ruling 4, 2026-09-02: lift if correct, perfect in jc if not; crate copies die); glue stays in the lab crate; `semantic_chunker` / `spiral_segment` decided by their falsifiers | Queued |
| D-TEH-4 | W3: ENTROPY M8 engine collapse with dtype parity suite; 5 cascade shapes + 3 lens modules collapse | Queued |
| D-TEH-5 | W4: residue deleted, crate renamed `thinking-lab` with a `--manifest-path` CI line; §2 rows closed; `TD-THINKING-ENGINE-EXCLUDED-DEBT-1` paid | Queued — closes the chapter |
Expand Down
2 changes: 1 addition & 1 deletion .claude/board/SUPERSESSION-INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ coverage instead.
| `dispatch_busdto` | BLOCKED | — | 3 | 6 | 5 |
| `persist_cycle` | BLOCKED | — | 10 | 6 | 5 |
| `CognitiveMarkers` | REPURPOSE | `Commit` | 2 | 0 | 0 |
| `DominoCascade` | REPURPOSE | `Commit` | 8 | 0 | 0 |
| `DominoCascade` | REPURPOSE | `Commit` | 7 | 0 | 0 |
| `GateDecision` | REPURPOSE | — | 25 | 27 | 24 |
| `GateState` | REPURPOSE | — | 14 | 1 | 1 |
| `MergeMode` | REPURPOSE | — | 8 | 13 | 12 |
Expand Down
2 changes: 1 addition & 1 deletion .claude/board/TECH_DEBT.md
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ multi-antecedent path for real.

- **Severity:** P3 (cosmetic type-dup; no runtime correctness risk — the two enums are not exchanged across a crate boundary today)
- **Surfaced in:** D-PERSONA-1 (`rung-persona-orchestration-v1` §2), 2026-05-26, branch `claude/splat3d-cpu-simd-renderer-MAOO0`
- **Status:** Open
- **Status:** RESOLVED 2026-09-02 (D-TEH-2): `thinking_engine::ghosts::GhostType` deleted with `ghosts.rs`; the lab crate's `persona` / `world_model` / `awareness_dto` import `contract::escalation::GhostEcho` directly. One declaration remains.
- **Description:** `lance_graph_contract::escalation::GhostEcho` (8 variants: Affinity / Epiphany / Somatic / Staunen / Wisdom / Thought / Grief / Boundary) is a second declaration of the same 8 named ghost echoes already in `thinking_engine::ghosts::GhostType` (`crates/thinking-engine/src/ghosts.rs`). The duplication is *intentional and currently unavoidable*: `lance-graph-contract` is ZERO-DEP and cannot import the excluded `thinking-engine` crate, and the contract is the canonical "single source of truth for types" home for the wisdom-marker substrate (≤32 named identities per I-VSA-IDENTITIES). The two are NOT interchanged across a boundary today, so there is no silent-corruption risk (cf. I-LEGACY-API-FEATURE-GATED), only a naming/maintenance dup.
- **Resolution (when thinking-engine joins the workspace):** make `thinking_engine::ghosts::GhostType` a re-export of (or `From`/`Into` with) `contract::escalation::GhostEcho`, retiring the thinking-engine copy. Until then, keep the variant sets identical (same 8, same order) so a future `transmute`/`From` bridge is trivial.
- **Cross-ref:** `crates/lance-graph-contract/src/escalation.rs` (`GhostEcho`, `WisdomMarker`); `crates/thinking-engine/src/ghosts.rs` (`GhostType`, `GhostField`); `docs/TYPE_DUPLICATION_MAP.md`; `.claude/plans/rung-persona-orchestration-v1.md` §2 + §8.
Expand Down
4 changes: 3 additions & 1 deletion .claude/plans/thinking-engine-harvest-closure-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ inter-mailbox handoff type never revive; the `E-MORTON-CASCADE-V3-1`
legacy arm is not deleted while that probe is open; no port of a fixed
axis vocabulary by assertion (AXES_48 goes falsifier-first or stays LAB).

**W2 result (2026-09-02, D-TEH-2).** The ghost prior landed as planner `nars/ghost_prior.rs` — per-thought, over `WisdomMarker` / `GhostEcho`, no singleton. The floor question the §1c row left open was decided by the pre-registered calibration gate, and it decided AGAINST the first declaration: `Trace` (source 0.001 + prune) loses all discrimination between a recurrence and a shift once the remembered pattern is older than ~42 cycles, `Marker` (contract 0.1, never pruned) keeps it (0.0188) at the cost of a higher absolute free-energy baseline (0.35 vs 0.07 with 30 stale patterns). Default = `Marker`. The remaining W2 items (math → jc, `semantic_chunker`, `spiral_segment`) are D-TEH-3/-5 and untouched here.

## 4. The good ideas — what the chapter leaves behind even where the code dies

Kept as doctrine with a named present or future home, so the closure is a
Expand All @@ -206,7 +208,7 @@ harvest and not an amputation.
|---|---|---|---|
| D-TEH-0 | census + fate table + open-row reconciliation + idea harvest (this plan) | plan + board rows | Shipped (this PR) |
| D-TEH-1 | W1: `bridge_gate` (seven items) → `lance_graph_contract::bridge_gate`; callcenter re-imports and drops the path dep; thinking-engine keeps a re-export shim | contract + callcenter | **Shipped 2026-09-02** — edge measured before (required dep, 6 crossing sites, dep-drop fails 6 × E0433) and after (zero thinking-engine deps in callcenter metadata; 1303 + 156 tests, driver default + `with-engine` green). The `with-engine` re-point is NOT part of this wave: D-TTV-1 is Queued and the engine hook still lives in thinking-engine, so there is nothing to re-point it at (stop condition honoured). thinking-engine is now a leaf for every REQUIRED edge; the one remaining edge is the ALU's optional engine hook |
| D-TEH-2 | W2: ghost prior harvested as planner `nars/ghost_prior.rs` over `WisdomMarker`, per-thought, with two-sided falsifiers; crate `ghosts.rs` deleted | planner | Queued — consumer = D-HOUSE-4 |
| D-TEH-2 | W2: ghost prior harvested as planner `nars/ghost_prior.rs` over `WisdomMarker`, per-thought, with two-sided falsifiers; crate `ghosts.rs` deleted | planner | **Shipped 2026-09-02** — planner `nars/ghost_prior.rs` (`GhostPrior`, `PriorFloor`, `Trace`, `calibration::{recurrence_fixture, discrimination}`; 14 tests); `ghosts.rs` + `examples/think.rs` deleted; lab `persona`/`world_model`/`awareness_dto` re-pointed to `contract::escalation::GhostEcho` (TD-GHOST-ECHO-DUP-1 resolved). Calibration gate REVERSED the first-declared floor: `Marker` (0.1, never pruned) discriminates ≥ `Trace` (0.001) on every fixture row and strictly once the remembered pattern ages past its prune point (disc 0.0188 vs 0.0000 at 30 stale / age 20 and 60); default = `Marker`. Consumer D-HOUSE-4 unblocked |
| D-TEH-3 | W2: calibration MATH → jc (ruling 4: compare, then lift or perfect in jc; crate copies deleted); `semantic_chunker` / `spiral_segment` decided by their falsifiers | jc / deepnsm-v2 / codec home | Queued |
| D-TEH-4 | W3: M8 engine collapse with parity suite; cascade shapes and lens modules collapse | thinking-engine → the one engine | Queued (owns ENTROPY M8) |
| D-TEH-5 | W4: residue deleted, crate renamed `thinking-lab` with a CI line; §2 rows closed; TD paid | workspace | Queued — closes the chapter |
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/weather-poc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,26 @@ jobs:
test:
runs-on: ubuntu-24.04
timeout-minutes: 10
defaults:
run:
working-directory: lance-graph
steps:
- uses: actions/checkout@v4
with:
path: lance-graph
persist-credentials: false
# weather-poc path-deps `jc`, and since #1140 `jc` path-deps the
# `ndarray` sibling at `../../../ndarray` unconditionally (operator
# ruling: ndarray is mandatory everywhere in lance-graph). Without this
# checkout `cargo test` fails at dependency resolution before a single
# test runs — first seen on #1142, whose only contract change was a doc
# comment. Same layout as rust-test.yml: repo in `lance-graph/`, sibling
# in `ndarray/`, so the relative path resolves.
- name: Checkout AdaWorldAPI/ndarray (sibling dependency of jc)
uses: actions/checkout@v4
with:
repository: AdaWorldAPI/ndarray
Comment thread
coderabbitai[bot] marked this conversation as resolved.
path: ndarray
persist-credentials: false
- name: Setup Rust
run: |
Expand Down
Loading
Loading