UAT: agents project context show JSON/YAML output structure does not match spec — missing context_policy, limits, summarization, current_usage keys #6483

Open
opened 2026-04-09 21:08:48 +00:00 by HAL9000 · 0 comments
Owner

Summary

The JSON and YAML output of agents project context show uses a flat, implementation-internal structure instead of the spec-required nested structure with context_policy, limits, summarization, and current_usage keys.

Spec Reference

docs/specification.md §CLI Commands — agents project context show JSON output (line ~4030–4068):

{
  "command": "project context show",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "context_policy": {
      "project": "local/api-service",
      "view": "strategize",
      "include_resources": ["repo"],
      "exclude_paths": ["**/node_modules/**"]
    },
    "limits": {
      "hot_max_tokens": 12000,
      "warm_max_decisions": 50,
      "cold_max_decisions": 200,
      "query_limit": 20,
      "max_file_size": "1 MB",
      "max_total_size": "50 MB"
    },
    "summarization": {
      "enabled": true,
      "max_tokens": 800
    },
    "current_usage": {
      "hot_context_tokens": 8420,
      "hot_context_limit": 12000,
      "warm_entries": 12,
      "warm_limit": 50,
      "cold_entries": 47,
      "cold_limit": 200,
      "indexed_resources": 1
    }
  }
}

Observed Behavior

The implementation (src/cleveragents/cli/commands/project_context.py, context_show(), line 761) produces:

{
  "default_view": {...},
  "strategize_view": null,
  "execute_view": null,
  "apply_view": null,
  "acms_config": {
    "hot_max_tokens": 8000,
    "warm_max_decisions": 500,
    ...
  }
}

The output:

  1. Uses raw Pydantic model field names (default_view, strategize_view) instead of spec-required context_policy
  2. Embeds all ACMS config in a flat acms_config dict instead of separate limits and summarization sections
  3. Omits current_usage entirely (see related issue #6479)
  4. Does not include command, status, exit_code, timing, or messages envelope fields

Expected Behavior

JSON output should use the spec-defined structure with:

  • context_policy (project name, view, include/exclude resources/paths)
  • limits (hot_max_tokens, warm_max_decisions, cold_max_decisions, query_limit, max_file_size, max_total_size)
  • summarization (enabled, max_tokens)
  • current_usage (hot_context_tokens, hot_context_limit, warm_entries, warm_limit, cold_entries, cold_limit, indexed_resources)

Code Location

  • src/cleveragents/cli/commands/project_context.pycontext_show() function (line 761)
  • _policy_to_dict() helper (line 216) — returns raw Pydantic field names, not spec-named keys

Steps to Reproduce

agents project context show --format json local/my-project

Observe: output uses default_view/acms_config keys instead of context_policy/limits/summarization/current_usage.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Summary The JSON and YAML output of `agents project context show` uses a flat, implementation-internal structure instead of the spec-required nested structure with `context_policy`, `limits`, `summarization`, and `current_usage` keys. ## Spec Reference `docs/specification.md` §CLI Commands — `agents project context show` JSON output (line ~4030–4068): ```json { "command": "project context show", "status": "ok", "exit_code": 0, "data": { "context_policy": { "project": "local/api-service", "view": "strategize", "include_resources": ["repo"], "exclude_paths": ["**/node_modules/**"] }, "limits": { "hot_max_tokens": 12000, "warm_max_decisions": 50, "cold_max_decisions": 200, "query_limit": 20, "max_file_size": "1 MB", "max_total_size": "50 MB" }, "summarization": { "enabled": true, "max_tokens": 800 }, "current_usage": { "hot_context_tokens": 8420, "hot_context_limit": 12000, "warm_entries": 12, "warm_limit": 50, "cold_entries": 47, "cold_limit": 200, "indexed_resources": 1 } } } ``` ## Observed Behavior The implementation (`src/cleveragents/cli/commands/project_context.py`, `context_show()`, line 761) produces: ```json { "default_view": {...}, "strategize_view": null, "execute_view": null, "apply_view": null, "acms_config": { "hot_max_tokens": 8000, "warm_max_decisions": 500, ... } } ``` The output: 1. Uses raw Pydantic model field names (`default_view`, `strategize_view`) instead of spec-required `context_policy` 2. Embeds all ACMS config in a flat `acms_config` dict instead of separate `limits` and `summarization` sections 3. Omits `current_usage` entirely (see related issue #6479) 4. Does not include `command`, `status`, `exit_code`, `timing`, or `messages` envelope fields ## Expected Behavior JSON output should use the spec-defined structure with: - `context_policy` (project name, view, include/exclude resources/paths) - `limits` (hot_max_tokens, warm_max_decisions, cold_max_decisions, query_limit, max_file_size, max_total_size) - `summarization` (enabled, max_tokens) - `current_usage` (hot_context_tokens, hot_context_limit, warm_entries, warm_limit, cold_entries, cold_limit, indexed_resources) ## Code Location - `src/cleveragents/cli/commands/project_context.py` — `context_show()` function (line 761) - `_policy_to_dict()` helper (line 216) — returns raw Pydantic field names, not spec-named keys ## Steps to Reproduce ```bash agents project context show --format json local/my-project ``` Observe: output uses `default_view`/`acms_config` keys instead of `context_policy`/`limits`/`summarization`/`current_usage`. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#6483
No description provided.