From b79341660f88f3cf0feb1ba85cf597171636aa45 Mon Sep 17 00:00:00 2001 From: Matt Walters Date: Thu, 26 Mar 2026 07:42:59 -0500 Subject: [PATCH 1/3] chore: restore notify-parent workflow (simplified) Re-adds notify-parent.yml to trigger parent meta repo's release-please when this child repo merges to main. Simplified: no checkout needed, all payload fields properly quoted with toJSON. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/notify-parent.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/notify-parent.yml diff --git a/.github/workflows/notify-parent.yml b/.github/workflows/notify-parent.yml new file mode 100644 index 0000000..7f027b7 --- /dev/null +++ b/.github/workflows/notify-parent.yml @@ -0,0 +1,26 @@ +name: Notify Parent Repo + +on: + push: + branches: [main] + +permissions: {} + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Notify parent repo + # PARENT_REPO_PAT requires `repo` scope (or fine-grained `contents:write`) + # on harmony-labs/meta. Configure in Settings → Secrets → Actions. + uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4 + with: + token: ${{ secrets.PARENT_REPO_PAT }} + repository: harmony-labs/meta + event-type: child-repo-updated + client-payload: >- + { + "repo_name": ${{ toJSON(github.event.repository.name) }}, + "sha": ${{ toJSON(github.sha) }}, + "actor": ${{ toJSON(github.actor) }} + } From ce1c86e7a787348e7ece45feefcfb84e5bc154af Mon Sep 17 00:00:00 2001 From: Matt Walters Date: Sun, 29 Mar 2026 10:53:58 -0500 Subject: [PATCH 2/3] fix: thread recursive option from plugin protocol to worktree create The host meta CLI strips --recursive from command args and passes it as a plugin protocol option. The worktree create handler was reading recursive from clap-parsed args (always false) instead of the protocol option. Inject --recursive back into clap args when the protocol option is set, so build_nested_dep_graph is invoked and transitive depends_on entries (e.g. core -> vendor/tree-sitter-markdown) are resolved correctly. Implements [[tasks/harmony-407]] Co-Authored-By: Claude Opus 4.6 (1M context) --- src/commands/worktree/mod.rs | 9 ++++++++- src/lib.rs | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/commands/worktree/mod.rs b/src/commands/worktree/mod.rs index 60c564c..3e9aba2 100644 --- a/src/commands/worktree/mod.rs +++ b/src/commands/worktree/mod.rs @@ -36,6 +36,7 @@ pub fn execute_worktree_command( verbose: bool, json: bool, strict: bool, + recursive: bool, ) -> CommandResult { // Extract the subcommand name from the matched command prefix (if present). // When the plugin registers bare "worktree", the subcommand is in args[0] instead. @@ -45,7 +46,7 @@ pub fn execute_worktree_command( .unwrap_or(""); // Build args for clap - let clap_args: Vec = if subcommand.is_empty() { + let mut clap_args: Vec = if subcommand.is_empty() { // Bare "worktree" or "git worktree" — args already contains the subcommand (if any) args.to_vec() } else { @@ -55,6 +56,12 @@ pub fn execute_worktree_command( .collect() }; + // Inject --recursive if the protocol option was set but the flag wasn't in the + // command args (the host strips global flags like --recursive before forwarding). + if recursive && !clap_args.iter().any(|a| a == "--recursive" || a == "-r") { + clap_args.push("--recursive".to_string()); + } + // No subcommand at all — show help if clap_args.is_empty() { print_worktree_help(); diff --git a/src/lib.rs b/src/lib.rs index 6b0306e..4766c78 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -51,6 +51,7 @@ pub fn execute_command( options.verbose, options.json_output, options.strict, + options.recursive, ); } From 894960d0b8ba11b7f28a09d8268556da3267a633 Mon Sep 17 00:00:00 2001 From: Matt Walters Date: Sun, 29 Mar 2026 11:05:55 -0500 Subject: [PATCH 3/3] fix: scope --recursive injection to create subcommand only Only `create` declares the --recursive flag. Injecting it for all worktree subcommands (list, status, remove, etc.) would cause clap parse errors when global --recursive is set. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/commands/worktree/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/worktree/mod.rs b/src/commands/worktree/mod.rs index 3e9aba2..00742ee 100644 --- a/src/commands/worktree/mod.rs +++ b/src/commands/worktree/mod.rs @@ -58,7 +58,9 @@ pub fn execute_worktree_command( // Inject --recursive if the protocol option was set but the flag wasn't in the // command args (the host strips global flags like --recursive before forwarding). - if recursive && !clap_args.iter().any(|a| a == "--recursive" || a == "-r") { + // Only inject for `create` — it's the only subcommand that declares this flag. + let is_create = matches!(clap_args.first().map(String::as_str), Some("create")); + if recursive && is_create && !clap_args.iter().any(|a| a == "--recursive" || a == "-r") { clap_args.push("--recursive".to_string()); }