Skip to content

feat: wire whiteness/holdout claim gates, reserve D21-D23, name U1 floor - #76

Merged
marcohost33-maker merged 1 commit into
mainfrom
claude/maintenance-improvements-mujpnd
Jul 4, 2026
Merged

marcohost33-maker merged 1 commit into
mainfrom
claude/maintenance-improvements-mujpnd

Conversation

@marcohost33-maker

Copy link
Copy Markdown
Owner

Summary

Closes the additive, non-anchor-touching gaps from issue #71 ("wire remaining implemented-but-unwired pieces"): the anti-overfit gates are exported and connected to the claim vocabulary, D21-D23 get an explicit reserved-slot contract, and the U1 placeholder gets a named source. No runtime default changes; diagnose() behaviour is untouched.

Scope

  • Bug fix (no new feature) — export/wiring gap for already-implemented gates
  • New diagnostic or layer (please link the motivating reference) — additive assess_relaxation_claim claim-gate helper (Ljung-Box 1978; temporal holdout LIOU-A-012)
  • Performance / sparse-path / numerics improvement
  • Docs / examples / packaging only
  • CI / workflow / security
  • Release / packaging / publish evidence

What changed

  • B2 — anti-overfit gates wired to the claim vocabulary. fitting/whiteness.py (Ljung-Box) and fitting/holdout.py (temporal out-of-sample) were implemented and unit-tested but exported by nothing and connected to no claim concept. They are now exported from liouscope.fitting, and new fitting/claim_gate.py::assess_relaxation_claim maps their verdicts onto the StabilityReport SAFE/REVIEW/BLOCK vocabulary fail-closed / worst-wins: rejected holdout → BLOCK; non-white residuals or an un-run gate → REVIEW; both run and passing → SAFE. The result feeds straight into build_stability_report(claim_level=...). Purely additive — callers opt in.
  • C2 — D21-D23 reserved-slot contract. _consts.RESERVED_DIAGNOSTIC_SLOTS records D21-D23 as reserved-but-not-implemented, next to DIAGNOSTIC_SCHEMA_VERSION, so the D1-D24 schema name stays honest and the gap is discoverable in code.
  • B5 — U1 nominal floor named. compute_uncertainty_layer now reads _consts.U1_NOMINAL_FLOOR instead of a bare 1e-10, and the docstring states plainly that U1 is a conservative placeholder (not a measured residual) unless the caller runs an ODE-tolerance sweep — which diagnose() does not.

Verification

  • pytest -q passes locally — 419 passed (was 405; +14 new)
  • tests/test_anchors.py unchanged and green — 21 passed
  • ruff check src tests benchmarks clean; mypy src/liouscope clean (50 files)
  • No MANIFEST_SCHEMA.json, taxonomy, or classifier-semantics change
  • No new external dependency
  • No .github/workflows/ change
  • No claims/release-wording change; new diagnostic helper carries no anchor-confirmed claim (reserved slots explicitly marked "not implemented")

New tests: tests/test_claim_gate.py (full SAFE/REVIEW/BLOCK truth table, incl. fail-closed no-gate case) and tests/test_reserved_slots.py (reserved-slot + U1-floor contract). CHANGELOG updated.

Quality contract

  • No unsupported production-ready / certified / published / archived wording introduced
  • Research / pre-clinical disclaimer preserved
  • False-pass and rework risk considered — gates default to the more restrictive verdict on missing or failing evidence, and reserving a slot is explicitly not a claim it is implemented

Reproducibility note

No numerical-result change. The claim-gate tests use fixed fixtures (np.random.default_rng(0), deterministic exponential trajectories); anchor fixtures are byte-for-byte unchanged.

Linked issues

Part of #71 (items B2, B5, C2). The classifier-semantics items (#68, #69, #70) and D17 (#69) are intentionally out of scope — those change canonical verdicts and per AGENTS.md §3 each needs a dedicated PR with physics rationale and deliberate anchor updates.

🤖 Generated with Claude Code


Generated by Claude Code

Closes the additive, non-anchor-touching gaps from issue #71 (wire
remaining implemented-but-unwired pieces):

- B2: export the residual-whiteness (Ljung-Box) and temporal-holdout
  anti-overfit gates from `liouscope.fitting`, and add
  `fitting/claim_gate.py::assess_relaxation_claim` mapping their verdicts
  onto the StabilityReport SAFE/REVIEW/BLOCK vocabulary fail-closed
  (worst-wins). Purely additive: `diagnose()` behaviour unchanged; callers
  opt in and can feed the result to `build_stability_report(claim_level=)`.
- C2: record D21-D23 as reserved-but-not-implemented in
  `_consts.RESERVED_DIAGNOSTIC_SLOTS`, an explicit code-level contract next
  to `DIAGNOSTIC_SCHEMA_VERSION` so the `D1-D24` name stays honest.
- B5: read U1 from the named `_consts.U1_NOMINAL_FLOOR` instead of a bare
  `1e-10`; clarify in the docstring that U1 is a conservative placeholder
  (not a measured residual) unless the caller runs an ODE-tolerance sweep.

No anchor, classifier-semantics, manifest-schema or taxonomy change. New
tests: `tests/test_claim_gate.py` (truth table) and
`tests/test_reserved_slots.py` (slot + U1 contract). CHANGELOG updated.

Gates: pytest 419 passed (21 anchors green), ruff clean, mypy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01StgHHKB6YGxxjTKdWjcCtq
@marcohost33-maker marcohost33-maker added the agent:claude PR authored by Claude Code label Jul 4, 2026 — with Claude
@marcohost33-maker
marcohost33-maker marked this pull request as ready for review July 4, 2026 07:16
@marcohost33-maker
marcohost33-maker merged commit 62e77f3 into main Jul 4, 2026
20 checks passed
@marcohost33-maker
marcohost33-maker deleted the claude/maintenance-improvements-mujpnd branch July 4, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:claude PR authored by Claude Code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants