|
19 | 19 | ) |
20 | 20 | from aces.core.runtime.registry import RuntimeTarget |
21 | 21 |
|
| 22 | +API_406_CARRIER_CONTRACTS = { |
| 23 | + "participant-lifecycle-event-v1", |
| 24 | + "participant-observation-envelope-v1", |
| 25 | + "participant-shared-state-record-v1", |
| 26 | +} |
| 27 | + |
22 | 28 |
|
23 | 29 | def test_fixture_suite_passes_for_orchestration_evaluation_profile(): |
24 | 30 | report = run_fixture_suite(profile=BackendCapabilityProfile.ORCHESTRATION_EVALUATION) |
@@ -61,6 +67,46 @@ def test_target_conformance_passes_for_stub_target(): |
61 | 67 | ) |
62 | 68 |
|
63 | 69 |
|
| 70 | +def test_full_remote_control_plane_profile_requires_api_406_carriers(): |
| 71 | + contracts = required_contracts(BackendCapabilityProfile.FULL_REMOTE_CONTROL_PLANE) |
| 72 | + |
| 73 | + assert contracts >= API_406_CARRIER_CONTRACTS |
| 74 | + assert { |
| 75 | + "runtime-snapshot-v1", |
| 76 | + "participant-episode-state-envelope-v1", |
| 77 | + "participant-episode-history-event-stream-v1", |
| 78 | + "participant-behavior-history-event-stream-v1", |
| 79 | + } <= contracts |
| 80 | + |
| 81 | + |
| 82 | +def test_fixture_suite_validates_api_406_carrier_fixtures(tmp_path: Path): |
| 83 | + backend_dir = tmp_path / "backend" |
| 84 | + backend_dir.mkdir() |
| 85 | + (backend_dir / "provisioning-only.json").write_text( |
| 86 | + json.dumps( |
| 87 | + { |
| 88 | + "schema_version": "backend-profile/v1", |
| 89 | + "profile": "provisioning-only", |
| 90 | + "required_contracts": sorted(API_406_CARRIER_CONTRACTS), |
| 91 | + } |
| 92 | + ) |
| 93 | + + "\n", |
| 94 | + encoding="utf-8", |
| 95 | + ) |
| 96 | + |
| 97 | + report = run_fixture_suite( |
| 98 | + profile=BackendCapabilityProfile.PROVISIONING_ONLY, |
| 99 | + profiles_root=backend_dir, |
| 100 | + ) |
| 101 | + |
| 102 | + assert report.passed is True |
| 103 | + assert {case.contract_name for case in report.cases} == API_406_CARRIER_CONTRACTS |
| 104 | + assert any(case.valid is False for case in report.cases) |
| 105 | + assert all( |
| 106 | + diagnostic.code != "conformance.contract-unknown" for case in report.cases for diagnostic in case.diagnostics |
| 107 | + ) |
| 108 | + |
| 109 | + |
64 | 110 | def test_profile_is_inferred_as_full_when_manifest_declares_participant_runtime(): |
65 | 111 | """RUN-311 — finding 3: a manifest that declares orchestrator, |
66 | 112 | evaluator, and participant_runtime must infer the |
@@ -701,6 +747,9 @@ def test_target_conformance_fails_when_declared_contracts_do_not_cover_profile_r |
701 | 747 | "participant-behavior-history-event-stream-v1", |
702 | 748 | "participant-episode-history-event-stream-v1", |
703 | 749 | "participant-episode-state-envelope-v1", |
| 750 | + "participant-lifecycle-event-v1", |
| 751 | + "participant-observation-envelope-v1", |
| 752 | + "participant-shared-state-record-v1", |
704 | 753 | "provisioning-plan-v1", |
705 | 754 | "runtime-snapshot-v1", |
706 | 755 | "workflow-history-event-stream-v1", |
|
0 commit comments