Files
cleveragents-core/features/m5_acms_smoke.feature
T
brent.edwards ece5e61725
CI / lint (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 21s
CI / security (pull_request) Successful in 40s
CI / typecheck (pull_request) Successful in 41s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 16s
CI / integration_tests (pull_request) Successful in 2m47s
CI / benchmark-regression (pull_request) Successful in 28m30s
CI / unit_tests (pull_request) Failing after 33m23s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Failing after 53m42s
test(e2e): add M5 ACMS + context suites
2026-02-27 20:20:13 +00:00

156 lines
6.8 KiB
Gherkin

Feature: M5 ACMS pipeline and large-project context smoke tests
As a developer working with the CleverAgents M5 milestone
I want to verify the ACMS context pipeline end-to-end
So that context assembly, budget enforcement, and multi-project context work correctly
Background:
Given a m5 smoke test runner
And a m5 smoke mocked context service
# --- Fixture loading ---
Scenario: M5 smoke load ACMS context policy fixture
When I m5 smoke load the ACMS context policy fixture
Then the m5 smoke policy fixture should have a default view
And the m5 smoke policy fixture should have a strategize view
And the m5 smoke policy fixture should have an execute view
Scenario: M5 smoke load large project context fixture
When I m5 smoke load the large project context fixture
Then the m5 smoke large project fixture should have file entries
And the m5 smoke large project fixture should have context tiers
Scenario: M5 smoke load context analysis results fixture
When I m5 smoke load the context analysis results fixture
Then the m5 smoke analysis fixture should have a summary
And the m5 smoke analysis fixture should have dependencies
And the m5 smoke analysis fixture should have relevance scores
# --- Context policy resolution ---
Scenario: M5 smoke resolve default view from empty policy
Given a m5 smoke empty context policy
When I m5 smoke resolve the view for phase "default"
Then the m5 smoke resolved view should include all paths
Scenario: M5 smoke resolve strategize view inherits from default
Given a m5 smoke policy with only default view
When I m5 smoke resolve the view for phase "strategize"
Then the m5 smoke resolved view should match the default view
Scenario: M5 smoke resolve strategize view with override
Given a m5 smoke policy with strategize override
When I m5 smoke resolve the view for phase "strategize"
Then the m5 smoke resolved view should use the strategize override
Scenario: M5 smoke resolve execute view inherits from strategize
Given a m5 smoke policy with strategize override
When I m5 smoke resolve the view for phase "execute"
Then the m5 smoke resolved view should use the strategize override
Scenario: M5 smoke resolve apply view falls through to default
Given a m5 smoke policy with only default view
When I m5 smoke resolve the view for phase "apply"
Then the m5 smoke resolved view should match the default view
Scenario: M5 smoke invalid phase raises ValueError
Given a m5 smoke empty context policy
When I m5 smoke resolve the view for invalid phase "invalid"
Then a m5 smoke ValueError should be raised
# --- Budget enforcement ---
Scenario: M5 smoke max file size rejects oversized files
Given a m5 smoke context view with max_file_size 1024
Then a m5 smoke file of size 2048 should exceed the budget
And a m5 smoke file of size 512 should be within the budget
Scenario: M5 smoke max total size limits aggregate context
Given a m5 smoke context view with max_total_size 8192
Then a m5 smoke aggregate of size 10000 should exceed the budget
And a m5 smoke aggregate of size 4096 should be within the budget
Scenario: M5 smoke zero max file size is invalid
When I m5 smoke create a context view with max_file_size 0
Then a m5 smoke validation error should be raised
Scenario: M5 smoke negative max total size is invalid
When I m5 smoke create a context view with max_total_size -1
Then a m5 smoke validation error should be raised
Scenario: M5 smoke None size limits allow unlimited
Given a m5 smoke context view with no size limits
Then a m5 smoke file of size 999999999 should be within the budget
And a m5 smoke aggregate of size 999999999 should be within the budget
# --- Context assembly via CLI ---
Scenario: M5 smoke context list with empty project
Given a m5 smoke project with no context
When I m5 smoke invoke context list
Then the m5 smoke context list should succeed
And the m5 smoke context list output should be empty
Scenario: M5 smoke context add file to project
Given a m5 smoke project with mocked context service
When I m5 smoke invoke context add with path "src/main.py"
Then the m5 smoke context add should succeed
Scenario: M5 smoke context show displays file content
Given a m5 smoke project with context entries
When I m5 smoke invoke context show for path "src/main.py"
Then the m5 smoke context show should succeed
And the m5 smoke context show output should contain content
Scenario: M5 smoke context clear removes all entries
Given a m5 smoke project with context entries
When I m5 smoke invoke context clear
Then the m5 smoke context clear should succeed
# --- Project context policy CLI ---
Scenario: M5 smoke project context show displays policy
Given a m5 smoke project with a saved context policy
When I m5 smoke invoke project context show
Then the m5 smoke project context show should succeed
And the m5 smoke project context output should contain phase views
Scenario: M5 smoke project context inspect is not yet wired
When I m5 smoke invoke project context inspect
Then a m5 smoke NotImplementedError should be raised mentioning "ACMS"
Scenario: M5 smoke project context simulate is not yet wired
When I m5 smoke invoke project context simulate
Then a m5 smoke NotImplementedError should be raised mentioning "ACMS"
# --- Context analysis agent ---
Scenario: M5 smoke context analysis produces summary
Given a m5 smoke mocked context analysis agent
When I m5 smoke invoke context analysis
Then the m5 smoke analysis result should have a non-empty summary
Scenario: M5 smoke context analysis produces dependencies
Given a m5 smoke mocked context analysis agent
When I m5 smoke invoke context analysis
Then the m5 smoke analysis result should have dependency entries
Scenario: M5 smoke context analysis produces relevance scores
Given a m5 smoke mocked context analysis agent
When I m5 smoke invoke context analysis
Then the m5 smoke analysis result should have relevance scores
And all m5 smoke relevance scores should be between 0 and 1
# --- Multi-project context ---
Scenario: M5 smoke multiple projects have independent context
Given m5 smoke project "proj-a" with 3 context files
And m5 smoke project "proj-b" with 5 context files
Then m5 smoke project "proj-a" should have 3 context entries
And m5 smoke project "proj-b" should have 5 context entries
Scenario: M5 smoke context exclusion patterns filter correctly
Given a m5 smoke context view excluding "**/__pycache__/**"
Then the m5 smoke path "__pycache__/module.pyc" should be excluded
And the m5 smoke path "src/module.py" should not be excluded