Skip to content

test(integration): substrate-gate boundary-state sweep — 10 deterministic cases (Task 1)#426

Merged
neuron7xLab merged 1 commit intomainfrom
fix/physics-boundary-sweep
Apr 26, 2026
Merged

test(integration): substrate-gate boundary-state sweep — 10 deterministic cases (Task 1)#426
neuron7xLab merged 1 commit intomainfrom
fix/physics-boundary-sweep

Conversation

@neuron7xLab
Copy link
Copy Markdown
Owner

Task 1 of 7-task Physics-Invariant Rocketization Protocol. Extends substrate-gate integration from one comfortable baseline to 10 deterministic boundary-adjacent cases.

# Case Mutation Expected
1 near_zero_positive_energy E=1e-30 J admissible (no NaN/Inf)
2 near_zero_positive_radius R=1e-30 m admissible
3 very_large_radius_finite_energy R=1e10 m, E=1 J admissible (no overflow)
4 bekenstein_just_below_bound claim = ceiling × 0.999999 admissible
5 bekenstein_exactly_at_boundary claim = ceiling admissible (<= boundary)
6 bekenstein_just_above_bound claim = ceiling × 1.000001 inadmissible
7 arrow_net_exactly_zero ΔS=-1, ΔI=+1 (Maxwell demon) admissible
8 arrow_net_just_below_zero ΔS=-1, ΔI=+0.999999 inadmissible
9 bandwidth_gamma_equals_sigma_dot Γ=Σ̇=5 bandwidth admissible; ANCHORED unaffected
10 bandwidth_gamma_just_above Γ=5.01, Σ̇=5 bandwidth fails; ANCHORED STILL admissible (tier separation)

11/11 PASS (10 cases + 1 enumeration sanity-check). Quality gates clean. No Hypothesis (per protocol §4).

…stic cases (Task 1)

Extends test_substrate_gate_chain.py from one comfortable baseline to
deterministic boundary-adjacent regions. Each case named, mutation
documented, expected verdict mapped to a specific invariant contract
anchored on actual module source.

Cases (10 deterministic, 1 enumeration sanity = 11 total):
  Bekenstein/gate (6):
    1. near_zero_positive_energy        — E=1e-30 J, no NaN/Inf
    2. near_zero_positive_radius        — R=1e-30 m, ceiling ≈ 0
    3. very_large_radius_finite_energy  — R=1e10 m, E=1 J, no overflow
    4. bekenstein_just_below_bound      — claim = ceiling × 0.999999
    5. bekenstein_exactly_at_boundary   — claim = ceiling (`<=` admissible)
    6. bekenstein_just_above_bound      — claim = ceiling × 1.000001
  Arrow (2):
    7. arrow_net_exactly_zero           — ΔS=-1, ΔI=+1 (`>=` admissible)
    8. arrow_net_just_below_zero        — ΔS=-1, ΔI=+0.999999
  Bandwidth (2):
    9. bandwidth_gamma_equals_sigma_dot — Γ=Σ̇=5 (`>=` admissible);
                                         ANCHORED gate unaffected (tier separation)
   10. bandwidth_gamma_just_above       — Γ=5.01, Σ̇=5;
                                         ANCHORED gate STILL admissible

Boundary semantics anchored from source:
  - bekenstein_axis_holds: observed_information_bits <= ceiling
    (anchored_substrate_gate.py)
  - arrow_axis_holds: net >= 0.0
    (arrow_of_time.assess_arrow_of_time)
  - bandwidth_holds: slack_hz = bound_hz - rate_hz >= 0.0
    (observer_bandwidth.assess_bandwidth_bound)

Each case asserts: bekenstein verdict, arrow verdict, composite
verdict. Bandwidth cases additionally assert tier separation —
SPECULATIVE bandwidth violation does NOT veto ANCHORED composite.

Quality gates:
  pytest tests/integration/test_substrate_gate_boundary_sweep.py
                                                11/11 PASS in 0.31s
  pytest chain + boundary suites               17/17 PASS
  ruff check / format / black                  clean (one I001 auto-fix for import sorting)
  mypy --strict                                clean (1 file, 0 issues)

No Hypothesis (deterministic boundary table per protocol §4 — property
layer is post-T1 optional). No randomness. No mocks. Same fixture
style as substrate-gate-chain test (PR #425).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

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

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: 6b35896c38

ℹ️ 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 on lines +317 to +321
assert len(expected) == 10
# Smoke: each name is a valid identifier (catches typos / accidental empty
# names in parametrize tables when refactored).
for name in expected:
assert name and name.replace("_", "").isalnum()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate boundary-case inventory against test parametrizations

This "coverage assertion" only checks properties of the local expected literal (len == 10 and identifier formatting) and never compares those names to the actual @pytest.mark.parametrize case tables, so removing or renaming a real boundary case in the parametrized tests will still pass here and silently weaken coverage while the protocol claim remains green. Because this test is intended to prevent silent case removal, it currently provides a false guarantee.

Useful? React with 👍 / 👎.

@neuron7xLab neuron7xLab merged commit 8499183 into main Apr 26, 2026
12 checks passed
@neuron7xLab neuron7xLab deleted the fix/physics-boundary-sweep branch April 26, 2026 11:43
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