Merge remote-tracking branch 'origin/main' into codex/sre-typed-automation-20260715

This commit is contained in:
ogt
2026-07-15 12:18:03 +08:00
7 changed files with 231 additions and 10 deletions

View File

@@ -52,6 +52,32 @@ def test_catalog_contains_exact_12_products_and_explicit_missing_rows() -> None:
"tool_output_contains_cross_tool_prompt_injection"
in capabilities["quarantine.agent-bounty-mcp"]["blockers"]
)
playwright = capabilities["external.playwright-verifier"]
assert playwright["compatibility_state"] == (
"protocol_schema_compatibility_verified"
)
assert playwright["replay_status"] == (
"completed_protocol_schema_replay_verified"
)
assert playwright["replay_protocol_version"] == "2025-06-18"
assert playwright["replay_tool_count"] == 24
assert playwright["replay_independent_verifier"] is True
assert playwright["replay_ephemeral_container_removed"] is True
assert playwright["replay_browser_started"] is False
assert playwright["replay_tool_call_performed"] is False
assert playwright["replay_external_rag_write_performed"] is False
assert playwright["replay_production_write_performed"] is False
assert playwright["replay_promotion_allowed"] is False
assert playwright["deployment_allowed"] is False
assert "compatibility_replay_not_executed" not in playwright["blockers"]
assert playwright["replay_audit_commit"] == (
"4a15edb8309a550b6d77f8c1f88b6b1203206045"
)
assert any(
"mcp-replay-receipts@4a15edb8309a550b6d77f8c1f88b6b1203206045"
in ref
for ref in playwright["evidence_refs"]
)
assert not any(
row["deployment_allowed"]
for row in catalog["capabilities"]
@@ -107,6 +133,29 @@ def test_catalog_rejects_external_deployment_without_immutable_receipts(
raise AssertionError("unsafe external deployment must be rejected")
def test_catalog_rejects_compatibility_replay_with_side_effect(
tmp_path: Path,
) -> None:
catalog = load_mcp_control_plane_catalog(_OPERATIONS_DIR)
playwright = next(
row
for row in catalog["capabilities"]
if row["capability_id"] == "external.playwright-verifier"
)
playwright["replay_tool_call_performed"] = True
(tmp_path / "mcp-control-plane-catalog.snapshot.json").write_text(
json.dumps(catalog),
encoding="utf-8",
)
try:
load_mcp_control_plane_catalog(tmp_path)
except ValueError as exc:
assert "no-browser, no-tool, no-write, and no-promotion" in str(exc)
else:
raise AssertionError("compatibility replay side effects must fail closed")
def test_overview_endpoint_returns_real_committed_catalog_without_runtime() -> None:
app = FastAPI()
app.include_router(router, prefix="/api/v1")
@@ -127,6 +176,16 @@ def test_overview_endpoint_returns_real_committed_catalog_without_runtime() -> N
data["operation_boundaries"]["operator_auth_required_for_future_mutation"]
is True
)
playwright = next(
row
for row in data["capabilities"]
if row["capability_id"] == "external.playwright-verifier"
)
assert playwright["replay_status"] == (
"completed_protocol_schema_replay_verified"
)
assert playwright["replay_run_id"] == "90d0515a-0812-4b04-9913-b210313accff"
assert playwright["deployment_allowed"] is False
def test_overview_promotes_durable_lifecycle_receipt_not_static_policy() -> None: