diff --git a/docs/ci/runtime_intelligence_gitlab_artifacts.md b/docs/ci/runtime_intelligence_gitlab_artifacts.md index f94268f..1e917f8 100644 --- a/docs/ci/runtime_intelligence_gitlab_artifacts.md +++ b/docs/ci/runtime_intelligence_gitlab_artifacts.md @@ -166,6 +166,7 @@ downstream guard-alignment marker for `edgeenv_orchestrator_producer_lineage` to remain present in EdgeEnv/AIGuard handoff context. It also requires AIGuard `edgeenv_orchestrator_task_event_rollup`, `edgeenv_orchestrator_operation_timeline_summary`, +`edgeenv_orchestrator_scheduler_fairness_summary`, `runtime_history_seed_run_config_traceability`, and `remote_execution_recovered_by_fallback` evidence so the smoke remains a cross-repo handoff fixture rather than a Lab-only report sample. When an @@ -183,6 +184,7 @@ packaging runs. That marker set preserves `Runtime Intelligence Risk Summary`, `AIGuard task event rollup evidence`, `AIGuard operation risk rollup evidence`, `AIGuard operation timeline evidence`, +`AIGuard scheduler fairness evidence`, `AIGuard runtime operation anomalies`, `AIGuard remote dispatch event summary`, `AIGuard remote event summary consistency`, @@ -205,7 +207,7 @@ timeline summary run IDs against the preserved EdgeEnv regression context, so compact AIGuard operation evidence remains traceable to producer-side Orchestrator context. -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, 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, 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 diff --git a/docs/portfolio/agent_runtime_reliability_report.md b/docs/portfolio/agent_runtime_reliability_report.md index 0f949ad..fa92c01 100644 --- a/docs/portfolio/agent_runtime_reliability_report.md +++ b/docs/portfolio/agent_runtime_reliability_report.md @@ -111,6 +111,12 @@ Newer AIGuard guard analysis can also include `stale_frame_risk` or preserved count, stale-drop rate, affected tasks, reason counts, and reason classes in the AIGuard Orchestrator Operation Evidence section as deployment review context. +When AIGuard preserves +`edgeenv_orchestrator_scheduler_fairness_summary`, Lab surfaces protected +high-priority tasks, starvation-risk tasks, scheduler-delay tasks, degraded +tasks, and boundary markers as scheduler fairness review context. This remains +Lab-owned deployment review evidence and does not make AIGuard or Orchestrator +the final decision owner. The report also preserves the Orchestrator operation-health fields added for runtime operation review: @@ -157,8 +163,9 @@ runtime operation review: `worker_health_degradation` and `scheduler_delay_pattern` when Orchestrator worker health or runtime event telemetry is analyzed by AIGuard. Lab preserves health reasons, policy/drop/stale-drop reason counts, scheduler - delay counts, stale-drop affected tasks, and stale-drop boundary markers as - deployment context without making AIGuard the final decision owner. + delay counts, stale-drop affected tasks, scheduler fairness task groups, and + boundary markers as deployment context without making AIGuard the final + decision owner. These fields make the report path explicit: @@ -211,7 +218,9 @@ example, `worker_health_degradation` shows degraded/constrained worker reasons such as fallback policy use or dropped frames, while `scheduler_delay_pattern` shows scheduler delay counts and related policy/drop reasons. These evidence shows scheduler delay counts and related policy/drop reasons. -`stale_frame_risk` shows which tasks had stale/backlog drops and why. These +`stale_frame_risk` shows which tasks had stale/backlog drops and why, and +`edgeenv_orchestrator_scheduler_fairness_summary` shows which tasks were +protected, delayed, starved, or degraded under scheduler pressure. These evidence items contribute through AIGuard's overall guard verdict and remain separate from Lab's final policy ownership. diff --git a/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md b/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md index 52ee088..868705d 100644 --- a/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md +++ b/docs/portfolio/edgeenv_runtime_regression_lab_handoff.md @@ -192,7 +192,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`, `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 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`, `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 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.`. - 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 @@ -208,7 +208,7 @@ Expected Lab behavior: - 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. - 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. -- The same handoff gate validates `edgeenv_report_summary.orchestrator_operation_risk_rollup_run_ids` and `edgeenv_report_summary.orchestrator_operation_timeline_summary_run_ids` against preserved Orchestrator context, so AIGuard operation rollup/timeline evidence cannot drift away from EdgeEnv's producer-side context. +- The same handoff gate validates `edgeenv_report_summary.orchestrator_operation_risk_rollup_run_ids` and `edgeenv_report_summary.orchestrator_operation_timeline_summary_run_ids` against preserved Orchestrator context, so AIGuard operation rollup/timeline/fairness evidence cannot drift away from EdgeEnv's producer-side context. - The committed smoke also carries AIGuard's EdgeEnv handoff alignment artifact, which confirms that EdgeEnv's producer summary and AIGuard's `edgeenv_orchestrator_producer_lineage` raw context agree on `edgeenv-smoke-candidate` and `edgeenv-smoke-missing` as the producer-lineage guard-alignment run IDs. - The bundle gate also requires AIGuard coverage evidence raw context to preserve the same Orchestrator mapping hint and producer markers, proving that AIGuard kept EdgeEnv/Orchestrator ownership markers as diagnosis context rather than recomputing coverage or owning deployment policy. - The same gate requires AIGuard `edgeenv_orchestrator_producer_lineage` evidence to preserve candidate and missing-telemetry device-local producer lineage as traceability evidence. diff --git a/docs/portfolio/final_validation_completion.md b/docs/portfolio/final_validation_completion.md index 5b0f5aa..377974d 100644 --- a/docs/portfolio/final_validation_completion.md +++ b/docs/portfolio/final_validation_completion.md @@ -33,7 +33,7 @@ InferEdge is complete for the current portfolio milestone when it can replay a l | Normal demo case | done | `examples/validation_demo/subset/` | | Problem demo cases | done | annotation missing, invalid structure, contract mismatch reports | | Report formats | done | JSON, Markdown, HTML evaluation reports | -| Runtime Intelligence risk summary | done | Orchestrator `operation_risk_rollup` -> EdgeEnv handoff -> AIGuard deterministic evidence -> Lab deployment risk report | +| Runtime Intelligence risk summary | done | Orchestrator `operation_risk_rollup` / scheduler fairness context -> EdgeEnv handoff -> AIGuard deterministic evidence -> Lab deployment risk report | | Tests | done | full `pytest` suite passing locally | ## Validated Numbers diff --git a/docs/portfolio/inferedge_pipeline_status.ko.md b/docs/portfolio/inferedge_pipeline_status.ko.md index 98caff7..3bbf000 100644 --- a/docs/portfolio/inferedge_pipeline_status.ko.md +++ b/docs/portfolio/inferedge_pipeline_status.ko.md @@ -13,7 +13,7 @@ - EdgeEnv runtime telemetry/regression context ingestion. - AIGuard deterministic runtime warning evidence preservation. - Orchestrator queue/deadline/fallback context를 supplemental operation evidence로 표시. -- Runtime Intelligence operation risk rollup chain: Orchestrator operation risk/timeline context -> EdgeEnv handoff -> AIGuard deterministic evidence -> Lab Runtime Intelligence Risk Summary. +- Runtime Intelligence operation risk rollup chain: Orchestrator operation risk/timeline/scheduler fairness context -> EdgeEnv handoff -> AIGuard deterministic evidence -> Lab Runtime Intelligence Risk Summary. ## 현재 evidence snapshot @@ -23,7 +23,7 @@ | Jetson TensorRT FP16 25W demo | `10.066401 ms` mean, `15.548438 ms` p99, `99.340373 FPS` | | Demo speedup | 약 `4.51x` | | Jetson EdgeEnv preservation smoke | `device_local_starter`, `run-20260529-034704-fbf753f0`, `runtime_operation_summary` | -| Runtime Intelligence rollup chain | `operation_risk_rollup` -> EdgeEnv handoff -> AIGuard evidence -> Lab Risk Summary | +| Runtime Intelligence rollup chain | `operation_risk_rollup` / scheduler fairness -> EdgeEnv handoff -> AIGuard evidence -> Lab Risk Summary | ## 아직 구현하지 않았거나 명시적으로 제외한 것 diff --git a/docs/portfolio/inferedge_pipeline_status.md b/docs/portfolio/inferedge_pipeline_status.md index 2eaa45e..84c9df0 100644 --- a/docs/portfolio/inferedge_pipeline_status.md +++ b/docs/portfolio/inferedge_pipeline_status.md @@ -120,7 +120,7 @@ The current cross-repository loop is covered by documentation, fixtures, and smo - YOLOv8 COCO subset evaluation report generated from 10 local images and 89 converted COCO-style person annotations, with metric backend `simplified`, mAP@50 0.1410, precision 0.2941, recall 0.1685, and structural validation passed - Validation problem case fixtures for annotation-missing review, invalid detection structure blocking, and contract shape mismatch blocking - Runtime Intelligence evidence chain from Orchestrator operation context and `operation_risk_rollup`, through EdgeEnv telemetry/regression handoff, optional AIGuard deterministic runtime evidence, and Lab's Runtime Intelligence Risk Summary / deployment risk report -- Runtime Intelligence bundle gates for reviewer quick-scan markers, operation timeline evidence, task event rollup evidence, remote fallback starter evidence, and explicit Lab final decision ownership without changing existing JSON contracts +- Runtime Intelligence bundle gates for reviewer quick-scan markers, operation timeline evidence, scheduler fairness evidence, task event rollup evidence, remote fallback starter evidence, and explicit Lab final decision ownership without changing existing JSON contracts This means the current product boundary is testable without running the production worker infrastructure. diff --git a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.json b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.json index 4612749..ec4001b 100644 --- a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.json +++ b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.json @@ -6,10 +6,10 @@ "diagnosis_owner": "aiguard", "handoff_schema_version": "edgeenv.runtime-intelligence-lab-handoff.v1", "guard_analysis_schema_version": "inferedge-aiguard-diagnosis-v1", - "required_evidence_type_count": 9, + "required_evidence_type_count": 10, "optional_evidence_type_count": 2, - "guard_evidence_type_count": 10, - "lab_expected_report_marker_count": 17, + "guard_evidence_type_count": 11, + "lab_expected_report_marker_count": 18, "lab_expected_report_markers": [ "Runtime Intelligence Risk Summary", "Runtime replay duration scope", @@ -21,6 +21,7 @@ "AIGuard operation risk rollup evidence", "AIGuard task event rollup evidence", "AIGuard operation timeline evidence", + "AIGuard scheduler fairness evidence", "AIGuard runtime operation anomalies", "AIGuard remote dispatch event summary", "AIGuard remote event summary consistency", @@ -44,6 +45,7 @@ "edgeenv_orchestrator_operation_risk_rollup", "edgeenv_orchestrator_task_event_rollup", "edgeenv_orchestrator_operation_timeline_summary", + "edgeenv_orchestrator_scheduler_fairness_summary", "runtime_history_seed_run_config_traceability", "runtime_queue_overload", "runtime_thermal_instability", @@ -60,6 +62,7 @@ "edgeenv_orchestrator_operation_risk_rollup", "edgeenv_orchestrator_task_event_rollup", "edgeenv_orchestrator_operation_timeline_summary", + "edgeenv_orchestrator_scheduler_fairness_summary", "runtime_history_seed_run_config_traceability", "runtime_thermal_instability", "runtime_queue_overload", diff --git a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.md b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.md index 3b036c2..15c5889 100644 --- a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.md +++ b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment.md @@ -8,10 +8,10 @@ | recommendation | alignment_satisfied | | decision_owner | lab | | diagnosis_owner | aiguard | -| required_evidence_type_count | 9 | +| required_evidence_type_count | 10 | | optional_evidence_type_count | 2 | -| guard_evidence_type_count | 10 | -| lab_expected_report_marker_count | 17 | +| guard_evidence_type_count | 11 | +| lab_expected_report_marker_count | 18 | | lab_report_marker_owner | lab | | report_marker_context_role | lab_report_contract_context | | aiguard_validates_expected_report_markers | False | @@ -23,14 +23,14 @@ | Field | Values | | --- | --- | -| required_evidence_types | runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, runtime_history_seed_run_config_traceability, runtime_queue_overload, runtime_thermal_instability, remote_execution_recovered_by_fallback | +| required_evidence_types | runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, edgeenv_orchestrator_scheduler_fairness_summary, runtime_history_seed_run_config_traceability, runtime_queue_overload, runtime_thermal_instability, remote_execution_recovered_by_fallback | | optional_aiguard_evidence_types | stale_frame_risk, edgeenv_orchestrator_stale_drop_summary | -| guard_analysis_evidence_types | runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_summary, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, runtime_history_seed_run_config_traceability, runtime_thermal_instability, runtime_queue_overload, remote_execution_recovered_by_fallback | +| guard_analysis_evidence_types | runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_summary, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, edgeenv_orchestrator_scheduler_fairness_summary, runtime_history_seed_run_config_traceability, runtime_thermal_instability, runtime_queue_overload, remote_execution_recovered_by_fallback | | missing_required_evidence_types | [] | | optional_guard_evidence_types_present | [] | | missing_optional_evidence_types | edgeenv_orchestrator_stale_drop_summary, stale_frame_risk | | supplemental_guard_evidence_types | edgeenv_orchestrator_operation_risk_summary | -| lab_expected_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 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, 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 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. | | handoff_duration_sources | [] | | handoff_duration_scope_labels | [] | | errors | [] | @@ -43,16 +43,16 @@ InferEdgeAIGuard EdgeEnv handoff alignment summary - 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, 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 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, 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 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 - optional_evidence_context_role: read_only_optional_guard_context - aiguard_validates_optional_evidence_as_required: False - handoff_duration_sources: [] - handoff_duration_scope_labels: [] -- required_evidence_types: [runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, runtime_history_seed_run_config_traceability, runtime_queue_overload, runtime_thermal_instability, remote_execution_recovered_by_fallback] +- required_evidence_types: [runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, edgeenv_orchestrator_scheduler_fairness_summary, runtime_history_seed_run_config_traceability, runtime_queue_overload, runtime_thermal_instability, remote_execution_recovered_by_fallback] - optional_aiguard_evidence_types: [stale_frame_risk, edgeenv_orchestrator_stale_drop_summary] -- guard_analysis_evidence_types: [runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_summary, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, runtime_history_seed_run_config_traceability, runtime_thermal_instability, runtime_queue_overload, remote_execution_recovered_by_fallback] +- guard_analysis_evidence_types: [runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_summary, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, edgeenv_orchestrator_scheduler_fairness_summary, runtime_history_seed_run_config_traceability, runtime_thermal_instability, runtime_queue_overload, remote_execution_recovered_by_fallback] - missing_required_evidence_types: [] - optional_guard_evidence_types_present: [] - missing_optional_evidence_types: [edgeenv_orchestrator_stale_drop_summary, stale_frame_risk] diff --git a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment_optional_present.json b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment_optional_present.json index 8406ddb..16e76ec 100644 --- a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment_optional_present.json +++ b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment_optional_present.json @@ -6,10 +6,10 @@ "diagnosis_owner": "aiguard", "handoff_schema_version": "edgeenv.runtime-intelligence-lab-handoff.v1", "guard_analysis_schema_version": "inferedge-aiguard-diagnosis-v1", - "required_evidence_type_count": 9, + "required_evidence_type_count": 10, "optional_evidence_type_count": 2, - "guard_evidence_type_count": 12, - "lab_expected_report_marker_count": 17, + "guard_evidence_type_count": 13, + "lab_expected_report_marker_count": 18, "lab_expected_report_markers": [ "Runtime Intelligence Risk Summary", "Runtime replay duration scope", @@ -21,6 +21,7 @@ "AIGuard operation risk rollup evidence", "AIGuard task event rollup evidence", "AIGuard operation timeline evidence", + "AIGuard scheduler fairness evidence", "AIGuard runtime operation anomalies", "AIGuard remote dispatch event summary", "AIGuard remote event summary consistency", @@ -44,6 +45,7 @@ "edgeenv_orchestrator_operation_risk_rollup", "edgeenv_orchestrator_task_event_rollup", "edgeenv_orchestrator_operation_timeline_summary", + "edgeenv_orchestrator_scheduler_fairness_summary", "runtime_history_seed_run_config_traceability", "runtime_queue_overload", "runtime_thermal_instability", @@ -60,6 +62,7 @@ "edgeenv_orchestrator_operation_risk_rollup", "edgeenv_orchestrator_task_event_rollup", "edgeenv_orchestrator_operation_timeline_summary", + "edgeenv_orchestrator_scheduler_fairness_summary", "runtime_history_seed_run_config_traceability", "runtime_thermal_instability", "runtime_queue_overload", diff --git a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment_optional_present.md b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment_optional_present.md index 8680242..0b4a5e1 100644 --- a/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment_optional_present.md +++ b/examples/runtime_intelligence_chain/aiguard_edgeenv_handoff_alignment_optional_present.md @@ -8,10 +8,10 @@ | recommendation | alignment_satisfied | | decision_owner | lab | | diagnosis_owner | aiguard | -| required_evidence_type_count | 9 | +| required_evidence_type_count | 10 | | optional_evidence_type_count | 2 | -| guard_evidence_type_count | 12 | -| lab_expected_report_marker_count | 17 | +| guard_evidence_type_count | 13 | +| lab_expected_report_marker_count | 18 | | lab_report_marker_owner | lab | | report_marker_context_role | lab_report_contract_context | | aiguard_validates_expected_report_markers | False | @@ -23,16 +23,16 @@ | Field | Values | | --- | --- | -| required_evidence_types | runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, runtime_history_seed_run_config_traceability, runtime_queue_overload, runtime_thermal_instability, remote_execution_recovered_by_fallback | +| required_evidence_types | runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, edgeenv_orchestrator_scheduler_fairness_summary, runtime_history_seed_run_config_traceability, runtime_queue_overload, runtime_thermal_instability, remote_execution_recovered_by_fallback | | optional_aiguard_evidence_types | stale_frame_risk, edgeenv_orchestrator_stale_drop_summary | -| guard_analysis_evidence_types | runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_summary, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, runtime_history_seed_run_config_traceability, runtime_thermal_instability, runtime_queue_overload, remote_execution_recovered_by_fallback, stale_frame_risk, edgeenv_orchestrator_stale_drop_summary | +| guard_analysis_evidence_types | runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_summary, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, edgeenv_orchestrator_scheduler_fairness_summary, runtime_history_seed_run_config_traceability, runtime_thermal_instability, runtime_queue_overload, remote_execution_recovered_by_fallback, stale_frame_risk, edgeenv_orchestrator_stale_drop_summary | | missing_required_evidence_types | [] | | optional_guard_evidence_types_present | edgeenv_orchestrator_stale_drop_summary, stale_frame_risk | | missing_optional_evidence_types | [] | | optional_present_source_artifact | InferEdgeAIGuard/examples/runtime_intelligence/aiguard_runtime_operation_guard_analysis_optional_stale_drop.json | | optional_present_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 | | supplemental_guard_evidence_types | edgeenv_orchestrator_operation_risk_summary, edgeenv_orchestrator_stale_drop_summary, stale_frame_risk | -| lab_expected_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 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, 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 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. | | handoff_duration_sources | [] | | handoff_duration_scope_labels | [] | | errors | [] | @@ -45,16 +45,16 @@ InferEdgeAIGuard EdgeEnv handoff alignment summary - 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, 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 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, 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 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 - optional_evidence_context_role: read_only_optional_guard_context - aiguard_validates_optional_evidence_as_required: False - handoff_duration_sources: [] - handoff_duration_scope_labels: [] -- required_evidence_types: [runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, runtime_history_seed_run_config_traceability, runtime_queue_overload, runtime_thermal_instability, remote_execution_recovered_by_fallback] +- required_evidence_types: [runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, edgeenv_orchestrator_scheduler_fairness_summary, runtime_history_seed_run_config_traceability, runtime_queue_overload, runtime_thermal_instability, remote_execution_recovered_by_fallback] - optional_aiguard_evidence_types: [stale_frame_risk, edgeenv_orchestrator_stale_drop_summary] -- guard_analysis_evidence_types: [runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_summary, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, runtime_history_seed_run_config_traceability, runtime_thermal_instability, runtime_queue_overload, remote_execution_recovered_by_fallback, stale_frame_risk, edgeenv_orchestrator_stale_drop_summary] +- guard_analysis_evidence_types: [runtime_telemetry_context_coverage, edgeenv_orchestrator_producer_lineage, edgeenv_orchestrator_operation_risk_summary, edgeenv_orchestrator_operation_risk_rollup, edgeenv_orchestrator_task_event_rollup, edgeenv_orchestrator_operation_timeline_summary, edgeenv_orchestrator_scheduler_fairness_summary, runtime_history_seed_run_config_traceability, runtime_thermal_instability, runtime_queue_overload, remote_execution_recovered_by_fallback, stale_frame_risk, edgeenv_orchestrator_stale_drop_summary] - missing_required_evidence_types: [] - optional_guard_evidence_types_present: [edgeenv_orchestrator_stale_drop_summary, stale_frame_risk] - missing_optional_evidence_types: [] diff --git a/examples/runtime_intelligence_chain/aiguard_runtime_operation_guard_analysis.json b/examples/runtime_intelligence_chain/aiguard_runtime_operation_guard_analysis.json index 64fd59b..31e23e2 100644 --- a/examples/runtime_intelligence_chain/aiguard_runtime_operation_guard_analysis.json +++ b/examples/runtime_intelligence_chain/aiguard_runtime_operation_guard_analysis.json @@ -1547,6 +1547,98 @@ } } }, + { + "type": "edgeenv_orchestrator_scheduler_fairness_summary", + "metric_name": "orchestrator_scheduler_fairness_marker_count", + "observed_value": 4, + "baseline_value": 0, + "threshold": 1, + "delta": null, + "delta_pct": null, + "increase_factor": null, + "severity": "medium", + "status": "warning", + "explanation": "EdgeEnv preserved Orchestrator scheduler_fairness_summary with 4 deterministic review marker(s).", + "why_it_matters": "The preserved fairness summary shows which high-priority tasks were protected and which workloads carried starvation, delay, or degradation risk without making AIGuard the final deployment owner.", + "suspected_causes": [ + "scheduler_starvation_context", + "scheduler_delay_context", + "worker_degradation_context", + "high_priority_protection_context" + ], + "recommendation": "Review scheduler_fairness_summary in Lab alongside queue pressure, policy decisions, and worker health before treating the operation profile as stable.", + "raw_context": { + "scheduler_fairness_summary": { + "summary": { + "schema_version": "inferedge-orchestrator-scheduler-fairness-summary-v1", + "operation_context_role": "supplemental" + }, + "boundary_markers_valid": true, + "protected_high_priority_tasks": [ + "safety_monitor_agent" + ], + "tasks_with_starvation_risk": [ + "vision_agent", + "voice_command_agent" + ], + "tasks_with_scheduler_delay": [ + "vision_agent" + ], + "tasks_with_degradation": [ + "vision_agent", + "voice_command_agent" + ], + "task_fairness": { + "safety_monitor_agent": { + "priority": 100, + "executed_count": 20, + "dropped_count": 0, + "fallback_count": 0, + "scheduler_delay_event_count": 0, + "health_state": "healthy", + "starvation_risk": false, + "starvation_reasons": [] + }, + "vision_agent": { + "priority": 80, + "executed_count": 18, + "dropped_count": 4, + "fallback_count": 0, + "scheduler_delay_event_count": 1, + "max_scheduler_delay_cycles": 3, + "health_state": "degraded", + "starvation_risk": true, + "starvation_reasons": [ + "scheduler_delay_present", + "worker_degraded" + ] + }, + "voice_command_agent": { + "priority": 50, + "executed_count": 4, + "dropped_count": 1, + "fallback_count": 1, + "scheduler_delay_event_count": 0, + "health_state": "degraded", + "starvation_risk": true, + "starvation_reasons": [ + "fallback_policy_used", + "worker_degraded" + ] + } + }, + "review_markers": [ + "scheduler_starvation_context", + "scheduler_delay_context", + "worker_degradation_context", + "high_priority_protection_context" + ], + "decision_owner": "lab", + "scheduler_owner": "orchestrator", + "not_a_deployment_decision": true + } + } + }, { "type": "runtime_history_seed_run_config_traceability", "metric_name": "runtime_history_seed_run_config_runs", diff --git a/examples/runtime_intelligence_chain/bundle_manifest.json b/examples/runtime_intelligence_chain/bundle_manifest.json index 358c957..8b818ee 100644 --- a/examples/runtime_intelligence_chain/bundle_manifest.json +++ b/examples/runtime_intelligence_chain/bundle_manifest.json @@ -56,6 +56,7 @@ "AIGuard operation risk rollup evidence", "AIGuard task event rollup evidence", "AIGuard operation timeline evidence", + "AIGuard scheduler fairness evidence", "AIGuard runtime operation anomalies", "AIGuard remote dispatch event summary", "AIGuard remote event summary consistency", diff --git a/examples/runtime_intelligence_chain/edgeenv_lab_handoff_manifest.json b/examples/runtime_intelligence_chain/edgeenv_lab_handoff_manifest.json index 5b351c2..e072300 100644 --- a/examples/runtime_intelligence_chain/edgeenv_lab_handoff_manifest.json +++ b/examples/runtime_intelligence_chain/edgeenv_lab_handoff_manifest.json @@ -63,6 +63,7 @@ "edgeenv_orchestrator_operation_risk_rollup", "edgeenv_orchestrator_task_event_rollup", "edgeenv_orchestrator_operation_timeline_summary", + "edgeenv_orchestrator_scheduler_fairness_summary", "runtime_history_seed_run_config_traceability", "runtime_queue_overload", "runtime_thermal_instability", @@ -109,6 +110,7 @@ "AIGuard operation risk rollup evidence", "AIGuard task event rollup evidence", "AIGuard operation timeline evidence", + "AIGuard scheduler fairness evidence", "AIGuard runtime operation anomalies", "AIGuard remote dispatch event summary", "AIGuard remote event summary consistency", diff --git a/inferedgelab/report/runtime_intelligence.py b/inferedgelab/report/runtime_intelligence.py index 03734a9..efdb61f 100644 --- a/inferedgelab/report/runtime_intelligence.py +++ b/inferedgelab/report/runtime_intelligence.py @@ -30,6 +30,10 @@ "edgeenv_orchestrator_operation_timeline_summary" ) +ORCHESTRATOR_SCHEDULER_FAIRNESS_EVIDENCE_TYPE = ( + "edgeenv_orchestrator_scheduler_fairness_summary" +) + RUN_CONFIG_TRACEABILITY_EVIDENCE_TYPE = "runtime_history_seed_run_config_traceability" REMOTE_RUNTIME_EVENT_SUMMARY_MISMATCH_EVIDENCE_TYPE = ( @@ -1550,6 +1554,16 @@ def _append_aiguard_runtime_operation_rows( ) ) + scheduler_fairness_label = _aiguard_scheduler_fairness_label(evidence_items) + if scheduler_fairness_label: + rows.append( + ( + "AIGuard scheduler fairness evidence", + scheduler_fairness_label, + "AIGuard preserves scheduler fairness context as deterministic review evidence; Lab still owns the deployment decision.", + ) + ) + candidate_summary = guard_analysis.get("candidate_summary") if not isinstance(candidate_summary, dict): return @@ -1982,6 +1996,46 @@ def _aiguard_operation_timeline_label( return ", ".join(parts) +def _aiguard_scheduler_fairness_label( + evidence_items: list[dict[str, Any]], +) -> str: + evidence = _find_evidence_item( + evidence_items, + ORCHESTRATOR_SCHEDULER_FAIRNESS_EVIDENCE_TYPE, + ) + if evidence is None: + return "" + + parts: list[str] = [] + status = evidence.get("status") + if status is not None: + parts.append(f"status={status}") + observed = evidence.get("observed_value") + if observed is not None: + parts.append(f"markers={_format_compact_value(observed)}") + + raw_context = evidence.get("raw_context") + if isinstance(raw_context, dict): + context = raw_context.get("scheduler_fairness_summary") + if isinstance(context, dict): + protected_tasks = _string_list(context.get("protected_high_priority_tasks")) + if protected_tasks: + parts.append("protected=" + ",".join(protected_tasks)) + starvation_tasks = _string_list(context.get("tasks_with_starvation_risk")) + if starvation_tasks: + parts.append("starvation=" + ",".join(starvation_tasks)) + delay_tasks = _string_list(context.get("tasks_with_scheduler_delay")) + if delay_tasks: + parts.append("scheduler_delay=" + ",".join(delay_tasks)) + degraded_tasks = _string_list(context.get("tasks_with_degradation")) + if degraded_tasks: + parts.append("degraded=" + ",".join(degraded_tasks)) + boundary_valid = context.get("boundary_markers_valid") + if boundary_valid is not None: + parts.append(f"boundary_valid={boundary_valid}") + return ", ".join(parts) + + def _append_aiguard_remote_dispatch_rows( rows: list[tuple[str, str, str]], guard_analysis: dict[str, Any], diff --git a/scripts/check_runtime_intelligence_artifact_bundle.py b/scripts/check_runtime_intelligence_artifact_bundle.py index 14649b4..d211ee2 100644 --- a/scripts/check_runtime_intelligence_artifact_bundle.py +++ b/scripts/check_runtime_intelligence_artifact_bundle.py @@ -149,6 +149,13 @@ "aiguard_operation_timeline_type": ( "edgeenv_orchestrator_operation_timeline_summary" ), + "aiguard_scheduler_fairness_evidence": ( + "| AIGuard scheduler fairness evidence | " + "status=warning, markers=4" + ), + "aiguard_scheduler_fairness_type": ( + "edgeenv_orchestrator_scheduler_fairness_summary" + ), "aiguard_remote_dispatch_summary": ( "| AIGuard remote dispatch event summary | " "events=3, final=succeeded, fallback_recovered=True |" @@ -272,6 +279,12 @@ "aiguard_operation_timeline_type": ( "edgeenv_orchestrator_operation_timeline_summary" ), + "aiguard_scheduler_fairness_evidence": ( + "AIGuard scheduler fairness evidence" + ), + "aiguard_scheduler_fairness_type": ( + "edgeenv_orchestrator_scheduler_fairness_summary" + ), "aiguard_remote_dispatch_summary": "AIGuard remote dispatch event summary", "aiguard_remote_dispatch_label": ( "events=3, final=succeeded, fallback_recovered=True" diff --git a/scripts/check_runtime_intelligence_bundle_manifest.py b/scripts/check_runtime_intelligence_bundle_manifest.py index e1d77f5..bcf8481 100644 --- a/scripts/check_runtime_intelligence_bundle_manifest.py +++ b/scripts/check_runtime_intelligence_bundle_manifest.py @@ -100,6 +100,7 @@ "edgeenv_orchestrator_operation_risk_rollup", "edgeenv_orchestrator_task_event_rollup", "edgeenv_orchestrator_operation_timeline_summary", + "edgeenv_orchestrator_scheduler_fairness_summary", "runtime_history_seed_run_config_traceability", "runtime_queue_overload", "runtime_thermal_instability", @@ -175,6 +176,7 @@ "AIGuard operation risk rollup evidence", "AIGuard task event rollup evidence", "AIGuard operation timeline evidence", + "AIGuard scheduler fairness evidence", "AIGuard runtime operation anomalies", "AIGuard remote dispatch event summary", "AIGuard remote event summary consistency", @@ -202,10 +204,12 @@ "aiguard_evidence: edgeenv_orchestrator_operation_risk_rollup validated", "aiguard_evidence: edgeenv_orchestrator_task_event_rollup validated", "aiguard_evidence: edgeenv_orchestrator_operation_timeline_summary validated", + "aiguard_evidence: edgeenv_orchestrator_scheduler_fairness_summary validated", "aiguard_evidence: runtime_history_seed_run_config_traceability validated", "aiguard_evidence: remote_execution_recovered_by_fallback validated", "aiguard_raw_context: producer_lineage_shape preserved", "aiguard_raw_context: task_event_rollup preserved", + "aiguard_raw_context: scheduler_fairness_summary preserved", "aiguard_raw_context: history_seed_run_config_traceability preserved", "aiguard_raw_context: remote_runtime_event_summary preserved", "aiguard_raw_context: remote_runtime_summary_boundary preserved", @@ -1887,6 +1891,8 @@ def _validate_guard_analysis(guard_analysis: dict[str, Any], errors: list[str]) _validate_task_event_rollup_evidence(item, index, errors) if item.get("type") == "edgeenv_orchestrator_operation_timeline_summary": _validate_operation_timeline_evidence(item, index, errors) + if item.get("type") == "edgeenv_orchestrator_scheduler_fairness_summary": + _validate_scheduler_fairness_evidence(item, index, errors) if item.get("type") == "runtime_history_seed_run_config_traceability": _validate_run_config_traceability_evidence(item, index, errors) if item.get("type") == "remote_execution_recovered_by_fallback": @@ -2411,6 +2417,80 @@ def _validate_operation_timeline_evidence( ) +def _validate_scheduler_fairness_evidence( + item: dict[str, Any], + index: int, + errors: list[str], +) -> None: + _record( + item.get("status") == "warning", + errors, + f"AIGuard evidence[{index}] scheduler fairness status must be warning", + ) + _record( + item.get("observed_value") == 4, + errors, + f"AIGuard evidence[{index}] scheduler fairness observed_value must be 4", + ) + raw_context = item.get("raw_context") or {} + fairness = raw_context.get("scheduler_fairness_summary") + _record( + isinstance(fairness, dict), + errors, + f"AIGuard evidence[{index}] raw_context.scheduler_fairness_summary must be an object", + ) + if not isinstance(fairness, dict): + return + + _record( + fairness.get("boundary_markers_valid") is True, + errors, + f"AIGuard evidence[{index}] scheduler_fairness_summary.boundary_markers_valid " + "must be true", + ) + _record( + fairness.get("protected_high_priority_tasks") == ["safety_monitor_agent"], + errors, + f"AIGuard evidence[{index}] scheduler_fairness_summary.protected_high_priority_tasks " + "must preserve safety_monitor_agent", + ) + _record( + fairness.get("tasks_with_starvation_risk") + == ["vision_agent", "voice_command_agent"], + errors, + f"AIGuard evidence[{index}] scheduler_fairness_summary.tasks_with_starvation_risk " + "must preserve vision_agent and voice_command_agent", + ) + _record( + fairness.get("tasks_with_scheduler_delay") == ["vision_agent"], + errors, + f"AIGuard evidence[{index}] scheduler_fairness_summary.tasks_with_scheduler_delay " + "must preserve vision_agent", + ) + _record( + fairness.get("tasks_with_degradation") + == ["vision_agent", "voice_command_agent"], + errors, + f"AIGuard evidence[{index}] scheduler_fairness_summary.tasks_with_degradation " + "must preserve vision_agent and voice_command_agent", + ) + _record( + fairness.get("decision_owner") == "lab", + errors, + f"AIGuard evidence[{index}] scheduler_fairness_summary.decision_owner must be lab", + ) + _record( + fairness.get("scheduler_owner") == "orchestrator", + errors, + f"AIGuard evidence[{index}] scheduler_fairness_summary.scheduler_owner must be orchestrator", + ) + _record( + fairness.get("not_a_deployment_decision") is True, + errors, + f"AIGuard evidence[{index}] scheduler_fairness_summary.not_a_deployment_decision must be true", + ) + + def _validate_run_config_traceability_evidence( item: dict[str, Any], index: int, diff --git a/scripts/check_runtime_intelligence_ci_artifacts.py b/scripts/check_runtime_intelligence_ci_artifacts.py index 0af11e4..655e15f 100644 --- a/scripts/check_runtime_intelligence_ci_artifacts.py +++ b/scripts/check_runtime_intelligence_ci_artifacts.py @@ -46,10 +46,12 @@ "aiguard_evidence: edgeenv_orchestrator_producer_lineage validated", "aiguard_evidence: edgeenv_orchestrator_task_event_rollup validated", "aiguard_evidence: edgeenv_orchestrator_operation_timeline_summary validated", + "aiguard_evidence: edgeenv_orchestrator_scheduler_fairness_summary validated", "aiguard_evidence: runtime_history_seed_run_config_traceability validated", "aiguard_evidence: remote_execution_recovered_by_fallback validated", "aiguard_raw_context: producer_lineage_shape preserved", "aiguard_raw_context: task_event_rollup preserved", + "aiguard_raw_context: scheduler_fairness_summary preserved", "aiguard_raw_context: history_seed_run_config_traceability preserved", "aiguard_raw_context: remote_runtime_event_summary preserved", "aiguard_raw_context: remote_runtime_summary_boundary preserved", @@ -89,6 +91,7 @@ "AIGuard operation risk rollup evidence", "AIGuard task event rollup evidence", "AIGuard operation timeline evidence", + "AIGuard scheduler fairness evidence", "AIGuard runtime operation anomalies", "AIGuard remote dispatch event summary", "AIGuard remote event summary consistency", @@ -541,6 +544,7 @@ def _validate_aiguard_handoff_alignment( "AIGuard operation risk rollup evidence, " "AIGuard task event rollup evidence, " "AIGuard operation timeline evidence, " + "AIGuard scheduler fairness evidence, " "AIGuard runtime operation anomalies, AIGuard remote dispatch event summary, " "AIGuard remote event summary consistency, " "Remote fallback starter evidence, " diff --git a/tests/test_runtime_intelligence_ci_template.py b/tests/test_runtime_intelligence_ci_template.py index 3940194..fd69523 100644 --- a/tests/test_runtime_intelligence_ci_template.py +++ b/tests/test_runtime_intelligence_ci_template.py @@ -168,6 +168,8 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p "edgeenv_orchestrator_task_event_rollup", "AIGuard operation timeline evidence", "edgeenv_orchestrator_operation_timeline_summary", + "AIGuard scheduler fairness evidence", + "edgeenv_orchestrator_scheduler_fairness_summary", "Lab EdgeEnv preservation context", "lab_report_preservation_context_present=True", "lab_preservation=present", @@ -221,10 +223,12 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p "- aiguard_evidence: edgeenv_orchestrator_operation_risk_rollup validated", "- aiguard_evidence: edgeenv_orchestrator_task_event_rollup validated", "- aiguard_evidence: edgeenv_orchestrator_operation_timeline_summary validated", + "- aiguard_evidence: edgeenv_orchestrator_scheduler_fairness_summary validated", "- aiguard_evidence: runtime_history_seed_run_config_traceability validated", "- aiguard_evidence: remote_execution_recovered_by_fallback validated", "- aiguard_raw_context: producer_lineage_shape preserved", "- aiguard_raw_context: task_event_rollup preserved", + "- aiguard_raw_context: scheduler_fairness_summary preserved", "- aiguard_raw_context: history_seed_run_config_traceability preserved", "- aiguard_raw_context: remote_runtime_event_summary preserved", "- aiguard_raw_context: remote_runtime_summary_boundary preserved", @@ -268,7 +272,7 @@ 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":17,' + '"lab_expected_report_marker_count":18,' '"lab_expected_report_markers":[' '"Runtime Intelligence Risk Summary",' '"Runtime replay duration scope",' @@ -280,6 +284,7 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p '"AIGuard operation risk rollup evidence",' '"AIGuard task event rollup evidence",' '"AIGuard operation timeline evidence",' + '"AIGuard scheduler fairness evidence",' '"AIGuard runtime operation anomalies",' '"AIGuard remote dispatch event summary",' '"AIGuard remote event summary consistency",' @@ -312,7 +317,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, 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 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, 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 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", "- optional_evidence_context_role: read_only_optional_guard_context", @@ -331,7 +336,7 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p ).write_text( '{"schema_version":"inferedge-aiguard-edgeenv-handoff-alignment-v1",' '"status":"passed","decision_owner":"lab","diagnosis_owner":"aiguard",' - '"lab_expected_report_marker_count":17,' + '"lab_expected_report_marker_count":18,' '"lab_expected_report_markers":[' '"Runtime Intelligence Risk Summary",' '"Runtime replay duration scope",' @@ -343,6 +348,7 @@ def test_runtime_intelligence_ci_artifact_gate_passes_for_expected_outputs(tmp_p '"AIGuard operation risk rollup evidence",' '"AIGuard task event rollup evidence",' '"AIGuard operation timeline evidence",' + '"AIGuard scheduler fairness evidence",' '"AIGuard runtime operation anomalies",' '"AIGuard remote dispatch event summary",' '"AIGuard remote event summary consistency",' @@ -394,7 +400,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, 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 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, 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 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", "- optional_evidence_context_role: read_only_optional_guard_context", @@ -656,6 +662,8 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_missing_lab_marker_cont "edgeenv_orchestrator_task_event_rollup", "AIGuard operation timeline evidence", "edgeenv_orchestrator_operation_timeline_summary", + "AIGuard scheduler fairness evidence", + "edgeenv_orchestrator_scheduler_fairness_summary", "Lab EdgeEnv preservation context", "lab_report_preservation_context_present=True", "lab_preservation=present", @@ -709,6 +717,7 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_missing_lab_marker_cont "- aiguard_evidence: edgeenv_orchestrator_operation_risk_rollup validated", "- aiguard_evidence: edgeenv_orchestrator_task_event_rollup validated", "- aiguard_evidence: edgeenv_orchestrator_operation_timeline_summary validated", + "- aiguard_evidence: edgeenv_orchestrator_scheduler_fairness_summary validated", "- aiguard_evidence: runtime_history_seed_run_config_traceability validated", "- aiguard_evidence: remote_execution_recovered_by_fallback validated", "- aiguard_raw_context: producer_lineage_shape preserved", @@ -830,6 +839,8 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_missing_contract_marker "edgeenv_orchestrator_task_event_rollup", "AIGuard operation timeline evidence", "edgeenv_orchestrator_operation_timeline_summary", + "AIGuard scheduler fairness evidence", + "edgeenv_orchestrator_scheduler_fairness_summary", "Lab EdgeEnv preservation context", "lab_report_preservation_context_present=True", "lab_preservation=present", @@ -934,6 +945,8 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_missing_coverage_gap_ma "edgeenv_orchestrator_task_event_rollup", "AIGuard operation timeline evidence", "edgeenv_orchestrator_operation_timeline_summary", + "AIGuard scheduler fairness evidence", + "edgeenv_orchestrator_scheduler_fairness_summary", "Lab EdgeEnv preservation context", "lab_report_preservation_context_present=True", "lab_preservation=present", @@ -1023,6 +1036,8 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_failed_deployment_risk( "edgeenv_orchestrator_task_event_rollup", "AIGuard operation timeline evidence", "edgeenv_orchestrator_operation_timeline_summary", + "AIGuard scheduler fairness evidence", + "edgeenv_orchestrator_scheduler_fairness_summary", "Lab EdgeEnv preservation context", "lab_report_preservation_context_present=True", "lab_preservation=present", @@ -1076,6 +1091,7 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_failed_deployment_risk( "- aiguard_evidence: edgeenv_orchestrator_operation_risk_rollup validated", "- aiguard_evidence: edgeenv_orchestrator_task_event_rollup validated", "- aiguard_evidence: edgeenv_orchestrator_operation_timeline_summary validated", + "- aiguard_evidence: edgeenv_orchestrator_scheduler_fairness_summary validated", "- aiguard_evidence: runtime_history_seed_run_config_traceability validated", "- aiguard_evidence: remote_execution_recovered_by_fallback validated", "- aiguard_raw_context: producer_lineage_shape preserved", @@ -1119,7 +1135,7 @@ 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":17,' + '"lab_expected_report_marker_count":18,' '"lab_expected_report_markers":[' '"Runtime Intelligence Risk Summary",' '"Runtime replay duration scope",' @@ -1131,6 +1147,7 @@ def test_runtime_intelligence_ci_artifact_gate_fails_for_failed_deployment_risk( '"AIGuard operation risk rollup evidence",' '"AIGuard task event rollup evidence",' '"AIGuard operation timeline evidence",' + '"AIGuard scheduler fairness evidence",' '"AIGuard runtime operation anomalies",' '"AIGuard remote dispatch event summary",' '"AIGuard remote event summary consistency",' @@ -1154,7 +1171,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, 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 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, 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 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",