Skip to content

feat(#117,#168): conditioning audit with Schur-projector cluster semantics - #173

Merged
marcohost33-maker merged 26 commits into
mainfrom
codex/issue117-168-current-main-20260927
Sep 30, 2026
Merged

marcohost33-maker merged 26 commits into
mainfrom
codex/issue117-168-current-main-20260927

Conversation

@marcohost33-maker

@marcohost33-maker marcohost33-maker commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Current-main consolidation of the audit-only zero-mode conditioning work from #166 plus the defective-cluster correction from #172.

This PR is intentionally rebuilt non-destructively from the current protected main after #171 merged. It preserves the #152 finite-generator guard and avoids rebasing/force-updating the older stacked branches.

Scientific contract

Simple zero mode

  • scalar reciprocal eigenvalue condition is the direct |y^H x|;
  • scalar first-order structural/solver displacement estimates remain available when finite;
  • the independent Schur path is not forced onto a simple root, avoiding unnecessary GEES/Sylvester round-off.

Multi-mode zero cluster

  • reorder the selected cluster in a complex Schur form with LAPACK xTRSEN;
  • use xTRSEN for reordering only;
  • solve T11 R - R T22 = T12;
  • first require the independent Schur spectrum to match the report spectrum mode-for-mode inside the existing round-off agreement band; a same-size but numerically different cluster fails closed;
  • report the reciprocal spectral-projector 2-norm 1/sqrt(1 + ||R||_2^2);
  • do not identify xTRSEN.S with that exact quantity: it is a Frobenius-norm lower bound;
  • return CLUSTER_ONLY and withhold scalar first-order eigenvalue-displacement claims, because defective versus semisimple multiplicity is not safely identifiable from numerical proximity alone.

Fail-closed rules

  • accepted/report spectrum must agree with the audit solve before scalar evidence is attached;
  • non-representable structural evidence returns UNAVAILABLE, including in cluster-only mode;
  • malformed/non-finite cutoffs are rejected;
  • no filter, D1-D24 value, certificate, classifier verdict or tier consumes this audit.

Regression discrimination

Provenance / current-main consolidation

Source work:

CHANGELOG.md and CITATION.cff were merged onto current-main content rather than copied wholesale from the stale stack; comparison against main shows additions only in both files.

Schema / release impact

Methodology and audit-field semantics change, so README / CHANGELOG / CITATION are updated. The run-manifest contract is unchanged and MANIFEST_SCHEMA is deliberately not bumped.

Test plan

  • required Python 3.10-3.14 proposed-merge checks
  • exact-head Python 3.10-3.14 checks
  • QuTiP proposed-merge + exact-head
  • Quality Contract
  • reusable CI pilot
  • anchors
  • ruff
  • mypy
  • full pytest
  • zero unresolved review threads

Supersedes #166 and #172 for integration once this current-main PR is green.

Refs #112, #117, #127, #130, #168. The default call is now basis invariant (ABSTAIN without a cutoff); the remaining finite-cutoff limit is tracked in #183, so #168 stays open until that is closed.

@marcohost33-maker
marcohost33-maker marked this pull request as ready for review September 27, 2026 00:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 41240d54ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/liouscope/numerics/conditioning.py
marcohost33-maker and others added 3 commits September 30, 2026 10:56
Both sides add independent Unreleased entries (#117/#168 vs #162/#177);
kept both, no text changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without zero_tolerance the audit used an internal NaN cutoff. Every ordered
comparison with NaN is False, so the scalar path could only answer BENIGN
(diag(0,-1,-1,-2), trace defect 1.414, came back BENIGN), and the zero set
was chosen by proximity, which a defective double root split by ~sqrt(eps)
makes basis dependent (issue-#168 pair: CLUSTER_ONLY plain, BENIGN rotated;
Codex review thread on conditioning.py:809).

- default call returns verdict ABSTAIN / reason zero_tolerance_not_supplied:
  observations only (smallest eigenvalue, magnitude, trace defect), every
  zero-set quantity NaN, never BENIGN
- scalar verdict via _scalar_verdict: BENIGN only on a TRUE budget <= tol;
  NaN/inf budget -> CONDITIONING_LIMITED, non-finite cutoff -> ABSTAIN
- tests: default invariance on the #168 pair, non-trace-preserving default,
  12-operator negative sweep, verdict truth table; measurement tests now pass
  the layer's own cutoff; longdouble fixtures skip where longdouble==float64
- benchmark families B/D/G follow the new default

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README, CHANGELOG (Unreleased/Fixed) and CITATION note: a call without
zero_tolerance returns ABSTAIN and never BENIGN; the spectral layer
always passes its certified cutoff, so no reported number moves.
Full-suite evidence run follows in chunks (~15 min).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

…the #183 limit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@marcohost33-maker
marcohost33-maker merged commit 39682ad into main Sep 30, 2026
34 checks passed
@marcohost33-maker
marcohost33-maker deleted the codex/issue117-168-current-main-20260927 branch September 30, 2026 09:52
marcohost33-maker added a commit that referenced this pull request Sep 30, 2026
…ling

Clean merge; ruff, mypy (58 files) and the touched test files
(gls/neff + issue117/issue168 conditioning) green locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant