-
Notifications
You must be signed in to change notification settings - Fork 0
feat: workspace.static soft override with env-var fallback #514
Copy link
Copy link
Closed
Description
Problem
Workspace configuration has accumulated overlapping controls across YAML and CLI, which makes behavior hard to predict.
Current confusion points:
- Multiple ways to express static workspaces (
mode/static_path, CLI path flags, legacy forms). - Mode and path interactions are implicit in places and strict in others.
- Legacy pooling and retention flags add extra precedence branches.
We want a single, obvious configuration model for workspace behavior.
Proposal: canonical workspace.mode + workspace.path
Adopt one workspace shape in YAML:
workspace:
mode: pooled | temp | static
path: /abs/path # required only when mode=static
template: ./template # for pooled/temp flows
repos: [...] # for pooled/temp flows
hooks: {...}Semantics
mode=pooled→ use pooled workspace lifecycle.mode=temp→ materialize fresh workspace per run (no pooling).mode=static→ use an existing user-managed workspace atworkspace.path.
Defaults and implied mode
- If no mode/path is provided, default to
pooled. - In YAML, non-empty
workspace.pathwith missingworkspace.modeimpliesstatic. - In CLI,
--workspace-pathimplies--workspace-mode static.
Validation rules
- If
mode=staticandpathis missing/empty → hard error. - If
--workspace-pathis set and--workspace-modeis provided with non-staticvalue → hard error.
Precedence (highest first)
- CLI
--workspace-path(implies static) - CLI
--workspace-mode - YAML
workspace.path/workspace.mode - Default
mode=pooled
CLI surface simplification
Keep only mode/path workspace controls in CLI:
- Keep
--workspace-mode pooled|temp|static - Keep
--workspace-path
Remove these flags entirely (hard remove, no warnings/transition period):
--keep-workspaces--cleanup-workspaces--retain-on-success--retain-on-failure--pool-workspaces--no-pool
Cleanup/retention behavior remains hook/config-driven (before_each / after_each / after_all), not CLI-driven.
Schema cleanup (hard remove)
Remove legacy/duplicate workspace fields and aliases:
- Remove
workspace.static(if introduced in prior drafts) - Remove
workspace.static_path - Remove
workspace.poolboolean - Remove target-level
workspace_template
Use only eval-level workspace.template / workspace.mode / workspace.path.
Acceptance signals
- YAML supports canonical
workspace.mode+workspace.path - Default is
mode=pooledwhen neither mode nor path is set - YAML
workspace.pathwithout mode impliesstatic - CLI
--workspace-pathimpliesstaticwithout requiring--workspace-mode - CLI rejects
--workspace-pathwith non-static--workspace-mode -
mode=staticwithoutpathis rejected - Removed CLI flags are no longer accepted
- Removed legacy YAML/target fields are rejected (
static_path,pool, targetworkspace_template) - CLI help/docs reflect only mode/path workspace controls and precedence
Non-goals
- No backward-compat aliases for removed fields/flags
- No warning-based transition period
- No changes to core hook execution semantics
Related
- feat(core): support env interpolation across all config string fields #510 — env interpolation across all config string fields (merged)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels