Commit graph

4 commits

Author SHA1 Message Date
Shay
2050b77ab2 feat(third-door): real Cartan–Iwasawa null-point peel + full Kabsch-conformal Procrustes (#16 #17)
- Cartan: recover_dilation → peel D → recover_translation → peel T;
  Spin remainder for non-similarities; strict close (no seed-to-rotor);
  recon residual fallback. Flips fidelity xfail.
- Procrustes: full 5-D Kabsch on null-point clouds; field conjugacy via
  raw sandwich + Spin GN; delete word_transition_rotor averaging path.
  Non-vacuous harness fixture.
- rotor_power: null-bivector power (a+B)^α = a^α + α a^{α-1} B so
  translators no longer silently zero under dual-slerp.
- Ledger scorecard: #2 and #3🟢; #4 remains 🟡 (bootstrap deferred).

549 passed (fidelity + ADR-0239 + null_point + 0240 + rotor_power).
2026-07-13 17:07:42 -07:00
Shay
efa84002cd feat(third-door): exact metric-orthogonal surprise projection + reconciled polarity (#20)
Finding #20 (Super-Blueprint §3.2). surprise_residual was Euclidean Gram-Schmidt
on flat 32-coefficient vectors — metric-blind (it ignored the (+,+,+,+,-)
signature and the blade grade structure), so "inside the admissible span" was
judged by the wrong geometry.

Operator math (core/physics/surprise.py):
- Exact metric-orthogonal projection: solve the normal equations G c = r
  (G_ij = cga_inner(b_i,b_j), r_i = cga_inner(b_i,x)) via lstsq, under cga_inner
  (32-vec) / eta (5-vec).
- Fail-closed (typed SurpriseResidualError) on a metric-degenerate span, keyed on
  rank(G) < rank(B) — a null direction with no reciprocal (lone n_o). Refines the
  literal "rank(G) < k": mere linear dependence among non-null columns is admitted
  (lstsq projects onto the span), so a redundant live basis [1, source] and the
  non-degenerate pair {n_o, n_inf} are admitted; only a lone n_o is refused. The
  disclosure names the Gram null-space direction (not just zero-diagonal columns).
- Reconciled productivity polarity: productive_transfer = low Procrustes AND low
  surprise (was `sur_norm >= 0.0`, always true). High surprise routes to discovery
  (split follow-up). Corrects the ledger's transfer/discovery conflation.

Adversarial verification (3 independent lenses) found, and this fixes:
- HIGH soundness hole: sur_norm was the reversion pseudo-norm, which VANISHES on
  a nonzero metric-null residual (the n_o/n_inf light cone) -> false-zero surprise
  -> an out-of-span light-cone probe was wrongly admitted as in-span. Now the
  DEFINITE (Euclidean) norm of the residual: the projection stays metric-exact,
  the magnitude is 0 iff nothing is unexplained.
- HIGH regression: the analogical-transfer harness called surprise_residual
  OUTSIDE its try/except, so a degenerate source crashed the whole run. Now
  guarded: records a refused case and continues.
- grade-support `allowed` -> exact-nonzero (removes a spurious-leak edge under
  coefficient amplification of sub-tolerance grade dust).

DiscoveryCandidate wiring into the contemplation loop is split to its own
follow-up (a distinct cross-cutting surface). Off-serving (nothing in
serving/runtime imports core.physics.*). Tests: 15 behavioral tests
(metric-vs-Euclidean divergence, null-cone regression, null refusal +
combination-degenerate disclosure, 5-vector branch, polarity); 139-test physics
sweep green; ruff clean.
2026-07-12 15:27:20 -07:00
Shay
896e90a92b fix(third-door): align with perfected package contracts from Downloads artifacts (refs #10 #11 #12 #13)
Some checks failed
smoke / smoke (-m "not quarantine") (pull_request) Failing after 1m1s
lane-shas / verify pinned lane SHAs (pull_request) Failing after 47s
Source artifacts from the multi-model landing package (README + Super-Blueprint
+ ADR-0238/0239/0240 + goldtether/dynamic_manifold/surprise) are now the
contractual surface, implemented on the live algebra/* kernel:

- GoldTetherMonitor.residual/update/may_relax_hitl/force_reset/autonomy
- signature_aware_pca (5×K, null-safe), conformal_procrustes, cartan_iwasawa_extract
- surprise_residual (Minkowski) + dual_procrustes_surprise audit dict

Package stubs (core.algebra.backend placeholders, scipy, identity-only
Procrustes) are replaced with dual-corrected Cl(4,1) operators. ADRs match
package decision language; docs/adr remains canonical with decisions redirects.

34/34 Third-Door tests + 7/7 ADR-0199 arena regression green.
2026-07-11 22:05:02 -07:00
Shay
e6b635c6aa test: Third-Door replay, closure, analogical transfer harness (refs #10 #13)
Some checks failed
lane-shas / verify pinned lane SHAs (pull_request) Failing after 1m13s
smoke / smoke (-m "not quarantine") (pull_request) Failing after 1m43s
40 tests covering ADR-0238/0239/0240: practice vs serve bands, floor decay,
signature PCA null classification, Procrustes residual, surprise dual,
biography holonomy order-sensitivity, temporal NOT_YET, miner SPECULATIVE-
only, fixture transfer wrong=0.
2026-07-11 22:01:13 -07:00