Skip to content

Global -C <path> / --repo and a single Workspace path resolver #73

Description

@Max-Levitskiy

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions