eb46f0ff54
CI / push-validation (push) Successful in 40s
CI / helm (push) Successful in 44s
CI / build (push) Successful in 1m14s
CI / lint (push) Successful in 1m18s
CI / quality (push) Successful in 1m36s
CI / e2e_tests (push) Successful in 1m19s
CI / typecheck (push) Successful in 2m22s
CI / security (push) Successful in 2m23s
CI / benchmark-regression (push) Failing after 41s
CI / integration_tests (push) Successful in 4m46s
CI / unit_tests (push) Failing after 20m13s
CI / benchmark-publish (push) Failing after 28m28s
CI / coverage (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / status-check (push) Has been cancelled
## Summary This PR fixes issue #10878 where architecture reviews were truncated because the regex pattern for parsing file output would stop at the first ``` encountered in the Markdown report. ## Changes - Change file delimiters from ``` to >>>>>>>/<<<<<<< to avoid Markdown conflicts - Add tier hydration before strategize phase in plan_executor.py - Increase max_tokens to 16384 in llm_actors.py for longer outputs - Increase context_max_tokens_hot from 16000 to 32000 in settings.py - Fix get_hot_view → get_hot_fragments in strategy_actor.py and plan_executor.py - Add opencode to skip directories in context_tier_hydrator.py - Change sandbox output location to plan-output/ directory in plan.py - Add get_context_summary stub method to acms_service.py ## Testing Run architecture review action and verify the output report is complete with all sections. Reviewed-on: #10938
192 lines
9.1 KiB
Gherkin
192 lines
9.1 KiB
Gherkin
Feature: Automation Profile CLI commands
|
|
As a developer
|
|
I want to manage automation profiles via CLI commands
|
|
So that I can control plan execution autonomy levels
|
|
|
|
Background:
|
|
Given an automation profile CLI runner with mocks
|
|
|
|
# Add command tests
|
|
Scenario: Add profile via config file
|
|
Given a valid automation profile config YAML file
|
|
When I run automation-profile add with --config pointing to the YAML file
|
|
Then the automation-profile add should succeed
|
|
And the automation-profile output should contain "acme/strict"
|
|
|
|
Scenario: Add profile with --update for existing custom profile
|
|
Given a valid automation profile config YAML file
|
|
And the custom profile "acme/strict" already exists
|
|
When I run automation-profile add with --config and --update
|
|
Then the automation-profile add should succeed
|
|
And the automation-profile output should contain "Updated"
|
|
|
|
Scenario: Add profile with --update when profile does not exist warns and creates
|
|
Given a valid automation profile config YAML file
|
|
When I run automation-profile add with --config and --update
|
|
Then the automation-profile add should succeed
|
|
And the automation-profile output should contain "Warning"
|
|
And the automation-profile output should contain "Profile Added"
|
|
|
|
Scenario: Add profile conflict without --update
|
|
Given a valid automation profile config YAML file
|
|
And the custom profile "acme/strict" already exists
|
|
When I run automation-profile add with --config without --update
|
|
Then the automation-profile command should abort
|
|
And the automation-profile output should contain "Conflict"
|
|
|
|
Scenario: Add profile with missing config file fails
|
|
When I run automation-profile add with --config pointing to a missing file
|
|
Then the automation-profile command should abort
|
|
|
|
Scenario: Add profile with invalid YAML fails
|
|
Given an invalid YAML automation profile config file
|
|
When I run automation-profile add with --config pointing to the invalid YAML file
|
|
Then the automation-profile command should abort
|
|
|
|
Scenario: Add profile with invalid name fails
|
|
Given an automation profile config YAML file with invalid name
|
|
When I run automation-profile add with --config pointing to the invalid name YAML file
|
|
Then the automation-profile command should abort
|
|
|
|
Scenario: Add profile with invalid threshold fails
|
|
Given an automation profile config YAML file with invalid threshold
|
|
When I run automation-profile add with --config pointing to the invalid threshold YAML file
|
|
Then the automation-profile command should abort
|
|
|
|
Scenario: Add profile with legacy threshold keys fails
|
|
Given an automation profile config YAML file with legacy threshold keys
|
|
When I run automation-profile add with --config pointing to the legacy threshold YAML file
|
|
Then the automation-profile command should abort
|
|
And the automation-profile output should contain "auto_strategize"
|
|
|
|
Scenario: Add profile cannot overwrite built-in
|
|
Given an automation profile config YAML file with built-in name "manual"
|
|
When I run automation-profile add with --config pointing to the built-in name YAML file
|
|
Then the automation-profile command should abort
|
|
And the automation-profile output should contain "built-in"
|
|
|
|
Scenario: Add profile with unsupported schema version
|
|
Given an automation profile config YAML file with schema_version "2.0"
|
|
When I run automation-profile add with --config pointing to the unsupported schema YAML file
|
|
Then the automation-profile command should abort
|
|
And the automation-profile output should contain "schema_version"
|
|
|
|
# List command tests
|
|
Scenario: List profiles shows built-in profiles
|
|
When I run automation-profile list
|
|
Then the automation-profile list should succeed
|
|
And the automation-profile output should contain "manual"
|
|
And the automation-profile output should contain "auto"
|
|
|
|
Scenario: List profiles with namespace filter
|
|
Given a custom profile "acme/strict" has been added
|
|
When I run automation-profile list with namespace filter "acme"
|
|
Then the automation-profile list should succeed
|
|
And the automation-profile output should contain "acme/strict"
|
|
|
|
Scenario: List profiles with regex filter
|
|
When I run automation-profile list with regex "caut.*"
|
|
Then the automation-profile list should succeed
|
|
And the automation-profile output should contain "cautious"
|
|
|
|
Scenario: List profiles with invalid regex
|
|
When I run automation-profile list with regex "[invalid"
|
|
Then the automation-profile command should abort
|
|
|
|
Scenario: List profiles with --format json output snapshot
|
|
When I run automation-profile list with --format json
|
|
Then the automation-profile list should succeed
|
|
And the automation-profile json output should contain "profiles"
|
|
And the automation-profile json output should contain "summary"
|
|
And the automation-profile json output should contain "built_in"
|
|
And the automation-profile json output should contain "select_tool"
|
|
|
|
@tdd_issue @tdd_issue_4235 @tdd_expected_fail
|
|
Scenario: List profiles JSON output has spec-required profiles wrapper with summary
|
|
When I run automation-profile list with --format json
|
|
Then the automation-profile list should succeed
|
|
And the automation-profile list json output has profiles wrapper with summary
|
|
|
|
Scenario: List profiles YAML output has spec-required profiles wrapper
|
|
When I run automation-profile list with --format yaml
|
|
Then the automation-profile list should succeed
|
|
And the automation-profile yaml output should contain "profiles:"
|
|
And the automation-profile yaml output should contain "summary:"
|
|
And the automation-profile yaml output should contain "built_in:"
|
|
And the automation-profile yaml output should contain "select_tool:"
|
|
|
|
Scenario: List profiles rich output has Auto-Apply column header
|
|
When I run automation-profile list
|
|
Then the automation-profile list should succeed
|
|
And the automation-profile output should contain "Auto-Ap"
|
|
|
|
Scenario: List profiles rich output has Summary panel
|
|
When I run automation-profile list
|
|
Then the automation-profile list should succeed
|
|
And the automation-profile output should contain "Summary"
|
|
And the automation-profile output should contain "Built-in:"
|
|
|
|
Scenario: List profiles with no matches
|
|
When I run automation-profile list with namespace filter "nonexistent"
|
|
Then the automation-profile output should contain "No profiles found"
|
|
|
|
# Show command tests
|
|
Scenario: Show built-in profile details
|
|
When I run automation-profile show "manual"
|
|
Then the automation-profile show should succeed
|
|
And the automation-profile output should contain "manual"
|
|
And the automation-profile output should contain "1.0"
|
|
|
|
Scenario: Show profile not found
|
|
When I run automation-profile show "nonexistent/profile"
|
|
Then the automation-profile command should abort
|
|
And the automation-profile output should contain "not found"
|
|
|
|
Scenario: Show profile with --format yaml output snapshot
|
|
When I run automation-profile show "manual" with --format yaml
|
|
Then the automation-profile show should succeed
|
|
And the automation-profile yaml output should contain "name: manual"
|
|
And the automation-profile yaml output should contain "decompose_task"
|
|
|
|
Scenario: Show profile with --format json
|
|
When I run automation-profile show "manual" with --format json
|
|
Then the automation-profile show should succeed
|
|
And the automation-profile json output should contain "name"
|
|
|
|
Scenario: Show profile with --format plain
|
|
When I run automation-profile show "manual" with --format plain
|
|
Then the automation-profile show should succeed
|
|
And the automation-profile output should contain "name: manual"
|
|
|
|
Scenario: Show profile with --format table
|
|
When I run automation-profile show "manual" with --format table
|
|
Then the automation-profile show should succeed
|
|
|
|
# Remove command tests
|
|
Scenario: Remove custom profile with confirmation
|
|
Given a custom profile "acme/strict" has been added
|
|
When I run automation-profile remove "acme/strict" with --yes
|
|
Then the automation-profile remove should succeed
|
|
And the automation-profile output should contain "removed"
|
|
|
|
Scenario: Remove built-in profile fails
|
|
When I run automation-profile remove "manual" with --yes
|
|
Then the automation-profile command should abort
|
|
And the automation-profile output should contain "built-in"
|
|
|
|
Scenario: Remove nonexistent profile fails
|
|
When I run automation-profile remove "nonexistent/profile" with --yes
|
|
Then the automation-profile command should abort
|
|
And the automation-profile output should contain "not found"
|
|
|
|
Scenario: Remove profile with --format json
|
|
Given a custom profile "acme/toremove" has been added
|
|
When I run automation-profile remove "acme/toremove" with --yes and --format json
|
|
Then the automation-profile remove should succeed
|
|
And the automation-profile json output should contain "removed"
|
|
|
|
# Legacy flag removal tests
|
|
Scenario: Legacy --automation-level flag is rejected on plan use
|
|
When I invoke plan use with --automation-level "manual"
|
|
Then the plan output should contain "--automation-level"
|