Priority: P0 · Epic: #71 · Refs: R27
Why
Every command hardcodes Path::new("weaver.yaml"), weaver.lock, .rw/state.yaml,
.rw/answers.yaml relative to cwd (apply.rs:54,70,113,334, check.rs:15,
describe.rs:24, list.rs:24, run.rs:28, module.rs:65,107,140,165,
plugins.rs:46,90,145,213). CI, fleet runs, and foreign-repo validation all need to
point wvr at another directory.
What
weaver_core::workspace::Workspace { root, config_path, lock_path, state_path, answers_path, plan_dir } with Workspace::discover(root: Option<PathBuf>).
- Global clap args
-C/--repo <path> (also WEAVER_ROOT); relative --plan/--out
paths resolve against the invocation cwd, everything else against root.
- All commands take a
&Workspace; PluginResolver::new(root) and
ModuleResolver receive it instead of PathBuf::from(".").
Acceptance
- Test:
wvr -C /tmp/x plan on a workspace in /tmp/x from another cwd behaves
identically to running inside it, for plan, apply, check, describe, list,
run, module list.
grep -rn 'Path::new("weaver.yaml")' crates/cli returns nothing.
Priority: P0 · Epic: #71 · Refs: R27
Why
Every command hardcodes
Path::new("weaver.yaml"),weaver.lock,.rw/state.yaml,.rw/answers.yamlrelative to cwd (apply.rs:54,70,113,334,check.rs:15,describe.rs:24,list.rs:24,run.rs:28,module.rs:65,107,140,165,plugins.rs:46,90,145,213). CI, fleet runs, and foreign-repo validation all need topoint
wvrat another directory.What
weaver_core::workspace::Workspace { root, config_path, lock_path, state_path, answers_path, plan_dir }withWorkspace::discover(root: Option<PathBuf>).-C/--repo <path>(alsoWEAVER_ROOT); relative--plan/--outpaths resolve against the invocation cwd, everything else against
root.&Workspace;PluginResolver::new(root)andModuleResolverreceive it instead ofPathBuf::from(".").Acceptance
wvr -C /tmp/x planon a workspace in/tmp/xfrom another cwd behavesidentically to running inside it, for
plan,apply,check,describe,list,run,module list.grep -rn 'Path::new("weaver.yaml")' crates/clireturns nothing.