11 Commits

Author SHA1 Message Date
HAL9000 0aacec7845 fix(cli): address PR #6626 review blockers for context set output
- Fix ruff import ordering in project_context_cli_steps.py (yaml moved to third-party section)
- Remove unused noqa: F401 suppression in rendering/__init__.py
- Add *args, **kwargs to _test_format_output stub in coverage boost steps (fixes TypeError)
- Extract context-set step definitions into dedicated module (project_context_set_steps.py)
  to bring project_context_cli_steps.py under 500-line limit (469 -> 316 lines)
- Revert spec changes for context show/inspect/simulate message format (bare strings)
  to keep PR focused on issue #6319 (context set only),
2026-06-03 17:30:22 -04:00
HAL9000 388fc458c5 fix(cli): fix project context set JSON/YAML output structure (#6319)
Implemented spec-compliant JSON, YAML, plain, and rich outputs for `agents project context set`. Added BDD coverage verifying the new output structure across formats.\n\nISSUES CLOSED: #6319
2026-06-03 17:30:22 -04:00
cleveragents-auto 57cb71e424 chore: worker ruff auto-fix (pre-push lint gate)
CI / lint (pull_request) Successful in 1m4s
CI / push-validation (pull_request) Successful in 37s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 47s
CI / typecheck (pull_request) Successful in 1m19s
CI / security (pull_request) Successful in 1m18s
CI / quality (pull_request) Successful in 1m19s
CI / unit_tests (pull_request) Successful in 7m0s
CI / docker (pull_request) Successful in 1m38s
CI / coverage (pull_request) Successful in 14m26s
CI / integration_tests (pull_request) Successful in 29m47s
CI / status-check (pull_request) Successful in 4s
2026-05-31 20:45:10 -04:00
HAL9000 826d70299a test(project-context): add BDD scenarios to boost coverage for issue 6323
Cover previously uncovered paths in _format_size (None, byte, KB/MB/GB/TB
branches), format_output dict-message paths (level/text, malformed key
ValueError, empty-level plain output), and context_show rich rendering
with execution environment panel and non-integer depth gradient keys.
2026-05-31 20:45:10 -04:00
HAL9000 19f11f0d0a fix(cli): restore context show rich panels
ISSUES CLOSED: #6323
2026-05-31 20:45:10 -04:00
HAL9000 17ede04458 fix(cli): align project context show structured output
ISSUES CLOSED: #6323
2026-05-31 20:45:10 -04:00
HAL9000 628c1dcf12 fix(cli): fix project context show JSON/YAML output fields (#6323)
ISSUES CLOSED: #6323
2026-05-31 20:45:10 -04:00
Luis Mendes ab911dbdc4 fix(cli): write machine-readable formats directly to stdout bypassing Rich line-wrapping
The format_output() function returned a string that callers passed to
Rich console.print(), which wraps long lines at terminal width.  This
injected literal newline characters into JSON string values (e.g. in
definition_of_done fields), producing invalid JSON that downstream
parsers could not decode (JSONDecodeError: Invalid control character).

For machine-readable formats (json, yaml, plain), format_output() now
writes the rendered output directly to sys.stdout and returns an empty
string.  This preserves the exact serialization from json.dumps/
yaml.dump without Rich text processing artifacts.

Refs: #746
2026-03-17 09:53:57 +00:00
Luis Mendes ff42d59d6d feat(cli): wire project context CLI stubs to ACMS pipeline
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 19s
CI / security (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 33s
CI / unit_tests (pull_request) Successful in 2m22s
CI / integration_tests (pull_request) Successful in 2m52s
CI / docker (pull_request) Successful in 39s
CI / coverage (pull_request) Successful in 4m13s
CI / lint (push) Successful in 13s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 16s
CI / security (push) Successful in 31s
CI / typecheck (push) Successful in 32s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m31s
CI / integration_tests (push) Successful in 3m0s
CI / docker (push) Successful in 39s
CI / coverage (push) Successful in 5m5s
CI / benchmark-publish (push) Successful in 14m43s
CI / benchmark-regression (pull_request) Successful in 25m44s
Wire all four project context CLI commands (inspect, simulate, set, show)
to live ACMS pipeline services via ContextTierService and CRP models.

- context inspect: queries ContextTierService for tier metrics and
  per-project fragments with filtering by strategy/focus/breadth/depth
- context simulate: dry-run context assembly using CRP models with
  configurable token budget and assembly strategies
- context set: 12 new ACMS pipeline options (hot_max_tokens,
  warm_max_decisions, cold_max_decisions, summary_max_tokens,
  temporal_scope, auto_refresh, focus_area, breadth, depth,
  assembly_strategy, retrieval_strategy, summary_strategy)
- context show: displays ACMS pipeline configuration alongside policy

- `context inspect` displayed global tier fragment counts (hot/warm/cold)
across all projects instead of counts for the target project only.

Add `ContextTierService.get_scoped_metrics(project_names)` which uses
`ScopedBackendView` to filter fragment counts to the specified projects
while keeping hit/miss counters as global service-level cache metrics.
Update `context_inspect()` to call `get_scoped_metrics([project])`
instead of `get_metrics()`.

- `context simulate --focus` accepted focus URIs and passed them to the
`ContextRequest` model but never used them to filter the fragment list,
making the `--focus` flag a no-op.

Add focus URI filtering in `_simulate_context_assembly()` after
`get_scoped_view()` — filters `project_fragments` by matching each
fragment's `resource_id` against the supplied focus URIs.

Also fixes redaction false positives for hot_max_tokens and
summary_max_tokens keys, and Rich Console line-wrapping in test
output that caused JSON parse failures.

Includes 28 new Behave BDD scenarios for wiring coverage, updated
Robot Framework integration tests, and reference documentation.

ISSUES CLOSED: #499
2026-03-03 23:36:15 +00:00
CoreRasurae 272f6fc255 test(unit): fix failing tests related to RichTerm usage
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 19s
CI / typecheck (pull_request) Successful in 32s
CI / security (pull_request) Successful in 39s
CI / integration_tests (pull_request) Failing after 2m20s
CI / unit_tests (pull_request) Successful in 3m42s
CI / docker (pull_request) Successful in 50s
CI / coverage (pull_request) Successful in 11m8s
2026-02-18 23:55:05 +00:00
freemo a8558f13ca feat(cli): add project context commands 2026-02-17 20:55:43 -05:00