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
7 changes: 6 additions & 1 deletion docs/ci/runtime_intelligence_gitlab_artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,12 @@ path. A companion
`aiguard_edgeenv_handoff_alignment_optional_present.json/.md` fixture exercises
the same optional labels when they are present, proving the gate can record
`optional_guard_evidence_types_present` without promoting those labels to
required deployment-decision evidence.
required deployment-decision evidence. That optional-present fixture also
records the source as
`InferEdgeAIGuard/examples/runtime_intelligence/aiguard_runtime_operation_guard_analysis_optional_stale_drop.json`
so reviewers can trace Lab's optional-present handoff fixture back to the
AIGuard full-evidence example without making that cross-repo path a required
runtime contract.

Remote dispatch rows in this artifact chain are starter evidence only. The
gates require worker-selection, fallback recovery, event-count, consistency,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
"stale_frame_risk"
],
"missing_optional_evidence_types": [],
"optional_present_source_artifact": {
"repository": "InferEdgeAIGuard",
"path": "examples/runtime_intelligence/aiguard_runtime_operation_guard_analysis_optional_stale_drop.json",
"schema_version": "inferedge-aiguard-diagnosis-v1",
"role": "aiguard-optional-stale-drop-full-evidence-source",
"context_role": "read_only_cross_repo_traceability"
},
"supplemental_guard_evidence_types": [
"edgeenv_orchestrator_operation_risk_summary",
"edgeenv_orchestrator_stale_drop_summary",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
| missing_required_evidence_types | [] |
| optional_guard_evidence_types_present | edgeenv_orchestrator_stale_drop_summary, stale_frame_risk |
| missing_optional_evidence_types | [] |
| optional_present_source_artifact | InferEdgeAIGuard/examples/runtime_intelligence/aiguard_runtime_operation_guard_analysis_optional_stale_drop.json |
| supplemental_guard_evidence_types | edgeenv_orchestrator_operation_risk_summary, edgeenv_orchestrator_stale_drop_summary, stale_frame_risk |
| lab_expected_report_markers | Runtime Intelligence Risk Summary, Runtime replay duration scope, Orchestrator operation feed context, EdgeEnv fixture matrix coverage, Reviewer operation quick scan, Orchestrator task event rollup, Lab EdgeEnv preservation context, AIGuard operation risk rollup evidence, AIGuard task event rollup evidence, AIGuard operation timeline evidence, AIGuard runtime operation anomalies, AIGuard remote dispatch event summary, AIGuard remote event summary consistency, Remote fallback starter evidence, lab=Remote fallback starter evidence; evidence=remote_execution_recovered_by_fallback, AIGuard producer-lineage guard alignment, Lab remains the final deployment decision owner. |
| handoff_duration_sources | [] |
Expand Down Expand Up @@ -56,6 +57,7 @@ InferEdgeAIGuard EdgeEnv handoff alignment summary
- missing_required_evidence_types: []
- optional_guard_evidence_types_present: [edgeenv_orchestrator_stale_drop_summary, stale_frame_risk]
- missing_optional_evidence_types: []
- optional_present_source_artifact: InferEdgeAIGuard/examples/runtime_intelligence/aiguard_runtime_operation_guard_analysis_optional_stale_drop.json
- 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]
Expand Down
37 changes: 35 additions & 2 deletions scripts/check_runtime_intelligence_ci_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,20 @@
"edgeenv_orchestrator_stale_drop_summary",
"stale_frame_risk",
]
REQUIRED_AIGUARD_OPTIONAL_PRESENT_SOURCE_ARTIFACT = {
"repository": "InferEdgeAIGuard",
"path": (
"examples/runtime_intelligence/"
"aiguard_runtime_operation_guard_analysis_optional_stale_drop.json"
),
"schema_version": "inferedge-aiguard-diagnosis-v1",
"role": "aiguard-optional-stale-drop-full-evidence-source",
"context_role": "read_only_cross_repo_traceability",
}
REQUIRED_AIGUARD_OPTIONAL_PRESENT_SOURCE_ARTIFACT_MARKER = (
"InferEdgeAIGuard/examples/runtime_intelligence/"
"aiguard_runtime_operation_guard_analysis_optional_stale_drop.json"
)
REQUIRED_AIGUARD_OPTIONAL_CONTEXT_SUMMARY_MARKERS = (
"## Validated AIGuard Optional Handoff Context",
"aiguard_optional_context: read_only_optional_guard_context preserved",
Expand All @@ -119,6 +133,8 @@
"aiguard_missing_optional_types: edgeenv_orchestrator_stale_drop_summary, stale_frame_risk",
"aiguard_optional_present_types: edgeenv_orchestrator_stale_drop_summary, stale_frame_risk",
"aiguard_optional_present_missing_types: none",
"aiguard_optional_present_source_artifact: "
f"{REQUIRED_AIGUARD_OPTIONAL_PRESENT_SOURCE_ARTIFACT_MARKER}",
)
REQUIRED_DURATION_TRACEABILITY_SUMMARY_MARKERS = (
"## Validated Duration Traceability",
Expand Down Expand Up @@ -312,6 +328,7 @@ def _validate_aiguard_handoff_alignment(
*,
expected_optional_guard_evidence_types_present: list[str] | None = None,
expected_missing_optional_evidence_types: list[str] | None = None,
expected_optional_present_source_artifact: dict[str, str] | None = None,
) -> None:
expected_optional_guard_evidence_types_present = (
expected_optional_guard_evidence_types_present
Expand Down Expand Up @@ -401,6 +418,13 @@ def _validate_aiguard_handoff_alignment(
errors,
"aiguard_edgeenv_handoff_alignment.json invalid_optional_evidence_types must be empty",
)
if expected_optional_present_source_artifact is not None:
_record(
payload.get("optional_present_source_artifact")
== expected_optional_present_source_artifact,
errors,
"aiguard_edgeenv_handoff_alignment.json optional-present source artifact must point to the AIGuard full evidence example",
)
_record(
payload.get("lab_expected_report_marker_count")
== len(REQUIRED_LAB_EXPECTED_REPORT_MARKERS),
Expand Down Expand Up @@ -448,7 +472,7 @@ def _validate_aiguard_handoff_alignment(
expected_missing_marker = _format_markdown_inline_list(
expected_missing_optional_evidence_types
)
for marker in (
expected_markers = [
"status: passed",
"decision_owner: lab",
"diagnosis_owner: aiguard",
Expand Down Expand Up @@ -481,7 +505,13 @@ 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]",
):
]
if expected_optional_present_source_artifact is not None:
expected_markers.append(
"optional_present_source_artifact: "
f"{REQUIRED_AIGUARD_OPTIONAL_PRESENT_SOURCE_ARTIFACT_MARKER}"
)
for marker in expected_markers:
_record(
marker in text,
errors,
Expand Down Expand Up @@ -567,6 +597,9 @@ def main(report_dir: str, summary_out: str = "") -> int:
REQUIRED_AIGUARD_PRESENT_OPTIONAL_EVIDENCE_TYPES
),
expected_missing_optional_evidence_types=[],
expected_optional_present_source_artifact=(
REQUIRED_AIGUARD_OPTIONAL_PRESENT_SOURCE_ARTIFACT
),
)
_validate_runtime_report(report_path / "runtime_anomaly_summary.md", errors)
_validate_portfolio_status(report_path / "portfolio_demo_check.json", errors)
Expand Down
13 changes: 13 additions & 0 deletions tests/test_runtime_intelligence_ci_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p
'"optional_guard_evidence_types_present":'
'["edgeenv_orchestrator_stale_drop_summary","stale_frame_risk"],'
'"missing_optional_evidence_types":[],'
'"optional_present_source_artifact":{'
'"repository":"InferEdgeAIGuard",'
'"path":"examples/runtime_intelligence/aiguard_runtime_operation_guard_analysis_optional_stale_drop.json",'
'"schema_version":"inferedge-aiguard-diagnosis-v1",'
'"role":"aiguard-optional-stale-drop-full-evidence-source",'
'"context_role":"read_only_cross_repo_traceability"},'
'"invalid_optional_evidence_types":[],'
'"handoff_producer_lineage_guard_alignment_run_ids":'
'["edgeenv-smoke-candidate","edgeenv-smoke-missing"],'
Expand All @@ -361,6 +367,7 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p
"- optional_aiguard_evidence_types: [stale_frame_risk, edgeenv_orchestrator_stale_drop_summary]",
"- optional_guard_evidence_types_present: [edgeenv_orchestrator_stale_drop_summary, stale_frame_risk]",
"- missing_optional_evidence_types: []",
"- optional_present_source_artifact: InferEdgeAIGuard/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]",
]
Expand Down Expand Up @@ -442,6 +449,12 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p
in summary
)
assert "aiguard_optional_present_missing_types: none" in summary
assert (
"aiguard_optional_present_source_artifact: "
"InferEdgeAIGuard/examples/runtime_intelligence/"
"aiguard_runtime_operation_guard_analysis_optional_stale_drop.json"
in summary
)

(report_dir / "runtime_anomaly_gate_summary.md").write_text(
"- Status: passed\n",
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 @@ -212,12 +212,28 @@ 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["optional_present_source_artifact"] == {
"repository": "InferEdgeAIGuard",
"path": (
"examples/runtime_intelligence/"
"aiguard_runtime_operation_guard_analysis_optional_stale_drop.json"
),
"schema_version": "inferedge-aiguard-diagnosis-v1",
"role": "aiguard-optional-stale-drop-full-evidence-source",
"context_role": "read_only_cross_repo_traceability",
}
assert (
"optional_guard_evidence_types_present: "
"[edgeenv_orchestrator_stale_drop_summary, stale_frame_risk]"
in optional_present_summary
)
assert "missing_optional_evidence_types: []" in optional_present_summary
assert (
"optional_present_source_artifact: "
"InferEdgeAIGuard/examples/runtime_intelligence/"
"aiguard_runtime_operation_guard_analysis_optional_stale_drop.json"
in optional_present_summary
)

ci_summary = (
output_dir / "runtime_intelligence_ci_artifact_gate_summary.md"
Expand Down Expand Up @@ -245,6 +261,12 @@ def test_runtime_intelligence_smoke_script_runs_artifact_chain(tmp_path):
in ci_summary
)
assert "aiguard_optional_present_missing_types: none" in ci_summary
assert (
"aiguard_optional_present_source_artifact: "
"InferEdgeAIGuard/examples/runtime_intelligence/"
"aiguard_runtime_operation_guard_analysis_optional_stale_drop.json"
in ci_summary
)
assert "## Validated Duration Traceability" in ci_summary
assert (
"duration_handoff_alignment: EdgeEnv/AIGuard report context preserved"
Expand Down
Loading