Commit graph

2069 commits

Author SHA1 Message Date
Shay
c8c147a4e9 docs(adr-0244-d4): mark Phase 1 done (3c3d2c29), dashboard -> Phase 2
[Verification]: docs-only tracker update referencing the already-gated
3c3d2c29 (Phase 1) landing.
2026-07-17 16:13:08 -07:00
Shay
3c3d2c296e feat(adr-0244): Phase 1 — operator-preservation identity manifold primitive
Implements ADR-0244 §2.1/§4a: the metric-exact operator-preservation
geometry, pure and off-serve (wired into the runtime gate in Phase 2).

core/physics/identity_manifold.py:
  - lift_axis: R^3 pack direction -> grade-1 Cl(4,1) at e1/e2/e3 slots
    (basis_vector, not embed_point) so the value subspace lives in the
    spatial grade-1 block where <.,.>_0 = Euclidean and the Gram matrix
    is positive-definite.
  - gram_matrix + ManifoldConditioningError (fail closed when cond(G)>1e5).
  - subspace_project: metric-orthogonal P_I(x) with SIGNED coefficients.
  - sandwich: versor action R x R~.
  - euclidean_norm: positive-definite leakage magnitude (NOT the indefinite
    Cl(4,1) norm, which can vanish/negate an e5-boost leakage).
  - IdentityManifoldGeometry (frozen): axes_psi + Gram + Gram^-1; .project,
    .axis_response -> (leakage, self_align), .leakage_rms.

Operator-preservation, per the ratified core-mechanism correction: the
live trajectory final_state.F is a VERSOR (even-grade operator, zero
grade-1 content), so we measure whether it PRESERVES the value subspace
via F a_i F~, not whether it lives in it. Two per-axis measures, both
required and non-redundant:
  - subspace leakage euclidean_norm(rot_i - P_I(rot_i)) catches tilt of a
    value axis toward an alien dimension (e4/e5);
  - signed self-alignment <a_i, rot_i>_0 catches in-subspace inversion
    (e1 -> -e1: leakage 0 but self-align -1).

tests/test_adr_0244_identity_manifold.py (24 tests) pins every falsifiable
claim: G=I for the default pack, idempotent projection, identity versor ->
0 leakage/+1 align, within-plane rotation -> no leak, e4/e5 tilt -> leak,
pi-inversion -> 0 leak but -1 self-align, near-degenerate axes ->
ManifoldConditioningError, determinism.

[Verification]: 24 new tests passed; in-worktree smoke 176 passed; fast
lane (-m 'not quarantine and not slow' -n auto) 11863 passed, 109 skipped;
serve-quarantine transitive test 2 passed (new module is NOT dragged onto
the serve path — off-serve until Phase 2).
2026-07-17 16:12:54 -07:00
Shay
459280e3f3 docs(adr-0244): amend §4a to operator-preservation (core-mechanism fix)
Discovered before implementing Phase 1: the live identity trajectory
final_state.F carries the invariant versor_condition(F) < 1e-6 — it is a
VERSOR (even-grade operator, grades 0/2/4, exactly zero grade-1 content).
§2.1/§2.2's literal 'project psi_traj onto the grade-1 value subspace' is
therefore VACUOUS on the real runtime object: P_id(F) = 0 identically,
flagging every trajectory — a fail-closed brick. Root cause: a versor is
an operator, not a state vector; projecting the operator into a subspace
of states is a category error.

Resolution (ratified by Joshua Shay 2026-07-17): measure whether the
versor PRESERVES the value subspace, via its action on the axes
F a_i F~ (sandwich). Two per-axis measures, both empirically verified
necessary and non-redundant:
  - subspace leakage = euclidean_norm(rot_i - P_I(rot_i)) — catches a
    versor tilting a value axis toward an alien dimension (e4/e5);
  - signed self-alignment = <a_i, rot_i>_0 — catches in-subspace
    inversion (e1 -> -e1: leakage 0 but self-align -1), the concrete
    realization of the ratified 'signed overlap, never abs()' decision.
Keeps the grade-1 pack axes unchanged (no pack migration) and sharpens
inalienability: identity is invariant UNDER transformation, not a frozen
state.

§4a rewritten to the operator-preservation spec (lift_axis, gram_matrix,
subspace_project, sandwich, euclidean_norm, axis_response); governance
annotation item 12 records the reframe + ratification; plan doc §3 Fact C
+ §5 Phase 1 + progress log updated.

[Verification]: docs-only ADR/plan amendment; provenance/ADR guard
(test_adr_0241_governance_p12.py) 6 passed — ADR-0244 Status line
confirmed still 'Proposed' (the item-12 ratification text is inside the
annotation/§4a, not a status flip). All acceptance numbers pre-verified
via in-tree numerical probes against algebra.cl41.
2026-07-17 15:55:58 -07:00
Shay
aeb75d9af2 docs(adr-0244-d4): mark Phase 0 done, dashboard points to Phase 1
[Verification]: docs-only tracker update, no executable surface;
references the already-gated ad37d03b landing.
2026-07-17 15:32:48 -07:00
Shay
ad37d03b19 docs(adr-0244,adr-0245): D4 Phase 0 — governance reconciliation
Reconciles ADR-0244 against its own D0 blockers and commits ADR-0245 as
a real companion ADR (previously a dangling reference in ADR-0244 §4).

ADR-0244 governance annotation expanded (11 items, all body text below
preserved verbatim for R&D provenance; annotation governs on conflict):
  1. Q_top proof (already landed) now explicitly drops the §2.2 egress
     ΔQ_top conjunct (it is a hollow, always-true discriminator).
  2. §4-vs-§2 contradiction RESOLVED — new §4a is the governing spec;
     §4 kept verbatim as the (contradictory) original R&D sketch.
  3. §2.1 axis construction was underspecified (packs ship dim-3
     directions, not 32-vectors) — resolved via a grade-1 lift at the
     e1/e2/e3 slots (algebra.cl41.basis_vector), not embed_point.
  4. §2.2 amended: signed overlap (never abs()'d — anti-alignment must
     stay distinguishable from orthogonality); leakage norm is the
     positive-definite Euclidean coefficient norm, not the indefinite
     Cl(4,1) inner product (which (+,+,+,+,-) permits to vanish for
     nonzero leakage).
  5. Inalienability reframed as 5 testable layers (algebraic / runtime
     / pipeline / operational / semantic) — only the first is a math
     guarantee.
  6. Paraphrase-invariance reworded as an empirical, measured property;
     Q_top conservation scoped to pure versors only (relax_to_ground
     can converge to non-versor superpositions — the ADR-0243 SD-A
     subtlety).
  7. boundary_ids activation (currently stored, never evaluated).
  8. Identity manifold is FROZEN — biography holonomy accumulates
     separately and never mutates the identity subspace.
  9-11. Filename correction (multimodal_lifecycle.py doesn't exist;
     real file is cognitive_lifecycle.py), ADR-0245 cross-link,
     theological citation labeled ESV + analogy disclaimer.

New §4a supersedes §4 with a typed, Gram/leakage-correct specification
(ManifoldConditioningError, IdentityGateRefusal, bounded/abstaining
C_id, isfinite + shape guards — no bare assert) for Phase 1/2 to build
against under TDD.

ADR-0245 committed Proposed, verbatim from the R&D export, with a
governance annotation mapping its 4 decisions + Sec 3 acceptance gate
against what the cohesion-directive arc already landed (Rust f32 GP,
_cached_eigh, digest hot-path all done; f64->f32 cast + Sec 3's
speedup/collision proofs open — tracked as D4 Phase 4/5).

Audit doc (adr-0244-cohesion-directive-audit-2026-07-17.md) wrinkles
1-2 and Q5 sequencing updated from 'pending'/'must reconcile' to
resolved, cross-referencing this landing.

[Verification]: in-worktree smoke gate 176 passed; provenance/ADR
governance pins (test_adr_0241_governance_p12.py,
test_adr_0242_topological_quarantine.py, test_third_door_cohesion.py)
30 passed — confirms ADR-0244 stays Proposed (no status flip) and no
existing ADR provenance guard was disturbed. Docs-only change, no
executable surface touched.
2026-07-17 15:32:09 -07:00
Shay
0f2b8d5e4f docs(adr-0244): D4 implementation plan + progress tracker (resume anchor)
Comprehensive phased plan for full ADR-0244 realization (D4) plus the
ADR-0245 companion: locked design decisions (Q_top dropped from egress,
grade-1 axis lift, signed overlap, Euclidean leakage norm, frozen
identity manifold, bounded/abstaining C_id), code-verified ground truth
(Fact A dim-3 axes, Fact B two field surfaces, boundary_ids dormant),
folded-in external-review considerations, and a per-phase progress
dashboard for seamless cross-session resume after rate-limit breaks.

[Verification]: docs-only (docs/handoff/), no executable surface; smoke
deferred to Phase 0 (first phase touching governance/ADR tests).
2026-07-17 15:17:05 -07:00
Shay
ee38c97617 feat(adr-0244): prove Q_top vacuity — D4 hollow-gate evidence + annotation upgrade
Turns the D0 "likely vacuous" annotation on ADR-0244 §2.3 into a re-runnable proof
that ΔQ_top = 0 is a hollow egress gate (the #19-pseudoscalar failure mode).

evals/adr_0244_qtop_vacuity/ — computes Q_top = <psi I5 ~psi>_0 on the real
Cl(4,1) algebra and finds: (1) Q_top = 0.000e+00 EXACTLY across every unit versor
(spatial rotors AND boosts through e5, and products) — I5 is central so
psi I5 ~psi = I5*(psi ~psi) = I5 for a unit versor, scalar part 0; (2) off the
versor manifold Q_top = -grade5(psi ~psi), nonzero only where the I-05 closure
residual already fires; (3) it is a conserved Spin(4,1) invariant but identically
0 on the valid manifold; (4) the decisive test — an aligned identity and an
adversarially-rotated one (a valid versor, overlap 0.963) both read Q_top = 0, so
ΔQ_top = 0 PASSES the attack the spectral-leakage/closure check actually catches.
Typed JSON artifact + CLI (exit 0 iff proven_vacuous).

tests/test_adr_0244_qtop_vacuity.py — pins each step + off-serving quarantine.

Docs: ADR-0244 §2.3 annotation upgraded "likely vacuous" -> "PROVEN vacuous —
retire from egress"; audit-doc Q4 marked RESOLVED with the evidence.

Verdict: do NOT wire ΔQ_top = 0 as an egress admit condition; keep Q_top, if at
all, as a closure-derived diagnostic. Closes the first of the two ADR-0244 D4
blockers with proof.

[Verification]: qtop eval 8 tests green; CLI proven_vacuous=true; smoke below.
2026-07-17 14:39:52 -07:00
Shay
3a0cd0b455 refactor(adr-0244): D3 search honesty — sampled-unimodality naming + kappa legibility
Cohesion directive Mandate 6 (ADR-0244 §2.4). The Fibonacci search was already
~85% compliant (typed OptimizationFailure, fail-closed, bracketed contract,
never a bare float); this closes the two residuals honestly:

- Rename the failure reason unimodality_violation_multiple_extrema_detected ->
  sampled_unimodality_violation_observed. A finite sample cannot prove global
  unimodality; the check only *observes* a violation on the evaluated points.
  Docstrings now state the Bracketed-Local contract explicitly.
- propose_kappa_from_search: kappa=1.0-on-failure IS the required "parameters
  unchanged" no-op (thr = productive_threshold / 1.0), and the typed
  OptimizationFailure is already returned as the second element — so the fix is
  legibility, not a behavior change (the working seam is preserved, not broken):
  the docstring names baseline as an explicit caller-side policy, and a new test
  pins that a failed search surfaces the typed failure rather than a bare float.

tests: test_adr_0244_search_honesty pins the renamed reason end-to-end (a
cos(8*pi*x) objective whose golden-section samples are non-monotone triggers it;
a smooth bimodal instead converges to a local-min certificate — the honest
Bracketed-Local distinction), _unimodality_ok as a finite-sample check, kappa
failure legibility + no-op baseline, and that no stale reason string remains.

[Verification]: search-honesty 6 + adr_0242_fibonacci + third_door_cohesion +
carry_seams green; smoke + fast lane below.
2026-07-17 13:58:17 -07:00
Shay
82b031d158 perf(adr-0244): D2 mechanical sympathy — Rust f64 GP fast-path + eigh memoization
Cohesion directive Mandates 1+2 (ADR-0244 §2.6 / §2.8).

Mandate 1 — Rust f64 geometric_product fast-path:
- core-rs/src/lib.rs: export a geometric_product_f64 PyO3 wrapper (mirrors the
  f32 one; delegates to cl41::geometric_product_f64, itself a term-for-term
  mirror of the pure-Python f64 kernel — same i-major scatter order, no FMA).
- algebra/backend.py: f64 branch in geometric_product, gated on CORE_BACKEND=rust
  + core_rs present (default stays pure-Python; older builds fall through on
  AttributeError). The directive's f32 gate was already built; the real gap was f64.
- Contract is BIT-IDENTICAL, not tol-matched: a 1-ULP divergence would move the
  f64 wave-field residual bytes and break I-02 replay under CORE_BACKEND=rust.
  Verified: test_geometric_product_f64_parity N=10000 Rust-vs-Python bit-for-bit
  + CORE_BACKEND=rust subprocess hex match (core_rs built).
- Measured M1 speedup (sixth acceptance criterion): dense f64 GP ~120x
  (Rust 4.3 us/call vs Python 520 us/call) with parity holding.

Mandate 2 — eigh memoization:
- cognitive_lifecycle.py: relax_to_ground's dense-branch np.linalg.eigh routed
  through _cached_eigh (functools.lru_cache, keyed on the frozen hamiltonian_id +
  matrix bytes), returning frozen read-only (evals, evecs) so a cache hit can
  never be mutated — every hit is bit-identical. The diagonal (propositional)
  fast path is untouched.

tests: test_adr_0244_mechanical_sympathy pins cached-eigh == fresh eigh,
read-only arrays, hit-returns-identical-objects, and relaxation determinism
through the cache; D9 extended with the N=10000 bit-identity gate and its
now-stale "f64 is Python-only" pins updated.

[Verification]: D9 22 passed (incl. bit-identity N=10000, core_rs built) +
mechanical-sympathy + cognitive_lifecycle green; smoke + fast lane below.
2026-07-17 13:58:17 -07:00
Shay
4ec2c8b9dc refactor(adr-0244): D1 semantic rigor — full 256-bit digests + LE byte-order
Cohesion directive Mandates 4+5. The ADR-0243 lifecycle modules were the only
content-address sites still truncating SHA-256 to 96 bits (24 hex) and passing
default=str to json.dumps — the rest of the codebase already uses full 64-hex
digests (claim_digest, cert_id, decision_id, pressure_id, ...). The default=str
+ [:24] drift had also just replicated into Lane C (biography_wiring.py).

- cognitive_lifecycle.py: _content_id drops default=str (non-serializable payload
  now fails closed with TypeError) + full 64-hex; _psi_digest full 64-hex over
  canonical little-endian f64 bytes via a new _le_f64_bytes helper (coercion, not
  the assert form the ADR-0244 draft used — assert is stripped under -O);
  matrix_sha routed through _le_f64_bytes too.
- biography_wiring.py, self_authorship.py: same _content_id hardening. Verified
  every payload is JSON-safe after the existing float()/str() wrapping, so
  removing default=str changes no current digest value — only future
  non-serializable inputs fail closed.
- On little-endian targets the widening is an un-truncation: the new 64-hex
  digest's 24-char prefix equals the old value (pinned).

tests: test_adr_0243_cognitive_lifecycle psi_digest gold updated to full+LE; new
test_adr_0244_semantic_rigor pins full-64 length, fail-closed TypeError, LE
byte-order canonicality (native vs >f8 hash-equal), and determinism.

[Verification]: D1-affected suites 66 + miner suites 23 green; smoke + fast lane below.
2026-07-17 13:58:17 -07:00
Shay
12a9ca0b2a docs(cohesion): D0 governance — land ADR-0244, directive, and mandate audit
First step of the cohesion-directive arc (docs only; no code).

- docs/adr/ADR-0244-…md: committed Proposed, verbatim from the R&D export
  (matching the ADR-0241/2/3 landing convention), plus a clearly-marked
  governance annotation holding two items open for the D4 implementation plan:
  (1) §2.3 Q_top is likely vacuous — central I5 in odd Cl(4,1) collapses the
  charge on versor states (the #19 pseudoscalar failure mode); it must not be an
  egress gate without an empirical discriminating counterexample; (2) §4's
  conformed implementation contradicts §2.1-2.2 (per-axis resonance vs.
  Gram-projection/leakage-norm/ManifoldConditioningError), references a dangling
  ADR-0245, and uses a bare assert for the byte-order guard.
- docs/analysis/engineering_cohesion_refactoring_directive.md: the technical
  directive moved to its own canonical path, verbatim (content byte-identical).
- docs/analysis/adr-0244-cohesion-directive-audit-2026-07-17.md: the code-level
  audit of all 7 mandates vs. main@24078b11 — per-mandate verdicts, the six
  spec-level wrinkles, the amended mandate→work-item mapping, the missing sixth
  acceptance criterion (Mechanical-Sympathy gain), and the five decisions (Q1-Q5).

Notable finding: the default=str + 24-char-digest drift the directive flags was
replicated into Lane C (biography_wiring.py) AFTER the directive was written —
raising the priority of the D1 semantic-rigor batch.

[Verification]: docs-only; ADR governance provenance-guard green (unchanged).
2026-07-17 13:58:17 -07:00
Shay
97aa20f67a docs: ADR-0243 Status: Proposed -> Accepted — ratified by Joshua Shay 2026-07-17 2026-07-17 13:23:12 -07:00
Shay
dfb6084ce2 docs(adr-0243): Phase 5 D10 acceptance packet (status flip deferred to ruling)
Submits the ADR-0243 arc for Joshua's ruling: claims-vs-evidence, deviations
D-1..D-5, deferred items, and the arc gate results (Phase 4 fast lane 11808;
decisive falsifier wrong==0). Follows the ADR-0241/0242 packet convention.

The Proposed->Accepted flip is NOT made here: the anti-self-Accept guard
(test_adr_0241_governance_p12) requires a recorded human ruling with inline
provenance. Section 8 RULING RECORD is PENDING; the status flip is a separate
one-line governance commit carrying Joshua's ratification, made only after his
explicit ruling.

[Verification]: docs-only; ADR-0243 suite + provenance-guard green.
2026-07-17 13:08:09 -07:00
Shay
2bb57a868f feat(adr-0243): Phase 4 falsifiability benchmark — metrics eval + CLI dispatcher
Completes ADR-0243 Phase 4 (plan §5). Adds the metrics benchmark scoring the
cognitive lifecycle against concrete falsifiable comparison classes, joining the
already-committed decisive propositional falsifier (bdf8146a) under one eval package.

evals/adr_0243_cognitive_lifecycle/benchmark.py — five falsifiable metrics, each
grounded in a live lifecycle primitive (no decorative numbers); typed
BenchmarkVerdict / MetricResult; deterministic, JSON-safe:
  - fidelity: decode overlap |<psi_steady, target>| after relax_to_ground on a
    quadratic well from a perturbed start (min >= 0.999; measured 1.0).
  - surprise separation: energy-above-ground of ID (small rotations of the
    identity axis) vs OOD (near-orthogonal rotations into distinct Cl(4,1)
    planes) against a fixed identity well; strict margined separation
    min_ood - max_id > 0.05 (measured 0.834); lam0 verified ~0, not assumed.
  - insertion cost: relaxation certificate.steps_taken — all certified, bounded
    (<= 256), real work (max_steps > 0; measured 22-23).
  - f32 drift over T=1000: unit versor iterated by a fixed rotor with no renorm;
    f64 holds versor closure to 1e-9 (~8e-14 measured) while f32 truncates to
    ~4.7e-5 (ratio ~5.9e8) — the gap motivating ADR-0244 §2.5/§2.6.
  - falsifier: run_propositional_falsifier wrong == 0 (1008 ID + 18 refusal-parity).

evals/adr_0243_cognitive_lifecycle/__main__.py — subcommand dispatcher
(benchmark [default] / corridor / falsifier); non-zero exit on falsification.

tests/test_adr_0243_benchmark.py — pins overall pass, each metric's falsifiable
claim, the genuine f32/f64 drift gap, CLI routing + exit codes, and the A-04
off-serving quarantine.

[Verification]: in-worktree smoke gate 176 passed; fast lane
(-m "not quarantine and not slow" -n auto) 11808 passed, 108 skipped;
serve-quarantine + third-door cohesion + dispatch hygiene 22 passed; Phase 4
tests (benchmark + falsifier) 17 passed; benchmark overall_passed True
(deterministic across runs).
2026-07-17 12:59:24 -07:00
Shay
bdf8146a2b feat(adr-0243): Phase 4 decisive falsifier — field decoder vs ROBDD gold (wrong=0)
The propositional slice of ADR-0243's falsifiability benchmark (plan §5 Phase 4),
the arc's load-bearing evidence. Two mechanism-disjoint engines decide the SAME
enumerated propositional problems:

- Field decoder: propositional_entails (Cl(4,1) wave-field ground energy).
- Gold: generate.proof_chain.entail.evaluate_entailment (exact ROBDD tautology
  check, ADR-0201 keystone) — genuinely independent, not the field checking itself.

A clause→string bridge (render_clause: `a | ~b | c`) lets both engines decide
byte-for-byte the same problem. Result over the enumerated panel (atoms a,b,c;
premise sets size ≤2):

- 1008 satisfiable-premise ID comparisons: field.entailed ⇔ gold is ENTAILED —
  wrong == 0.
- 18 inconsistent-premise cases: field discloses satisfiable_premises=False
  exactly where gold returns REFUSED — matched refusal, no ex-falso leak.
- OOD (>5 atoms): field decoder refuses by construction while gold still decides
  — the honest ID/OOD scope boundary in the propositional domain.

Deterministic (enumerated, no randomness/wall-clock); off-serving (evals/ only,
chat/runtime non-import pinned).

[Verification]: tests/test_adr_0243_propositional_falsifier.py — 6 passed;
run_propositional_falsifier() → wrong=0 over 1026 field-vs-gold decisions.
2026-07-17 12:00:47 -07:00
24078b1118 Merge pull request 'feat(adr-0243): Phase 3 Lane A — surprise→discovery wiring + live κ line-search caller' (#60) from feat/adr-0243-phase3-lane-a-discovery into main 2026-07-17 18:50:49 +00:00
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
adea00b0c4 Merge pull request 'feat(adr-0243): Phase 3 Lane B — sensorium corridor eval (I-04 first live consumer)' (#59) from feat/adr-0243-phase3-lane-b-corridor into main 2026-07-17 18:30:28 +00:00
Shay
40db09b559 feat(adr-0243): Phase 3 Lane B — sensorium corridor eval (I-04 first live consumer)
New evals/adr_0243_cognitive_lifecycle/ composes AudioCompiler/VisionCompiler ->
sensorium_wave_feed -> relax_to_ground/CognitiveLifecycleEngine.egress ->
generate/realizer readback -> explicit GoldTetherMonitor.decide into one
deterministic fixed-replay corridor, per
docs/handoff/ADR-0243-PHASE3-BRIEF-PACK.md Brief B. Pure composition of
already-tested organs; no new core.physics module; OFF-SERVING (evals/ only,
never imported by chat/runtime.py).

Relaxation targets the full audio+vision integrated percept but starts from the
audio-only partial percept (engine.solve() is not used, since it ties start ==
target) so the relaxer decodes across real steps rather than starting
already-converged; stages are driven explicitly and reassembled into one
LifecycleOutcome keyed off the full percept.

[Verification]: uv run core test --suite smoke -q (176 passed); sensorium suite
(152 passed); algebra suite (82 passed, 50 skipped); new
tests/test_adr_0243_sensorium_corridor.py (6 passed, includes a
steps_taken > 0 pin against silent regression to a no-op relax, a cosine/ANN-free
static pin, and a chat/runtime.py non-import pin).
2026-07-17 11:26:19 -07:00
d5db97f0e2 Merge pull request 'feat(adr-0243): Phase 3 Lane C — ADR-0240 PASS → integrate_biography wiring' (#58) from feat/adr-0243-phase3-lane-c-biography into main 2026-07-17 18:17:33 +00: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
ff6c8b3f7b docs(adr-0243): fix Phase 3 brief pack references to the deleted Phase 2 branch
Phase 2 merged (#56) after the brief pack was written; feat/adr-0243-phase2-lifecycle
no longer exists. Lane B's base/worktree instructions pointed at it. All three
lanes now branch off forgejo/main directly, per the actual current state.

Orthogonal docs-only fix, direct push (no code/tests touched).
2026-07-17 06:57:23 -07:00
3db25a4e49 Merge pull request 'docs(adr-0243): Phase 3 lane brief pack (A/B/C) + correct stale readback-rules claim' (#57) from feat/adr-0243-phase3-briefs into main 2026-07-17 13:49:24 +00:00
Shay
f79fec9e63 docs(adr-0243): Phase 3 lane brief pack (A/B/C) + correct stale readback-rules claim
Production-line brief pack for the three independent Phase 3 wiring lanes,
each grounded in fresh read-only research against the current worktree (not
assumed from the plan text):

- Lane A (discovery wiring): is_discovery_eligible + cross_band_discovery_gate
  -> DiscoveryCandidate via the contemplation runner's existing sink; live
  caller for propose_kappa_line_search so kappa_search_event fires. Flags a
  real open question (what feeds surprise_norm for a contemplation finding)
  rather than guessing.
- Lane B (sensorium corridor eval): first live consumer of the I-04 feed —
  real Audio/Vision compilers -> cognitive_lifecycle -> readback -> GoldTether,
  shaped like the adr_0242_v2_energy_compare fixed-replay template.
- Lane C (biography wiring): ADR-0240 harness PASS -> integrate_biography with
  I-01 closure asserts and provenance recording. Flags a genuine
  identity-substrate design question (mutation vs. proposal-only) for Shay
  rather than picking silently.

Corrected dependency DAG: only Lane B actually depends on Phase 2's
cognitive_lifecycle module landing. Lanes A and C touch zero Phase-2 code —
every symbol they wire already exists on forgejo/main — so they can start
immediately, in parallel with Phase 2's own review, rather than waiting.

Also fixes a stale claim this research caught: the plan's substrate table
(Sec 2) named packs/en/readback_rules.py as already-landed §2.3 readback
rules. That file was deleted under audit ratchet W-006; the live substitute
is generate/realizer.py:energy_modulated_surface. Corrected in place.

Per standing production-line-pattern + no-self-dispatch doctrine: brief pack
only, dispatch is Shay's call.

[Verification]: docs-only change, no code touched; no test suite affected.
2026-07-17 06:48:33 -07:00
8624ea9a0e Merge pull request 'feat(adr-0243): flagship cognitive_lifecycle.py — ingress/relax/egress, Tier-2 off-serving' (#56) from feat/adr-0243-phase2-lifecycle into main 2026-07-17 13:47:35 +00: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
904380e96a docs(adr-0243): commit ADR-0243 + implementation plan, pin sketch defects
Commits the ADR-0243 (Wave-Field Cognitive Lifecycle) proposal verbatim as
Proposed, and the arc-governing implementation plan derived from it plus
docs/analysis/core_cohesion_master_plan.md and the ADR-0241/0242 post-Accept
close audit findings.

The plan records that most of ADR-0243's organs already exist on main
(sensorium feed, WaveManifold, energy classes, GoldTether, surprise/discovery
plumbing, self-authorship, biography, packs/en readback) and that
tests/test_third_door_cohesion.py already pins I-01..I-05, A-02/A-04, and
core_ha absence from the cohesion master plan — so this arc is the §2.2
relaxation reasoner plus three wiring lanes, not a rebuild.

Also pins three defects in the ADR's §3 reference prototype so it can never
be ported verbatim: the egress gate's antisymmetric quadratic form is
identically zero (rejects every state, valid or not); the unitary
relaxation loop cannot dissipate toward a ground state (the honest
relaxer is the imaginary-time semigroup); and the prototype's block-matrix
"pseudoscalar proxy" is a different operator from the real Cl(4,1)
pseudoscalar action despite sharing I^2 = -Id.

[Verification]: uv run core test --suite smoke -q -> 176 passed (133.41s);
uv run python -m pytest tests/test_adr_0243_sketch_defect_pins.py tests/test_third_door_cohesion.py -q -> 19 passed (0.93s)
2026-07-16 21:53:20 -07:00
198191941e Merge pull request 'feat: close ADR-0241/0242 post-Accept backlog (local-first mastery)' (#55) from feat/adr-0241-0242-implementation into main
Reviewed-on: #55
2026-07-16 23:51:57 +00:00
Shay
dd49021ceb docs(plans): stabilize mastery-close status branch pointer wording 2026-07-16 15:26:13 -07:00
Shay
5deb4e53db docs(plans): point mastery-close status at tip SHA 240652d2 2026-07-16 15:26:09 -07:00
Shay
240652d2f6 docs(plans): note post-Accept backlog commit SHA on mastery-close status 2026-07-16 15:25:50 -07:00
Shay
d388fc9e2c feat: close ADR-0241/0242 post-Accept backlog (local-first mastery)
Complete remaining W5/post-pivot backlog without Docker CI: INV-21 allowlist
dedup, -n auto fast/full defaults, frozen f64 GP Python SOT suite, real
sensorium compiler → ψ → algebraic ρ feed, V2 fib/dyadic/log fixed-replay
evidence without production energy promotion, and project doctrine restored to
local-first + ubuntu-latest:host (no Docker CI for merge).

[Verification]: Smoke suite passed locally (145s, 176 passed); make test-fast
(-n auto) passed twice (11709 passed, 108 skipped each ~11–12 min).
2026-07-16 15:25:43 -07:00
3019eb41b9 Merge pull request 'docs: forbid tea CLI, fix stale smoke-count and tea references' (#54) from docs/forbid-tea-cli-doctrine into main
Some checks failed
lane-shas / verify pinned lane SHAs (push) Successful in 15m35s
full-pytest / fast pytest (-m "not quarantine and not slow" -n 2) (push) Failing after 46m52s
2026-07-16 21:23:07 +00:00
Shay
acf2d9c436 docs: forbid tea CLI, fix stale smoke-count and tea references
All checks were successful
lane-shas / verify pinned lane SHAs (pull_request) Successful in 32s
smoke / smoke (-m "not quarantine") (pull_request) Successful in 6m5s
Lands Shay's own correction (authored 2026-07-16 as commit 798c6d1c in
the primary checkout, never pushed): tea frequently hangs/times out
(Cloudflare 524) via HTTP/2 proxying and WAF handoffs — use the Forgejo
MCP tools instead. Also fixes two references the Local-First CI
Validation Protocol section had left stale: the smoke suite is 175
tests, not 108+ (parity-pinned by test_cli_smoke_suite_covers_ci_smoke_gate),
and PR creation goes through the Forgejo MCP tools, not `tea pr create`.
2026-07-16 14:21:39 -07:00
6e8ebf93f2 Merge pull request 'docs(plans): consolidate ADR-0241/0242 mastery-close plan + outcome' (#53) from docs/mastery-close-status into main
Some checks failed
lane-shas / verify pinned lane SHAs (push) Successful in 19m6s
full-pytest / fast pytest (-m "not quarantine and not slow" -n 2) (push) Has been cancelled
2026-07-16 21:00:27 +00:00
Shay
dee76ba7c8 docs(plans): consolidate ADR-0241/0242 mastery-close plan + outcome
All checks were successful
lane-shas / verify pinned lane SHAs (pull_request) Successful in 26s
smoke / smoke (-m "not quarantine") (pull_request) Successful in 3m52s
The operational W0-W5 plan that drove the arc was never committed — it
lived only as a gitignored .claude/plan/ artifact in an orphaned
worktree. This commits the durable plan-to-outcome record: phase-by-phase
status against the original plan, the unplanned CI-collapse/local-first
pivot that consumed the post-ratification session, and the remaining
backlog.
2026-07-16 13:59:29 -07:00
18d3c70daf Merge pull request 'docs(analysis): rejected Drive-draft re-implementation — assessment + sketch-defect pins' (#52) from docs/rejected-draft-reimpl-assessment into main
Some checks failed
lane-shas / verify pinned lane SHAs (push) Successful in 13m44s
full-pytest / fast pytest (-m "not quarantine and not slow" -n 2) (push) Failing after 39m3s
2026-07-16 20:17:38 +00:00
207d9c6ac1 Merge pull request 'docs(governance): CI/CD Runner Architecture — local Mac Act runner doctrine' (#51) from docs/ci-runner-doctrine into main
Some checks failed
full-pytest / fast pytest (-m "not quarantine and not slow" -n 2) (push) Has been cancelled
lane-shas / verify pinned lane SHAs (push) Has been cancelled
2026-07-16 20:17:20 +00:00
31073d5503 Merge pull request 'fix(ci): stream lane-shas progress + distinguish timeout from content drift' (#50) from fix/ci-lane-shas-timeout-diagnostics into main
Some checks failed
lane-shas / verify pinned lane SHAs (push) Has been cancelled
full-pytest / fast pytest (-m "not quarantine and not slow" -n 2) (push) Has been cancelled
Reviewed-on: #50
2026-07-16 20:17:00 +00:00
Shay
0e9051b643 Merge remote-tracking branch 'forgejo/main' into fix/ci-lane-shas-timeout-diagnostics
All checks were successful
smoke / smoke (-m "not quarantine") (pull_request) Successful in 5m2s
lane-shas / verify pinned lane SHAs (pull_request) Successful in 10m22s
2026-07-16 12:58:03 -07:00
Shay
fc38a6c7ee docs(governance): CI/CD Runner Architecture doctrine — local Mac Act runner
Some checks failed
lane-shas / verify pinned lane SHAs (pull_request) Successful in 3m15s
smoke / smoke (-m "not quarantine") (pull_request) Failing after 21m42s
Ports the runner-migration doctrine (authored by the Gemini session against
a stale checkout; grafted here onto current main so the #40-era Local-First
protocol section is preserved, not clobbered):

- CI jobs dispatch to a local Act runner on the primary developer's Mac
  (label ubuntu-latest:host = native macOS host execution; the ubuntu name
  is a fiction — no Linux-only steps).
- The GCP e2-micro server-side runner was REMOVED 2026-07-16; never
  re-provision it (1GB RAM, OOM class). A waiting queue while the Mac is
  asleep is intentional — pre-push local gates are the real discipline.
- Workflows remain canonical and install the locked universe (uv sync
  --locked, committed uv.lock). GitHub mirror Actions are billing-locked
  dead signals.
- CLAUDE.md gains a one-line pointer (policy stays in AGENTS.md).

[Verification]: smoke suite passed locally (175 passed); docs-only.
2026-07-16 10:31:57 -07:00
Shay
559d5821f6 docs(analysis): rejected Drive-draft re-implementation — assessment + sketch-defect pins
A parallel session re-implemented the ADR-0241/0242 memo reference sketches
as 'production-ready' files and requested a commit, unaware the repo carries
the ratified implementations (Accepted 2026-07-15). Assessment: two genuine
defects in the memo SKETCH (index overflow; bracket-collapse ratio — now
pinned in the committed memo copy's §4 audit note), one wrong-math 'fix'
(diag[8:16] pseudo-reversion), one self-refuting verification claim (the
submitted orchestrator contains a syntax error and cannot import), and a
new module violating no-scipy-as-truth / P7-retired-polar / zero-fabrication
/ T1-T2. No live checkout was touched (verified). Recommendations: dispatch
briefs point at repo + living summary §12 before Drive docs; Accepted ADRs
get extensions, never re-implementations; unverifiable green claims are red.

[Verification]: docs-only; tree code byte-identical to gated main.
2026-07-16 10:13:04 -07:00
a7279a54ad Merge pull request 'feat(physics): ADR-0242 §5 carry seams — κ-cert telemetry + F5–F7 cross-band gate' (#49) from feat/adr-0242-carry-items into main
Some checks failed
lane-shas / verify pinned lane SHAs (push) Successful in 17m19s
full-pytest / fast pytest (-m "not quarantine and not slow" -n 2) (push) Failing after 29m31s
Reviewed-on: #49
2026-07-16 14:29:10 +00:00
Shay
8d58481566 Merge remote-tracking branch 'forgejo/main' into feat/adr-0242-carry-items
All checks were successful
lane-shas / verify pinned lane SHAs (pull_request) Successful in 17m8s
smoke / smoke (-m "not quarantine") (pull_request) Successful in 5m18s
2026-07-16 06:57:12 -07:00
56e55e6eb1 Merge pull request 'fix(tests): evolve P12 anti-self-Accept guard for the ratified state' (#47) from fix/governance-p12-post-ratification into main
Some checks failed
full-pytest / fast pytest (-m "not quarantine and not slow" -n 2) (push) Has been cancelled
lane-shas / verify pinned lane SHAs (push) Has been cancelled
Reviewed-on: #47
2026-07-16 13:54:04 +00:00
b0156406dd Merge pull request 'fix(tests): isolate xdist polluters blocking -n auto default (W3)' (#46) from fix/xdist-polluter-isolation into main
Some checks are pending
full-pytest / fast pytest (-m "not quarantine and not slow" -n 2) (push) Waiting to run
lane-shas / verify pinned lane SHAs (push) Waiting to run
Reviewed-on: #46
2026-07-16 13:53:00 +00:00
Shay
05e9d6d28e fix(ci): stream lane-shas progress + distinguish timeout from content drift
Some checks failed
smoke / smoke (-m "not quarantine") (pull_request) Failing after 53s
lane-shas / verify pinned lane SHAs (pull_request) Failing after 14m15s
lane-shas.yml has intermittently failed under Act-runner contention with
truncated/ambiguous logs (see docs/plans/adr-0241-0242-session-completion-
summary-2026-07-15.md #38 postmortem: run #167 failed at ~22m39s, but local
verify_lane_shas.py showed 9/9 pins matching — the failure was never
conclusively attributed to a timeout vs an incomplete log, because the
script buffers all per-lane output until every lane finishes).

Two changes, no lane logic touched:

1. Stream progress per lane (`-> lane_id ... done (Ns)`, flush=True) instead
   of buffering until the end, so a hang shows exactly which lane and for
   how long even if the job is killed before the final summary prints.
2. Make the per-lane subprocess timeout configurable via
   CORE_LANE_VERIFY_TIMEOUT_S (default unchanged at 900s — same knob shape
   as CORE_SHOWCASE_HARD_BUDGET), and report a TimeoutExpired distinctly
   from a genuine SHA mismatch so the remediation text stops suggesting
   `--update` (re-pinning) for what is actually runner contention.

[Verification]: tests/test_lane_sha_verifier.py 6 passed; ruff clean;
scripts/verify_lane_shas.py run locally with the new streaming output
confirmed correct per-lane timing (e.g. demo_composition 154s) end to end.
2026-07-16 06:33:25 -07:00
Shay
ecc7e8ab52 feat(physics): ADR-0242 §5 carry seams — κ-cert telemetry event + F5–F7 cross-band gate
Some checks failed
smoke / smoke (-m "not quarantine") (pull_request) Failing after 1m1s
lane-shas / verify pinned lane SHAs (pull_request) Failing after 17m1s
Closes the two staged items recorded in the acceptance packet §7 (ruled
non-blocking at ratification, tracked work):

P1 — kappa_search_event(): JSONL-ready execution-telemetry envelope for
the Fibonacci κ search (kind=fibonacci_kappa_search; certificate payload
with content-addressed cert_id, or failure payload with baseline κ=1.0).
propose_kappa_line_search gains an optional sink (any emit(line) object,
e.g. chat.telemetry sinks) that writes one deterministic JSONL line.
Pure serialization — no state, no COHERENT standing (§6 sovereignty).

P2 — cross_band_discovery_gate(): persistence verdict over a surprise-
event history across the F5/F6/F7 Fibonacci bands (τ = {5,8,13}·τ0).
Eligible ⇔ history spans ≥ F5·τ0 (a single fresh spike has zero temporal
persistence) AND every band's decay-weighted accumulation ≥ γ. Typed
CrossBandVerdict; pure; PROPOSAL-side only. Lives in multi_scale_energy
(Tier-2, serve-quarantined) so the gate can never touch serving —
re-pinned by the module-level sys.modules probe in the new test file.

TDD RED→GREEN. [Verification]: carry-seam suite 10 passed; regression
(goldtether consumers + multi_scale + fibonacci + chiral + quarantine +
cohesion) 85 passed; smoke suite passed locally (133s, 175 passed).
2026-07-16 06:23:50 -07:00
Shay
df8d35c12f build: commit uv.lock — the locked universe CI now installs
All checks were successful
smoke / smoke (-m "not quarantine") (pull_request) Successful in 5m53s
lane-shas / verify pinned lane SHAs (pull_request) Successful in 17m53s
#48 switched CI to 'uv sync --locked' but uv.lock was gitignored (an early
library-style choice; this repo is an application — the lock belongs in
git). Every run since failed at install: 'Unable to find lockfile'.
Un-ignore and commit the lock (217 packages, matches pyproject via
'uv lock --check'). CI now installs the exact universe local development
and all green verification ran against.

[Verification]: code tree byte-identical to the smoke-gated state
(175 passed); this commit adds a data file CI requires + one .gitignore
line removal.
2026-07-16 06:14:49 -07:00
Shay
7930a9183f build: commit uv.lock — the locked universe CI now installs
All checks were successful
smoke / smoke (-m "not quarantine") (pull_request) Successful in 5m30s
lane-shas / verify pinned lane SHAs (pull_request) Successful in 17m9s
#48 switched CI to 'uv sync --locked' but uv.lock was gitignored (an early
library-style choice; this repo is an application — the lock belongs in
git). Every run since failed at install: 'Unable to find lockfile'.
Un-ignore and commit the lock (217 packages, matches pyproject via
'uv lock --check'). CI now installs the exact universe local development
and all green verification ran against.

[Verification]: code tree byte-identical to the smoke-gated state
(175 passed); this commit adds a data file CI requires + one .gitignore
line removal.
2026-07-16 06:14:33 -07:00