Files
aios/tests/platform/test_r2_review_guards.py
T
AIOS Governed Continuation 7e1649808d
autonomy-smoke-tests autonomy smoke tests PASS (A18-A23 staged-run authorized by Owner; G7 staging checks green)
autonomy-unit-tests R2 290/0 + G7 66/0 unit suites PASS
campaign-approval-gate OWNER APPROVAL — campaign approval gate PASS (Owner-authorized agent)
git-diff-check git diff --check clean (only patch-content artifact)
py-compile py_compile 71/71 PASS
reconciliation-contract reconciliation contract consistent (no drops, ChangeEnvelope verified)
release-state-machine release state machine advances to STAGING (authorized by Owner)
secret-scan secret scan 0 secrets PASS
signer-validator-contract signer-validator contract PASS (Owner-authorized)
feat(r2+g5): R2+R2.1 unified platform convergence candidate + G5 import/execution-mode fixes
R2+R2.1: task_plane lineage/auto-claim/autonomous-next-child/mission/legacy-attachment,
task_lineage + hooks/integration/taskplane-adapter, terminal proof, mission authority server,
job controller/admission live adapters (53 new + 7 modified).
G5 dependency/import closure: tests/conftest.py inject active-runtime root (app namespace)
alongside active-runtime/app (legacy aios_* imports); fix 3 real NameErrors in
test_autonomous_next_child.py (mod-qualified refs).
Working-tree subset 290 passed / 0 failed in supported run; overlay/stub + S3 live-binding pending env.
2026-09-14 22:33:41 +08:00

54 lines
2.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from __future__ import annotations
from pathlib import Path
import json
ROOT = Path(__file__).resolve().parents[2]
def test_gate_dag_is_acyclic_and_ordered():
doc = json.loads((ROOT / "docs/GATE_DAG_V2.json").read_text(encoding="utf-8"))
gates = [row["id"] for row in doc["gates"]]
assert gates == [
"REVIEW_READY",
"STAGING_ACTIVATION_READY",
"STAGING_ACCEPTED",
"PRODUCTION_ELIGIBLE",
"PRODUCTION_ACCEPTED",
"PROGRAM_COMPLETE",
]
index = {name: i for i, name in enumerate(gates)}
for row in doc["gates"]:
for dep in row["requires"]:
if dep in index:
assert index[dep] < index[row["id"]], (row["id"], dep)
def test_no_gate_requires_its_own_future_acceptance():
doc = json.loads((ROOT / "docs/GATE_DAG_V2.json").read_text(encoding="utf-8"))
prohibited = {
"REVIEW_READY": {"STAGING_ACCEPTED", "PRODUCTION_ACCEPTED", "PROGRAM_COMPLETE"},
"STAGING_ACTIVATION_READY": {"STAGING_ACCEPTED", "PRODUCTION_ACCEPTED", "PROGRAM_COMPLETE"},
"PRODUCTION_ELIGIBLE": {"PRODUCTION_ACCEPTED", "PROGRAM_COMPLETE"},
}
for row in doc["gates"]:
assert not (set(row["requires"]) & prohibited.get(row["id"], set()))
def test_schedulability_and_retry_governor_reuse_existing_canonical_contract():
sched = (ROOT / "active-runtime/app/task_plane/schedulability.py").read_text(encoding="utf-8")
retry = (ROOT / "scripts/platform/aios_retry_toil_governor.py").read_text(encoding="utf-8")
for text in (sched, retry):
assert "sort_keys=True" not in text
assert "separators=" not in text
assert "from .models import canonical_json" in sched
assert "from app.task_plane.models import canonical_json" in retry
def test_g0_partial_discovery_contract_is_documented():
text = (ROOT / "docs/G0_EVIDENCE_COVERAGE_V2.md").read_text(encoding="utf-8")
assert "PARTIAL_DISCOVERY" in text
assert "g0_exit_eligible=false" in text
assert "WP3–WP10" in text