From f8fb9919345728bbd902fc1d11917924f0c37625 Mon Sep 17 00:00:00 2001 From: hyeokjun32 Date: Wed, 3 Jun 2026 03:19:08 +0900 Subject: [PATCH] Gate runtime intelligence quick-scan marker --- .../runtime_intelligence_gitlab_artifacts.md | 8 +++++--- .../edgeenv_runtime_regression_lab_handoff.md | 2 +- .../aiguard_edgeenv_handoff_alignment.json | 3 ++- .../aiguard_edgeenv_handoff_alignment.md | 2 +- .../bundle_manifest.json | 1 + .../edgeenv_lab_handoff_manifest.json | 1 + ...ck_runtime_intelligence_artifact_bundle.py | 14 +++++++++++++ ...ck_runtime_intelligence_bundle_manifest.py | 1 + ...check_runtime_intelligence_ci_artifacts.py | 4 ++++ ...st_runtime_intelligence_bundle_manifest.py | 1 + .../test_runtime_intelligence_ci_template.py | 20 +++++++++++++++---- 11 files changed, 47 insertions(+), 10 deletions(-) diff --git a/docs/ci/runtime_intelligence_gitlab_artifacts.md b/docs/ci/runtime_intelligence_gitlab_artifacts.md index 158f5ad..e0901ee 100644 --- a/docs/ci/runtime_intelligence_gitlab_artifacts.md +++ b/docs/ci/runtime_intelligence_gitlab_artifacts.md @@ -166,7 +166,8 @@ 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`, `Runtime replay duration scope`, -`Orchestrator operation feed context`, `Orchestrator task event rollup`, +`Orchestrator operation feed context`, `Reviewer operation quick scan`, +`Orchestrator task event rollup`, `Lab EdgeEnv preservation context`, `AIGuard task event rollup evidence`, `AIGuard runtime operation anomalies`, @@ -186,7 +187,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 the `Reviewer Focus` quick-scan table, Lab ownership, EdgeEnv comparability, telemetry coverage-gap markers, Runtime replay duration scope with `source=entrypoint_requested_frames` traceability, Orchestrator operation feed context, 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_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 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 `Reviewer Focus` quick-scan table, Lab ownership, EdgeEnv comparability, 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_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 bundle manifest gate also checks the external AIGuard artifact before the rendered report stage. In particular, `runtime_queue_overload` must preserve @@ -215,7 +216,8 @@ The same CI artifact gate also checks the copied `aiguard_edgeenv_handoff_alignment.json/.md` for Lab report marker context: `lab_expected_report_markers` must match the Lab-owned Runtime Intelligence report marker set, including the remote fallback row value marker -`lab=Remote fallback starter evidence; evidence=remote_execution_recovered_by_fallback`, +`lab=Remote fallback starter evidence; evidence=remote_execution_recovered_by_fallback` +and the `Reviewer operation quick scan` row marker, `report_marker_context_role` must remain `lab_report_contract_context`, and `aiguard_validates_expected_report_markers` must remain `false`. This keeps diff --git a/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md b/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md index 367687f..47ede56 100644 --- a/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md +++ b/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md @@ -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`, `Runtime replay duration scope`, `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`, `lab=Remote fallback starter evidence; evidence=remote_execution_recovered_by_fallback`, `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`, `Runtime replay duration scope`, `Orchestrator operation feed context`, `Reviewer operation quick scan`, `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`, `lab=Remote fallback starter evidence; evidence=remote_execution_recovered_by_fallback`, `AIGuard producer-lineage guard alignment`, and `Lab remains the final deployment decision owner.`. - The external AIGuard artifact gate also requires `runtime_queue_overload` raw context to preserve `orchestrator_candidate_operation_max_total_queue_depth=7`, keeping the diff --git a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.json b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.json index 91213b7..d3773fe 100644 --- a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.json +++ b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.json @@ -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": 13, + "lab_expected_report_marker_count": 14, "lab_expected_report_markers": [ "Runtime Intelligence Risk Summary", "Runtime replay duration scope", "Orchestrator operation feed context", + "Reviewer operation quick scan", "Orchestrator task event rollup", "Lab EdgeEnv preservation context", "AIGuard task event rollup evidence", diff --git a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.md b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.md index f699936..223899d 100644 --- a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.md +++ b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.md @@ -4,7 +4,7 @@ - recommendation: alignment_satisfied - decision_owner: lab - diagnosis_owner: aiguard -- lab_expected_report_markers: Runtime Intelligence Risk Summary, Runtime replay duration scope, 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, lab=Remote fallback starter evidence; evidence=remote_execution_recovered_by_fallback, AIGuard producer-lineage guard alignment, Lab remains the final deployment decision owner. +- lab_expected_report_markers: Runtime Intelligence Risk Summary, Runtime replay duration scope, Orchestrator operation feed context, Reviewer operation quick scan, 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, lab=Remote fallback starter evidence; evidence=remote_execution_recovered_by_fallback, 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 diff --git a/examples/runtime_intelligence_chain/bundle_manifest.json b/examples/runtime_intelligence_chain/bundle_manifest.json index c4fb27b..3bc01a3 100644 --- a/examples/runtime_intelligence_chain/bundle_manifest.json +++ b/examples/runtime_intelligence_chain/bundle_manifest.json @@ -49,6 +49,7 @@ "Runtime Intelligence Risk Summary", "Runtime replay duration scope", "Orchestrator operation feed context", + "Reviewer operation quick scan", "Orchestrator task event rollup", "Lab EdgeEnv preservation context", "AIGuard task event rollup evidence", diff --git a/examples/runtime_intelligence_chain/edgeenv_lab_handoff_manifest.json b/examples/runtime_intelligence_chain/edgeenv_lab_handoff_manifest.json index f7d11fa..6bd9afd 100644 --- a/examples/runtime_intelligence_chain/edgeenv_lab_handoff_manifest.json +++ b/examples/runtime_intelligence_chain/edgeenv_lab_handoff_manifest.json @@ -70,6 +70,7 @@ "Runtime Intelligence Risk Summary", "Runtime replay duration scope", "Orchestrator operation feed context", + "Reviewer operation quick scan", "Orchestrator task event rollup", "Lab EdgeEnv preservation context", "AIGuard task event rollup evidence", diff --git a/scripts/check_runtime_intelligence_artifact_bundle.py b/scripts/check_runtime_intelligence_artifact_bundle.py index 8a21800..a05091c 100644 --- a/scripts/check_runtime_intelligence_artifact_bundle.py +++ b/scripts/check_runtime_intelligence_artifact_bundle.py @@ -41,6 +41,15 @@ "queue_pressure_reason=queue_backlog_threshold_exceeded, " "max_total_queue_depth=7" ), + "reviewer_operation_quick_scan": ( + "| Reviewer operation quick scan | candidate: " + "queue_pressure_reason=queue_backlog_threshold_exceeded, " + "max_total_queue_depth=7" + ), + "reviewer_operation_quick_scan_preservation": ( + "preservation=identity=jetson_device_local_preservation, " + "path=device_local_starter, run=edgeenv-smoke-candidate" + ), "runtime_replay_duration_scope": ( "| Runtime replay duration scope | candidate: " "scope_label=source=entrypoint_requested_frames" @@ -181,6 +190,11 @@ "orchestrator_queue_deadline_fallback_values": ( "queue_pressure_reason=queue_backlog_threshold_exceeded" ), + "reviewer_operation_quick_scan": "Reviewer operation quick scan", + "reviewer_operation_quick_scan_preservation": ( + "preservation=identity=jetson_device_local_preservation, " + "path=device_local_starter, run=edgeenv-smoke-candidate" + ), "runtime_replay_duration_scope": "Runtime replay duration scope", "runtime_replay_duration_label": "short 96-frame-class replay (96 frames)", "runtime_replay_duration_source": "source=entrypoint_requested_frames", diff --git a/scripts/check_runtime_intelligence_bundle_manifest.py b/scripts/check_runtime_intelligence_bundle_manifest.py index acd53ce..b2c03dd 100644 --- a/scripts/check_runtime_intelligence_bundle_manifest.py +++ b/scripts/check_runtime_intelligence_bundle_manifest.py @@ -126,6 +126,7 @@ "Runtime Intelligence Risk Summary", "Runtime replay duration scope", "Orchestrator operation feed context", + "Reviewer operation quick scan", "Orchestrator task event rollup", "Lab EdgeEnv preservation context", "AIGuard task event rollup evidence", diff --git a/scripts/check_runtime_intelligence_ci_artifacts.py b/scripts/check_runtime_intelligence_ci_artifacts.py index 28bdfd9..5310217 100644 --- a/scripts/check_runtime_intelligence_ci_artifacts.py +++ b/scripts/check_runtime_intelligence_ci_artifacts.py @@ -71,6 +71,7 @@ "Runtime Intelligence Risk Summary", "Runtime replay duration scope", "Orchestrator operation feed context", + "Reviewer operation quick scan", "Orchestrator task event rollup", "Lab EdgeEnv preservation context", "AIGuard task event rollup evidence", @@ -182,9 +183,11 @@ def _validate_runtime_report(path: Path, errors: list[str]) -> None: "lab_preservation=present", "edgeenv_orchestrator_task_event_rollup", "Runtime telemetry coverage gaps", + "Reviewer operation quick scan", "Orchestrator queue/deadline/fallback markers", "queue_pressure_reason=queue_backlog_threshold_exceeded", "max_total_queue_depth=7", + "preservation=identity=jetson_device_local_preservation", "AIGuard max queue raw-context traceability", "raw_context=orchestrator_candidate_operation_max_total_queue_depth=7", "AIGuard producer-lineage guard alignment", @@ -314,6 +317,7 @@ def _validate_aiguard_handoff_alignment( "lab_expected_report_markers: " "Runtime Intelligence Risk Summary, Runtime replay duration scope, " "Orchestrator operation feed context, " + "Reviewer operation quick scan, " "Orchestrator task event rollup, " "Lab EdgeEnv preservation context, " "AIGuard task event rollup evidence, " diff --git a/tests/test_runtime_intelligence_bundle_manifest.py b/tests/test_runtime_intelligence_bundle_manifest.py index a6120cd..d511b13 100644 --- a/tests/test_runtime_intelligence_bundle_manifest.py +++ b/tests/test_runtime_intelligence_bundle_manifest.py @@ -193,6 +193,7 @@ def test_readme_runtime_intelligence_section_stays_scannable(): for marker in [ "edgeenv_orchestrator_producer_lineage", "runtime_history_seed_run_config_traceability", + "Reviewer operation quick scan", "Orchestrator queue/deadline/fallback markers", "AIGuard max queue raw-context traceability", "Runtime replay duration scope", diff --git a/tests/test_runtime_intelligence_ci_template.py b/tests/test_runtime_intelligence_ci_template.py index 829470f..15cc946 100644 --- a/tests/test_runtime_intelligence_ci_template.py +++ b/tests/test_runtime_intelligence_ci_template.py @@ -120,9 +120,11 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p "lab_report_preservation_context_present=True", "lab_preservation=present", "Runtime telemetry coverage gaps", + "Reviewer operation quick scan", "Orchestrator queue/deadline/fallback markers", "queue_pressure_reason=queue_backlog_threshold_exceeded", "max_total_queue_depth=7", + "preservation=identity=jetson_device_local_preservation", "AIGuard max queue raw-context traceability", "raw_context=orchestrator_candidate_operation_max_total_queue_depth=7", "AIGuard producer-lineage guard alignment", @@ -198,11 +200,12 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p (report_dir / "aiguard_edgeenv_handoff_alignment.json").write_text( '{"schema_version":"inferedge-aiguard-edgeenv-handoff-alignment-v1",' '"status":"passed","decision_owner":"lab","diagnosis_owner":"aiguard",' - '"lab_expected_report_marker_count":13,' + '"lab_expected_report_marker_count":14,' '"lab_expected_report_markers":[' '"Runtime Intelligence Risk Summary",' '"Runtime replay duration scope",' '"Orchestrator operation feed context",' + '"Reviewer operation quick scan",' '"Orchestrator task event rollup",' '"Lab EdgeEnv preservation context",' '"AIGuard task event rollup evidence",' @@ -229,7 +232,7 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p "- status: passed", "- decision_owner: lab", "- diagnosis_owner: aiguard", - "- lab_expected_report_markers: Runtime Intelligence Risk Summary, Runtime replay duration scope, 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, lab=Remote fallback starter evidence; evidence=remote_execution_recovered_by_fallback, AIGuard producer-lineage guard alignment, Lab remains the final deployment decision owner.", + "- lab_expected_report_markers: Runtime Intelligence Risk Summary, Runtime replay duration scope, Orchestrator operation feed context, Reviewer operation quick scan, 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, lab=Remote fallback starter evidence; evidence=remote_execution_recovered_by_fallback, 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", "- handoff_producer_lineage_guard_alignment_run_ids: edgeenv-smoke-candidate, edgeenv-smoke-missing", @@ -363,9 +366,11 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_missing_lab_marker_cont "lab_report_preservation_context_present=True", "lab_preservation=present", "Runtime telemetry coverage gaps", + "Reviewer operation quick scan", "Orchestrator queue/deadline/fallback markers", "queue_pressure_reason=queue_backlog_threshold_exceeded", "max_total_queue_depth=7", + "preservation=identity=jetson_device_local_preservation", "AIGuard max queue raw-context traceability", "raw_context=orchestrator_candidate_operation_max_total_queue_depth=7", "AIGuard producer-lineage guard alignment", @@ -514,9 +519,11 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_missing_contract_marker "lab_report_preservation_context_present=True", "lab_preservation=present", "Runtime telemetry coverage gaps", + "Reviewer operation quick scan", "Orchestrator queue/deadline/fallback markers", "queue_pressure_reason=queue_backlog_threshold_exceeded", "max_total_queue_depth=7", + "preservation=identity=jetson_device_local_preservation", "AIGuard max queue raw-context traceability", "raw_context=orchestrator_candidate_operation_max_total_queue_depth=7", "AIGuard producer-lineage guard alignment", @@ -604,9 +611,11 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_missing_coverage_gap_ma "lab_report_preservation_context_present=True", "lab_preservation=present", "Runtime telemetry coverage gaps", + "Reviewer operation quick scan", "Orchestrator queue/deadline/fallback markers", "queue_pressure_reason=queue_backlog_threshold_exceeded", "max_total_queue_depth=7", + "preservation=identity=jetson_device_local_preservation", "AIGuard max queue raw-context traceability", "raw_context=orchestrator_candidate_operation_max_total_queue_depth=7", "AIGuard producer-lineage guard alignment", @@ -679,9 +688,11 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_failed_deployment_risk( "lab_report_preservation_context_present=True", "lab_preservation=present", "Runtime telemetry coverage gaps", + "Reviewer operation quick scan", "Orchestrator queue/deadline/fallback markers", "queue_pressure_reason=queue_backlog_threshold_exceeded", "max_total_queue_depth=7", + "preservation=identity=jetson_device_local_preservation", "AIGuard max queue raw-context traceability", "raw_context=orchestrator_candidate_operation_max_total_queue_depth=7", "AIGuard producer-lineage guard alignment", @@ -757,11 +768,12 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_failed_deployment_risk( (report_dir / "aiguard_edgeenv_handoff_alignment.json").write_text( '{"schema_version":"inferedge-aiguard-edgeenv-handoff-alignment-v1",' '"status":"passed","decision_owner":"lab","diagnosis_owner":"aiguard",' - '"lab_expected_report_marker_count":13,' + '"lab_expected_report_marker_count":14,' '"lab_expected_report_markers":[' '"Runtime Intelligence Risk Summary",' '"Runtime replay duration scope",' '"Orchestrator operation feed context",' + '"Reviewer operation quick scan",' '"Orchestrator task event rollup",' '"Lab EdgeEnv preservation context",' '"AIGuard task event rollup evidence",' @@ -788,7 +800,7 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_failed_deployment_risk( "- status: passed", "- decision_owner: lab", "- diagnosis_owner: aiguard", - "- lab_expected_report_markers: Runtime Intelligence Risk Summary, Runtime replay duration scope, 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, lab=Remote fallback starter evidence; evidence=remote_execution_recovered_by_fallback, AIGuard producer-lineage guard alignment, Lab remains the final deployment decision owner.", + "- lab_expected_report_markers: Runtime Intelligence Risk Summary, Runtime replay duration scope, Orchestrator operation feed context, Reviewer operation quick scan, 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, lab=Remote fallback starter evidence; evidence=remote_execution_recovered_by_fallback, 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", "- handoff_producer_lineage_guard_alignment_run_ids: edgeenv-smoke-candidate, edgeenv-smoke-missing",