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

fix!: run commands as typed; --include/--exclude name whole repos - #40

Merged
gold-silver-copper merged 14 commits into
mainfrom
fix/run-commands-as-argv
Oct 25, 2026
Merged

gold-silver-copper merged 14 commits into
mainfrom
fix/run-commands-as-argv

Conversation

@gold-silver-copper

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

Copy link
Copy Markdown
Contributor

Part of the meta fix for fuzz findings fuzz-2026-10-24-01 (shell re-parsing of arguments) and -21 (substring --include/--exclude). Main PR with the full description and verification: gitkb/meta#113 (other PRs: gitkb/meta_plugin_protocol#6 gitkb/loop_lib#14 gitkb/loop_cli#13 gitkb/meta_git_cli#31 gitkb/meta_mcp#11 gitkb/meta_rust_cli#16 gitkb/meta_project_cli#18 )

meta exec and plugin plans run as argv; the plugin router keeps an unclaimed subcommand's arguments as args instead of joining them into the command string. New repo_filter: --include/--exclude select repos by .meta name or whole path from the root, once, before loop or plugins run; unmatched values are errors. Skills and meta exec --help updated.

All PRs share branch fix/run-commands-as-argv and are tested together by gitkb/meta CI.

Also: in a worktree set repos are selected by alias (their path in the set); a value that is one repo's path and another's name is an error; git clone refuses filters; meta's flag scanner and help detection stop at --; --recursive with --config walks the chosen config.

gold-silver-copper and others added 2 commits October 25, 2026 04:34
meta exec and plugin plans run as argv with no shell. The plugin router
no longer joins an unclaimed subcommand and its arguments into the
request's command string: the namespace word is the command, the rest
stay args.

--include/--exclude take a repo's .meta name or its path from the
workspace root, resolved against the repos in scope; a value that names
no repo is an error.

Implements [[tasks/harmony-2756]]
--include/--exclude now pick the repos before anything runs, so plugins
that act on their project list honor them too. Names come from the
config chosen with --config, and .meta paths are normalized.

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

coderabbitai Bot commented Oct 25, 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: 29b55652-c331-4b7c-a584-b09734de7f8a
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

t added 12 commits October 25, 2026 05:05
extract_global_flags took --json, --silent and friends from anywhere in
a plugin command, so a file named --json in 'meta git add -- --json'
never reached git. It now stops at --.

Implements [[tasks/harmony-2756]]
…ze like paths

Recursive discovery reloaded the default config file, so --config was
ignored with --recursive. It now starts from the chosen config and
walks only the nested meta repos. A name selector also ignores a
leading ./ and trailing /.

Implements [[tasks/harmony-2756]]
…rses its own line

Implements [[tasks/harmony-2756]]
Dropping .. parts gave different repos the same selection name (a '..'
project matched '.'). Help detection also stops at --.

Implements [[tasks/harmony-2756]]
Joining with an empty prefix gave /libs/core, so names from the tree
(nested repos, worktree exec) never matched.

Implements [[tasks/harmony-2756]]
… filters

- In a worktree set a member sits at its alias, so values select by its
  path in the set; .meta names map to primary-checkout paths and could
  pick a different member.
- .meta names resolve in the same root-relative form as the repos
  (absolute configured paths work).
- A value that is one repo's path and another repo's name is an error.
- meta git clone refuses --include/--exclude instead of dropping them.

Implements [[tasks/harmony-2756]]
…ig trees once

- Inside a worktree set, --include/--exclude were not checked when --tag
  left no member, so a typo exited 0.
- walk_from walks the chosen config like walk_meta_tree, with one visited
  set seeded with the root, so a nested '..' back-edge doesn't expand the
  root again and run commands twice.

Implements [[tasks/harmony-2756]]
- --include api, where nested meta repos both name a project api, used
  to select both; it is now an error that lists their paths.
- repo_path makes the root absolute like the dirs, so a relative
  META_WORKTREES no longer breaks worktree filters.

Implements [[tasks/harmony-2756]]
- Two spellings of one directory (api and libs/../api, or the root and
  child/..) are one repo, so --exclude skips both.
- A value starting with ./ is a path only, so a path that is also an
  ambiguous name can still be selected.

Implements [[tasks/harmony-2756]]
An older plugin (e.g. a meta-git in .meta/plugins or ~/.meta/plugins,
found before PATH) still sends {"cmd": ...}. Such a plan no longer
parses, and was printed and treated as success, so 'meta git push'
pushed nothing and exited 0. JSON with a plan key that does not parse
now fails, naming the plugin and saying to upgrade it. Usage and the
unrecognized-command hint show 'meta exec --'.

Implements [[tasks/harmony-2756]]
@gold-silver-copper
gold-silver-copper merged commit d09d5a1 into main Oct 25, 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