Skip to content
This repository was archived by the owner on Nov 3, 2026. It is now read-only.

feat: name repos by their path from the workspace root - #13

Merged
gold-silver-copper merged 3 commits into
mainfrom
harmony-2712-repo-paths
Oct 24, 2026
Merged

gold-silver-copper merged 3 commits into
mainfrom
harmony-2712-repo-paths

Conversation

@gold-silver-copper

@gold-silver-copper gold-silver-copper commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What

meta git pull, meta git status and every other command that runs through loop_lib named each repo by its basename. In harmony (98 repos) agent appears twice and nested repos like loop_cli don't say where they live. Now progress lines, result headers and the failure summary all name a repo by its path from the workspace root:

[69/98] ⠄ ./open-source/meta/loop_cli: running...
✓ ./open-source/meta/loop_cli:

The root stays . (results: . (harmony)). Parallel results now sort by that path, so nested repos sit under their parent instead of being mixed in by basename.

Path form: paths start at the root (./open-source/meta/loop_cli), not at the root folder's name (./harmony/open-source/...). The root line already names the folder (. (harmony)), and a path that starts at the root can be pasted into cd from where you ran meta. gitkb/meta_git_cli#30 and gitkb/meta_cli#37 give worktree commands the same naming; gitkb/meta_project_cli#17 (same task) puts remote URLs in meta project list.

One helper (display_name, plus result_name for the . (harmony) form) replaces four copies of the basename logic, and removes an unwrap() on the "No directory found" path.

A repo outside the root (an absolute path in .meta) shows its full path, so it can't collide either.

JSON: every field is unchanged (directory is still the full path). One deliberate change: in parallel mode the results array now follows the same path order as the text output (root first, then by path; before: root first, then by basename, so agent, agent, analytics, ... became ./clients, ./clients/analytics, ...). Sequential mode never sorted, so array order was never a stable contract. The only consumer in harmony, meta_mcp's tool_git_status, finds results by field, not position, so no consumer needs updating.

Unchanged: a caller that passes no root_dir keeps basenames, as before, and its failure summary keeps the full path. Two such callers were meta git worktree exec and meta exec inside a worktree; gitkb/meta_git_cli#30 and gitkb/meta_cli#37 now pass the worktree as the root, so they match. The standalone loop CLI still passes none.

Before / after

meta git status --recursive in harmony (read-only), result headers:

Before:

✓ . (harmony):
✓ agent:
✓ agent:
✓ analytics:
✓ api:
...
✓ loop_cli:

After:

✓ . (harmony):
✓ ./clients:
✓ ./clients/analytics:
...
✓ ./open-source/agent:
✓ ./open-source/meta/agent:
...
✓ ./open-source/meta/loop_cli:

Failure summary, before → after:

✗ /home/gsc/code/gitkb-dev/harmony/clients/app-google: git status (Exit code 1)
✗ ./clients/app-google: git status (Exit code 1)

meta git pull --recursive in a scratch workspace (two repos named agent, one nested; scratch has no remote). Progress lines mid-run:

Before:

[1/6] ⢀ .: running...
[2/6] ⡀ agent: running...
[3/6] ⢀ alpha: running...
[5/6] ⡀ tools: running...
[6/6] ⡀ agent: running...

After:

[1/6] ⢀ .: running...
[2/6] ⡀ ./agent: running...
[3/6] ⢀ ./alpha: running...
[5/6] ⡀ ./tools: running...
[6/6] ⡀ ./tools/agent: running...

Results, after:

✓ . (ws):
✓ ./agent:
✓ ./alpha:
✗ ./scratch:
✓ ./tools:
✓ ./tools/agent:
Summary: ✗ 1 out of 6 commands failed
✗ ./scratch: git pull (Exit code 1)

Verification

  • cargo test -p loop_lib (new test_display_name_is_path_from_root), clippy -D warnings, fmt.
  • Built meta + plugins against this branch and ran the commands above.

Implements [[tasks/harmony-2712]]

Progress and result lines named each repo by its basename, so two repos
called agent looked the same and nested repos didn't say where they live.
They now show ./open-source/meta/loop_cli, relative to the root (still
shown as '. (harmony)'), and results sort by that path.

Implements [[tasks/harmony-2712]]
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 958bdb54-3321-4547-87f4-fab659f233f3
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

A repo outside the workspace root (an absolute path in .meta) fell back to
its basename, which can be ambiguous again. Show its full path instead.

Implements [[tasks/harmony-2712]]
Comparing displayed paths as strings put ./open-source/gitkb-bench between
./open-source/gitkb and ./open-source/gitkb/core, since '-' sorts before
'/'. Compare them as paths so nested repos stay under their parent.

Implements [[tasks/harmony-2712]]
@gold-silver-copper
gold-silver-copper merged commit 14830d2 into main Oct 24, 2026
7 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant