49015c6bee
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 18s
CI / helm (pull_request) Successful in 23s
CI / lint (pull_request) Successful in 3m19s
CI / quality (pull_request) Successful in 3m43s
CI / typecheck (pull_request) Successful in 3m57s
CI / security (pull_request) Successful in 4m6s
CI / integration_tests (pull_request) Successful in 7m5s
CI / unit_tests (pull_request) Successful in 7m10s
CI / docker (pull_request) Successful in 1m18s
CI / coverage (pull_request) Successful in 11m47s
CI / e2e_tests (pull_request) Successful in 20m22s
CI / status-check (pull_request) Successful in 2s
CI / benchmark-regression (pull_request) Successful in 1h0m10s
Add --execution-env-priority flag to 'project context set' command, enabling project-level execution environment priority per spec WF17. - Add execution_env_priority field to ContextConfig domain model - Validate flag value against ExecutionEnvPriority enum (fallback/override) - Persist in context_policy_json, preserving existing execution_environment - Display in 'project context show' Execution Environment section - Merge with existing blob to avoid overwriting previously set fields Tests: 9 Behave scenarios, 26 steps. ISSUES CLOSED: #1079
64 lines
3.4 KiB
Gherkin
64 lines
3.4 KiB
Gherkin
Feature: Project execution environment priority
|
|
As a user
|
|
I need to set --execution-env-priority on project context set
|
|
So that I can control whether the project-level environment overrides or defers
|
|
|
|
# ── Domain model ─────────────────────────────────────────────────
|
|
|
|
Scenario: ContextConfig accepts execution_env_priority field
|
|
Given I create a ContextConfig with execution_env_priority "fallback"
|
|
Then the context config execution_env_priority should be "fallback"
|
|
|
|
Scenario: ContextConfig accepts override priority
|
|
Given I create a ContextConfig with execution_env_priority "override"
|
|
Then the context config execution_env_priority should be "override"
|
|
|
|
Scenario: ContextConfig execution_env_priority defaults to None
|
|
Given I create a default ContextConfig
|
|
Then the context config execution_env_priority should be None
|
|
|
|
# ── ExecutionEnvPriority enum ────────────────────────────────────
|
|
|
|
Scenario: ExecutionEnvPriority enum has fallback and override
|
|
Then the ExecutionEnvPriority enum should have "fallback"
|
|
And the ExecutionEnvPriority enum should have "override"
|
|
|
|
# ── CLI project context set validation ───────────────────────────
|
|
|
|
Scenario: project context set rejects invalid execution-env-priority
|
|
Given I have a test project "local/test-eep"
|
|
When I call project context set with execution-env-priority "invalid"
|
|
Then a CLI error should be raised for invalid priority
|
|
|
|
Scenario: project context set accepts fallback priority
|
|
Given I have a test project "local/test-eep-fb"
|
|
When I call project context set with execution-env-priority "fallback"
|
|
Then the project priority should be persisted as "fallback"
|
|
|
|
Scenario: project context set accepts override priority
|
|
Given I have a test project "local/test-eep-ov"
|
|
When I call project context set with execution-env-priority "override"
|
|
Then the project priority should be persisted as "override"
|
|
|
|
# ── Persistence round-trip ───────────────────────────────────────
|
|
|
|
Scenario: execution_env_priority persists alongside execution_environment
|
|
Given I have a test project "local/test-eep-both"
|
|
When I set execution-environment "container" and priority "override"
|
|
Then the persisted blob should have execution_environment "container"
|
|
And the persisted blob should have execution_env_priority "override"
|
|
|
|
Scenario: Setting priority does not clear execution_environment
|
|
Given I have a test project "local/test-eep-preserve"
|
|
When I set execution-environment "container" first
|
|
And I set execution-env-priority "override" second
|
|
Then the persisted blob should still have execution_environment "container"
|
|
And the persisted blob should have execution_env_priority "override"
|
|
|
|
# ── Priority propagation to plan ─────────────────────────────────
|
|
|
|
Scenario: Project-level priority propagates to plan when no plan-level override
|
|
Given I have a test project "local/test-eep-prop"
|
|
When I set execution-environment "container" and priority "override"
|
|
Then the persisted blob should have execution_env_priority "override"
|