Skip to content

Halt workspace walk-up at the first repo boundary

find_workspace_root() ascends from the discovery cwd until the first directory that contains .forest/ or .git, whichever is nearer; the nearest .forest/config.yaml wins. Walk-up never pierces a nested repository.

This is required by the real layout: fcs2flow/, bcl2airr/, and airrflow/ are separate git repos, each with a legacy root forest.yaml, nested inside the G004 tree. Unbounded ascent would bind a command run inside one of them to a parent G004 workspace, or trip the ambiguous-config error (root forest.yaml + parent .forest/config.yaml) on every command.

Consequences

  • Nested forest repos are self-contained; use -C (ADR-0008) to reach across them.
  • The root-forest.yaml-vs-.forest/config.yaml ambiguity check is scoped within one boundary.
  • Refines ADR-0003's "walk upward" with an explicit stop condition.