L10 scoping Decision 0 ruled the session/context.py "drift fix" family as
sanctioned SEMANTIC anchoring, not forbidden drift-repair:
- closure (versor_condition<1e-6) is owned by the sanctioned algebra/versor.py
sandwich closure and holds BY CONSTRUCTION (measured: 100k-step field walk,
max versor_condition ~6e-13, flat, with AND without the anchor pull);
- the family preserves the invariant by construction (rotor_power /
word_transition_rotor / versor_apply on the Spin manifold, no post-hoc
unitize) and expresses the session concept-attractor model.
CLAUDE.md: add session/context.py semantic anchoring to sanctioned normalization
sites behind a two-clause guard, plus a bright-line paragraph (semantic anchoring
vs drift repair; closure owned solely by algebra/versor.py; no "drift fix" naming).
Rename _anchor_pull -> _session_anchor_pull; reframe the "Drift fix 1/3" /
"conjugate correction against slow angular drift" docs as semantic anchoring
(no behavior change). Update test_session_coherence.py to the new name.
Out of scope (flagged for separate review): generate/stream.py "Drift fix 2"
sits in a forbidden normalization site.
Verified: 15 targeted tests green; INV-02 normalization invariant unaffected.
Closes W-015 wiring debt. Per Sonnet's investigation (PR #252,
verdict (c)): _slerp_toward interpolates on S^31 but the versor
manifold (Spin sub-group in Cl(4,1)) is a proper subset. Slerp's
geodesic doesn't stay on the manifold, producing systematic
off-manifold state that the post-hoc unitize_versor was repairing.
Fix replaces _slerp_toward with the proper rotor-geodesic path:
R = word_transition_rotor(field_state.F, anchor_field)
R_step = rotor_power(R, _ANCHOR_PULL_ALPHA)
pulled_F = versor_apply(R_step, field_state.F)
rotor_power stays on the manifold by construction (same principle
as generate/stream.py:220). versor_apply closes via algebra/
versor.py — an already-sanctioned site. The unsanctioned
unitize_versor call in _anchor_pull and the entire _slerp_toward
function are removed.
CLAUDE.md normalization-site discipline is now restored:
session/context.py:_anchor_pull no longer performs normalization.
Changes:
- session/context.py: import rotor_power + word_transition_rotor,
remove _slerp_toward (34 lines), rewrite _anchor_pull to use
rotor-geodesic (15 lines net change).
- tests/test_session_coherence.py: new test pins the manifold
invariant — after anchor pull, versor_condition stays < 1e-6
without any unitize call (32 lines).
Intentional lane re-pins (audit-trail per #229 discipline):
- demo_composition: 403be13b → 3a3d09f3 (anchor pull now produces
correct on-manifold fields; demo output shifts as expected).
- public_demo: acd51d0c → 888ddd0d (same cause).
CLAIMS.md regenerated to reflect new pins (per #239 lesson).
Verification:
- tests/test_session_coherence.py: 3 passed
- core test --suite smoke: 67 passed
- scripts/verify_lane_shas.py: 7/7 match (post-re-pin)
- Manifold invariant test pinned: anchor pull preserves
versor_condition < 1e-6 by construction (no repair).
Investigation source: PR #252 (Sonnet). 4,138-sample bimodal
distribution confirmed _slerp_toward as the sole drift source.
_orient_result_to_anchor used np.dot (Euclidean dot product) alongside
cga_inner to decide hemisphere flips. When CGA inner was positive
(correct hemisphere) but Euclidean was negative, the flip negated CGA
alignment — making correctly-oriented fields rank last in vault recall.
Changes:
- Move hemisphere check into finalize_turn so all paths (ChatRuntime,
SessionContext.respond) get consistent protection.
- Use CGA inner product only, removing the forbidden Euclidean metric.
- Remove _orient_result_to_anchor (subsumed by finalize_turn).
- Remove SessionContext.arespond (dead code, no callers).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
_farther_unrelated searched for grade-1 reflectors whose cga_inner
score was below the prompt score. Field states are even-grade
(grade 0+2+4), so cga_inner with a grade-1 reflector is always zero
— making the search impossible when prompt_score is negative.
Replaced with _random_rotor (product of two reflectors) which lives
in the same even-grade subspace and produces nonzero inner products.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>