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.
This commit is contained in:
parent
aeb75d9af2
commit
459280e3f3
2 changed files with 94 additions and 49 deletions
|
|
@ -21,6 +21,7 @@
|
|||
> 9. **Filename correction.** ADR-0245 (item 10) and its R&D commentary reference `core/physics/multimodal_lifecycle.py`; that file does not exist. The real module is `core/physics/cognitive_lifecycle.py` (ADR-0243).
|
||||
> 10. **ADR-0245 is real.** `docs/adr/ADR-0245-cga-unification-mechanical-sympathy-and-semantic-rigor.md`, committed **Proposed** as a companion ADR at D4 Phase 0. It is the mechanical-sympathy + semantic-rigor foundation this ADR's identity gate sits on: Rust `geometric_product` fast-path (its §2.1 ≡ this ADR's §2.6), the f64→f32 serving-boundary cast (its §2.2 ≡ this ADR's §2.5 — one contract, two ADRs), content-addressing rigor (its §2.3 ≡ this ADR's §2.7), and `eigh` memoization (its §2.4 ≡ this ADR's §2.8).
|
||||
> 11. **Theological citation.** The quoted John 1:1–2 text matches the **ESV** (English Standard Version). It is cited as an engineering analogy that makes the architecture legible to humans, not as a scientific or theological proof of the geometric claims in §2.
|
||||
> 12. **Operator-preservation reframe (§2.1/§2.2 core mechanism corrected; ratified by Joshua Shay 2026-07-17).** The live identity trajectory `final_state.F` carries the invariant `versor_condition(F) < 1e-6` (`field/state.py`) — it is a **versor: an even-grade operator (grades 0,2,4) with exactly zero grade-1 content** (verified empirically). §2.1/§2.2's literal "project ψ_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; "project the operator into a subspace of states" is a category error. **Resolution:** measure whether the versor *preserves* the value subspace, via its action on the axes `F aᵢ F̃` (sandwich). Leakage = the out-of-subspace component of each rotated axis (Euclidean norm, catches tilt toward e4/e5); a second **signed self-alignment** `⟨aᵢ, F aᵢ F̃⟩₀` catches in-subspace inversion (`e1 → −e1`: leakage 0 but self-alignment −1) — both verified necessary and non-redundant. This keeps the grade-1 pack axes unchanged (no pack migration) and sharpens the inalienability semantics: identity is invariant *under transformation* (the versor leaves the value subspace fixed), not a frozen state. §4a is the governing spec; §2.1/§2.2's "project ψ_traj" prose is superseded by this operator-preservation formulation.
|
||||
>
|
||||
> **Governance anchors (ADR-0225).** *Safety/identity boundary:* this ADR defines the identity trust boundary itself — items 4, 7, 8 above are exactly that boundary's shape. *Versor closure:* axis eigenmodes and `ψ_traj` are validated for shape (`N_COMPONENTS`,) and finiteness before projection (§4a); the manifold does not assume `ψ_traj` is itself a unit versor (item 6 — it may be a superposition). *Reconstruction-over-storage:* the manifold stores only axis directions + calibration certificates; `ψ_traj` is read from `final_state.F` per-turn, never duplicated into the manifold. *Replay-equivalence:* the identity gate's fail-closed path must preserve byte-identical output for non-flagged turns (D4 Phase 2 acceptance criterion — the gate is flag-gated off by default until calibrated). *Mutation standing:* the identity manifold is frozen (item 8), never mutated in-path; `C_id`'s corrective displacement acts on the trajectory, never on the manifold.
|
||||
>
|
||||
|
|
@ -410,7 +411,9 @@ class IdentityCheck:
|
|||
|
||||
## 4a. D4 Phase 0 — Reconciled Implementation Specification (supersedes §4)
|
||||
|
||||
§4 above is preserved verbatim as the original R&D sketch. Per governance annotation item 2, it contradicts the governing §2.1–2.2 decision and is **not** the specification implementers build against. This section is that specification. It is normative *shape* — the literal shipped code is produced under TDD in D4 Phase 1 (`core/physics/identity_manifold.py`) and Phase 2 (`core/physics/identity.py`); this block is not the final diff.
|
||||
§4 above is preserved verbatim as the original R&D sketch. Per governance annotation items 2 and 12, it contradicts the governing decision and is **not** the specification implementers build against. This section is that specification. It is normative *shape* — the literal shipped code is produced under TDD in D4 Phase 1 (`core/physics/identity_manifold.py`) and Phase 2 (`core/physics/identity.py`); this block is not the final diff.
|
||||
|
||||
**The operator-preservation correction (governance annotation item 12).** The live identity trajectory is `final_state.F`, whose class invariant (`field/state.py`) is `versor_condition(F) < 1e-6` — i.e. **F is a versor: an even-grade operator (grades 0,2,4), with zero grade-1 content.** §2.1/§2.2's literal "project ψ_traj onto the grade-1 value subspace" applied to F is therefore vacuous (`P_id(F) = 0` identically ⇒ every trajectory maximally flagged ⇒ a fail-closed brick). This was verified empirically before implementation. The geometrically correct question for an *operator* against a *subspace* is not "is the operator in the subspace" but "does the operator **preserve** the subspace" — evaluated by its action on the subspace's basis via the sandwich product `F aᵢ F̃`. This keeps the grade-1 pack axes unchanged and matches inalienability precisely: a legitimate cognitive versor leaves the value axes invariant; a jailbreak versor twists a value axis out of the value subspace (leakage) or inverts it (anti-alignment). **Ratified by Joshua Shay, 2026-07-17.**
|
||||
|
||||
**Phase 1 primitive — `core/physics/identity_manifold.py` (§2.1):**
|
||||
|
||||
|
|
@ -418,19 +421,22 @@ class IdentityCheck:
|
|||
class ManifoldConditioningError(ValueError):
|
||||
"""Gram matrix condition number exceeds the mode-aliasing bound (10**5)."""
|
||||
|
||||
def lift_axis(direction3: tuple[float, float, float]) -> np.ndarray:
|
||||
def lift_axis(direction3: Sequence[float]) -> np.ndarray:
|
||||
"""Grade-1 lift: R^3 -> Cl(4,1) at the e1/e2/e3 slots.
|
||||
|
||||
Uses algebra.cl41.basis_vector(0..2) — NOT algebra.cga.embed_point, which
|
||||
maps to null-cone points and would make the Gram matrix a distance table
|
||||
rather than a metric inner product. Precomputed once at manifold load:
|
||||
f64 precision domain (the f64->f32 serving-boundary cast, Sec 2.5 /
|
||||
ADR-0245 Sec 2.2, applies only to the live per-turn psi_traj, not to this
|
||||
offline axis construction).
|
||||
rather than a metric inner product. The value subspace I = span(lifted
|
||||
axes) therefore lives in the spatial grade-1 block (e1,e2,e3), where the
|
||||
Cl(4,1) inner product <.,.>_0 coincides with the Euclidean coefficient
|
||||
inner product (each e_i^2 = +1), so the Gram matrix is positive-definite.
|
||||
Precomputed once at manifold load in the f64 precision domain (the
|
||||
f64->f32 serving cast, Sec 2.5 / ADR-0245 Sec 2.2, applies only to the
|
||||
live per-turn versor F, not to this offline axis construction).
|
||||
"""
|
||||
psi = np.zeros(N_COMPONENTS, dtype=np.float64)
|
||||
for k, component in enumerate(direction3):
|
||||
psi = psi + component * basis_vector(k).astype(np.float64)
|
||||
psi = psi + float(component) * basis_vector(k).astype(np.float64)
|
||||
return psi
|
||||
|
||||
def gram_matrix(axes_psi: Sequence[np.ndarray]) -> np.ndarray:
|
||||
|
|
@ -444,58 +450,94 @@ def gram_matrix(axes_psi: Sequence[np.ndarray]) -> np.ndarray:
|
|||
raise ManifoldConditioningError(f"Gram condition number {cond:.3e} exceeds 1e5")
|
||||
return G
|
||||
|
||||
def project(psi: np.ndarray, axes_psi: Sequence[np.ndarray], g_inv: np.ndarray) -> np.ndarray:
|
||||
"""P_id(psi) = sum_ij psi_axis_i * (G^-1)_ij * <psi_axis_j, psi>_0 — signed."""
|
||||
c = np.array([scalar_part(geometric_product(reverse(a), psi)) for a in axes_psi])
|
||||
def subspace_project(x: np.ndarray, axes_psi, g_inv) -> np.ndarray:
|
||||
"""Metric-orthogonal projection of x onto I = span(axes_psi).
|
||||
P_I(x) = sum_ij axis_i * (G^-1)_ij * <axis_j, x>_0. Coefficients are SIGNED
|
||||
(never abs()'d) so orientation is preserved (governance annotation item 4)."""
|
||||
c = np.array([scalar_part(geometric_product(reverse(a), x)) for a in axes_psi])
|
||||
coeffs = g_inv @ c
|
||||
return sum(w * a for w, a in zip(coeffs, axes_psi))
|
||||
out = np.zeros(N_COMPONENTS, dtype=np.float64)
|
||||
for w, a in zip(coeffs, axes_psi):
|
||||
out = out + w * a
|
||||
return out
|
||||
|
||||
def leakage_norm(s_id: np.ndarray) -> float:
|
||||
def sandwich(R: np.ndarray, x: np.ndarray) -> np.ndarray:
|
||||
"""Versor action R x R~. For a versor R this preserves grade and norm, so a
|
||||
grade-1 axis maps to a grade-1 unit vector."""
|
||||
return geometric_product(geometric_product(R, x), reverse(R))
|
||||
|
||||
def euclidean_norm(s: np.ndarray) -> float:
|
||||
"""Positive-definite coefficient-Euclidean norm — NOT the indefinite Cl(4,1)
|
||||
inner product <S, S~>_0, which signature (+,+,+,+,-) permits to vanish for
|
||||
nonzero leakage, silently hiding a breach (governance annotation item 4)."""
|
||||
return float(np.linalg.norm(s_id, ord=2))
|
||||
<S,S~>_0, which signature (+,+,+,+,-) permits to vanish (or go negative, e.g.
|
||||
for an e5/boost leakage component) for nonzero leakage, silently hiding a
|
||||
breach (governance annotation item 4)."""
|
||||
return float(np.linalg.norm(np.asarray(s, dtype=np.float64), ord=2))
|
||||
|
||||
def axis_response(R, axes_psi, g_inv):
|
||||
"""Per-axis operator-preservation measures for versor R. For each value
|
||||
axis a_i:
|
||||
rotated_i = sandwich(R, a_i) # grade-1 unit vector
|
||||
rejection_i = rotated_i - subspace_project(rotated_i) # out-of-I component
|
||||
leakage_i = euclidean_norm(rejection_i) # subspace departure (Sec 2.2)
|
||||
self_align_i = <a_i, rotated_i>_0 # SIGNED orientation (item 4)
|
||||
Returns (leakage[], self_align[]). Both are needed and non-redundant:
|
||||
rejection catches tilt toward alien dimensions (e4/e5); self_align catches
|
||||
in-subspace inversion (e1 -> -e1: leakage 0 but self_align -1)."""
|
||||
leak, align = [], []
|
||||
for a in axes_psi:
|
||||
rot = sandwich(R, a)
|
||||
rej = rot - subspace_project(rot, axes_psi, g_inv)
|
||||
leak.append(euclidean_norm(rej))
|
||||
align.append(scalar_part(geometric_product(a, reverse(rot))))
|
||||
return leak, align
|
||||
```
|
||||
|
||||
**Phase 2 gate — `core/physics/identity.py` (§2.2; dual-mode, fail-closed):**
|
||||
|
||||
```python
|
||||
class IdentityGateRefusal(Exception):
|
||||
"""Fail-closed refusal: leakage or boundary check failed and C_id could not
|
||||
recover alignment within its bound. Live parameters are unchanged."""
|
||||
"""Fail-closed refusal: leakage/orientation or boundary check failed and
|
||||
C_id could not recover alignment within its bound. Params unchanged."""
|
||||
|
||||
def _axis_projection(axis, psi_traj, axis_psi) -> float:
|
||||
psi_arr = np.ascontiguousarray(psi_traj, dtype=np.float32)
|
||||
if psi_arr.dtype.byteorder not in ("<", "="):
|
||||
def _wave_field_check(F_traj, axes_psi, g_inv) -> tuple[float, list, list]:
|
||||
F = np.ascontiguousarray(F_traj, dtype=np.float32)
|
||||
if F.dtype.byteorder not in ("<", "="):
|
||||
raise ValueError("Identity gate requires little-endian float32")
|
||||
if not np.all(np.isfinite(psi_arr)):
|
||||
raise ValueError("Identity gate encountered nonfinite values in psi_traj")
|
||||
if psi_arr.shape != (N_COMPONENTS,):
|
||||
raise ValueError(f"psi_traj must be shape ({N_COMPONENTS},), got {psi_arr.shape}")
|
||||
# Signed overlap — do NOT abs(): a large negative value is anti-alignment
|
||||
# (opposition), a materially worse condition than orthogonality, and must
|
||||
# stay distinguishable from it (governance annotation item 4).
|
||||
return float(scalar_part(geometric_product(psi_arr, reverse(axis_psi))))
|
||||
if not np.all(np.isfinite(F)):
|
||||
raise ValueError("Identity gate encountered nonfinite values in F_traj")
|
||||
if F.shape != (N_COMPONENTS,):
|
||||
raise ValueError(f"F_traj must be shape ({N_COMPONENTS},), got {F.shape}")
|
||||
leak, align = axis_response(F.astype(np.float64), axes_psi, g_inv)
|
||||
# subspace-preservation score (RMS leakage over axes; each rotated axis is
|
||||
# unit-norm, so the denominator is sqrt(n)); orientation carried separately.
|
||||
score = 1.0 - (sum(l * l for l in leak) / len(leak)) ** 0.5
|
||||
return score, leak, align
|
||||
|
||||
# Malformed psi_traj (NaN / wrong shape / wrong byte-order) raises — it never
|
||||
# Malformed F_traj (NaN / wrong shape / wrong byte-order) raises — it never
|
||||
# falls through to the legacy scalar-L2 path (Sec 3's dual-mode fallback is
|
||||
# for ABSENT psi_traj only, not malformed psi_traj).
|
||||
# for ABSENT F_traj only, not malformed F_traj).
|
||||
```
|
||||
|
||||
Egress condition (replaces §2.2 item 2's formula — `∧ ΔQ_top = 0` dropped per governance annotation item 1):
|
||||
Egress condition (replaces §2.2 item 2's formula — `∧ ΔQ_top = 0` dropped per governance annotation item 1; operator-preservation per item 12):
|
||||
|
||||
```
|
||||
psi_minus = F_cognitive(psi_t, u_t)
|
||||
r_id = psi_minus - P_id(psi_minus) # leakage
|
||||
psi_plus = C_id(psi_minus, r_id) # bounded, abstaining corrector
|
||||
admit <=> leakage_norm(psi_plus - P_id(psi_plus)) <= gamma_id
|
||||
F_minus = versor from F_cognitive(psi_t, u_t) # a versor (grades 0,2,4)
|
||||
leak, align = axis_response(F_minus, axes_psi, g_inv)
|
||||
F_plus = C_id(F_minus, leak, align) # bounded, abstaining corrector
|
||||
admit <=> rms(leak(F_plus)) <= gamma_id # subspace preserved
|
||||
AND min(align(F_plus)) >= gamma_orient # no value axis inverted
|
||||
AND no boundary_id violated # hard boundaries (item 7)
|
||||
```
|
||||
|
||||
`C_id` is a **bounded, abstaining** corrector: it may apply a bounded corrective displacement toward the manifold; if it cannot recover alignment within that bound, it **abstains** — raises `IdentityGateRefusal`, live parameters are kept unchanged. `C_id` must **not** rewrite reasoning arbitrarily to force a low leakage score — a corrector that can do that creates a "good-metric, bad-cognition" failure mode, which is a new defect, not a fix.
|
||||
Two per-axis measures, both required and non-redundant (empirically verified):
|
||||
- **Subspace leakage** `euclidean_norm(rotated_i − P_I(rotated_i))` — catches a versor tilting a value axis toward an alien dimension (e4/e5). Euclidean norm per item 4/6.
|
||||
- **Signed self-alignment** `<a_i, rotated_i>_0` — catches a versor *inverting* a value axis within the subspace (`e1 -> -e1`: subspace leakage is 0, but self-alignment is −1). This is the concrete realization of the "signed overlap, never abs()" ratified decision.
|
||||
|
||||
`boundary_ids` (governance annotation item 7) is evaluated as a hard-boundary check alongside the axis-leakage score; a boundary violation is refused independent of the leakage score (its predicate is designed in D4 Phase 2, not prescribed here).
|
||||
`C_id` is a **bounded, abstaining** corrector: it may apply a bounded corrective displacement toward the manifold; if it cannot recover alignment within that bound, it **abstains** — raises `IdentityGateRefusal`, live parameters kept unchanged. `C_id` must **not** rewrite reasoning arbitrarily to force a low leakage score — a corrector that can do that creates a "good-metric, bad-cognition" failure mode, which is a new defect, not a fix.
|
||||
|
||||
**Identity-continuity (governance annotation item 8):** `axes_psi` above is computed once at manifold/pack load and frozen for the session. ADR-0243 biography holonomy accumulation is a separate, non-mutating process with respect to this subspace.
|
||||
`boundary_ids` (governance annotation item 7) is evaluated as a hard-boundary check alongside the leakage/orientation scores; a boundary violation is refused independent of them (its predicate is designed in D4 Phase 2, not prescribed here).
|
||||
|
||||
**Identity-continuity (governance annotation item 8):** `axes_psi` and `g_inv` above are computed once at manifold/pack load and frozen for the session. ADR-0243 biography holonomy accumulation is a separate, non-mutating process with respect to this subspace.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ Verified by reading the tree, **not** the relays (which contain at least one hal
|
|||
|
||||
- **Fact A — axes are R³ 3-vectors.** `packs/identity/default_general_v1.json` ships `direction` = dim-3 unit vectors; loader enforces `_DIRECTION_LEN`. §2.1 assumes 32-vector eigenmodes → requires the grade-1 lift (decision #4).
|
||||
- **Fact B — two field surfaces, not one.** §2.2 gate runs on `result.final_state.F` (cognition-pipeline field, `chat/runtime.py:2679`). §2.5 `ψ_steady` cast lives in `core/physics/cognitive_lifecycle.py` (ADR-0243 lifecycle), which `chat/` + `core/cognition/` **do not import** (A-04 off-serve). The ADR conflates them; they are separate contracts in separate files.
|
||||
- **Fact C — `final_state.F` is a VERSOR (operator), not a state vector** (`field/state.py` invariant `versor_condition(F) < 1e-6`). It is even-grade (grades 0,2,4) with **exactly zero grade-1 content** (verified). This makes §2.1/§2.2's literal "project ψ onto the grade-1 subspace" vacuous (`P_id(F)=0`, flags everything). Resolution (ratified 2026-07-17): **operator-preservation** — measure whether the versor preserves the value subspace via `F aᵢ F̃`. See ADR-0244 governance annotation item 12 + §4a. This is the D4 core-mechanism correction.
|
||||
- **Advisory, not a gate.** Current identity_score feeds `_build_surface_context` (hedge/claim-strength, `runtime.py:2705`) + telemetry. `would_violate` is never called in runtime. §2.2 converts advisory → fail-closed = a **live-serving behavior change** (highest risk).
|
||||
- **`psi_traj` is never populated.** `_make_trajectory_from_result` (`runtime.py:385`) builds from `result.trajectory or (result.final_state,)`; no `psi_traj` attr. The wave-field 32-vector *is* available as `final_state.F` (used by `versor_condition(result.final_state.F)`). Phase 2 must thread it.
|
||||
- **`boundary_ids` dormant** — stored on the manifold, never evaluated (decision #7).
|
||||
|
|
@ -113,18 +114,19 @@ Dependencies: `0 → {1, 4}` · `1 → 2 → 3` · `5 after 0` · `6 last`. Each
|
|||
**Status:** ✅ DONE — landed `ad37d03b`
|
||||
**Resume notes:** ADR-0244 governance annotation expanded to 11 items (§4a added, supersedes §4, verbatim R&D body preserved). ADR-0245 committed Proposed at `docs/adr/ADR-0245-cga-unification-mechanical-sympathy-and-semantic-rigor.md` with its own governance annotation + status map. Audit doc wrinkles 1–2 + Q5 line updated to resolved. Gate: smoke 176 passed + provenance/ADR pins (governance_p12, topological_quarantine, third_door_cohesion) 30 passed. Both ADR status lines confirmed still `Proposed` (no flip). Phase 1's `lift_axis` spec confirmed against the real `algebra.cl41.basis_vector` helper (grade-1 lives at component indices 1–5; e1/e2/e3 = `basis_vector(0..2)`) — no further verification needed before Phase 1 starts.
|
||||
|
||||
### Phase 1 — §2.1 Gram identity manifold (pure primitive, off-path) — TDD
|
||||
**Objective:** the metric-exact projection primitive, no runtime wiring.
|
||||
**Files:** new `core/physics/identity_manifold.py` (keep `identity.py` as compat shell + dual-mode host); `tests/test_adr_0244_identity_manifold.py`.
|
||||
**Steps:**
|
||||
- `lift_axis(direction3) → ψ_axis(32)`: grade-1 embedding via `algebra.cl41.basis_vector(0..2)` = e1/e2/e3 at component indices 1/2/3 (verified at Phase 0 against `cl41.py`'s grade-lexicographic blade ordering: grade-1 occupies indices 1–5; `basis_vector(i)` sets `v[1+i]=1.0`). Full §4a spec already drafted in ADR-0244 — implement directly against it.
|
||||
- `gram(axes) → G` (`G_ij = scalar_part(gp(ψ_i, reverse(ψ_j)))`), symmetric; `cond(G) > 1e5 → ManifoldConditioningError` (typed).
|
||||
- `project(ψ, axes, Ginv) → P_id(ψ) = Σ ψ_i (G⁻¹)_ij c_j`, `c_j = ⟨ψ_j, ψ⟩₀` (**signed**).
|
||||
- `leakage(ψ) = ψ − P_id(ψ)`; `leakage_norm = ‖·‖₂` (Euclidean coeff norm).
|
||||
**Acceptance (falsifiable):** orthonormal default pack ⇒ `G=I`; projection idempotent (`P_id∘P_id = P_id` to 1e-12); in-subspace ψ ⇒ leakage_norm ≈ 0; orthogonal ψ ⇒ leakage_norm ≈ ‖ψ‖; anti-aligned ψ ⇒ negative signed overlap detected; near-degenerate synthetic axes ⇒ `ManifoldConditioningError`. Deterministic.
|
||||
### Phase 1 — §2.1 identity manifold primitive (OPERATOR-PRESERVATION, pure, off-path) — TDD
|
||||
**Objective:** the metric-exact **operator-preservation** primitive, no runtime wiring. (§2.1/§2.2's literal "project ψ onto I" is vacuous — the trajectory `final_state.F` is a **versor/operator** (grades 0,2,4, zero grade-1); see ADR-0244 governance annotation item 12 + §4a. We measure whether the versor *preserves* the value subspace via `F aᵢ F̃`.)
|
||||
**Files:** new `core/physics/identity_manifold.py` (keep `identity.py` as compat shell + dual-mode host, wired in Phase 2); `tests/test_adr_0244_identity_manifold.py`.
|
||||
**Steps (implement §4a verbatim shape):**
|
||||
- `lift_axis(direction3) → ψ_axis(32)`: grade-1 embedding via `algebra.cl41.basis_vector(0..2)` (e1/e2/e3, component indices 1/2/3). Value subspace `I` lives in spatial grade-1 where `⟨·,·⟩₀ = ` Euclidean ⇒ `G` positive-definite.
|
||||
- `gram_matrix(axes) → G` (`G_ij = scalar_part(gp(ψ_i, reverse(ψ_j)))`), symmetric PD; `cond(G) > 1e5 → ManifoldConditioningError`.
|
||||
- `subspace_project(x, axes, Ginv) → P_I(x) = Σ ψ_i (G⁻¹)_ij ⟨ψ_j, x⟩₀` (**signed** coeffs).
|
||||
- `sandwich(R, x) = gp(gp(R,x), reverse(R))`; `euclidean_norm(s) = ‖s‖₂`.
|
||||
- `axis_response(R, axes, Ginv) → (leakage[], self_align[])`: per axis `rot=sandwich(R,aᵢ)`, `leakage_i=euclidean_norm(rot − P_I(rot))` (subspace departure), `self_align_i=⟨aᵢ, rot⟩₀` (**signed** orientation). Both required, non-redundant.
|
||||
**Acceptance (falsifiable, all empirically pre-verified):** orthonormal default pack ⇒ `G=I`; `subspace_project` idempotent (`P_I∘P_I = P_I` to 1e-12); identity versor ⇒ all `leakage≈0`, all `self_align≈+1`; rotor **within** value plane (e12) ⇒ `leakage≈0`; rotor tilting a value axis toward e4/e5 ⇒ `leakage>0` (e.g. e14 θ=0.5 → 0.28, boost e15 θ=0.5 → 0.29); π-rotor inverting a value axis (e1→−e1) ⇒ `leakage≈0` **but** `self_align≈−1`; near-parallel synthetic axes ⇒ `ManifoldConditioningError`. Deterministic (f64).
|
||||
**Gate:** smoke + fast lane + new tests.
|
||||
**Status:** ⬜ NOT STARTED
|
||||
**Resume notes:** —
|
||||
**Status:** ◐ IN PROGRESS
|
||||
**Resume notes:** ADR-0244 §4a already carries the full operator-preservation spec + rationale; implement `core/physics/identity_manifold.py` directly against it. All acceptance numbers pre-verified via scratch probes (see progress log 2026-07-17 operator-preservation entry).
|
||||
|
||||
### Phase 2 — §2.2 fail-closed gate + `C_id` + `boundary_ids` + telemetry + eval — TDD
|
||||
**Objective:** convert advisory → fail-closed egress gate on `final_state.F`; wire in-path behind a flag.
|
||||
|
|
@ -219,6 +221,7 @@ Forward-looking mechanical-sympathy items from the critique — a separate optim
|
|||
|
||||
- **2026-07-17** — Arc kicked off. Plan doc authored + committed to `main`. Worktree `core-adr0244d4` created off `ee38c976`. Both sign-offs recorded (§2). Next: Phase 0.
|
||||
- **2026-07-17** — **Phase 0 landed `ad37d03b`.** ADR-0244 reconciled (11-item governance annotation + new §4a superseding §4); ADR-0245 committed as a real companion ADR (Proposed) with its own status map; audit doc updated. Gate green (smoke 176 + provenance/ADR pins 30). Pushed to `forgejo/main`, local `main` fast-forwarded, worktree in sync. Next: Phase 1.
|
||||
- **2026-07-17** — **Phase 1 core-mechanism correction (ratified).** 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. Amendment commit lands before the Phase 1 code commit.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue