docs(adr-0244-d4): Phase 2 COMPLETE (2c c0ff4720); dashboard → Phase 3

[Verification]: docs-only tracker update referencing the already-gated
2a/2b/2c landings (1c7ea26e / c7e2b3b6 / c0ff4720).
This commit is contained in:
Shay 2026-07-17 17:22:33 -07:00
parent c0ff4720b3
commit b440b92b39

View file

@ -141,8 +141,8 @@ Dependencies: `0 → {1, 4}` · `1 → 2 → 3` · `5 after 0` · `6 last`. Each
**Gate:** smoke + fast lane + eval suites + new tests.
**Decomposition (sub-commits for clean checkpoints):** **2a** pure `identity.py` capability (dual-mode wave path + `IdentityGateRefusal` + boundary predicate + C_id) — no runtime change; **2b** runtime wiring behind `identity_wave_gate` flag + telemetry; **2c** eval suite (ablation / fail-closed / injection-catching).
**Key facts locked from recon:** `final_state.F` is the wave field (versor); `boundary_ids` = union of identity+safety(`no_identity_override`,…)+ethics IDs, so boundary activation is an intersection with the turn's `SafetyVerdict.violated_boundaries` `EthicsVerdict.violated_commitments` (available only AFTER the verdicts, ~`runtime.py:2740`, not at the `2679` identity call); `compute_trace_hash` excludes telemetry fields (replay-safe); the JSONL serializer is explicit `getattr` per field, so wave telemetry lives on `IdentityScore` and is emitted only when `wave_mode_active` (byte-identical when off); C_id v1 = admit-or-abstain (no silent correction). Deviation from the reviewer's `TurnEvent.psi_leakage_norm` suggestion: telemetry lives on `IdentityScore` instead (serializer already reads it; cleaner + byte-identity-preserving).
**Status:** ◐ IN PROGRESS — 2a landed `1c7ea26e`; 2b (runtime wiring) next.
**Resume notes:** 2a shipped in `core/physics/identity.py` (additive): dual-mode `check(..., *, wave_field=None, violated_boundary_ids=frozenset())`, `_validate_wave_field` (fail-closed), `_wave_field_score` (operator-preservation via `IdentityManifoldGeometry`), extended `IdentityScore`, `IdentityGateRefusal`, `conjugate_correct` (admit-or-abstain), `would_violate` extended. `tests/test_adr_0244_identity_gate_wave.py` (16 tests). identity_manifold now imported by identity.py (serve-safe; quarantine tests green). Legacy path byte-identical (no wave_field + empty boundary set). Gate: 16 new + smoke 176 + fast lane 11879/109. **2b next:** add `identity_wave_gate: bool = False` to `core/config.py` RuntimeConfig; at `chat/runtime.py:2679` pass `wave_field=result.final_state.F if flag`; after verdicts (~2740) supplement `boundary_violations` via `replace` + fold geometric `IdentityGateRefusal` into `refusal_surface` (use `TYPED_REFUSAL_PREFIX`); emit wave telemetry keys in `chat/telemetry.py:serialize_turn_event` only when `identity_score.wave_mode_active`.
**Status:** ✅ DONE — 2a `1c7ea26e`, 2b `c7e2b3b6`, 2c `c0ff4720`.
**Resume notes:** Phase 2 landed in three gated sub-commits. **2a** (`1c7ea26e`): pure `identity.py` capability (dual-mode `check(..., *, wave_field=, violated_boundary_ids=)`, `_validate_wave_field` fail-closed, `_wave_field_score`, extended `IdentityScore`, `IdentityGateRefusal`, admit-or-abstain `conjugate_correct`, `would_violate` extended; 16 tests). **2b** (`c7e2b3b6`): runtime wiring behind `identity_wave_gate` flag (`core/config.py`) — `wave_field=final_state.F` at the identity check + post-verdict boundary supplement + geometric refusal fold in `chat/runtime.py`; wave telemetry in `chat/telemetry.py` (only when `wave_mode_active`). Integration fix: per-axis **normalization** in `identity_manifold.py` (boost/e5 versors break Euclidean-norm preservation) → leakage ∈ [0,1], self-align ∈ [1,1]. Runtime test seeds state to reach main-path turns. **2c** (`c0ff4720`): `evals/adr_0244_identity_gate/` detection-value ablation — the wave gate separates a geometric-attack panel (tilts/boosts/inversions) from an aligned panel (all attacks flagged, all aligned admitted, margin > 0) and adds detection value 6-vs-0 over the geometry-blind legacy path; 6 tests + CLI. Gate: smoke 176 + fast lane 11883→11889/109. **Carried to Phase 3:** value axes are placeholders (e1/e2/e3); the gate discriminates the *designed geometric* attack signal, but whether *real paraphrased injections* induce such geometry through the live encoder is empirical (governance annotation item 6) — Phase 3 γ_id calibration over reference traces is where that is measured, and the flag stays OFF until it is evidenced.
### Phase 3 — §2.4 `γ_id` calibration
**Objective:** replace the hardcoded threshold with a certifiable, calibrated bound.
@ -226,6 +226,8 @@ Forward-looking mechanical-sympathy items from the critique — a separate optim
- **2026-07-17****Phase 1 core-mechanism correction (ratified), amendment `459280e3`.** Discovered before implementing: `final_state.F` is a versor/operator (grade-1 energy exactly 0), so §2.1/§2.2's literal grade-1 projection is vacuous (flags everything). Ratified switch to **operator-preservation** (sandwich `F aᵢ F̃`): subspace-rejection leakage (catches e4/e5 tilt) + signed self-alignment (catches in-subspace inversion). Both empirically verified necessary + discriminating (identity→0 leak/+1 align; e14/e15 tilt→0.28/0.29 leak; π-invert→0 leak/1 align). ADR-0244 governance annotation item 12 + §4a rewritten; plan §3 Fact C + §5 Phase 1 updated.
- **2026-07-17****Phase 1 landed `3c3d2c29`.** `core/physics/identity_manifold.py` (operator-preservation primitive) + `tests/test_adr_0244_identity_manifold.py` (24 tests). Pure/f64/deterministic, off-serve (quarantine test green). Gate: 24 new + smoke 176 + fast lane **11863 passed, 109 skipped** (9:01). Not yet wired into serve — Phase 2. Next: Phase 2.
- **2026-07-17****Phase 2a landed `1c7ea26e`.** Pure `identity.py` capability: dual-mode wave gate + `IdentityGateRefusal` + boundary predicate + admit-or-abstain `C_id` + extended `IdentityScore` + 16 tests. No runtime behavior change (legacy path byte-identical). Gate: 16 new + smoke 176 + fast lane **11879 passed, 109 skipped** (8:39). Next: 2b (runtime wiring behind `identity_wave_gate` flag).
- **2026-07-17****Phase 2b landed `c7e2b3b6`.** Runtime wiring: `identity_wave_gate` flag (`core/config.py`), two flag-gated touches in `chat/runtime.py` (`wave_field=final_state.F` at the identity check; post-verdict boundary supplement + geometric refusal fold), wave telemetry in `chat/telemetry.py` (emitted only when `wave_mode_active`). **Integration bug caught + fixed:** the live versor carries boost (e5) components → `F aᵢ F̃` is NOT Euclidean-norm-preserving → un-normalized leakage/self-align ran to 5.16 / 4.75. Fixed with per-axis normalization in `identity_manifold.py` (leakage fraction ∈ [0,1], signed cosine ∈ [1,1]; Phase-1 unit-rotor results unchanged; boost test added; §4a updated). Gate: 74 targeted + smoke 176 + fast lane **11883 passed, 109 skipped** (8:26) — flag-off byte-identity confirmed. **Open reality for Phase 3:** value axes are placeholders (e1/e2/e3), so whether the geometric gate DISCRIMINATES adversarial vs benign is an empirical question — 2c measures it. Next: 2c (ablation eval).
- **2026-07-17****Phase 2c landed `c0ff4720` → Phase 2 COMPLETE.** `evals/adr_0244_identity_gate/` (detection-value ablation) + `tests/test_adr_0244_identity_gate_eval.py` (6 tests) + CLI. Measured: the wave gate separates a geometric-attack panel (2 inversions caught by orientation, 4 tilts/boosts caught by subspace leakage) from an aligned in-subspace panel — all attacks flagged, all aligned admitted, `min_attack_signal 0.35 > max_aligned_leakage 0.0`; wave adds detection value 6-vs-0 over the geometry-blind legacy path. Honest caveat baked in: separation is on the *designed* geometric signal; real-encoder separation is empirical (Phase 3). Additive-only (evals/ + test), off-serving (quarantine green). Gate: smoke 176 + fast lane. Next: Phase 3 (γ_id calibration).
---
@ -235,10 +237,10 @@ Forward-looking mechanical-sympathy items from the critique — a separate optim
|---|---|---|---|
| 0 | Governance reconciliation (ADR-0244 edits + commit ADR-0245) | ✅ DONE | `ad37d03b` (+ `459280e3` §4a amend) |
| 1 | §2.1 identity manifold primitive (operator-preservation) | ✅ DONE | `3c3d2c29` |
| 2 | §2.2 fail-closed gate + boundary_ids + C_id + telemetry + eval | ◐ IN PROGRESS (2a ✅ `1c7ea26e`; 2b/2c pending) | — |
| 2 | §2.2 fail-closed gate + boundary_ids + C_id + telemetry + eval | ✅ DONE | `1c7ea26e`+`c7e2b3b6`+`c0ff4720` |
| 3 | §2.4 γ_id calibration | ⬜ NOT STARTED | — |
| 4 | §2.5 / 0245 §2.2 serving-boundary cast | ⬜ NOT STARTED | — |
| 5 | §2.7 residual + §2.9 wiring + §2.10 audit + 0245 §3 gate | ⬜ NOT STARTED | — |
| 6 | Close-out (2 acceptance packets + 2 ratified flips) | ⬜ NOT STARTED | — |
**▶ NEXT: Phase 2 — §2.2 fail-closed gate + boundary_ids + C_id + telemetry + eval.**
**▶ NEXT: Phase 3 — §2.4 γ_id calibration** (calibrate the leakage threshold over reference traces; flip `identity_wave_gate` on once evidenced). Parallel-eligible: Phase 4 (§2.5 cast) and Phase 5 (residuals) depend only on Phase 0.