forked from cleveragents/cleveragents-core
ff42d59d6d
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
50 lines
2.2 KiB
Plaintext
50 lines
2.2 KiB
Plaintext
*** Settings ***
|
|
Documentation Smoke tests for project context CLI commands
|
|
Resource ${CURDIR}/common.resource
|
|
Suite Setup Setup Test Environment
|
|
Suite Teardown Cleanup Test Environment
|
|
|
|
*** Variables ***
|
|
${HELPER_SCRIPT} robot/helper_project_context_cli.py
|
|
|
|
*** Test Cases ***
|
|
Context Policy Set And Show Round Trip
|
|
[Documentation] Set a context policy and verify it reads back correctly
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} set-show cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} context-set-show-ok
|
|
|
|
Context Inspect Wired To ACMS
|
|
[Documentation] Verify inspect queries the ACMS tier service and returns tier state
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} inspect-wired cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} context-inspect-wired-ok
|
|
|
|
Context Simulate Wired To ACMS
|
|
[Documentation] Verify simulate runs dry-run context assembly via ACMS
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} simulate-wired cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} context-simulate-wired-ok
|
|
|
|
Context Set ACMS Pipeline Options
|
|
[Documentation] Verify context set persists ACMS pipeline configuration
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} set-acms cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} context-set-acms-ok
|
|
|
|
Context Show ACMS Pipeline Config
|
|
[Documentation] Verify context show displays ACMS pipeline configuration
|
|
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} show-acms cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} context-show-acms-ok
|