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
3 changes: 2 additions & 1 deletion docs/ci/runtime_intelligence_gitlab_artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ packaging runs. That marker set preserves `Runtime Intelligence Risk Summary`,
`AIGuard runtime operation anomalies`,
`AIGuard remote dispatch event summary`,
`AIGuard remote event summary consistency`,
`Remote fallback starter evidence`,
`AIGuard producer-lineage guard alignment`, and `Lab remains the final deployment decision owner.`.

The smoke also includes the precomputed AIGuard
Expand All @@ -180,7 +181,7 @@ EdgeEnv handoff summary and AIGuard deterministic evidence agree on
producer-lineage guard-alignment run IDs. This keeps the cross-repo marker
check file-based and does not make AIGuard a deployment decision owner.

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 Lab ownership, EdgeEnv comparability, telemetry coverage-gap markers, Orchestrator operation feed context, Orchestrator task event rollup, Lab EdgeEnv preservation context, Orchestrator `operation_risk_summary` navigation context, AIGuard runtime operation anomalies, AIGuard `edgeenv_orchestrator_operation_risk_summary` evidence, AIGuard `edgeenv_orchestrator_task_event_rollup` evidence, remote dispatch starter event summary, `edgeenv_orchestrator_producer_lineage`, `runtime_history_seed_run_config_traceability`, `remote_execution_recovered_by_fallback`, and triggered deployment review rules.
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 Lab ownership, EdgeEnv comparability, telemetry coverage-gap markers, Orchestrator operation feed context, Orchestrator task event rollup, Lab EdgeEnv preservation context, Orchestrator `operation_risk_summary` navigation context, AIGuard runtime operation anomalies, AIGuard `edgeenv_orchestrator_operation_risk_summary` evidence, AIGuard `edgeenv_orchestrator_task_event_rollup` 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.

The CI artifact gate is implemented by `scripts/check_runtime_intelligence_ci_artifacts.py`. It runs in the deployment-risk stage and verifies that the collected optional GitLab artifacts include the manifest gate summary, AIGuard handoff alignment artifact, report gate summary, Runtime Intelligence Risk Summary report, portfolio demo status, and the validated contract markers from the bundle manifest gate. This keeps the final CI gate file-based and deterministic without turning GitLab into a runtime control plane.
The same CI artifact gate also checks the copied
Expand Down
2 changes: 1 addition & 1 deletion docs/portfolio/edgeenv_runtime_regression_lab_handoff.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Expected Lab behavior:
- The same gate requires EdgeEnv-preserved Orchestrator producer markers to carry `source_repository=InferEdgeOrchestrator`, `artifact_role=orchestrator-supplemental-operation-context`, and `producer_contract=inferedge-orchestrator-edgeenv-runtime-telemetry-feed-v1`.
- When EdgeEnv preservation context is present, Lab renders `Lab EdgeEnv preservation context` with `lab_report_preservation_context_present=True`, `lab_preservation=present`, and `lab_context=present` so the Runtime Intelligence report gate and entrypoint evidence index use the same Lab-owned marker vocabulary.
- When an EdgeEnv handoff manifest is provided, the bundle gate requires EdgeEnv-produced file keys, external AIGuard file keys, source repository mapping, artifact roles, producer contracts, and boundary flags to match Lab's Runtime Intelligence bundle contract.
- The same manifest gate requires `expected_report_markers` to preserve these exact Lab-owned report markers: `Runtime Intelligence Risk Summary`, `Orchestrator operation feed context`, `Orchestrator task event rollup`, `Lab EdgeEnv preservation context`, `AIGuard task event rollup evidence`, `AIGuard runtime operation anomalies`, `AIGuard remote dispatch event summary`, `AIGuard remote event summary consistency`, `AIGuard producer-lineage guard alignment`, and `Lab remains the final deployment decision owner.`.
- The same manifest gate requires `expected_report_markers` to preserve these exact Lab-owned report markers: `Runtime Intelligence Risk Summary`, `Orchestrator operation feed context`, `Orchestrator task event rollup`, `Lab EdgeEnv preservation context`, `AIGuard task event rollup evidence`, `AIGuard runtime operation anomalies`, `AIGuard remote dispatch event summary`, `AIGuard remote event summary consistency`, `Remote fallback starter evidence`, `AIGuard producer-lineage guard alignment`, and `Lab remains the final deployment decision owner.`.
- The same handoff gate verifies that the referenced `runtime_telemetry_history` artifact exists and preserves EdgeEnv history schema, telemetry coverage, and Runtime history seed ownership markers.
- The same handoff gate verifies that missing telemetry entries remain evidence gaps while preserving Orchestrator producer markers, owner boundary flags, and EdgeEnv mapping hints when Orchestrator context is attached.
- The same handoff gate validates `edgeenv_report_summary.producer_lineage_guard_alignment_run_ids` against the preserved EdgeEnv regression context so the Orchestrator-declared `edgeenv_orchestrator_producer_lineage` marker cannot disappear between EdgeEnv producer output and Lab bundle ingestion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"guard_analysis_schema_version": "inferedge-aiguard-diagnosis-v1",
"required_evidence_type_count": 7,
"guard_evidence_type_count": 8,
"lab_expected_report_marker_count": 10,
"lab_expected_report_marker_count": 11,
"lab_expected_report_markers": [
"Runtime Intelligence Risk Summary",
"Orchestrator operation feed context",
Expand All @@ -18,6 +18,7 @@
"AIGuard runtime operation anomalies",
"AIGuard remote dispatch event summary",
"AIGuard remote event summary consistency",
"Remote fallback starter evidence",
"AIGuard producer-lineage guard alignment",
"Lab remains the final deployment decision owner."
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- recommendation: alignment_satisfied
- decision_owner: lab
- diagnosis_owner: aiguard
- lab_expected_report_markers: Runtime Intelligence Risk Summary, Orchestrator operation feed context, Orchestrator task event rollup, Lab EdgeEnv preservation context, AIGuard task event rollup evidence, AIGuard runtime operation anomalies, AIGuard remote dispatch event summary, AIGuard remote event summary consistency, AIGuard producer-lineage guard alignment, Lab remains the final deployment decision owner.
- lab_expected_report_markers: Runtime Intelligence Risk Summary, Orchestrator operation feed context, Orchestrator task event rollup, Lab EdgeEnv preservation context, AIGuard task event rollup evidence, AIGuard runtime operation anomalies, AIGuard remote dispatch event summary, AIGuard remote event summary consistency, Remote fallback starter evidence, AIGuard producer-lineage guard alignment, Lab remains the final deployment decision owner.
- report_marker_context_role: lab_report_contract_context
- aiguard_validates_expected_report_markers: False
- required_evidence_types: runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_task_event_rollup, runtime_history_seed_run_config_traceability, runtime_queue_overload, runtime_thermal_instability, remote_execution_recovered_by_fallback
Expand Down
1 change: 1 addition & 0 deletions examples/runtime_intelligence_chain/bundle_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"AIGuard runtime operation anomalies",
"AIGuard remote dispatch event summary",
"AIGuard remote event summary consistency",
"Remote fallback starter evidence",
"AIGuard producer-lineage guard alignment",
"Lab remains the final deployment decision owner."
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"AIGuard runtime operation anomalies",
"AIGuard remote dispatch event summary",
"AIGuard remote event summary consistency",
"Remote fallback starter evidence",
"AIGuard producer-lineage guard alignment",
"Lab remains the final deployment decision owner."
],
Expand Down
46 changes: 46 additions & 0 deletions inferedgelab/report/runtime_intelligence.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"remote_execution_starter_success",
REMOTE_RUNTIME_EVENT_SUMMARY_MISMATCH_EVIDENCE_TYPE,
}
REMOTE_FALLBACK_LAB_CONTEXT_LABEL = "Remote fallback starter evidence"

RUN_CONFIG_MARKER_FIELDS = (
"input_mode",
Expand Down Expand Up @@ -825,6 +826,19 @@ def _append_aiguard_remote_dispatch_rows(
)
)

fallback_context_label = _remote_fallback_lab_context_label(
remote_dispatch,
evidence_items,
)
if fallback_context_label:
rows.append(
(
REMOTE_FALLBACK_LAB_CONTEXT_LABEL,
fallback_context_label,
"Lab-facing remote fallback label matches the entrypoint registry while remaining starter-only review context.",
)
)

evidence_types = sorted(
{
str(item.get("type"))
Expand Down Expand Up @@ -954,6 +968,38 @@ def _remote_runtime_event_boundary_label(remote_dispatch: dict[str, Any]) -> str
return ", ".join(str(part) for part in parts)


def _remote_fallback_lab_context_label(
remote_dispatch: dict[str, Any],
evidence_items: list[dict[str, Any]],
) -> str:
evidence_type = "remote_execution_recovered_by_fallback"
evidence_types = {
str(item.get("type"))
for item in evidence_items
if item.get("type") in REMOTE_DISPATCH_EVIDENCE_TYPES
}
event_summary = remote_dispatch.get("remote_runtime_event_summary")
if not isinstance(event_summary, dict):
event_summary = {}

fallback_recovered = _first_present(
remote_dispatch.get("remote_runtime_event_summary_fallback_recovered"),
event_summary.get("fallback_recovered"),
remote_dispatch.get("fallback_recovered"),
)
fallback_final_status = _first_present(
remote_dispatch.get("fallback_final_status"),
event_summary.get("final_status"),
)
if (
evidence_type in evidence_types
or fallback_recovered is True
or str(fallback_final_status).lower() == "succeeded"
):
return f"lab={REMOTE_FALLBACK_LAB_CONTEXT_LABEL}; evidence={evidence_type}"
return ""


def _first_present(*values: Any) -> Any:
for value in values:
if value is not None:
Expand Down
7 changes: 7 additions & 0 deletions scripts/check_runtime_intelligence_artifact_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"production_remote_execution=False |"
),
"aiguard_remote_dispatch_evidence": "remote_execution_recovered_by_fallback",
"remote_fallback_lab_context": (
"| Remote fallback starter evidence | "
"lab=Remote fallback starter evidence; "
"evidence=remote_execution_recovered_by_fallback |"
),
"aiguard_orchestrator_handoff": (
"| AIGuard Orchestrator context handoff | feeds=2.0, candidate |"
),
Expand Down Expand Up @@ -124,6 +129,8 @@
"production_remote_execution=False"
),
"aiguard_remote_dispatch_evidence": "remote_execution_recovered_by_fallback",
"remote_fallback_lab_context": "Remote fallback starter evidence",
"remote_fallback_lab_context_marker": "lab=Remote fallback starter evidence",
"aiguard_orchestrator_handoff": "AIGuard Orchestrator context handoff",
"orchestrator_operation_risk_summary": "Orchestrator operation risk summary",
"orchestrator_task_event_rollup": "Orchestrator task event rollup",
Expand Down
1 change: 1 addition & 0 deletions scripts/check_runtime_intelligence_bundle_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"AIGuard runtime operation anomalies",
"AIGuard remote dispatch event summary",
"AIGuard remote event summary consistency",
"Remote fallback starter evidence",
"AIGuard producer-lineage guard alignment",
"Lab remains the final deployment decision owner.",
}
Expand Down
4 changes: 4 additions & 0 deletions scripts/check_runtime_intelligence_ci_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"AIGuard runtime operation anomalies",
"AIGuard remote dispatch event summary",
"AIGuard remote event summary consistency",
"Remote fallback starter evidence",
"AIGuard producer-lineage guard alignment",
"Lab remains the final deployment decision owner.",
)
Expand Down Expand Up @@ -164,6 +165,8 @@ def _validate_runtime_report(path: Path, errors: list[str]) -> None:
"runtime_history_seed_run_config_traceability",
"AIGuard remote dispatch event summary",
"remote_execution_recovered_by_fallback",
"Remote fallback starter evidence",
"lab=Remote fallback starter evidence",
"runtime_telemetry_field_gap",
"Inspect telemetry coverage missing fields",
"guard_warning_review",
Expand Down Expand Up @@ -287,6 +290,7 @@ def _validate_aiguard_handoff_alignment(
"AIGuard task event rollup evidence, "
"AIGuard runtime operation anomalies, AIGuard remote dispatch event summary, "
"AIGuard remote event summary consistency, "
"Remote fallback starter evidence, "
"AIGuard producer-lineage guard alignment, "
"Lab remains the final deployment decision owner.",
"report_marker_context_role: lab_report_contract_context",
Expand Down
7 changes: 7 additions & 0 deletions tests/test_report_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,11 @@ def test_generate_compare_markdown_summarizes_remote_runtime_event_summary():
"| AIGuard remote dispatch evidence | "
"remote_execution_recovered_by_fallback |"
) in text
assert (
"| Remote fallback starter evidence | "
"lab=Remote fallback starter evidence; "
"evidence=remote_execution_recovered_by_fallback |"
) in text
assert "Lab remains the final decision owner" in text


Expand Down Expand Up @@ -1177,6 +1182,8 @@ def test_generate_compare_html_summarizes_remote_runtime_event_summary():
assert "remote dispatch starter evidence only" in html
assert "production_remote_execution=False" in html
assert "remote_execution_recovered_by_fallback" in html
assert "Remote fallback starter evidence" in html
assert "lab=Remote fallback starter evidence" in html
assert "Lab remains the final decision owner" in html


Expand Down
Loading
Loading