Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
914fd8e
audit: the 34 NARS recipes against the current substrate
claude Sep 14, 2026
657cd18
quack: the columnar query crate whose operators ARE masking ops
claude Sep 14, 2026
e4fae74
recipes: fix the two classical Berry-Esseen citations (I-NOISE-FLOOR-…
claude Sep 14, 2026
f3df172
audit: correct it — bucket is not a dispatch key, and the loco bridge…
claude Sep 14, 2026
ea1a353
quack: planes, the survivor skip, projection, fusion, GROUP BY
claude Sep 14, 2026
ca96dc1
quack: the empty-junction refusal is spelled three times — record it
claude Sep 14, 2026
75b69c3
board: record the quack surface (D-QCK-0..7)
claude Sep 14, 2026
355ce85
quack: drive the operator set from the harvest, and repair the harves…
claude Sep 14, 2026
3f6bf8c
quack: the accumulator gate, and A1's falsifier run rather than ported
claude Sep 14, 2026
c223417
board: the convergence verdict, and the floor that hid a dead fixture
claude Sep 14, 2026
d8afa4b
ci: quack joined the workspace with no CI line at all
claude Sep 15, 2026
439403f
review: the hill-climb argument was measured FALSE, and five other ov…
claude Sep 15, 2026
2c15cae
review: the accumulator gate outranked the plane and silently dropped it
claude Sep 15, 2026
ea0a3e4
board: date-first header on the E-A-FLOOR entry
claude Sep 15, 2026
7005000
review round 2: an independent review re-found the P1, and my fmt dec…
claude Sep 15, 2026
8e5c3d7
issues: reproduce the lower_fused timings rather than relay them
claude Sep 15, 2026
985d36a
issues: the workspace-build blocker has two remedies, and I had named…
claude Sep 15, 2026
b7e8251
board: tag the fenced blocks I added (MD040)
claude Sep 15, 2026
5e954eb
probe: document the two helpers whose behaviour is load-bearing
claude Sep 15, 2026
75c3f7b
deps: make the AWS SDK optional — the workspace build is green again
claude Sep 15, 2026
c2b4bc7
ci: stop passing --all-features to the publish verification build
claude Sep 15, 2026
99479a5
board: the CI verdict you can see is not a verdict about the code you…
claude Sep 15, 2026
188d6b3
board: address four citations by section, not by line number
claude Sep 15, 2026
e43d12f
review: six verified findings from the CodeRabbit pass on 947753d/994…
claude Sep 15, 2026
d77cd4e
quack: say in the crate doc that fusing forfeits the skip
claude Sep 15, 2026
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
144 changes: 144 additions & 0 deletions .claude/audits/nars-34-substrate-audit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Audit — the 34 NARS recipes against the CURRENT substrate

> 2026-09-14. Read `recipes.rs` (all 34) against `ndarray::simd_masking_ops`
> (the masking algebra) and the workspace's own iron rules. The question asked:
> **what needs improving.**

## ⊘ CORRECTION — `bucket` is NOT a dispatch key (read after writing this)

The audit below says the stale `bucket` column matters because it routes. **It
does not route.** Measured:

- `recipe_dispatch.rs` — **zero** uses of `bucket`. Dispatch is by
`RecipeInference` (deduction/induction/abduction/revision/counterfactual),
`rung` + `dispatch_order` (from `Tier` + `InferenceType::rung_delta`), and
the `nan_disqualifier` checklist.
- `recipe_kernels.rs` — **one** use, the default `Tactic::gate`:
`match bucket { Bucket::Gate => ctx.gate_state() != GateState::Flow, _ => true }`.

So only the **`Gate`** arm is load-bearing, and `Gate` is the one bucket this
audit found ACCURATE (TCP/CAS/TCF/CUR are the prune/cascade family the masking
algebra genuinely expresses). `Datapath` vs `Control` is **inert descriptive
metadata that nothing reads.**

Consequence: the 9 stale `Datapath` strings are **documentation debt, not live
mis-dispatch.** They still want fixing — a string naming a retired kernel reads
as a spec — but item 1 below ("re-derive bucket") is NOT urgent and NOT a
correctness risk. I claimed the opposite in session ("a routing key derived
from a retired substrate is currently deciding what executes") without reading
either module. That claim is withdrawn.

## ⊘ ALSO: the loco↔34 bridge already exists — do not build it

`lance-graph-ogar/src/recipe_vocab.rs` is the 34 as loco ops:
`RECIPE_OP_BASE = DOMAIN_FLOOR`, ids `1..=34` ↔ bytes `0x90..=0xB1`,
`op_of` / `recipe_of`, `impl Vocabulary for RecipeVocabulary`, and
`ladder_program() -> Vec<FnIndex>` — the ladder already lowered to a loco
program in `dispatch_order`. It carries two gates that answer different
questions (awareness: the kanban census; epistemic: the NaN pothole) with
`refusal_of` reporting which spoke, "because an unwilling ladder and an unable
one are different diagnoses."

Its header also settles the dependency question correctly: *"`ogar_loco` is
zero-dep by design and `lance_graph_contract` is zero-dep by charter. Neither
may import the other. A vocabulary needs both, so it lives in a consumer that
already depends on both."* An `ogar-loco/src/nars.rs` with a contract dep —
which this session started writing — is the wrong home for a reason already
recorded.

## The finding that IS serious, and is not mine

`E-RECIPE-SELECTOR-REACHABILITY-1`, measured and documented in
`recipe_dispatch.rs`'s own header: through the shipped saccade selector
(`materialize::select_tactic`) only **8 of 34 recipes are reachable**, **all 14
Infrastructure recipes never win**, and **ICR #31 is permanently shadowed by
RCR #4** on a lowest-id tie. The `ladder` mode exists to cover exactly those
three gaps, and `dispatch_mode.rs` routes between the two modes. That is a
larger fact about the 34 than anything in the substrate-string audit below.

## Headline: the `bucket` column was assigned against a substrate that is gone

**9 of 9 `Datapath` recipes name a retired or forbidden realization.** The tier
that is supposed to BE the masking ops is the tier most contaminated:

| id | code | substrate string | verdict |
|---|---|---|---|
| 19 | ARE | `ABBA unbind: A⊗B⊗B=A` | VSA — retired |
| 24 | ZCF | `VSA bind(A,B)` | VSA — retired |
| 25 | HPM | `fingerprint cosine/Hamming sweep` | Hamming — retired |
| 27 | MPC | `bundle = majority-vote-per-bit` | VSA bundle — retired |
| 28 | SSAM | `bind+similarity (Gentner)` | VSA — retired |
| 34 | HKF | `cross-domain bind(A,rel,B)` | VSA — retired |
| 14 | MCT | `… → one fingerprint` | fingerprint — retired |
| 12 | TCA | `Markov ±5` | **±5 was retired** by the whole-book finding (63.3% of same-subject links reach beyond ±5) |
| 32 | SDD | `Berry-Esseen noise floor` | **forbidden by `I-NOISE-FLOOR-JIRAK`** — classical Berry-Esseen is wrong under this system's weak dependence; Jirak 2016 is the rule |

So the `Datapath` label currently means *"was a VSA kernel"*, not *"is a masking
op"*. **I asserted earlier in this session that `bucket` is still a valid
routing column and only `substrate` was stale. That was wrong** — the bucket was
derived FROM the substrate, so it inherited the staleness.

## What the masking algebra DOES express today

Cross-checking the 34 against the real op list (`eq/ne/lt/le/gt/ge_*_to_mask`,
`ternary_match_*`, each with a gated `_under` twin; `mask_and/or/xor/andnot/not`;
`mask_ternlog<IMM>` over the full 256-table; `mask_any/all`; `masked_sum/min/max_i32`,
`masked_strided_group_sum`):

| id | code | bucket | expressible as | note |
|---|---|---|---|---|
| 5 | TCP | Gate | a gated predicate — `*_under` | prune = don't evaluate where the gate is empty |
| 8 | CAS | Gate | a cascade of `_under` tiers | the INT1/4/8/32 ladder is the gate chain |
| 20 | TCF | Gate | N masks → agreement | `ternlog` majority + `popcount` |
| 26 | CUR | Gate | coarse-to-fine `_under` chain | same shape as CAS |
| 30 | SPP | Control | N independent masks → agreement | identical algebra to TCF; the ECC/RAID framing is the same majority |

**The recipes the masking algebra can run TODAY are 4 Gate + 1 Control — and
zero Datapath.** The tier assignment is inverted relative to the substrate that
actually exists.

## Other defects found

- **22 ETD** — `"CLAM cluster geometry determines subtasks (no spec)"`. Says so
itself. Unspecified, not merely stale.
- **18 CWS** — `"persistent BindSpace"`. The singleton BindSpace was retired
(`E-MARKOV-TEMPORAL-STREAM-1`: *"in most cases the singleton-BindSpace VSA
substrate is NOT used"*).
- **31 ICR** — `"CausalEdge64 −6 mantissa"` cites the **v2** layout. Truth
(frequency/confidence) is moving to **v3**, so this reference needs re-pinning
with that change rather than after it.
- **1 RTE** — `"Berry-Esseen stop"`. Same iron-rule violation as SDD, in a
Control recipe.

## What needs improving, in order

1. **Re-derive `bucket` from the masking algebra**, not from the VSA substrate.
The five above are what the algebra can run today, and the table classifies
them **4 `Gate` + 1 `Control`, zero `Datapath`** — the current nine
`Datapath` labels are the ones that are not honest. ⊘ This read "the five
above are the honest `Datapath` set today", contradicting the table two
sections up; caught in review on PR #1235.
2. **Rewrite the 9 stale `substrate` strings** to name mask-algebra
compositions, or mark them `unrealized` — a string naming a retired kernel
reads as a spec and is worse than an empty one.
3. ⊘ **CLOSED in the same commit** — both strings now name shipped Jirak
surfaces (`recipes.rs:97` `SigmaTierBands::jirak_p`, `:408` `jc` Pillar 5),
and `no_recipe_cites_classical_berry_esseen` guards against a third. The
two rows above record the PRE-fix state and are kept as the finding, not
as outstanding work. Originally: **Fix the 2 Berry-Esseen citations** (1 RTE, 32 SDD) to Jirak 2016, per
`I-NOISE-FLOOR-JIRAK`. These are iron-rule violations sitting in shipped data.
4. **Re-pin 12 TCA** off the retired ±5 window onto the version-range read
(`QueryReference::at(v, rung)`), which is what replaced it.
5. **Re-pin 18 CWS** off the singleton BindSpace.
6. **31 ICR** rides the CausalEdge64 v3 change.
7. **22 ETD** needs a spec or an explicit `unrealized` mark.

## What this audit does NOT claim

It does not say the 34 are wrong as *tactics*. It says their recorded
realization is against a substrate that no longer exists, and that the routing
column derived from it cannot be trusted until re-derived. (⊘ this said
"as a dispatch key"; per the correction at the top of this file `bucket` is
NOT a dispatch key at all except for the `Bucket::Gate` arm, so the phrase
re-asserted the thing the correction retracted.)
Nothing here was executed; this is a read of the catalogue against the op list.
Loading
Loading