Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/ci/runtime_intelligence_gitlab_artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ The handoff gate also compares Orchestrator operation risk rollup and operation
timeline summary run IDs against the preserved EdgeEnv regression context, so
compact AIGuard operation evidence remains traceable to producer-side
Orchestrator context.
It additionally requires AIGuard's EdgeEnv handoff alignment artifact to carry
matching policy-pressure summary run IDs from the EdgeEnv handoff and the
`guard_analysis` raw context, keeping policy-pressure review evidence tied back
to the same candidate run without moving deployment ownership away from Lab.

The artifact gate is implemented by `scripts/check_runtime_intelligence_artifact_bundle.py`. It checks the generated Markdown / HTML report for the required Runtime Intelligence rows, including the short `Review Path` section, the `Review path` note, the `Reviewer Focus` quick-scan table, Lab ownership, EdgeEnv comparability, `EdgeEnv fixture matrix coverage`, telemetry coverage-gap markers, Runtime replay duration scope with `source=entrypoint_requested_frames` traceability, Orchestrator operation feed context, the Lab-owned `Reviewer operation quick scan` row, compact queue/deadline/fallback operation markers with `max_total_queue_depth`, AIGuard max queue raw-context traceability, Orchestrator task event rollup, Lab EdgeEnv preservation context, Jetson/device-local preservation identity and detail labels, Orchestrator `operation_risk_summary` navigation context, AIGuard runtime operation anomalies, AIGuard `edgeenv_orchestrator_operation_risk_summary` evidence, AIGuard `edgeenv_orchestrator_operation_risk_rollup` evidence, AIGuard `edgeenv_orchestrator_task_event_rollup` evidence, AIGuard `edgeenv_orchestrator_operation_timeline_summary` evidence, AIGuard `edgeenv_orchestrator_scheduler_fairness_summary` evidence, AIGuard `edgeenv_orchestrator_policy_pressure_summary` evidence, remote dispatch starter event summary, `Remote fallback starter evidence`, `edgeenv_orchestrator_producer_lineage`, `runtime_history_seed_run_config_traceability`, `remote_execution_recovered_by_fallback`, and triggered deployment review rules.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@
"edgeenv-smoke-candidate",
"edgeenv-smoke-missing"
],
"handoff_policy_pressure_summary_run_ids": [
"edgeenv-smoke-candidate"
],
"guard_analysis_policy_pressure_summary_run_ids": [
"edgeenv-smoke-candidate"
],
"policy_pressure_summary_errors": [],
"guard_alignment_summary_errors": [],
"errors": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ InferEdgeAIGuard EdgeEnv handoff alignment summary
- supplemental_guard_evidence_types: [edgeenv_orchestrator_operation_risk_summary]
- handoff_producer_lineage_guard_alignment_run_ids: [edgeenv-smoke-candidate, edgeenv-smoke-missing]
- guard_analysis_producer_lineage_guard_alignment_run_ids: [edgeenv-smoke-candidate, edgeenv-smoke-missing]
- handoff_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]
- guard_analysis_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]
```
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@
"edgeenv-smoke-candidate",
"edgeenv-smoke-missing"
],
"handoff_policy_pressure_summary_run_ids": [
"edgeenv-smoke-candidate"
],
"guard_analysis_policy_pressure_summary_run_ids": [
"edgeenv-smoke-candidate"
],
"policy_pressure_summary_errors": [],
"guard_alignment_summary_errors": [],
"errors": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,6 @@ InferEdgeAIGuard EdgeEnv handoff alignment summary
- supplemental_guard_evidence_types: [edgeenv_orchestrator_operation_risk_summary, edgeenv_orchestrator_stale_drop_summary, stale_frame_risk]
- handoff_producer_lineage_guard_alignment_run_ids: [edgeenv-smoke-candidate, edgeenv-smoke-missing]
- guard_analysis_producer_lineage_guard_alignment_run_ids: [edgeenv-smoke-candidate, edgeenv-smoke-missing]
- handoff_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]
- guard_analysis_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]
```
24 changes: 24 additions & 0 deletions scripts/check_runtime_intelligence_ci_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@
"edgeenv-smoke-candidate",
"edgeenv-smoke-missing",
]
REQUIRED_AIGUARD_POLICY_PRESSURE_RUN_IDS = [
"edgeenv-smoke-candidate",
]
REQUIRED_AIGUARD_OPTIONAL_EVIDENCE_TYPES = [
"stale_frame_risk",
"edgeenv_orchestrator_stale_drop_summary",
Expand Down Expand Up @@ -510,6 +513,23 @@ def _validate_aiguard_handoff_alignment(
errors,
"AIGuard alignment guard_analysis run IDs must match EdgeEnv summary",
)
_record(
payload.get("handoff_policy_pressure_summary_run_ids")
== REQUIRED_AIGUARD_POLICY_PRESSURE_RUN_IDS,
errors,
"AIGuard alignment handoff policy-pressure run IDs must match EdgeEnv summary",
)
_record(
payload.get("guard_analysis_policy_pressure_summary_run_ids")
== REQUIRED_AIGUARD_POLICY_PRESSURE_RUN_IDS,
errors,
"AIGuard alignment guard_analysis policy-pressure run IDs must match EdgeEnv summary",
)
_record(
payload.get("policy_pressure_summary_errors") == [],
errors,
"AIGuard alignment policy_pressure_summary_errors must be empty",
)
_record(
payload.get("guard_alignment_summary_errors") == [],
errors,
Expand Down Expand Up @@ -568,6 +588,10 @@ def _validate_aiguard_handoff_alignment(
"[edgeenv-smoke-candidate, edgeenv-smoke-missing]",
"guard_analysis_producer_lineage_guard_alignment_run_ids: "
"[edgeenv-smoke-candidate, edgeenv-smoke-missing]",
"handoff_policy_pressure_summary_run_ids: "
"[edgeenv-smoke-candidate]",
"guard_analysis_policy_pressure_summary_run_ids: "
"[edgeenv-smoke-candidate]",
]
if expected_optional_present_source_artifact is not None:
expected_markers.append(
Expand Down
28 changes: 28 additions & 0 deletions tests/test_runtime_intelligence_ci_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p
'["edgeenv-smoke-candidate","edgeenv-smoke-missing"],'
'"guard_analysis_producer_lineage_guard_alignment_run_ids":'
'["edgeenv-smoke-candidate","edgeenv-smoke-missing"],'
'"handoff_policy_pressure_summary_run_ids":'
'["edgeenv-smoke-candidate"],'
'"guard_analysis_policy_pressure_summary_run_ids":'
'["edgeenv-smoke-candidate"],'
'"policy_pressure_summary_errors":[],'
'"guard_alignment_summary_errors":[],"errors":[]}',
encoding="utf-8",
)
Expand All @@ -332,6 +337,8 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p
"- missing_optional_evidence_types: [edgeenv_orchestrator_stale_drop_summary, stale_frame_risk]",
"- handoff_producer_lineage_guard_alignment_run_ids: [edgeenv-smoke-candidate, edgeenv-smoke-missing]",
"- guard_analysis_producer_lineage_guard_alignment_run_ids: [edgeenv-smoke-candidate, edgeenv-smoke-missing]",
"- handoff_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]",
"- guard_analysis_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]",
]
),
encoding="utf-8",
Expand Down Expand Up @@ -395,6 +402,11 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p
'["edgeenv-smoke-candidate","edgeenv-smoke-missing"],'
'"guard_analysis_producer_lineage_guard_alignment_run_ids":'
'["edgeenv-smoke-candidate","edgeenv-smoke-missing"],'
'"handoff_policy_pressure_summary_run_ids":'
'["edgeenv-smoke-candidate"],'
'"guard_analysis_policy_pressure_summary_run_ids":'
'["edgeenv-smoke-candidate"],'
'"policy_pressure_summary_errors":[],'
'"guard_alignment_summary_errors":[],"errors":[]}',
encoding="utf-8",
)
Expand All @@ -418,6 +430,8 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p
"- optional_present_reproduction_command: python -m inferedge_aiguard.cli build-runtime-intelligence-optional-stale-drop --edgeenv-regression examples/runtime_intelligence/edgeenv_runtime_regression_with_optional_stale_drop_context.json --remote-dispatch examples/runtime_intelligence/remote_dispatch_fallback_recovered_result.json --orchestration-summary examples/runtime_intelligence/orchestrator_multi_workload_sustained_summary.json --save-json examples/runtime_intelligence/aiguard_runtime_operation_guard_analysis_optional_stale_drop.json",
"- handoff_producer_lineage_guard_alignment_run_ids: [edgeenv-smoke-candidate, edgeenv-smoke-missing]",
"- guard_analysis_producer_lineage_guard_alignment_run_ids: [edgeenv-smoke-candidate, edgeenv-smoke-missing]",
"- handoff_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]",
"- guard_analysis_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]",
]
),
encoding="utf-8",
Expand Down Expand Up @@ -774,6 +788,11 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_missing_lab_marker_cont
'["edgeenv-smoke-candidate","edgeenv-smoke-missing"],'
'"guard_analysis_producer_lineage_guard_alignment_run_ids":'
'["edgeenv-smoke-candidate","edgeenv-smoke-missing"],'
'"handoff_policy_pressure_summary_run_ids":'
'["edgeenv-smoke-candidate"],'
'"guard_analysis_policy_pressure_summary_run_ids":'
'["edgeenv-smoke-candidate"],'
'"policy_pressure_summary_errors":[],'
'"guard_alignment_summary_errors":[],"errors":[]}',
encoding="utf-8",
)
Expand All @@ -785,6 +804,8 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_missing_lab_marker_cont
"- diagnosis_owner: aiguard",
"- handoff_producer_lineage_guard_alignment_run_ids: edgeenv-smoke-candidate, edgeenv-smoke-missing",
"- guard_analysis_producer_lineage_guard_alignment_run_ids: edgeenv-smoke-candidate, edgeenv-smoke-missing",
"- handoff_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]",
"- guard_analysis_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]",
]
),
encoding="utf-8",
Expand Down Expand Up @@ -1179,6 +1200,11 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_failed_deployment_risk(
'["edgeenv-smoke-candidate","edgeenv-smoke-missing"],'
'"guard_analysis_producer_lineage_guard_alignment_run_ids":'
'["edgeenv-smoke-candidate","edgeenv-smoke-missing"],'
'"handoff_policy_pressure_summary_run_ids":'
'["edgeenv-smoke-candidate"],'
'"guard_analysis_policy_pressure_summary_run_ids":'
'["edgeenv-smoke-candidate"],'
'"policy_pressure_summary_errors":[],'
'"guard_alignment_summary_errors":[],"errors":[]}',
encoding="utf-8",
)
Expand All @@ -1193,6 +1219,8 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_failed_deployment_risk(
"- aiguard_validates_expected_report_markers: False",
"- handoff_producer_lineage_guard_alignment_run_ids: edgeenv-smoke-candidate, edgeenv-smoke-missing",
"- guard_analysis_producer_lineage_guard_alignment_run_ids: edgeenv-smoke-candidate, edgeenv-smoke-missing",
"- handoff_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]",
"- guard_analysis_policy_pressure_summary_run_ids: [edgeenv-smoke-candidate]",
]
),
encoding="utf-8",
Expand Down
22 changes: 22 additions & 0 deletions tests/test_runtime_intelligence_smoke_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ def test_runtime_intelligence_smoke_script_runs_artifact_chain(tmp_path):
"edgeenv_orchestrator_stale_drop_summary",
"stale_frame_risk",
]
assert alignment_payload["handoff_policy_pressure_summary_run_ids"] == [
"edgeenv-smoke-candidate"
]
assert alignment_payload[
"guard_analysis_policy_pressure_summary_run_ids"
] == ["edgeenv-smoke-candidate"]
assert alignment_payload["policy_pressure_summary_errors"] == []
assert "status: passed" in alignment_summary
assert "decision_owner: lab" in alignment_summary
assert "diagnosis_owner: aiguard" in alignment_summary
Expand Down Expand Up @@ -195,6 +202,14 @@ def test_runtime_intelligence_smoke_script_runs_artifact_chain(tmp_path):
"guard_analysis_producer_lineage_guard_alignment_run_ids: "
"[edgeenv-smoke-candidate, edgeenv-smoke-missing]"
) in alignment_summary
assert (
"handoff_policy_pressure_summary_run_ids: "
"[edgeenv-smoke-candidate]"
) in alignment_summary
assert (
"guard_analysis_policy_pressure_summary_run_ids: "
"[edgeenv-smoke-candidate]"
) in alignment_summary
optional_present_summary = (
output_dir / "aiguard_edgeenv_handoff_alignment_optional_present.md"
).read_text(encoding="utf-8")
Expand All @@ -219,6 +234,13 @@ def test_runtime_intelligence_smoke_script_runs_artifact_chain(tmp_path):
"stale_frame_risk",
]
assert optional_present_payload["missing_optional_evidence_types"] == []
assert optional_present_payload["handoff_policy_pressure_summary_run_ids"] == [
"edgeenv-smoke-candidate"
]
assert optional_present_payload[
"guard_analysis_policy_pressure_summary_run_ids"
] == ["edgeenv-smoke-candidate"]
assert optional_present_payload["policy_pressure_summary_errors"] == []
assert optional_present_payload["optional_present_source_artifact"] == {
"repository": "InferEdgeAIGuard",
"path": (
Expand Down
Loading