Commit graph

4 commits

Author SHA1 Message Date
Shay
ec2b9ae794 feat(adr-0243): Lane A — discovery wiring + live kappa-search caller
Wire the ADR-0242 §5 pinned primitives into the contemplation runner
(ADR-0243 §2.4): contemplate_surprise_history() gates the newest
caller-timed ADR-0239 dual-operator observation through
is_discovery_eligible, the measured history through
cross_band_discovery_gate (F5/F6/F7 persistence), and only then emits a
DiscoveryCandidate via the existing emit_surprise_discovery ->
DiscoveryCandidateSink. Proposal-plumbing only: the sole side effect is
sink.emit().

Surprise-signal sourcing (the Lane A open question): ContemplationFinding
carries no surprise measurement and the report-mining paths have no
geometry, so nothing is fabricated for them — the canonical carrier is
the ADR-0239 dual audit dict (SelfAuthorshipMiner / ADR-0240 harness),
consumed as explicit SurpriseObservations with caller-supplied logical
time (deterministic, no wall clock).

Give propose_kappa_line_search its live caller (ADR-0242 §5-P1):
evals/analogical_transfer/kappa_calibration.py calibrate_transfer_kappa,
confined to the ADR-0240 calibration pipeline per R-04; kappa_search_event
fires exactly once when a sink is passed. Proposal-only — no
GoldTetherMonitor mutation.

A-04 hardening found during review: chat/runtime.py idle_tick lazily
imports core.contemplation.runner inside the serve process, and the
package __init__ eagerly pulled wave_seam -> holographic_vault (a
serve-banned module) — a PRE-EXISTING process-level quarantine breach.
Closed by making the wave-seam re-exports lazy (PEP 562) and keeping the
multi_scale_energy gate import function-local; pinned by a new dynamic
idle-tick-edge test in test_serve_quarantine_transitive.py.

Pinned primitives untouched: is_discovery_eligible,
cross_band_discovery_gate, candidate_from_surprise_dual signatures
unchanged; no changes to cognitive_lifecycle.py or chat/runtime.py.
2026-07-17 11:36:41 -07:00
Shay
5e0f0e5f0b feat(adr-0243): wire ADR-0240 PASS into integrate_biography (Phase 3 Lane C)
First live caller of integrate_biography (previously zero production call
sites). New core/physics/biography_wiring.py: report-level PASS gate
(report.wrong == 0 AND >=1 correct transfer; refusals don't block but
all-refused validates nothing), I-01 closure asserts re-checked at the
wiring seam (fail-closed typed BiographyIntegrationError), and a net-new
append-only BiographyProvenanceRecord binding report evidence to the
integrated trajectory hash (AuthorshipProposal-style closure proof in a
TurnEvent-style audit role).

Design ruling (Shay, 2026-07-17, brief open question): direct integration,
structurally pinned — integrate_biography is a pure recompute
(reconstruction-over-storage), so D-5/I-03 proposal gating does not attach;
the ruling is enforced by a test pinning that the wiring imports no vault
store and no evals package (report typed structurally, no core->evals
import). Module registered in the never-serve lazy tier + _BANNED +
third-door banned lists. cognitive_lifecycle.py untouched (Lane C touches
zero Phase-2 code).
2026-07-17 10:49:44 -07:00
Shay
c3b4d045f1 feat(adr-0243): flagship cognitive_lifecycle.py — ingress/relax/egress, Tier-2 off-serving
Implements ADR-0243 §2 honestly per the plan's deviations ledger, correcting
the §3 sketch's three pinned defects (SD-A/B/C):

- Ingress delegates superposition to sensorium_wave_feed, normalizes once at
  the owned construction boundary (D-3).
- Relaxation is the imaginary-time semigroup psi <- normalize(exp(-(H-lam0)*dt)*psi)
  (D-1) with a certified, never-assumed convergence certificate (D-2): exact
  ground energy, achieved Rayleigh energy, eigen-residual, spectral gap, and a
  psi_digest binding the certificate to the exact state it certifies.
- Two checkable problem domains: quadratic_well (convex target-decoding) and
  propositional (Cl(4,1) blade lattice = assignment lattice of <=5 atoms;
  diagonal penalty Hamiltonian; entailment via UNSAT(premises & !conclusion)
  scored against independent truth-table gold).
- Egress composes unit-amplitude-density + certificate-binding + versor
  closure (routes, does not admit, per the dual of SD-A) + ADR-0006 energy
  classes + E0/E1 crystallization policy. Cold states emit a
  CrystallizationProposal (epistemic_status pinned SPECULATIVE by the type;
  D-5/I-03) — never a vault write.
- Quarantined off-serving (A-04): lazy barrel export, banned in the
  transitive subprocess probe and the cohesion AST suite.

Adversarial verification (finder/verifier workflow; most verify agents lost
to a session limit, every surviving finding reproduced in-tree before acting)
surfaced and this closes two real defects beyond the plan text:

- egress_gate admitted any unit state paired with any converged certificate
  from an unrelated run, so CrystallizationProposal could package a foreign
  psi_digest next to an unrelated certificate_id as false provenance. Fixed
  by binding the certificate to its state (psi_digest) and refusing mismatches
  (certificate_state_mismatch).
- A state with a spectral gap below the requested tolerance could certify
  with ZERO ground-space overlap (energy window alone can't resolve it).
  Certification now also requires the excited weight (E-lam0)/gap <= tol
  (refusal spectral_gap_below_tolerance), and the degeneracy cluster is
  capped at the acceptance window so certificates report the honest
  rate-limiting gap instead of absorbing a hairline split.

38 tests (31 original + 7 hardening: certificate-binding must-reject,
gap-refusal + true-ground pair, dense-branch (eigh) refusals, iterate-collapse,
Hamiltonian/egress shape must-rejects, E2 hold route, hardcoded canonical
entailment verdicts independent of the gold function's code shape).

[Verification]: lifecycle+pins+cohesion+transitive 58 passed; in-worktree
smoke 176 passed (131s); fast lane 11750 passed, 108 skipped (574s, exit 0).
2026-07-17 06:19:33 -07:00
Shay
c8160cacba fix(physics): close A-04 transitive serve breach — lazy Tier-2 barrel exports + process-level guard
Importing chat.runtime transitively loaded 5 off-serving modules
(wave_manifold, holographic_vault, fibonacci_search, multi_scale_energy,
wave_energy_boundary) through the core/physics package barrel — falsifying
the 'serve path not wired' acceptance row while the direct-AST A-04 pin
stayed green.

Reconciliation (ruled 2026-07-15): one substrate, two tiers.
- T1 sanctioned serve substrate: wave_manifold (goldtether/surprise/
  biography delegate to it) — stays eager, removed from the A-04 ban list.
- T2 off-serving (holographic_vault, fibonacci_search, wave_energy_boundary,
  multi_scale_energy): converted to PEP 562 lazy __getattr__ exports so the
  serve process never loads them; 'from core.physics import X' still works
  for off-serving callers. TYPE_CHECKING block keeps static analysis intact.
- New tests/test_serve_quarantine_transitive.py enforces the process-level
  invariant via a clean-interpreter sys.modules probe (RED against the old
  barrel, GREEN now).

Evidence: docs/research/adr-0241-0242-adversarial-and-fidelity-findings.md
(Finding #2). 179 affected tests green.
2026-07-15 12:48:45 -07:00