diff --git a/docs/ci/runtime_intelligence_gitlab_artifacts.md b/docs/ci/runtime_intelligence_gitlab_artifacts.md index eed774c..d4f274a 100644 --- a/docs/ci/runtime_intelligence_gitlab_artifacts.md +++ b/docs/ci/runtime_intelligence_gitlab_artifacts.md @@ -187,6 +187,12 @@ 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, Runtime replay duration scope with `source=entrypoint_requested_frames` traceability, Orchestrator operation feed context, 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. +When that report gate passes, its summary now emits a +`Validated Duration Traceability` section with `duration_handoff_alignment`, +`duration_source: source=entrypoint_requested_frames`, +`duration_scope_label: scope_label=source=entrypoint_requested_frames`, and the +`short 96-frame-class replay (96 frames)` label. This is reviewer navigation +context for the Lab-owned report, not an AIGuard-owned marker decision. 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 diff --git a/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md b/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md index 1d74bb7..c7829bc 100644 --- a/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md +++ b/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md @@ -189,6 +189,12 @@ Expected Lab behavior: - Markdown/HTML reports include a `Runtime Intelligence Risk Summary` that summarizes EdgeEnv comparability/regression, telemetry replay gaps, Runtime history seed/run_config traceability, AIGuard deterministic evidence, and the Lab-owned deployment decision in one reviewer-facing table. - When EdgeEnv includes preserved Orchestrator feed context, the `Runtime Intelligence Risk Summary` surfaces queue, thermal, throttling, memory, fallback context, and compact `operation_risk_summary` markers as supplemental runtime evidence. - When EdgeEnv includes replay duration metadata, the same Risk Summary surfaces `Runtime replay duration scope` with `duration_label`, `duration_class`, frame count, and optional `duration_source` / `duration_scope_label` traceability as reviewer navigation context. This does not change EdgeEnv comparability or Lab deployment policy. +- The report artifact gate summary also emits a `Validated Duration Traceability` + section so reviewers can see `duration_handoff_alignment`, + `source=entrypoint_requested_frames`, + `scope_label=source=entrypoint_requested_frames`, and the + `short 96-frame-class replay (96 frames)` label without opening the full + Markdown/HTML report. - The Jetson/device-local preservation row starts with `identity=jetson_device_local_preservation` and the device-local path marker such as `path=device_local_starter` when available, making the preserved Jetson EdgeEnv run easier to identify before reviewers inspect detailed queue/resource context. - The detailed producer/source/stage/resource markers are rendered in a separate `Jetson/device-local EdgeEnv preservation details` row so the identity row stays short while preserving the same navigation context. - Agent Runtime Reliability reports now mirror the same reviewer-facing split inside `Runtime Intelligence EdgeEnv Preservation`: `preservation_identity` keeps the run/path identity short, while `preservation_details` carries source, stage, device-local event, resource, and queue markers as navigation context. diff --git a/scripts/check_runtime_intelligence_artifact_bundle.py b/scripts/check_runtime_intelligence_artifact_bundle.py index 57b6232..f4674cc 100644 --- a/scripts/check_runtime_intelligence_artifact_bundle.py +++ b/scripts/check_runtime_intelligence_artifact_bundle.py @@ -190,6 +190,13 @@ ), } +DURATION_TRACEABILITY_SUMMARY_MARKERS = ( + "duration_handoff_alignment: EdgeEnv/AIGuard report context preserved", + "duration_source: source=entrypoint_requested_frames", + "duration_scope_label: scope_label=source=entrypoint_requested_frames", + "duration_label: short 96-frame-class replay (96 frames)", +) + def _read_text(path: str, label: str) -> str: try: @@ -228,6 +235,11 @@ def _write_summary( lines.append("") lines.extend(f"- `{name}`" for name in missing_html) lines.append("") + if not missing_markdown and not missing_html: + lines.append("## Validated Duration Traceability") + lines.append("") + lines.extend(f"- {marker}" for marker in DURATION_TRACEABILITY_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 15d6fba..2787083 100644 --- a/tests/test_runtime_intelligence_artifact_gate.py +++ b/tests/test_runtime_intelligence_artifact_gate.py @@ -52,6 +52,17 @@ def test_runtime_intelligence_artifact_gate_passes_for_chain_report(tmp_path): assert "- Status: passed" in summary assert "- Missing Markdown markers: 0" in summary assert "- Missing HTML markers: 0" in summary + assert "## Validated Duration Traceability" in summary + assert ( + "duration_handoff_alignment: EdgeEnv/AIGuard report context preserved" + in summary + ) + assert "duration_source: source=entrypoint_requested_frames" in summary + assert ( + "duration_scope_label: scope_label=source=entrypoint_requested_frames" + in summary + ) + assert "duration_label: short 96-frame-class replay (96 frames)" in summary markdown = markdown_path.read_text(encoding="utf-8") assert "Runtime replay duration scope" in markdown assert "short 96-frame-class replay (96 frames)" in markdown @@ -82,7 +93,26 @@ def test_runtime_intelligence_artifact_gate_cli_passes_for_chain_report(tmp_path assert result.returncode == 0 assert "Runtime Intelligence artifact bundle gate passed." in result.stdout - assert "- Status: passed" in summary_path.read_text(encoding="utf-8") + summary = summary_path.read_text(encoding="utf-8") + assert "- Status: passed" in summary + assert "duration_handoff_alignment" in summary + + +def test_runtime_intelligence_docs_describe_duration_traceability_gate_summary(): + docs = [ + REPO_ROOT / "docs" / "ci" / "runtime_intelligence_gitlab_artifacts.md", + REPO_ROOT + / "docs" + / "portfolio" + / "edgeenv_runtime_regression_lab_handoff.md", + ] + + for path in docs: + text = path.read_text(encoding="utf-8") + assert "Validated Duration Traceability" in text + assert "duration_handoff_alignment" in text + assert "source=entrypoint_requested_frames" in text + assert "scope_label=source=entrypoint_requested_frames" in text def test_runtime_intelligence_artifact_gate_fails_when_owner_row_is_missing(