fix(cli): add per-tier budget utilization breakdown to context show
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 54s
CI / benchmark-regression (pull_request) Failing after 1m0s
CI / quality (pull_request) Successful in 1m9s
CI / typecheck (pull_request) Successful in 1m18s
CI / security (pull_request) Successful in 1m18s
CI / helm (pull_request) Successful in 29s
CI / build (pull_request) Successful in 40s
CI / push-validation (pull_request) Successful in 24s
CI / integration_tests (pull_request) Successful in 3m14s
CI / unit_tests (pull_request) Successful in 4m22s
CI / e2e_tests (pull_request) Failing after 3m30s
CI / docker (pull_request) Successful in 2m13s
CI / coverage (pull_request) Successful in 11m12s
CI / status-check (pull_request) Failing after 4s
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 54s
CI / benchmark-regression (pull_request) Failing after 1m0s
CI / quality (pull_request) Successful in 1m9s
CI / typecheck (pull_request) Successful in 1m18s
CI / security (pull_request) Successful in 1m18s
CI / helm (pull_request) Successful in 29s
CI / build (pull_request) Successful in 40s
CI / push-validation (pull_request) Successful in 24s
CI / integration_tests (pull_request) Successful in 3m14s
CI / unit_tests (pull_request) Successful in 4m22s
CI / e2e_tests (pull_request) Failing after 3m30s
CI / docker (pull_request) Successful in 2m13s
CI / coverage (pull_request) Successful in 11m12s
CI / status-check (pull_request) Failing after 4s
Extends the budget utilization summary in `context show` to display hot/warm/cold tier utilization percentages individually, satisfying the spec requirement for a per-tier breakdown. Previously only hot tier utilization was shown. - Hot tier: tokens used vs. max_tokens_hot budget - Warm tier: fragment count vs. max_decisions_warm budget - Cold tier: fragment count vs. max_decisions_cold budget Also updates Robot Framework helper to verify per-tier breakdown is present in output, and updates CHANGELOG/CONTRIBUTORS. ISSUES CLOSED: #9586
This commit is contained in:
+3
-1
@@ -22,5 +22,7 @@ Below are some of the specific details of various contributions.
|
||||
* HAL 9000 has contributed the benchmark workflow separation (#9040): moved the benchmark-regression job out of the default PR workflow into a dedicated scheduled workflow, reducing median PR CI turnaround time from 99-132 minutes to under 30 minutes.
|
||||
* HAL 9000 has contributed the agent-evolution-pool-supervisor PR metadata assignment (#7888): the supervisor now automatically looks up the Type/Automation label and earliest open milestone before dispatching improvement PR creation workers, ensuring all generated improvement PRs have correct Type labels and milestone assignments.
|
||||
* HAL 9000 has contributed the decision recording hook for the Strategize phase (issue #8522): captures every decision point with question, chosen option, alternatives, confidence, rationale, and full context snapshot for replay and correction.
|
||||
* HAL 9000 has contributed the ACMS context CLI commands (`context show` and `context clear`) for the ACMS v1 milestone, including BDD test coverage, Robot Framework integration tests, ASV performance benchmarks, and per-tier budget utilization breakdown (issue #9586).
|
||||
* HAL 9000 has contributed automated bug fixes, CLI output formatting improvements, and ongoing maintenance as part of the CleverAgents automation system.
|
||||
* HAL 9000 has contributed the ACMS context CLI commands (`context show` and `context clear`) for the ACMS v1 milestone, including full BDD test coverage, Robot Framework integration tests, ASV performance benchmarks, and per-tier budget utilization breakdown (issue #9586).
|
||||
* This project was made possible thanks to considerable donation of time, money, and resources by CleverThis, Inc.
|
||||
>>>>>>> 829b1755 (fix(cli): add per-tier budget utilization breakdown to context show)
|
||||
|
||||
@@ -150,6 +150,14 @@ def _cmd_context_show() -> int:
|
||||
if expected not in output:
|
||||
print(f"acms-fail: expected {expected!r} in output\n{output}")
|
||||
return 1
|
||||
# Verify per-tier budget utilization breakdown is present
|
||||
for tier_label in ("Hot tier", "Warm tier", "Cold tier"):
|
||||
if tier_label not in output:
|
||||
print(
|
||||
f"acms-fail: expected per-tier breakdown"
|
||||
f" '{tier_label}' in output\n{output}"
|
||||
)
|
||||
return 1
|
||||
print("acms-context-show-ok")
|
||||
return 0
|
||||
|
||||
|
||||
@@ -133,18 +133,31 @@ def acms_context_show(
|
||||
# Display tier metrics using actual token counts per tier
|
||||
metrics = tier_service.get_metrics()
|
||||
budget = tier_service.budget
|
||||
utilization = _format_budget_utilization(hot_tokens, budget.max_tokens_hot or 1)
|
||||
hot_utilization = _format_budget_utilization(
|
||||
hot_tokens, budget.max_tokens_hot or 1
|
||||
)
|
||||
warm_utilization = _format_budget_utilization(
|
||||
metrics.warm_count, budget.max_decisions_warm or 1
|
||||
)
|
||||
cold_utilization = _format_budget_utilization(
|
||||
metrics.cold_count, budget.max_decisions_cold or 1
|
||||
)
|
||||
console.print("\n[bold]Budget Utilization:[/bold]")
|
||||
console.print(
|
||||
f" Hot tier: {metrics.hot_count} fragments ({hot_tokens:,} tokens)"
|
||||
f" Hot tier: {metrics.hot_count} fragments"
|
||||
f" ({hot_tokens:,} tokens)"
|
||||
f" — {hot_utilization} of token budget"
|
||||
)
|
||||
console.print(
|
||||
f" Warm tier: {metrics.warm_count} fragments ({warm_tokens:,} tokens)"
|
||||
f" Warm tier: {metrics.warm_count} fragments"
|
||||
f" ({warm_tokens:,} tokens)"
|
||||
f" — {warm_utilization} of decision budget"
|
||||
)
|
||||
console.print(
|
||||
f" Cold tier: {metrics.cold_count} fragments ({cold_tokens:,} tokens)"
|
||||
f" Cold tier: {metrics.cold_count} fragments"
|
||||
f" ({cold_tokens:,} tokens)"
|
||||
f" — {cold_utilization} of decision budget"
|
||||
)
|
||||
console.print(f" Hot utilization: {utilization}")
|
||||
|
||||
except CleverAgentsError as e:
|
||||
_logger.exception("ACMS context show failed for view %r", view)
|
||||
|
||||
Reference in New Issue
Block a user