1 Commits

Author SHA1 Message Date
HAL9000 3b66bf08f5 feat(acms): implement context analysis engine with tier distribution and budget utilization metrics
CI / push-validation (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 31s
CI / build (pull_request) Successful in 57s
CI / lint (pull_request) Successful in 1m17s
CI / quality (pull_request) Successful in 1m29s
CI / security (pull_request) Successful in 1m33s
CI / typecheck (pull_request) Successful in 1m45s
CI / integration_tests (pull_request) Successful in 3m38s
CI / e2e_tests (pull_request) Successful in 4m0s
CI / unit_tests (pull_request) Successful in 5m5s
CI / docker (pull_request) Successful in 1m49s
CI / benchmark-publish (pull_request) Has been skipped
CI / coverage (pull_request) Successful in 11m41s
CI / status-check (pull_request) Successful in 3s
CI / push-validation (push) Successful in 25s
CI / helm (push) Successful in 33s
CI / quality (push) Successful in 1m15s
CI / build (push) Successful in 58s
CI / lint (push) Successful in 1m39s
CI / typecheck (push) Successful in 1m45s
CI / security (push) Successful in 1m45s
CI / integration_tests (push) Successful in 3m56s
CI / e2e_tests (push) Successful in 4m34s
CI / unit_tests (push) Successful in 5m21s
CI / docker (push) Successful in 1m49s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Has started running
CI / coverage (push) Successful in 11m24s
CI / status-check (push) Successful in 4s
CI / benchmark-regression (pull_request) Successful in 1h4m44s
Introduces a new ContextAnalysisEngine service to unify ACMS context analysis across tiered storage.
It computes and exposes key observability metrics and provides flexible formatting for tooling and dashboards.
Metrics include:
- entry_count(): total entries across all tiers
- tier_distribution(): per-tier counts and sizes (hot, warm, cold)
- budget_utilization(): current total size vs. configured max, as a percentage
- top_files(n): top-N entries by access_count in descending order
- analyze(top_n): combined analysis result aggregating the above metrics
- format_json() and format_text() static formatters for machine- and human-friendly output

A new CLI command context analyze has been added at src/cleveragents/cli/commands/context.py to surface the feature from the command line.
Unit tests live under features/acms_context_analysis_engine.feature (29 scenarios) with step definitions in features/steps/acms_context_analysis_engine_steps.py.
The commit wires the new command into the CLI, enables test-driven validation of the metrics, and lays the groundwork for integration with dashboards.

ISSUES CLOSED: #9984
2026-04-23 11:46:36 +00:00