Skip to content

Resolve relative workspaceRoot values from the manifest directory #12

Description

@EthanThatOneKid

Problem

Manifest paths are documented as workspace-relative, but manifestPaths() currently uses a relative workspaceRoot value as-is. For example, workspaceRoot: ".." remains ".." instead of resolving relative to the directory containing repos.json. Behavior therefore depends on the caller's current working directory and can place repositories, worktrees, or the secrets vault in an unexpected location.

The existing test currently locks in this incorrect behavior by expecting the unresolved string.

Desired behavior

Resolve relative workspaceRoot values against the manifest file's directory, then derive all configured directories from that absolute normalized root. Absolute workspaceRoot values should remain supported.

Acceptance criteria

  • With /tmp/workspace/repos.json and workspaceRoot: "..", the root resolves to /tmp regardless of the process current directory.
  • With no workspaceRoot, the root remains the directory containing the manifest.
  • Absolute workspace roots remain absolute and unchanged except for normal path normalization.
  • repositoriesDirectory, worktreesDirectory, and vaultDirectory are derived from the resolved root.
  • Repository path: "." resolves to the resolved workspace root.
  • Add tests that invoke path resolution from a different current directory and cover ., .., nested relative paths, and absolute paths.
  • Update schema/docs to state the resolution rule unambiguously.

Non-goals

  • Do not change the manifest's existing default directory names.
  • Do not silently reinterpret repository paths as relative to the Git checkout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwayfinder:taskTask ticket (HITL or AFK)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions