diff --git a/docs/ci/runtime_intelligence_gitlab_artifacts.md b/docs/ci/runtime_intelligence_gitlab_artifacts.md index 0412652..91af4f5 100644 --- a/docs/ci/runtime_intelligence_gitlab_artifacts.md +++ b/docs/ci/runtime_intelligence_gitlab_artifacts.md @@ -216,7 +216,7 @@ 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. +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, the policy-pressure reason-count marker `reasons=queue_backlog_threshold_exceeded:2`, 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 @@ -242,6 +242,9 @@ It also emits `Validated Review Path` with and `review_path_artifact_gate_summary: artifact gate summary reference row validated`, so the compact gate summary preserves the report reading order without making CI the report owner or deployment decision owner. +It also emits `Validated Policy Pressure` with the policy-pressure +reason-count marker, so overload reason preservation remains visible in the +gate summary. 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 final `runtime_intelligence_ci_artifact_gate_summary.md` also preserves the diff --git a/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md b/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md index 086120e..67e22f1 100644 --- a/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md +++ b/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md @@ -194,6 +194,7 @@ Expected Lab behavior: - 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`, `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 scheduler fairness evidence`, `AIGuard worker health trend evidence`, `AIGuard policy pressure evidence`, `AIGuard pressure window 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 Runtime Intelligence bundle gate also requires the policy-pressure reason-count marker `reasons=queue_backlog_threshold_exceeded:2`, so the Lab-owned report cannot drop Orchestrator pressure reasons while still showing the broader AIGuard policy-pressure evidence row. - Reviewer navigation can trace Orchestrator curated samples through AIGuard evidence into Lab report rows: `agent_scheduler_delay_sample.json` -> `scheduler_delay_pattern` -> `Reviewer operation quick scan` / `Orchestrator queue/deadline/fallback markers`, and `remote_fallback_recovery_sample.json` -> `remote_execution_recovered_by_fallback` -> `Remote fallback starter evidence`. Lab does not treat those curated samples as benchmark outputs, production retry proof, or deployment policy inputs. - The external AIGuard artifact gate also requires `runtime_queue_overload` raw context to preserve @@ -205,6 +206,7 @@ Expected Lab behavior: so reviewers can identify the preservation path without treating it as a deployment decision override. - The same gate summary emits `expected_report_markers: EdgeEnv fixture matrix coverage row declared` and `expected_report_markers: remote fallback Lab context row declared`, keeping the EdgeEnv replay fixture coverage row and remote fallback row-value marker visible in file-based CI artifacts without making CI a runtime control plane. +- The artifact gate summary emits `Validated Policy Pressure` with the policy-pressure reason-count marker, keeping Orchestrator pressure reason preservation visible without giving the gate deployment-decision ownership. - 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 `edgeenv_report_summary.fixture_matrix_*` fields against the EdgeEnv regression report's `fixture_matrix_context`, keeping fixture coverage as EdgeEnv-owned replay context rather than Lab decision policy. - 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. diff --git a/scripts/check_runtime_intelligence_artifact_bundle.py b/scripts/check_runtime_intelligence_artifact_bundle.py index 5039c2f..97f768b 100644 --- a/scripts/check_runtime_intelligence_artifact_bundle.py +++ b/scripts/check_runtime_intelligence_artifact_bundle.py @@ -167,6 +167,9 @@ "| AIGuard policy pressure evidence | " "status=warning, markers=5" ), + "aiguard_policy_pressure_reasons": ( + "reasons=queue_backlog_threshold_exceeded:2" + ), "aiguard_policy_pressure_type": ( "edgeenv_orchestrator_policy_pressure_summary" ), @@ -313,6 +316,9 @@ "edgeenv_orchestrator_worker_health_trend" ), "aiguard_policy_pressure_evidence": "AIGuard policy pressure evidence", + "aiguard_policy_pressure_reasons": ( + "reasons=queue_backlog_threshold_exceeded:2" + ), "aiguard_policy_pressure_type": ( "edgeenv_orchestrator_policy_pressure_summary" ), @@ -415,6 +421,10 @@ "review_path_source_traceability_summary: source traceability summary reference row validated", ) +POLICY_PRESSURE_SUMMARY_MARKERS = ( + "aiguard_policy_pressure_reasons: reasons=queue_backlog_threshold_exceeded:2", +) + def _read_text(path: str, label: str) -> str: try: @@ -475,6 +485,10 @@ def _write_summary( lines.append("") lines.extend(f"- {marker}" for marker in REVIEW_PATH_SUMMARY_MARKERS) lines.append("") + lines.append("## Validated Policy Pressure") + lines.append("") + lines.extend(f"- {marker}" for marker in POLICY_PRESSURE_SUMMARY_MARKERS) + lines.append("") out_path = Path(path) out_path.parent.mkdir(parents=True, exist_ok=True) diff --git a/tests/test_runtime_intelligence_artifact_gate.py b/tests/test_runtime_intelligence_artifact_gate.py index 1872717..c3fef09 100644 --- a/tests/test_runtime_intelligence_artifact_gate.py +++ b/tests/test_runtime_intelligence_artifact_gate.py @@ -89,6 +89,7 @@ def test_runtime_intelligence_artifact_gate_passes_for_chain_report(tmp_path): "review_path_artifact_gate_summary: artifact gate summary reference row validated" in summary ) + assert "aiguard_policy_pressure_reasons" in summary markdown = markdown_path.read_text(encoding="utf-8") html = html_path.read_text(encoding="utf-8") assert "### Review Path" in markdown @@ -124,6 +125,8 @@ def test_runtime_intelligence_artifact_gate_passes_for_chain_report(tmp_path): assert "not_a_deployment_decision=True" in markdown assert "EdgeEnv fixture matrix coverage" in html assert "roles=6/6" in html + assert "reasons=queue_backlog_threshold_exceeded:2" in markdown + assert "reasons=queue_backlog_threshold_exceeded:2" in html def test_runtime_intelligence_artifact_gate_cli_passes_for_chain_report(tmp_path): @@ -164,6 +167,7 @@ def test_runtime_intelligence_artifact_gate_cli_passes_for_chain_report(tmp_path "review_path_artifact_gate_summary: artifact gate summary reference row validated" in summary ) + assert "aiguard_policy_pressure_reasons" in summary def test_runtime_intelligence_docs_describe_duration_traceability_gate_summary(): @@ -186,6 +190,8 @@ def test_runtime_intelligence_docs_describe_duration_traceability_gate_summary() assert "EdgeEnv fixture matrix coverage" in text assert "Validated Review Path" in text assert "Reviewer Focus -> Detailed Evidence Rows guidance validated" in text + assert "Validated Policy Pressure" in text + assert "policy-pressure reason-count marker" in text def test_runtime_intelligence_artifact_gate_fails_when_owner_row_is_missing(