Files
cleveragents-core/features/project_context_depth_gradient.feature
T
freemo 4eddbcf489
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 22s
CI / helm (pull_request) Successful in 25s
CI / lint (pull_request) Successful in 3m45s
CI / quality (pull_request) Successful in 4m5s
CI / typecheck (pull_request) Successful in 4m22s
CI / security (pull_request) Successful in 4m31s
CI / integration_tests (pull_request) Successful in 7m27s
CI / unit_tests (pull_request) Successful in 7m55s
CI / docker (pull_request) Successful in 1m30s
CI / coverage (pull_request) Successful in 12m1s
CI / e2e_tests (pull_request) Successful in 22m32s
CI / status-check (pull_request) Successful in 12s
CI / build (push) Successful in 25s
CI / quality (push) Successful in 39s
CI / helm (push) Successful in 41s
CI / lint (push) Successful in 3m36s
CI / typecheck (push) Successful in 3m52s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m3s
CI / unit_tests (push) Successful in 4m12s
CI / docker (push) Successful in 1m32s
CI / integration_tests (push) Successful in 7m3s
CI / coverage (push) Successful in 11m52s
CI / e2e_tests (push) Successful in 20m56s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 28m22s
CI / benchmark-regression (pull_request) Successful in 55m2s
fix(cli): add --depth-gradient flag to project context set
Add the missing --depth-gradient repeatable flag to `project context set`
per specification. The flag accepts HOP:INT_OR_NAME format to control
context detail depth degradation with graph distance. Parsing validates
hop as integer and value as integer or recognized detail level name.

ISSUES CLOSED: #889
2026-03-30 17:12:20 +00:00

50 lines
2.6 KiB
Gherkin

Feature: Project context depth-gradient flag (B2.cli)
As a CleverAgents user
I want to set per-hop depth gradients via ``project context set --depth-gradient``
So that context detail depth degrades with graph distance from focus nodes
Background:
Given a project context CLI in-memory database is initialized
And a project "local/ctx-app" exists for context CLI
# ── single depth-gradient value ─────────────────────────────
Scenario: Set a single depth-gradient with integer value
When I run context set on "local/ctx-app" with depth-gradient "0:9"
Then the context set command should succeed
And the stored ACMS depth gradient should have hop "0" with value 9
Scenario: Set a single depth-gradient with named level value
When I run context set on "local/ctx-app" with depth-gradient "1:SIGNATURES"
Then the context set command should succeed
And the stored ACMS depth gradient should have hop "1" with string value "SIGNATURES"
# ── multiple depth-gradient values ──────────────────────────
Scenario: Set multiple depth-gradient values
When I run context set on "local/ctx-app" with depth-gradients "0:9,1:4,2:MODULE_LISTING"
Then the context set command should succeed
And the stored ACMS depth gradient should have hop "0" with value 9
And the stored ACMS depth gradient should have hop "1" with value 4
And the stored ACMS depth gradient should have hop "2" with string value "MODULE_LISTING"
# ── invalid format ──────────────────────────────────────────
Scenario: Invalid depth-gradient missing colon fails
When I run context set on "local/ctx-app" with depth-gradient "bad"
Then the context set command should fail
Scenario: Invalid depth-gradient non-integer hop fails
When I run context set on "local/ctx-app" with depth-gradient "abc:5"
Then the context set command should fail
# ── display in show command ─────────────────────────────────
Scenario: Depth gradient is displayed in context show output
Given I have set depth-gradient "0:9,1:SIGNATURES" on "local/ctx-app"
When I run context show on "local/ctx-app" without options
Then the context show command should succeed
And the context show output should contain "Depth gradient"
And the context show output should contain "0:9"
And the context show output should contain "1:SIGNATURES"