core/evals
Shay 11c91581e8
fix(W-015): replace _slerp_toward with rotor-geodesic anchor pull (#255)
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.
2026-05-24 20:05:25 -07:00
..
adversarial_identity
anchor_lens_tour
anti_regression feat(epistemic): Phase 3 state tagging spine (#220) 2026-05-24 11:26:06 -07:00
articulation
articulation_of_status
audit_tour
calibration
classical_literature_ood
cognition
cold_start_grounding
compositionality
compound_intent_decomposition
contradiction_detection
conversation
conversational_thread_coherence
cross_domain_transfer
curriculum_loop_closure
demo_composition fix(W-015): replace _slerp_toward with rotor-geodesic anchor pull (#255) 2026-05-24 20:05:25 -07:00
deterministic_fluency
discourse_paragraph
domain_contract_validation chore(ci): re-pin drifted lane SHAs + refresh canonical reports (#229) 2026-05-24 14:25:11 -07:00
elementary_mathematics_ood
english_fluency_ood
fabrication_control chore(ci): re-pin drifted lane SHAs + refresh canonical reports (#229) 2026-05-24 14:25:11 -07:00
forward_semantic_control
foundational_biology_ood
foundational_physics_ood feat: ADR-0111 physics expert-demo promotion (second successful) 2026-05-22 14:37:36 -07:00
frontier_compare
grammatical_coverage
gsm8k_math fix(epistemic): Phase 2 known bug repairs (#219) 2026-05-24 11:20:32 -07:00
gsm8k_parser_dev feat: add ADR-0125 perturbation suite 2026-05-22 17:12:33 -07:00
hebrew_fluency
identity_divergence
industry_demos
inference_closure feat: ADR-0122 systems_software audit-passed deferred (lane-shape mismatch) 2026-05-22 16:31:59 -07:00
introspection
koine_greek_fluency
lab
learning_loop
long_context_cost
math_bounded_grammar/v1 feat(ADR-0131.3): bounded-grammar word-problem benchmark — lane PASSED 50/50 (#180) 2026-05-23 11:27:04 -07:00
math_capability_axes feat(ADR-0136.S.4): novel-initial-form parser extension + rescan v4 (#210) 2026-05-23 22:34:51 -07:00
math_expert_claims/v1 feat(ADR-0120 math, ledger flip): mathematics_logic → expert tier (first-ever) (#195) 2026-05-23 18:55:34 -07:00
math_symbolic_equivalence feat(ADR-0131.1.F): frontier-baseline comparison harness for B1 (#178) 2026-05-23 12:14:06 -07:00
math_teaching_corpus/v1 feat(ADR-0131.2.B): B2 teaching-corpus enrichment — load-bearing gate (#177) 2026-05-23 11:29:48 -07:00
miner_loop_closure
monotonic_learning
multi_agent_composition
multi_sentence_response
multi_step_reasoning
obligation_2_ood_ratio feat(ADR-0114a.2): OOD-ratio auditor — Obligation #2 wired for B3, ratio=1.00 (#193) 2026-05-23 16:25:28 -07:00
obligation_5_perturbation feat(ADR-0114a.5): reasoning-isolation perturbation suite — Obligation #5 wired for B3, PASSING 130/130 preserving, 68/68 breaking (#191) 2026-05-23 16:07:59 -07:00
obligation_6_depth_curve feat(ADR-0114a.6): depth-curve auditor — Obligation #6 wired for B3 (assertion holds, coverage gap named) (#190) 2026-05-23 16:19:58 -07:00
obligation_8_adversarial feat(ADR-0114a.8): adversarial auditor — Obligation #8 wired, PASSING; surfaces 2 known parser-layer gaps (#192) 2026-05-23 16:11:37 -07:00
obligation_10_pack_provenance feat(ADR-0114a.10): pack-provenance auditor — Obligation #10 wired for B3, PASSING 2026-05-23 15:44:53 -07:00
orthogonality_tour
prompt_diversity
provenance
public_demo fix(W-015): replace _slerp_toward with rotor-geodesic anchor pull (#255) 2026-05-24 20:05:25 -07:00
realizer_guard
refusal_calibration
register_diagnostics
register_tour
reports
results
reviewer_registry
sample_efficiency
self_consistency_over_time
symbolic_logic feat: ADR-0122 systems_software audit-passed deferred (lane-shape mismatch) 2026-05-22 16:31:59 -07:00
teaching_injection_resistance
walkthrough_chain
warmed_session_consistency
zero_code_domain_acquisition
__init__.py
_parallel.py
baseline_runner.py
CLAIMS.md
cognition_cases.jsonl
framework.py
holdout_runner.py
metrics.py
parallel.py
run_cognition_eval.py