core/docs/plans/2026-07-28-foundations-audit.md
Shay cbfc8ccbf7 feat(evals,tests,docs,adr): FA-1 ruled — cross-language holonomy does not discriminate meaning (NO-GO)
The CORE-Logos "Crown Proof" — ADR-0015's claim that cross-language holonomy
closure is THE validation gate of meaning — was measured against a criterion
registered before the run, and refused.

  G1  separation, all negatives      AUC 0.557   (chance 0.500, bar 0.80)   FAIL
  G2  hardest class, cross-pairing   AUC 0.664   (bar 0.75)                 FAIL
  G3  word-order sensitivity         0.644       (bar 0.90)                 FAIL
  G4  no collapse re-entry           0 lost      (bar: 0)                   PASS

G4 is the half that succeeded: the repairs work. The claim is what failed --
which is the outcome the registration called "worth as much as a GO", because
it retires the largest piece of unearned design in the system.

Both preconditions had to be BUILT before the question could be asked at all,
which is why the 2026-06-14 negative constrained nothing: the shipped compiler
collapsed 37-53 coordinates, and holonomy_encode never closed. Measured on the
repaired ground with a genuine loop, over 1,016 aligned pairs and 58,375
mechanically-generated negatives in three classes, nothing hand-picked.

Diagnosis, not just a number: the encoding reacts more strongly to REORDERING a
clause (median deviation 41.2) than to CHANGING WHAT IT IS ABOUT (32.2). It
measures path shape, not content -- and that follows from the algebra, since
permutation acts on an ordered product through non-commutativity, a first-order
effect, while substituting one of three factors perturbs it only through that
factor. The negative classes do order correctly by meaning-distance
(aligned 27.2 < lexical 32.2 < order 41.2 < cross-pair 53.2), so the geometry is
weak signal rather than noise -- a correlation where the design asked for a gate.

Consequences, all landed here:

  * ADR-0005 and ADR-0015 AMENDED to record the refusal. The three-language
    architecture, the pack contract, morphology-as-structure and Hebrew root
    folding into geometry all survive untouched; only the claim that alignment
    or closure VALIDATES meaning is retired.
  * tests/test_fa1_gate_verdict.py is the tripwire: if a future encoding makes
    the gate real, it fails, and the amendment is withdrawn in the same commit
    that replaces it with a proof. Two sabotages observed red.
  * allow_cross_language_recall RULED by measurement (work-order item 3): it
    gates vault-recall depth over field states, has no language argument and no
    cross-language path, and reaches only walk_surface, which runtime_contracts
    declares telemetry. Stays ON, reclassified DEPLOYMENT, flip condition
    recorded. G-25's own claim that it was "the pillar's own switch" is
    CORRECTED -- that read the flag's name instead of its call graph, which is
    the error the audit exists to find.
  * A sixth defect found while building the harness: en_collapse_anchors_v1
    declares role "collapse_anchor", which is not a LanguageRole member, so
    load_pack() raises. It is registered in the resolver, consumed by opening
    lexicon.jsonl on a raw path that bypasses the loader, and is the target of
    all 24 alignment edges that still resolve to nothing. The enum's own comment
    records the identical failure once before (ADR-0097, domain_seed).

The repairs cross to the keel on their own merit regardless of the verdict:
geodesic blending removes every coordinate collision, and mount-wide edge
resolution connects 39 of the 63 dead edges. The collapse was damaging English's
own vocabulary; seeing that required no theory of meaning.

FA-1 is CLOSED: all four work-order items discharged, L2 verdict recorded as
defective-but-repairable with its central design claim retired.

[Verification]: uv run core test --suite smoke -q -> 786 passed in 239.45s, EXIT=0
                (+4 tests, +15s vs the prior 782/224s -- the FA-1 pin's stated cost).
                Doc-parsing pins re-run after the ADR and register amendments:
                test_adr_status_governance + test_adr_index -> 321 passed;
                test_flag_register -> 6 passed.
2026-07-28 14:37:07 -07:00

18 KiB
Raw Blame History

The Foundations Audit — bottom-up, inside-out, logos-first

Charter · 2026-07-28 · opened at 339bfd37 · precedes and re-gates the Perception Arc

RATIFIED 2026-07-28 (Shay): the KEEL. The audit's findings feed a clean-trunk rebuild at ../coreai — assembly rebuilt, parts and evidence carried over by admission, the diseases designed out structurally rather than policed. Charter set: coreai/docs/charter/. This repository remains the serving system and the evidence source throughout the migration; components are admitted to the keel per its migration protocol, and the legacy surface shrinks under ratchet. FA-1 (the holonomy-gate experiment) runs here, where the machinery lives; its verdict gates the keel's L2/L3 design. Standing question: for every part of the cognitive design — is it masterfully implemented intrinsically, in the role it plays in its subsystem, in the role its subsystem plays in the system, and at every seam it is supposed to share with other organs, packs, and components? Nothing is "understood" until all four can be articulated with evidence.


0. Why this audit, and why it starts at the bottom

Five independent investigations this session converged on one disease: layers assuming connections that were never made. The serving path assumed geometry it never touched (G-24); the faithful §2 reader sat dark while its inversion served; three operator experiments were run and forgotten; the mirror assumed a sync direction nobody verified. Every one was found by opening the layer below the claim.

The corollary is the audit's method: verify from the foundation upward, because a defect at layer N silently invalidates the mastery of everything at N+1 — and this repo's record proves the invalidations are real, not hypothetical. The always-on daemon consolidated an empty set for six weeks because one foundational flag was absent; every layer above it looked correct.

Exit criterion: every layer below the perception boundary carries a verdict — MASTERFUL (intrinsic + role + seams all evidenced), SOUND-BUT-STRANDED (correct, unwired), or DEFECTIVE — and every seam between layers is either proven live or explicitly declared dark with an owner. The Perception Arc's Phase 1+ does not run until Layers 02 have verdicts.

1. The first finding, and why logos is the entry point — FA-1

The suspicion that CORE-Logos is not integrated as designed was tested against the source before this charter was written. It is correct, and the evidence is exact:

What ADR-0005/0015 design. Three languages as charts on one semantic manifold: Hebrew roots as depth anchors, Greek as relational depth, English as articulation surface. Alignment edges carry resonance ("Alignment is resonance. These must not be collapsed into one multiplication"), and the validation gate of meaning is cross-language holonomy closure: "holonomy(hebrew clause) ≈ holonomy(koine greek clause) ≈ holonomy(english clause)… Word-order changes should change holonomy. This is the CORE-Logos proof." The pillar is not decoration in the design — it is the design's criterion for meaning.

What exists, measured at 339bfd37:

Layer State Evidence
Substrate grounding Real packs/compiler.py folds HE roots into vectors as triliteral: tokens — logos shapes the geometry at compile time
Holonomy machinery Livepresent but not a holonomy core/physics/digest.py — that module is a field digest cycle that passes holonomy through untouched. The encoder is algebra/holonomy.py, and its reverse walk was deleted at fca6216e with the docstring describing it left in place. See the FA-1 verdict below.
Alignment data Seed-scale: 11 edges83 edges authored, 20 resolve Four packs carry alignment.jsonl. The two the serving path actually grounds HE/GRC against (he_core_cognition_v1 22, grc_logos_cognition_v1 41) contribute zero — a hardcoded three-entry prefix map drops every one of their edges. The corpus was grown 7.5×; the growth was never connected.
EN lexicon tagging Present 91 entries carrying logos.core semantic domains
Serving-path role Veto only, no-ops on English pipeline.py:544-583evaluate_logos_on_text can force a refusal against observed HE plural morphology; "English-only turns with no HE surface → no-op"
Recall bridge ON, undocumented — the pillar's own switchmisnamed; not the pillar's switch at all allow_cross_language_recall gates recall_top_k=3 vs 0 into vault.recall(state.F, top_k) — a nearest-versor search over stored field states with no language argument, no pack, no cross-language path. Its output feeds the generation walk, which is telemetry-only (runtime_contracts.md:44). Ruled 2026-07-28: stays ON, reclassified DEPLOYMENT. This row's original claim read the flag's name instead of its call graph — the exact error this audit exists to find, committed by the audit.
Curriculum Registered, bandless hebrew_greek_textual_reasoning in DOMAIN_PACKS with corpora; produced zero curriculum bands at the PR-14 measurement
Validation-gate role Never assumed ADR-0015 §"Establishes holonomy-level resonance as the validation gate" — no serving or licensing path consults cross-language holonomy; template match became the de-facto gate instead

FA-1 verdict (superseded by measurement, 2026-07-28 — the original read is struck below). The pillar is architected and seeded exactly as designed, then left at seed scale, wired at three mutually-unaware points, and load-bearing nowhere.

FA-1 verdict, measured: the pillar is architected as designed, grown further than this charter believed, and then destroyed at compile time. Full evidence: docs/analysis/logos-substrate-collapse-2026-07-28.md. Five defects, all exact:

  1. packs.compiler._blend_feature_versors ignores its strength argument and returns the target verbatim. Every "nudge" in the system — cross-language alignment (0.10), morphology clustering (0.40), mount-time domain resonance (0.40) — is a total overwrite. ADR-0015's "a weighted graph, not a translation table" and "without flattening their distinctions" are both violated bit-exactly.
  2. Mounting the depth packs removes 37 distinct coordinates (239 surfaces → 202 points). English alone: 220/220, collision-free. Nine English question words — ask, question, what, who, where, how, why, when, which — land on one coordinate, dragged there by a single Greek verb sharing their primary domain. דבר, λόγος, דברים and word are one point.
  3. The roles invert. English is chosen as the mount-time prototype, so the depth languages are not anchors — they are deleted into the articulation surface. At pack-load time, which language a Hebrew token becomes is decided by sorted() order of pack ids.
  4. 63 of 83 alignment edges resolve to nothing — the two packs serving actually uses contribute zero, because _infer_foreign_pack_ids maps entry-id prefixes through a table hardcoded to the original three packs.
  5. algebra.holonomy.holonomy_encode never closes. The reverse walk was deleted at fca6216e; the docstring that describes it stayed. alpha is validated and never read (alpha=0.0 and alpha=1.0 return bit-identical arrays) while core/physics/biography.py:94 passes it. A walk followed by its reverse does not return to identity.

And the cure was already built one layer down. A linear blend leaves the versor group and VocabManifold.update() correctly refuses it — the overwrite is what a lerp degrades into once the guard bites. The correct operation is the group geodesic, and algebra/rotor.py has shipped rotor_power + word_transition_rotor since the algebra layer's first commit. It was never called. That is this audit's thesis — layers assuming connections that were never made — with both halves present and unjoined.

This is why everything above L2 could at best be correct about an ungrounded semantic space, and it is the missing half of the "geometry adds nothing" verdicts: no operator can distinguish what its ground does not distinguish. Registered as G-25.

FA-1's work order (first in the audit):

  1. Map the designed logos contract completely — every ADR-0005/0015 obligation as a row: obligation → implementing site → live/dark → seam partner. No prose without a site.
  2. Decide the holonomy-gate question the way §5 was decided — pre-registered, criterion committed before the run. This is the designed validation gate; it has never been measured. CORRECTION (2026-07-28): it has been measured, and it came back negative. docs/analysis/holonomy-resonance-proof-not-robust-2026-06-14.md measured the clause-level resonance and found it does not separate aligned from misaligned — under the engine's own holonomy_similarity it anti-correlates (aligned mean 87.2, misaligned +122.6). Two tests already pin that failure as honest tripwires. Writing "never measured" was the same error the Perception Arc §4 correction exists to prevent, made in the document that records that correction — the fourth instance of this pattern in the arc, and the reason the census-before-claim rule now applies to plans, not only to code. What FA-1 adds is not a first measurement but the first measurement on a ground that has not been flattened, with a closed loop — both preconditions were absent in June, and the negative is uninterpretable without them.
  3. Rule allow_cross_language_recall — the pillar's switch gets its recorded rationale or gets turned off; measured either way. (Note the flag now gates recall across a manifold in which the cross-language distinctions it retrieves over do not exist — measure it on the repaired ground or the number means nothing.)
  4. Grow-or-declare the alignment corpusANSWERED by measurement, not owed as work. The corpus was grown to 83 edges across four packs. 63 of them resolve to nothing, including all 63 belonging to the two packs the serving path actually grounds Hebrew and Greek against. The item was never "grow it"; it was "connect what was already grown." Carried to the keel as a K3 contract obligation: an alignment edge that resolves to no pack is a load error, not a silent continue.

2. The layer stack and the articulation requirement

Bottom-up. A layer's audit is complete only when each component in it has all four articulations with evidence: (i) intrinsic correctness, (ii) role in its subsystem, (iii) subsystem's role in the system, (iv) every seam named with its partner and its live/dark status.

# Layer Contents Prior evidence in hand Status
L0 Algebra kernel algebra/ (Cl(4,1), versors, CGA embed/readback) 355 geo refs, fully reachable, exact-recall invariants, versor_condition flat across 5,000-beat soak Candidate-MASTERFUL — verify seams, then close
L1 Physics & field core/physics/ (37 files), field/, salience, Hamiltonians, digest/holonomy Soak evidence pinned; salience live-but-bypassed; relation_compiler sound-but-stranded Audit: which operators are load-bearing vs decorative
L2 Semantic ground — the logos layer packs, vocab, morphology, semantic_primitives, alignment, cross-language recall FA-1 above DEFECTIVE-BY-ABSENCE at scale; starts first
L3 Perception both readers, linguistic_pipeline, binding_graph, structure_mapping, the comprehension organs G-24, F-A…F-E, three negative operator experiments, 1.28% read rate Blocked on L2's verdict — a reader over an ungrounded lexicon inherits the gap
L4 Cognition core/cognition/ pipeline, contemplation, epistemic state/disclosure/questions, vault, recognizer Pipeline audited pointwise (H-11, H-13); epistemic_disclosure/questions fully dark in census; ADR-0144 recognizer dark Seam census then role audit
L5 Serving & articulation surfaces, licences, articulation/writer, workbench Licence machinery honest post-R-13/R-8; writer 6 constructions Last — it is the layer most shaped by all below
X Cross-cuts teaching/learning loop, governance/ledgers, always-on life Docket executed; teaching gated; daemon profile fixed Audited per-layer at each seam they touch

Instrument (from the census at 339bfd37): 666 modules, 293 reachable from serving, 373 dark. Every dark module gets exactly one of: seam scheduled · deliberately-dark with recorded reason · deletion candidate. The census script becomes a pinned lane so this number is a ratchet, not a snapshot.

FA-1 · CLOSED 2026-07-28 — all four work-order items discharged

Item Outcome
1 · map the designed logos contract Done as the defect map: docs/analysis/logos-substrate-collapse-2026-07-28.md — six defects, each with its site, its measurement, and its cure
2 · decide the holonomy-gate question NO-GO, pre-registered, G4 held: docs/analysis/fa1-holonomy-gate-verdict-2026-07-28.md. AUC 0.557 (chance 0.500, bar 0.80); word-order sensitivity 64.4% against the ADR's own test. ADR-0005 and ADR-0015 amended; tripwire pinned
3 · rule allow_cross_language_recall Ruled by measurement: it gates vault-recall depth, has no cross-language path, and reaches only telemetry. Stays ON, reclassified DEPLOYMENT, with the flip condition recorded (docs/specs/flag_register.md §1)
4 · grow-or-declare the alignment corpus Answered before it started: 83 edges authored, 63 resolving to nothing. Not a growth problem — a connection problem

L2 verdict: DEFECTIVE (repairable), and its central design claim RETIRED. The repairs are real and measured — the geodesic blend removes every coordinate collision (37 on the trilingual mount, 53 on the six-pack logos mount), and mount-wide edge resolution connects 39 of the 63 dead edges. What does not survive is the claim that the repaired ground validates meaning by holonomy closure.

A sixth defect, found while building the experiment: en_collapse_anchors_v1 declares role: "collapse_anchor", which is not a member of packs.schema.LanguageRole, so load_pack() raises before reading it. It is listed in chat/pack_resolver.py, consumed by chat/pack_grounding.py by opening lexicon.jsonl on a raw path — bypassing the loader that would reject it — and is the target of all 24 still-unresolved alignment edges. The enum carries a comment recording this exact failure once before (ADR-0097, domain_seed): a registry widened by hand falls behind by hand.

What this changes downstream. L3's audit no longer waits on an open question — it inherits a ruled one. A reader over this ground cannot get its meaning criterion from cross-language closure, which converts the 1.28% read rate from "a reader problem we might solve with better grounding" into "a reader problem, full stop." That is a smaller and more honest question.

3. Sequencing

FA-1 (logos, L2)FA-0 (L0 closure — cheap, likely already masterful, and everything cites it)FA-2 (L1 physics role-audit)FA-3 (L3 perception, absorbing the Perception Arc phases, now on a verified ground)FA-4 (L4)FA-5 (L5) → close with the full articulable map: every component, four articulations, evidence-linked.

The Perception Arc is not discarded — its Phase 0 (read-rate ratchet) runs immediately as instrumentation, its Phase 4 deletions stand, and its Phase 1 is corrected (below) and re-gated behind FA-1's holonomy decision, because the honest experiment order is: first establish whether the semantic ground carries meaning as designed; then ask what a reader over that ground can do.

4. Phase 1 correction, imported from the systematic sweep

The operator hypothesis ("relations as geometric operators") is not untested — it has three negative results, found only when reachability was enumerated instead of grepped:

Date Experiment Encoding Verdict
2026-06-04 Field-reasoner wedge (docs/analysis/field-wedge-ablation-result-2026-06-04.md) relations as translator versors, e1 line C3 — decoration: wrong=0 held, caught zero symbolic errors, lost one case, diversity 0
2026-07-19 Relational operator ablation (docs/analysis/relational-operator-ablation-dossier-2026-07-19.md) relations as CGA dilation (VersorBinding) Identical to rational baseline (2/8 both); depth metadata inert; enrich=decoration
2026-07-28 ADR-0252 §5 (docs/research/sme-experiment-verdict-797ebad5.md) structure as point configurations, Procrustes NO-GO at every attribute weight

Convergent mechanism: wherever the geometric operation is isomorphic to the arithmetic it replaces, it reproduces it exactly and adds nothing — zero diversity is near-tautological, not disappointing. And all three hit the same binding constraint: the reader (6/8 refused; 5/500 decided; 1.28% read). Reopening criterion, stated so this is never re-proposed blind: a domain where the geometric encoding is not isomorphic to a trivial symbolic computation — which is precisely what FA-1's holonomy-resonance question is, and why it, not a fourth operator-arithmetic ablation, is the next experiment.


Method note: every claim above carries a path. The audit inherits the standing philosophies — red-before-green for every new pin, measure before ruling, record the error next to the fix — and the census, read-rate, and seam maps become pinned lanes so the audit's own instruments cannot go stale the way the ones it replaces did.