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
1 change: 1 addition & 0 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ Runtime Intelligence report에서 읽어야 할 핵심 row:
- telemetry replay gap
- Runtime history seed `run_config` traceability
- Orchestrator device-local producer lineage
- Lab EdgeEnv preservation context marker
- AIGuard deterministic anomaly evidence
- Lab-owned deployment decision

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,12 @@ If AIGuard preserves EdgeEnv/Orchestrator `candidate_context.producer` lineage,

If EdgeEnv preserves an Orchestrator `operation_risk_summary`, Lab shows the compact queue-pressure, max-pressure task, worker-health, and producer/device-local event markers as navigation context in the Runtime Intelligence Risk Summary. These markers help reviewers find the relevant operation evidence, but they do not become EdgeEnv regression deltas, comparability fields, or a deployment decision override.

When the EdgeEnv preservation path is present, Lab also renders a `Lab EdgeEnv
preservation context` row with `lab_report_preservation_context_present=True`,
`lab_preservation=present`, and `lab_context=present`. This keeps Lab's
Runtime Intelligence artifact gate aligned with the entrypoint evidence index
without making EdgeEnv the deployment decision owner.

If the Orchestrator feed includes `runtime_task_event_summary`, Lab also renders a task-level event rollup showing which workload had scheduler delay, deadline misses, fallback decisions, or drop/policy reasons. This is report navigation context only; Lab still owns the deployment decision.

If AIGuard also emits `edgeenv_orchestrator_operation_risk_summary`, Lab renders that deterministic evidence as a separate operation-risk summary row. This keeps the AIGuard warning explanation visible while preserving Lab as the final deployment decision owner.
Expand All @@ -516,6 +522,7 @@ Markdown and HTML reports include a Runtime Intelligence Risk Summary that conne
- telemetry replay gaps
- Runtime history seed and run_config traceability
- Orchestrator operation risk summary markers
- Lab EdgeEnv preservation context markers
- device-local producer lineage handoff
- Orchestrator-declared downstream guard alignment
- remote dispatch starter boundary evidence
Expand Down
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 @@ -166,6 +166,7 @@ The same manifest gate requires `expected_report_markers` to match the
Lab-owned Runtime Intelligence report contract before optional CI artifact
packaging runs. That marker set preserves `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`,
Expand All @@ -179,7 +180,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, 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, `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
3 changes: 2 additions & 1 deletion docs/portfolio/edgeenv_runtime_regression_lab_handoff.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ Expected Lab behavior:
- The same gate requires Orchestrator's AIGuard evidence candidate hint to preserve `runtime_queue_overload` and `runtime_thermal_instability`, keeping runtime operation anomaly evidence deterministic and supplemental.
- The same gate requires Orchestrator candidate context to carry `run_id`, `telemetry_source`, `operation`, and `resource`, so Lab can verify handoff completeness without treating Orchestrator context as a regression judgement.
- 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`, `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`, `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,11 +8,12 @@
"guard_analysis_schema_version": "inferedge-aiguard-diagnosis-v1",
"required_evidence_type_count": 7,
"guard_evidence_type_count": 8,
"lab_expected_report_marker_count": 9,
"lab_expected_report_marker_count": 10,
"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",
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, 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, 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 @@ -49,6 +49,7 @@
"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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"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",
Expand Down
7 changes: 7 additions & 0 deletions inferedgelab/report/runtime_intelligence.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ def _append_telemetry_context_rows(
"Device-local or Jetson starter evidence is preserved through EdgeEnv for Lab review; Lab remains the final decision owner.",
)
)
rows.append(
(
"Lab EdgeEnv preservation context",
"lab_report_preservation_context_present=True; lab_preservation=present; lab_context=present",
"Lab-owned Runtime Intelligence gates use the same EdgeEnv preservation marker vocabulary as entrypoint evidence indexes.",
)
)

task_event_labels = _orchestrator_task_event_rollup_labels(telemetry_context)
if task_event_labels:
Expand Down
10 changes: 10 additions & 0 deletions scripts/check_runtime_intelligence_artifact_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
"vision_agent(delay=1,miss=1,max_delay_cycles=3,max_wait_ms=15,"
"policy=queue_backlog_threshold_exceeded:1)"
),
"lab_edgeenv_preservation_context": (
"| Lab EdgeEnv preservation context | "
"lab_report_preservation_context_present=True; "
"lab_preservation=present; lab_context=present |"
),
"aiguard_evidence": "| AIGuard deterministic evidence | warning / suspicious |",
"aiguard_operation_anomalies": (
"| AIGuard runtime operation anomalies | "
Expand Down Expand Up @@ -122,6 +127,11 @@
"aiguard_orchestrator_handoff": "AIGuard Orchestrator context handoff",
"orchestrator_operation_risk_summary": "Orchestrator operation risk summary",
"orchestrator_task_event_rollup": "Orchestrator task event rollup",
"lab_edgeenv_preservation_context": "Lab EdgeEnv preservation context",
"lab_edgeenv_preservation_context_marker": (
"lab_report_preservation_context_present=True"
),
"lab_edgeenv_registry_marker": "lab_preservation=present",
"orchestrator_operation_risk_queue": "queue=queue_backlog_threshold_exceeded",
"aiguard_producer_lineage_handoff": "AIGuard producer lineage handoff",
"aiguard_producer_lineage_evidence": "edgeenv_orchestrator_producer_lineage",
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 @@ -126,6 +126,7 @@
"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",
Expand Down
5 changes: 5 additions & 0 deletions scripts/check_runtime_intelligence_ci_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"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",
Expand Down Expand Up @@ -152,6 +153,9 @@ def _validate_runtime_report(path: Path, errors: list[str]) -> None:
"AIGuard operation risk summary evidence",
"edgeenv_orchestrator_operation_risk_summary",
"AIGuard task event rollup evidence",
"Lab EdgeEnv preservation context",
"lab_report_preservation_context_present=True",
"lab_preservation=present",
"edgeenv_orchestrator_task_event_rollup",
"Runtime telemetry coverage gaps",
"AIGuard producer-lineage guard alignment",
Expand Down Expand Up @@ -279,6 +283,7 @@ def _validate_aiguard_handoff_alignment(
"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, "
Expand Down
8 changes: 8 additions & 0 deletions tests/test_report_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,11 @@ def test_generate_compare_markdown_summarizes_orchestrator_context_risk():
"run=candidate, device_local_events=15, resource=tegrastats_timeline, "
"queue=queue_backlog_threshold_exceeded |"
) in text
assert (
"| Lab EdgeEnv preservation context | "
"lab_report_preservation_context_present=True; "
"lab_preservation=present; lab_context=present |"
) in text
assert "| Orchestrator task event rollup | candidate: " in text
assert "vision_agent(delay=1,miss=1,max_delay_cycles=3,max_wait_ms=15)" in text
assert (
Expand Down Expand Up @@ -1132,6 +1137,9 @@ def test_generate_compare_html_summarizes_orchestrator_context_risk():
assert "Orchestrator operation feed context" in html
assert "Orchestrator context attached runs" in html
assert "Jetson/device-local EdgeEnv preservation run" in html
assert "Lab EdgeEnv preservation context" in html
assert "lab_report_preservation_context_present=True" in html
assert "lab_preservation=present" in html
assert (
"candidate: run=candidate, device_local_events=15, "
"resource=tegrastats_timeline, queue=queue_backlog_threshold_exceeded"
Expand Down
27 changes: 27 additions & 0 deletions tests/test_runtime_intelligence_artifact_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,33 @@ def test_runtime_intelligence_artifact_gate_fails_when_run_config_traceability_i
assert "`aiguard_run_config_traceability_evidence`" in summary


def test_runtime_intelligence_artifact_gate_fails_when_lab_preservation_context_is_missing(
tmp_path,
):
markdown_path, html_path = _write_runtime_intelligence_reports(tmp_path)
markdown = markdown_path.read_text(encoding="utf-8").replace(
"Lab EdgeEnv preservation context",
"Lab preservation context marker removed",
)
html = html_path.read_text(encoding="utf-8").replace(
"Lab EdgeEnv preservation context",
"Lab preservation context marker removed",
)
markdown_path.write_text(markdown, encoding="utf-8")
html_path.write_text(html, encoding="utf-8")
summary_path = tmp_path / "gate_summary.md"

result = gate_main(
markdown=str(markdown_path),
html=str(html_path),
summary_out=str(summary_path),
)

assert result == 2
summary = summary_path.read_text(encoding="utf-8")
assert "`lab_edgeenv_preservation_context`" in summary


def test_runtime_intelligence_artifact_gate_fails_when_remote_summary_is_missing(
tmp_path,
):
Expand Down
Loading
Loading