From aa822aaa00b2e940404b4d0a7e46cc109d4e4664 Mon Sep 17 00:00:00 2001 From: hyeokjun32 Date: Fri, 12 Jun 2026 09:42:08 +0900 Subject: [PATCH] Mirror AIGuard optional source traceability --- README.md | 7 +++ docs/ko/README.md | 7 +++ docs/portfolio_summary.md | 5 ++ inferedge_env/result/lab_handoff.py | 47 +++++++++++++++++++ .../test_runtime_intelligence_lab_handoff.py | 47 +++++++++++++++++++ 5 files changed, 113 insertions(+) diff --git a/README.md b/README.md index 8f69ce4..d2ea2b5 100644 --- a/README.md +++ b/README.md @@ -462,6 +462,13 @@ The alignment block separately declares optional AIGuard evidence types sustained Orchestrator stale-drop context. They are optional so EdgeEnv can preserve stale-drop evidence when present without rejecting older queue/thermal feeds or changing Lab's required Runtime Intelligence bundle set. +`lab_bundle_alignment.optional_aiguard_source_traceability` mirrors the +AIGuard optional-present source artifact and regeneration command as read-only +metadata: +`InferEdgeAIGuard/examples/runtime_intelligence/aiguard_runtime_operation_guard_analysis_optional_stale_drop.json` +and `python -m inferedge_aiguard.cli build-runtime-intelligence-optional-stale-drop`. +This lets downstream reviewers connect the EdgeEnv handoff to the AIGuard +source fixture without making EdgeEnv produce `guard_analysis`. The same `lab_bundle_alignment.expected_report_markers` list declares the Lab-owned report markers that downstream Lab gates must preserve: `Runtime Intelligence Risk Summary`, `Runtime replay duration scope`, diff --git a/docs/ko/README.md b/docs/ko/README.md index e2a8798..0bb1d94 100644 --- a/docs/ko/README.md +++ b/docs/ko/README.md @@ -180,6 +180,13 @@ sustained Orchestrator stale-drop context에서 AIGuard가 만들 수 있는 `stale_frame_risk`와 `edgeenv_orchestrator_stale_drop_summary`를 선언한다. 이 둘은 optional이므로 기존 queue/thermal feed나 Lab required bundle set을 깨뜨리지 않는다. +`lab_bundle_alignment.optional_aiguard_source_traceability`는 AIGuard +optional-present source artifact와 재생성 명령을 read-only metadata로 +mirror한다: +`InferEdgeAIGuard/examples/runtime_intelligence/aiguard_runtime_operation_guard_analysis_optional_stale_drop.json`, +`python -m inferedge_aiguard.cli build-runtime-intelligence-optional-stale-drop`. +이는 EdgeEnv handoff와 AIGuard source fixture를 추적 가능하게 할 뿐, +EdgeEnv가 `guard_analysis`를 생성한다는 의미가 아니다. 같은 `lab_bundle_alignment.expected_report_markers`는 downstream Lab report가 보존해야 하는 marker를 producer-side handoff에 명시한다: `Runtime Intelligence Risk Summary`, `Runtime replay duration scope`, diff --git a/docs/portfolio_summary.md b/docs/portfolio_summary.md index e3e7239..66b62d3 100644 --- a/docs/portfolio_summary.md +++ b/docs/portfolio_summary.md @@ -57,6 +57,11 @@ name the Lab-owned report rows expected downstream: `Runtime Intelligence Risk S When available, the same handoff summary preserves `duration_source` and `duration_scope_label` values such as `source=entrypoint_requested_frames` as producer-side traceability for the Lab-owned replay duration row. +It also mirrors AIGuard optional-present source traceability through +`lab_bundle_alignment.optional_aiguard_source_traceability`, including +`InferEdgeAIGuard/examples/runtime_intelligence/aiguard_runtime_operation_guard_analysis_optional_stale_drop.json` +and `python -m inferedge_aiguard.cli build-runtime-intelligence-optional-stale-drop`, +without making EdgeEnv produce the external `guard_analysis`. This is traceability metadata for Lab's report gate, not an EdgeEnv deployment decision. diff --git a/inferedge_env/result/lab_handoff.py b/inferedge_env/result/lab_handoff.py index 62933cc..55d9877 100644 --- a/inferedge_env/result/lab_handoff.py +++ b/inferedge_env/result/lab_handoff.py @@ -86,6 +86,29 @@ "stale_frame_risk", "edgeenv_orchestrator_stale_drop_summary", ) +LAB_BUNDLE_OPTIONAL_AIGUARD_SOURCE_TRACEABILITY_CONTEXT_ROLE = ( + "read_only_optional_source_traceability" +) +LAB_BUNDLE_OPTIONAL_AIGUARD_STALE_DROP_REPRODUCTION_COMMAND = ( + "python", + "-m", + "inferedge_aiguard.cli", + "build-runtime-intelligence-optional-stale-drop", + "--edgeenv-regression", + ( + "examples/runtime_intelligence/" + "edgeenv_runtime_regression_with_optional_stale_drop_context.json" + ), + "--remote-dispatch", + "examples/runtime_intelligence/remote_dispatch_fallback_recovered_result.json", + "--orchestration-summary", + "examples/runtime_intelligence/orchestrator_multi_workload_sustained_summary.json", + "--save-json", + ( + "examples/runtime_intelligence/" + "aiguard_runtime_operation_guard_analysis_optional_stale_drop.json" + ), +) LAB_BUNDLE_EXPECTED_REPORT_MARKERS = ( "Runtime Intelligence Risk Summary", "Runtime replay duration scope", @@ -1268,6 +1291,9 @@ def _lab_bundle_alignment(files: dict[str, str]) -> dict[str, Any]: "optional_aiguard_evidence_types": list( LAB_BUNDLE_OPTIONAL_AIGUARD_EVIDENCE_TYPES ), + "optional_aiguard_source_traceability": ( + _optional_aiguard_source_traceability() + ), "expected_report_markers": list(LAB_BUNDLE_EXPECTED_REPORT_MARKERS), "external_aiguard_alignment_gate": { "declared_by": "edgeenv", @@ -1289,3 +1315,24 @@ def _lab_bundle_alignment(files: dict[str, str]) -> dict[str, Any]: "production_observability_platform": False, }, } + + +def _optional_aiguard_source_traceability() -> dict[str, Any]: + return { + "context_role": LAB_BUNDLE_OPTIONAL_AIGUARD_SOURCE_TRACEABILITY_CONTEXT_ROLE, + "edgeenv_does_not_generate_guard_analysis": True, + "lab_is_final_decision_owner": True, + "optional_present_source_artifact": { + "repository": "InferEdgeAIGuard", + "path": ( + "examples/runtime_intelligence/" + "aiguard_runtime_operation_guard_analysis_optional_stale_drop.json" + ), + "schema_version": AIGUARD_DIAGNOSIS_SCHEMA_VERSION, + "role": "aiguard-optional-stale-drop-full-evidence-source", + "context_role": "read_only_cross_repo_traceability", + "reproduction_command": list( + LAB_BUNDLE_OPTIONAL_AIGUARD_STALE_DROP_REPRODUCTION_COMMAND + ), + }, + } diff --git a/tests/test_runtime_intelligence_lab_handoff.py b/tests/test_runtime_intelligence_lab_handoff.py index 9d7b6c3..1fd723d 100644 --- a/tests/test_runtime_intelligence_lab_handoff.py +++ b/tests/test_runtime_intelligence_lab_handoff.py @@ -108,6 +108,47 @@ def test_runtime_intelligence_lab_handoff_manifest_records_producer_contracts( "stale_frame_risk", "edgeenv_orchestrator_stale_drop_summary", ] + assert payload["lab_bundle_alignment"]["optional_aiguard_source_traceability"] == { + "context_role": "read_only_optional_source_traceability", + "edgeenv_does_not_generate_guard_analysis": True, + "lab_is_final_decision_owner": True, + "optional_present_source_artifact": { + "repository": "InferEdgeAIGuard", + "path": ( + "examples/runtime_intelligence/" + "aiguard_runtime_operation_guard_analysis_optional_stale_drop.json" + ), + "schema_version": "inferedge-aiguard-diagnosis-v1", + "role": "aiguard-optional-stale-drop-full-evidence-source", + "context_role": "read_only_cross_repo_traceability", + "reproduction_command": [ + "python", + "-m", + "inferedge_aiguard.cli", + "build-runtime-intelligence-optional-stale-drop", + "--edgeenv-regression", + ( + "examples/runtime_intelligence/" + "edgeenv_runtime_regression_with_optional_stale_drop_context.json" + ), + "--remote-dispatch", + ( + "examples/runtime_intelligence/" + "remote_dispatch_fallback_recovered_result.json" + ), + "--orchestration-summary", + ( + "examples/runtime_intelligence/" + "orchestrator_multi_workload_sustained_summary.json" + ), + "--save-json", + ( + "examples/runtime_intelligence/" + "aiguard_runtime_operation_guard_analysis_optional_stale_drop.json" + ), + ], + }, + } assert payload["lab_bundle_alignment"]["expected_report_markers"] == list( LAB_BUNDLE_EXPECTED_REPORT_MARKERS ) @@ -222,6 +263,12 @@ def test_runtime_intelligence_docs_describe_lab_expected_report_markers(): for doc in docs: assert "lab_bundle_alignment.expected_report_markers" in doc + assert "optional_aiguard_source_traceability" in doc + assert "build-runtime-intelligence-optional-stale-drop" in doc + assert ( + "aiguard_runtime_operation_guard_analysis_optional_stale_drop.json" + in doc + ) for marker in LAB_BUNDLE_EXPECTED_REPORT_MARKERS: assert marker in doc