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

feat: name meta exec and plugin repos by their path from the real root - #37

Merged
gold-silver-copper merged 2 commits into
mainfrom
harmony-2712-worktree-exec-root
Oct 24, 2026
Merged

gold-silver-copper merged 2 commits into
mainfrom
harmony-2712-worktree-exec-root

Conversation

@gold-silver-copper

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

Copy link
Copy Markdown
Contributor

What

meta exec inside a worktree built its LoopConfig with root_dir: None, so it named the worktree's root repo by its folder (t1, sorted last) and children by basename. Outside a worktree the same command passes the meta dir as the root and shows . (name) first. It now passes the worktree dir (task_dir) as the root in both worktree branches (with and without a .meta config).

Plugin commands (meta git status, meta git pull, ...) had a related bug: execute_plan guessed the root as the plan's first directory. In a worktree with no root checkout (the meta dir isn't a git repo) that is a child repo, so the first repo was shown as the root. SubprocessPluginManager::execute now takes the root from its callers (the meta dir, or the worktree dir); calls without projects (help, git clone) pass None and keep the guess, since the plugin lists the root first there.

With gitkb/loop_lib#13 (names repos by their path from the root) children show as ./agent; on loop_lib main they keep their basename and only the root line changes. No ordering needed between the PRs. JSON fields are unchanged. With a root set, loop_lib's parallel mode puts the root first in the results array, as it already does outside a worktree (before: the root sorted among the children by folder name). No consumer depends on that order (meta_mcp finds results by field).

Before / after

Scratch meta workspace, inside worktree t1 (., agent, alpha): meta exec -- echo hi

Before:

✓ agent:
hi

✓ alpha:
hi

✓ t1:
hi

After (with loop_lib#13):

✓ . (t1):
hi

✓ ./agent:
hi

✓ ./alpha:
hi

Worktree with no root checkout (meta dir not a git repo, .meta has a/agent and b/agent), inside worktree t2: meta git status -s

Before:

✓ . (a-agent):
✓ b-agent:

After (with loop_lib#13):

✓ ./a-agent:
✓ ./b-agent:

Verification

  • cargo test -p meta --lib --bins --test plugin_git, clippy -D warnings, fmt. Locally two registry tests fail only because ~/.meta exists above the temp dir on this machine (untouched code); CI is the check.
  • Built meta from this branch and ran the command above.

Part of tasks/harmony-2712, with gitkb/loop_lib#13, gitkb/meta_project_cli#17 and gitkb/meta_git_cli#30 (meta git worktree exec).

Implements [[tasks/harmony-2712]]

meta exec inside a worktree passed no root to loop_lib, so it named the
root repo by its folder (t1, sorted last) and children by basename, while
the same command outside a worktree shows '. (name)'. Pass the worktree
dir as the root.

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: 74a0e22f-fc5c-498c-a3cb-9ce8a72e7140
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

execute_plan guessed the root as the plan's first directory. In a worktree
with no root checkout that is a child repo, so meta git status showed the
first repo as '. (a-agent)'. The callers that know the root (the meta dir,
or the worktree dir) now pass it; the guess stays for calls without
projects (help, git clone), where the plugin lists the root first.

Implements [[tasks/harmony-2712]]
@gold-silver-copper gold-silver-copper changed the title feat: name meta exec repos by their path inside a worktree feat: name meta exec and plugin repos by their path from the real root Oct 23, 2026
@gold-silver-copper
gold-silver-copper merged commit 6b77174 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