aidp 0.49.8 → 0.49.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c15551574a43168d1adfd3157dd3f8981c17972953e7f5285b355358e7cdc288
4
- data.tar.gz: 37ef9124f109f9a615da64d86e938324bc4751322d7e32bfd39c9a93eb2f77f2
3
+ metadata.gz: 152b6f4bd772dffcdd49bff974dc989b987e16e1d5a2a6cbc28ff0017eb654ad
4
+ data.tar.gz: 6163f77e46235f25748344bd675e8ccd221a6ce56d0322d63da1e93969ffc903
5
5
  SHA512:
6
- metadata.gz: b1b634b25d0aacea5def51a4e57ccc26a636fed79d144a7e6fdd8ebe248ee735abe57446e0ba98ae369dfd150cfad3abbb309dd8455be315afe7d2cd48fe1c35
7
- data.tar.gz: 1b61e3ff6de42b5008c44fe96ad786fdc5fee5ea25ccec925d754dd055ab59c87b4c218fb2af03a5ad6284f2a7fed9fc3fa4aa00873fed6cfc25028416d04768
6
+ metadata.gz: fcde2af278ae33285b683948d102eecb16b38bd40d121135c80fceab6ed01908be325ce7cb2ff266d5e4399a9f1127b6aae538ad7eedf8442c46bd7630c3bdfe
7
+ data.tar.gz: a2d8a65e046f8bb81bcb4ec50bbf6838fe6119beb4872bec33f4249db67c107809fa12e65aeaa4452bd8b02e41be3bde74f2956a8faa6b0c70e0bfd4b3240f06
data/lib/aidp/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aidp
4
- VERSION = "0.49.8"
4
+ VERSION = "0.49.9"
5
5
  end
@@ -1,3 +1,4 @@
1
+ require "open3"
1
2
  require "aidp/watch/base_processor"
2
3
  require "aidp/worktree"
3
4
  require "aidp/pr_worktree_manager"
@@ -116,11 +117,12 @@ module Aidp
116
117
  # Use PRWorktreeManager's method to perform rebase and conflict resolution
117
118
  with_worktree_context(worktree_path) do
118
119
  # Fetch the latest changes
119
- @shell_executor.system("git fetch origin")
120
+ @shell_executor.system("git", "fetch", "origin")
120
121
 
121
- # Attempt to rebase
122
- rebase_command = "git rebase origin/#{base_branch}"
123
- rebase_output = @shell_executor.system(rebase_command)
122
+ # Attempt to rebase. Pass args as separate argv entries (not an
123
+ # interpolated shell string) so branch names can never be
124
+ # interpreted by a shell.
125
+ rebase_output = @shell_executor.system("git", "rebase", "origin/#{base_branch}")
124
126
 
125
127
  unless rebase_output
126
128
  # Conflict resolution using AI
@@ -134,9 +136,8 @@ module Aidp
134
136
  if resolution
135
137
  # Stage resolved files and continue rebase
136
138
  # GIT_EDITOR=true prevents editor from opening during automated rebase
137
- quoted_files = conflict_files.map { |f| "\"#{f}\"" }.join(" ")
138
- @shell_executor.system("git add #{quoted_files}")
139
- @shell_executor.system({"GIT_EDITOR" => "true"}, "git rebase --continue")
139
+ @shell_executor.system("git", "add", *conflict_files)
140
+ @shell_executor.system({"GIT_EDITOR" => "true"}, "git", "rebase", "--continue")
140
141
  else
141
142
  return false
142
143
  end
@@ -147,15 +148,19 @@ module Aidp
147
148
  end
148
149
 
149
150
  # Push the rebased branch
150
- @shell_executor.system("git push -f origin #{head_branch}")
151
+ @shell_executor.system("git", "push", "-f", "origin", head_branch)
151
152
  end
152
153
 
153
154
  true
154
155
  end
155
156
 
156
157
  def detect_conflicting_files(worktree_path)
157
- # Use git to list conflicting files
158
- `cd #{worktree_path} && git diff --name-only --diff-filter=U`.split("\n")
158
+ # Use git to list conflicting files. Argv form avoids shell
159
+ # interpretation of worktree_path or any file names in the output.
160
+ stdout, _stderr, _status = Dir.chdir(worktree_path) do
161
+ Open3.capture3("git", "diff", "--name-only", "--diff-filter=U")
162
+ end
163
+ stdout.split("\n")
159
164
  end
160
165
 
161
166
  def resolve_conflicts(worktree_path, base_branch, conflict_files)
@@ -189,8 +194,10 @@ module Aidp
189
194
 
190
195
  # Stage and continue rebase
191
196
  # GIT_EDITOR=true prevents editor from opening during automated rebase
192
- @shell_executor.system("cd #{worktree_path} && git add .")
193
- @shell_executor.system({"GIT_EDITOR" => "true"}, "cd #{worktree_path} && git rebase --continue")
197
+ Dir.chdir(worktree_path) do
198
+ @shell_executor.system("git", "add", ".")
199
+ @shell_executor.system({"GIT_EDITOR" => "true"}, "git", "rebase", "--continue")
200
+ end
194
201
  end
195
202
 
196
203
  def post_rebase_status(pr_number, rebase_result, error_detail = nil)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aidp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.49.8
4
+ version: 0.49.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bart Agapinan