Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/agent_orchestration_summary_contract.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ deployment judgement를 수행하지 않습니다.
checker 출력은 compact `operation_timeline` review hint와 stale-drop count/task도
함께 보여주므로, reviewer가 전체 JSON을 열기 전에
queue delay/fallback/deadline/stale drop pressure를 확인할 수 있습니다.
`run-multi-workload-sustained` CLI도 `operation_risk_rollup`에서 가져온
`operation-risk` first-read line을 출력해 risk level, primary reason, affected
task를 바로 보여줍니다. 이는 reviewer navigation aid일 뿐이며 JSON rollup이
source evidence이고, deployment decision owner는 계속 Lab입니다.

## Compatibility Rules

Expand Down
4 changes: 4 additions & 0 deletions docs/agent_orchestration_summary_contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ markers only; it does not perform regression analysis or deployment judgement.
The checker output also prints the compact `operation_timeline` review hints and
stale-drop count/tasks so reviewers can see queue delay/fallback/deadline/stale
drop pressure without opening the full JSON first.
The `run-multi-workload-sustained` CLI also prints an `operation-risk` first-read
line from `operation_risk_rollup` with risk level, primary reasons, and affected
tasks. This is a reviewer navigation aid only; the JSON rollup remains the
source evidence, and Lab remains the deployment decision owner.

## Compatibility Rules

Expand Down
14 changes: 14 additions & 0 deletions src/inferedge_orchestrator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def _run_multi_workload_sustained(args: argparse.Namespace) -> int:
policy_pressure = (
timeline.get("policy_pressure", {}) if isinstance(timeline, dict) else {}
)
risk_rollup = report.get("operation_risk_rollup", {})
review_hints = timeline.get("review_hints", []) if isinstance(timeline, dict) else []
print(f"wrote sustained telemetry: {args.output}")
if args.edgeenv_feed_output:
Expand Down Expand Up @@ -250,6 +251,19 @@ def _run_multi_workload_sustained(args: argparse.Namespace) -> int:
f"fallback={_format_cli_list(policy_pressure.get('fallback_tasks'))} "
f"markers={_format_cli_list(policy_pressure.get('pressure_markers'))}"
)
if isinstance(risk_rollup, dict) and risk_rollup:
affected = risk_rollup.get("affected_tasks", {})
if not isinstance(affected, dict):
affected = {}
print(
"operation-risk: "
f"level={risk_rollup.get('risk_level', 'unknown')} "
f"first_read={risk_rollup.get('first_read', 'unknown')} "
f"reasons={_format_cli_list(risk_rollup.get('primary_reasons'))} "
f"scheduler_delay={_format_cli_list(affected.get('scheduler_delay'))} "
f"fallback={_format_cli_list(affected.get('fallback'))} "
f"degraded={_format_cli_list(affected.get('degraded'))}"
)
return 0


Expand Down
5 changes: 5 additions & 0 deletions tests/test_multi_workload_sustained.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,9 @@ def test_cli_run_multi_workload_sustained_writes_edgeenv_feed_output(
assert "limited=" in captured.out
assert "protected=" in captured.out
assert "markers=" in captured.out
assert "operation-risk: level=review" in captured.out
assert "first_read=review_operation_risk_context" in captured.out
assert "reasons=queue_pressure_overloaded" in captured.out
report = json.loads(output.read_text(encoding="utf-8"))
feed = json.loads(feed_output.read_text(encoding="utf-8"))
assert feed == report["edgeenv_runtime_telemetry_feed"]
Expand Down Expand Up @@ -1303,6 +1306,8 @@ def test_cli_device_local_overrides_write_edgeenv_feed_output(
assert "stale_drop=" in captured.out
assert "stale_drop_tasks=" in captured.out
assert "max_queue_wait_ms=" in captured.out
assert "operation-risk: level=review" in captured.out
assert "first_read=review_operation_risk_context" in captured.out
report = json.loads(output.read_text(encoding="utf-8"))
feed = json.loads(feed_output.read_text(encoding="utf-8"))
assert feed == report["edgeenv_runtime_telemetry_feed"]
Expand Down