Merge pull request 'fix(tests): evolve P12 anti-self-Accept guard for the ratified state' (#47) from fix/governance-p12-post-ratification into main
Some checks failed
full-pytest / fast pytest (-m "not quarantine and not slow" -n 2) (push) Has been cancelled
lane-shas / verify pinned lane SHAs (push) Has been cancelled

Reviewed-on: #47
This commit is contained in:
Joshua Matthew-Catudio Shay 2026-07-16 13:54:04 +00:00
commit 56e55e6eb1
3 changed files with 33 additions and 10 deletions

View file

@ -10,7 +10,7 @@ Base: `forgejo/main` @ `54228d45`
|------|---------|--------|
| Fast | `pytest -m "not quarantine and not slow" -n auto -q` | **5 failed**, 11660 passed, 106 skipped (pre-fix) |
| Fast recheck | same after fix | (see verification below) |
| Slow | `pytest -m "slow and not quarantine" -n auto -q` | running / recorded at PR time |
| Slow | `pytest -m "slow and not quarantine" -n auto -q` | **1 failed, 909 passed, 1 skipped, 1 xfailed** (37m06s, 2026-07-15 sweep @ `8f67590d`+#47). The 1 red = `test_public_showcase.py::TestRuntimeBudget` — stale constant pin (30) vs the deliberate 640dbe8f re-budget (60); fixed alongside this row. Slow lane is otherwise clean → the historical "~31 reds" figure is fully retired. |
| Full | `pytest -m "not quarantine"` | union of fast + slow |
The briefs “~31 reds” appears to reflect an older main tip. On current `forgejo/main`, the **non-quarantine fast lane** surfaces **exactly 5** dedicated failures. Smoke/pack/lane gates stay green because they never execute these nodes.

View file

@ -4,7 +4,8 @@ Does not re-execute the full physics suite. Asserts the load-bearing
governance surfaces for ADR-0241/0242 cohesion remain present and honest:
* runtime_contracts documents off-serve quarantine + epistemic standing
* acceptance checklist maps C0C8 to tests
* ADRs stay Proposed (ready for Joshua) not self-Accepted
* ADR statuses carry recorded ruling provenance (ratified 2026-07-15;
a silent status flip in either direction fails)
* cohesion suite still names I-01I-05 pins
"""
@ -82,21 +83,37 @@ def test_cohesion_suite_names_entity_invariants():
assert name in text, f"missing entity pin {name}"
def test_adrs_ready_for_acceptance_not_self_accepted():
"""P12: implementation complete → Proposed + ready; Joshua alone Accepts."""
def test_adrs_accepted_with_recorded_ruling_provenance():
"""P12 (post-ratification): status flips are valid ONLY with provenance.
Joshua Shay ruled "Ratify" on 2026-07-15 (D10 acceptance packet §8), so
the anti-self-Accept guard evolves rather than dies: each ADR must say
Accepted WITH the ratification provenance inline, and the packet must
carry the ruling record. A silent status flip in either direction an
Accept without provenance, or a quiet demotion fails here.
"""
packet = (
_ROOT / "docs/audit/adr-0241-0242-acceptance-packet-2026-07-15.md"
).read_text(encoding="utf-8")
assert "## 8. RULING RECORD" in packet, "ruling record section missing"
assert "RATIFIED — Joshua Shay, 2026-07-15" in packet, "ruling attribution missing"
for rel in (
"docs/adr/ADR-0241-wave-field-driven-hyperbolic-atlas-and-resonant-cognition.md",
"docs/adr/ADR-0242-atlas-packing-and-fibonacci.md",
):
text = (_ROOT / rel).read_text(encoding="utf-8")
# First status line must remain Proposed until human Accept.
status_line = next(
(ln for ln in text.splitlines() if ln.startswith("**Status**")),
"",
)
assert "Proposed" in status_line, f"{rel} lost Proposed status"
assert "Accepted" not in status_line, f"{rel} must not self-Accept"
assert "Joshua" in status_line or "ready" in status_line.lower()
assert "Accepted" in status_line, f"{rel} lost Accepted status"
assert "ratified by Joshua Shay" in status_line, (
f"{rel} status lacks ratification provenance"
)
assert "acceptance-packet" in status_line, (
f"{rel} status must cite the ruling packet"
)
def test_serve_quarantine_list_matches_cohesion_ast_pin():

View file

@ -162,5 +162,11 @@ class TestPureCompositionGate:
class TestRuntimeBudget:
def test_budget_is_thirty_seconds(self) -> None:
assert MAX_RUNTIME_SECONDS == 30
def test_budget_is_sixty_seconds(self) -> None:
# 30 → 60 was a deliberate re-budget (commit 640dbe8f: post-CGA
# substrate work makes a cold RegisterTour alone ~30s+; see
# evals/public_demo/contract.md "Known Environment Caveat"). This slow
# pin was missed then because the slow lane hadn't been run since
# (nightly lives on the billing-locked GitHub side) — caught by the
# 2026-07 slow-lane sweep. Pin the deliberate value.
assert MAX_RUNTIME_SECONDS == 60