core/chat
Claude 98a6e8b439
feat(cognition): count the swallow — three silent backstops made visible (PR-9, H-11)
Wave 2's PR-9, whose authority is "mechanical PR" and which is gated on no
ruling. Widened by the 2026-07-28 triage from the accrual guard alone to all
three broad `except` blocks on the turn spine.

Each guard is DELIBERATE and stays: accrual is additive and must never crash a
turn; a pack/catalog failure must not take down logos authority; a probe
failure must not touch the served surface. Narrowing them to ImportError/
OSError — as an external assessment proposed — would convert a malformed
decision object into a turn-spine crash, trading silent failure for
served-surface failure. What was wrong is not the tolerance, it is that each
wrote a value INDISTINGUISHABLE FROM ITS HEALTHY CASE:

  - a raising read->realize->determine chain left the same None accrual a quiet
    turn leaves;
  - a logos decision that raised looked exactly like a turn where logos was
    never consulted (both: logos_decision_kind == "");
  - a crashed geometric probe recorded the same empty neighborhood as a probe
    that ran and found nothing — in the block whose entire job is producing the
    data that prices the anti-unification roadmap.

Silence, in the one layer whose constitution is "failures are typed, never
silent" (INV-34).

  chat/runtime.py         _accrual_swallows / _last_accrual_error, read via
                          accrual_swallow_telemetry(). _last_turn_accrual is
                          still None on failure, so _maybe_surface_determination
                          returns byte-identically — ADDITIVE BY CONSTRUCTION,
                          and pinned as such.
  cognition/result.py     logos_error on CognitiveTurnResult.
  cognition/pipeline.py   logos_error recorded; probe_error,
                          neighbor_scan_errors, graph_anti_unify_error on the
                          OOV telemetry.

tests/test_accrual_swallow_telemetry.py — 7 pins. The two behavioral ones were
OBSERVED RED against a build carrying the fields with the recording stripped,
so they discriminate rather than merely pass. Two test bugs of mine were fixed
along the way (wrong logos module path; CognitiveTurnResult has required
fields) — the tests were wrong, not the code.

Registered in BOTH TEST_SUITES["smoke"] and smoke.yml on creation, per #136.
Local/CI delta verified unchanged at exactly ten (local 25, CI 15, CI-only 0),
so this settles nothing R-14 has to rule.

Cleanup as found: three dead imports removed from chat/runtime.py
(_COGNITION_PACK_ID, _TEACHING_CORPUS_ID, engine_identity_for_config), each
confirmed to have no re-export dependence first — workbench/readers.py imports
engine_identity_for_config straight from core.engine_identity. ruff 4 -> 1 on
these paths; the survivor is a pre-existing structural E402.

Registers: H-11 CLOSED; PR-9 marked LANDED in the plan.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wcw2pnMBwyvmNyQg4uPEt4
2026-07-28 03:50:42 +00:00
..
data feat(deduction-serve): Band v6-EX — existential witnesses, decided (ADR-0261) 2026-07-24 14:14:37 -07:00
__init__.py
__main__.py
always_on.py feat(identity): split engine identity from build provenance (ADR-0220 PR C) (#774) 2026-06-15 11:38:04 -07:00
always_on_daemon.py feat(l10): always-on daemon/CLI — the process that runs the continuous-life heartbeat 2026-06-14 17:33:37 -07:00
anaphora.py feat(adr-0066): session-thread context + opt-in anaphora prefix (Phase 3.1 + 3.2) 2026-05-18 17:01:34 -07:00
articulation_telemetry.py feat(contemplation): Phase 5 — articulation-quality miner closes the loop 2026-05-21 10:55:39 -07:00
ask_runtime.py feat(ask): add runtime-facing ASK helper module 2026-06-10 03:34:02 -07:00
atom_equivalence.py feat(telemetry): ADR-0078 Phase 1 — composer/graph atom equivalence (observational) 2026-05-20 06:14:25 -07:00
cross_pack_grounding.py feat(register): R1–R4 register pack subsystem — deterministic surface variation 2026-05-19 16:52:36 -07:00
curriculum_serve_license.py feat(provenance,teaching): close the lateral gaps the assessment actually found 2026-07-25 04:51:15 +00:00
curriculum_surface.py feat(curriculum): query-scoped premise compilation (ADR-0264 R5-R7) 2026-07-25 17:02:36 -07:00
deduction_serve_license.py feat(provenance,teaching): close the lateral gaps the assessment actually found 2026-07-25 04:51:15 +00:00
deduction_surface.py feat(deduction-serve): Band v6-EX — existential witnesses, decided (ADR-0261) 2026-07-24 14:14:37 -07:00
dispatch_trace.py chore(chat): dispatch trace for grounding-source dispatcher (ADR-0142 debt #2) (#233) 2026-05-24 15:22:02 -07:00
example_surface.py feat(register): R1–R4 register pack subsystem — deterministic surface variation 2026-05-19 16:52:36 -07:00
narrative_surface.py feat(register): R1–R4 register pack subsystem — deterministic surface variation 2026-05-19 16:52:36 -07:00
oov_surface.py feat(adr-0066): NARRATIVE + EXAMPLE intents with multi-clause composers (Phase 3.3 + 3.4) 2026-05-18 17:01:55 -07:00
pack_grounding.py Lane 4: Registry Consolidation (language_packs to packs) 2026-07-04 15:11:28 -07:00
pack_resolver.py feat: close 3-lang depth deck — same-turn roots, capability pins, public_demo budget 2026-07-08 19:15:34 -07:00
pack_surface_candidate.py feat(pack-grounding): selector-ready gloss wiring via PackSurfaceCandidate 2026-05-19 07:26:46 -07:00
partial_surface.py feat(adr-0065): OOV cliff → five-tier honesty gradient (Phase 2.1 + 2.2) 2026-05-18 16:41:45 -07:00
refusal.py chore: Refactor CLI and Governance Anchors (#926) 2026-07-03 12:34:56 -07:00
register_substantive.py feat(register): ADR-0077 — substantive register knobs + layering boundary (R6) 2026-05-19 23:39:11 -07:00
register_variation.py feat(register): R5 — operator-visible register telemetry + tour demo 2026-05-19 19:03:07 -07:00
runtime.py feat(cognition): count the swallow — three silent backstops made visible (PR-9, H-11) 2026-07-28 03:50:42 +00:00
teaching_grounding.py feat(adr-0083): transitive (multi-hop) teaching-grounded surface (#63) 2026-05-20 14:11:40 -07:00
telemetry.py feat(physics,cognition): Cl(4,1) geometric sovereignty convergence 2026-07-20 12:20:05 -07:00
thread_context.py feat(adr-0066): session-thread context + opt-in anaphora prefix (Phase 3.1 + 3.2) 2026-05-18 17:01:34 -07:00
verdicts.py