pdd-cli 0.0.90__py3-none-any.whl → 0.0.118__py3-none-any.whl
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.
- pdd/__init__.py +38 -6
- pdd/agentic_bug.py +323 -0
- pdd/agentic_bug_orchestrator.py +497 -0
- pdd/agentic_change.py +231 -0
- pdd/agentic_change_orchestrator.py +526 -0
- pdd/agentic_common.py +521 -786
- pdd/agentic_e2e_fix.py +319 -0
- pdd/agentic_e2e_fix_orchestrator.py +426 -0
- pdd/agentic_fix.py +118 -3
- pdd/agentic_update.py +25 -8
- pdd/architecture_sync.py +565 -0
- pdd/auth_service.py +210 -0
- pdd/auto_deps_main.py +63 -53
- pdd/auto_include.py +185 -3
- pdd/auto_update.py +125 -47
- pdd/bug_main.py +195 -23
- pdd/cmd_test_main.py +345 -197
- pdd/code_generator.py +4 -2
- pdd/code_generator_main.py +118 -32
- pdd/commands/__init__.py +6 -0
- pdd/commands/analysis.py +87 -29
- pdd/commands/auth.py +309 -0
- pdd/commands/connect.py +290 -0
- pdd/commands/fix.py +136 -113
- pdd/commands/maintenance.py +3 -2
- pdd/commands/misc.py +8 -0
- pdd/commands/modify.py +190 -164
- pdd/commands/sessions.py +284 -0
- pdd/construct_paths.py +334 -32
- pdd/context_generator_main.py +167 -170
- pdd/continue_generation.py +6 -3
- pdd/core/__init__.py +33 -0
- pdd/core/cli.py +27 -3
- pdd/core/cloud.py +237 -0
- pdd/core/errors.py +4 -0
- pdd/core/remote_session.py +61 -0
- pdd/crash_main.py +219 -23
- pdd/data/llm_model.csv +4 -4
- pdd/docs/prompting_guide.md +864 -0
- pdd/docs/whitepaper_with_benchmarks/data_and_functions/benchmark_analysis.py +495 -0
- pdd/docs/whitepaper_with_benchmarks/data_and_functions/creation_compare.py +528 -0
- pdd/fix_code_loop.py +208 -34
- pdd/fix_code_module_errors.py +6 -2
- pdd/fix_error_loop.py +291 -38
- pdd/fix_main.py +204 -4
- pdd/fix_verification_errors_loop.py +235 -26
- pdd/fix_verification_main.py +269 -83
- pdd/frontend/dist/assets/index-B5DZHykP.css +1 -0
- pdd/frontend/dist/assets/index-DQ3wkeQ2.js +449 -0
- pdd/frontend/dist/index.html +376 -0
- pdd/frontend/dist/logo.svg +33 -0
- pdd/generate_output_paths.py +46 -5
- pdd/generate_test.py +212 -151
- pdd/get_comment.py +19 -44
- pdd/get_extension.py +8 -9
- pdd/get_jwt_token.py +309 -20
- pdd/get_language.py +8 -7
- pdd/get_run_command.py +7 -5
- pdd/insert_includes.py +2 -1
- pdd/llm_invoke.py +459 -95
- pdd/load_prompt_template.py +15 -34
- pdd/path_resolution.py +140 -0
- pdd/postprocess.py +4 -1
- pdd/preprocess.py +68 -12
- pdd/preprocess_main.py +33 -1
- pdd/prompts/agentic_bug_step10_pr_LLM.prompt +182 -0
- pdd/prompts/agentic_bug_step1_duplicate_LLM.prompt +73 -0
- pdd/prompts/agentic_bug_step2_docs_LLM.prompt +129 -0
- pdd/prompts/agentic_bug_step3_triage_LLM.prompt +95 -0
- pdd/prompts/agentic_bug_step4_reproduce_LLM.prompt +97 -0
- pdd/prompts/agentic_bug_step5_root_cause_LLM.prompt +123 -0
- pdd/prompts/agentic_bug_step6_test_plan_LLM.prompt +107 -0
- pdd/prompts/agentic_bug_step7_generate_LLM.prompt +172 -0
- pdd/prompts/agentic_bug_step8_verify_LLM.prompt +119 -0
- pdd/prompts/agentic_bug_step9_e2e_test_LLM.prompt +289 -0
- pdd/prompts/agentic_change_step10_identify_issues_LLM.prompt +1006 -0
- pdd/prompts/agentic_change_step11_fix_issues_LLM.prompt +984 -0
- pdd/prompts/agentic_change_step12_create_pr_LLM.prompt +131 -0
- pdd/prompts/agentic_change_step1_duplicate_LLM.prompt +73 -0
- pdd/prompts/agentic_change_step2_docs_LLM.prompt +101 -0
- pdd/prompts/agentic_change_step3_research_LLM.prompt +126 -0
- pdd/prompts/agentic_change_step4_clarify_LLM.prompt +164 -0
- pdd/prompts/agentic_change_step5_docs_change_LLM.prompt +981 -0
- pdd/prompts/agentic_change_step6_devunits_LLM.prompt +1005 -0
- pdd/prompts/agentic_change_step7_architecture_LLM.prompt +1044 -0
- pdd/prompts/agentic_change_step8_analyze_LLM.prompt +1027 -0
- pdd/prompts/agentic_change_step9_implement_LLM.prompt +1077 -0
- pdd/prompts/agentic_e2e_fix_step1_unit_tests_LLM.prompt +90 -0
- pdd/prompts/agentic_e2e_fix_step2_e2e_tests_LLM.prompt +91 -0
- pdd/prompts/agentic_e2e_fix_step3_root_cause_LLM.prompt +89 -0
- pdd/prompts/agentic_e2e_fix_step4_fix_e2e_tests_LLM.prompt +96 -0
- pdd/prompts/agentic_e2e_fix_step5_identify_devunits_LLM.prompt +91 -0
- pdd/prompts/agentic_e2e_fix_step6_create_unit_tests_LLM.prompt +106 -0
- pdd/prompts/agentic_e2e_fix_step7_verify_tests_LLM.prompt +116 -0
- pdd/prompts/agentic_e2e_fix_step8_run_pdd_fix_LLM.prompt +120 -0
- pdd/prompts/agentic_e2e_fix_step9_verify_all_LLM.prompt +146 -0
- pdd/prompts/agentic_fix_primary_LLM.prompt +2 -2
- pdd/prompts/agentic_update_LLM.prompt +192 -338
- pdd/prompts/auto_include_LLM.prompt +22 -0
- pdd/prompts/change_LLM.prompt +3093 -1
- pdd/prompts/detect_change_LLM.prompt +571 -14
- pdd/prompts/fix_code_module_errors_LLM.prompt +8 -0
- pdd/prompts/fix_errors_from_unit_tests_LLM.prompt +1 -0
- pdd/prompts/generate_test_LLM.prompt +20 -1
- pdd/prompts/generate_test_from_example_LLM.prompt +115 -0
- pdd/prompts/insert_includes_LLM.prompt +262 -252
- pdd/prompts/prompt_code_diff_LLM.prompt +119 -0
- pdd/prompts/prompt_diff_LLM.prompt +82 -0
- pdd/remote_session.py +876 -0
- pdd/server/__init__.py +52 -0
- pdd/server/app.py +335 -0
- pdd/server/click_executor.py +587 -0
- pdd/server/executor.py +338 -0
- pdd/server/jobs.py +661 -0
- pdd/server/models.py +241 -0
- pdd/server/routes/__init__.py +31 -0
- pdd/server/routes/architecture.py +451 -0
- pdd/server/routes/auth.py +364 -0
- pdd/server/routes/commands.py +929 -0
- pdd/server/routes/config.py +42 -0
- pdd/server/routes/files.py +603 -0
- pdd/server/routes/prompts.py +1322 -0
- pdd/server/routes/websocket.py +473 -0
- pdd/server/security.py +243 -0
- pdd/server/terminal_spawner.py +209 -0
- pdd/server/token_counter.py +222 -0
- pdd/summarize_directory.py +236 -237
- pdd/sync_animation.py +8 -4
- pdd/sync_determine_operation.py +329 -47
- pdd/sync_main.py +272 -28
- pdd/sync_orchestration.py +136 -75
- pdd/template_expander.py +161 -0
- pdd/templates/architecture/architecture_json.prompt +41 -46
- pdd/trace.py +1 -1
- pdd/track_cost.py +0 -13
- pdd/unfinished_prompt.py +2 -1
- pdd/update_main.py +23 -5
- {pdd_cli-0.0.90.dist-info → pdd_cli-0.0.118.dist-info}/METADATA +15 -10
- pdd_cli-0.0.118.dist-info/RECORD +227 -0
- pdd_cli-0.0.90.dist-info/RECORD +0 -153
- {pdd_cli-0.0.90.dist-info → pdd_cli-0.0.118.dist-info}/WHEEL +0 -0
- {pdd_cli-0.0.90.dist-info → pdd_cli-0.0.118.dist-info}/entry_points.txt +0 -0
- {pdd_cli-0.0.90.dist-info → pdd_cli-0.0.118.dist-info}/licenses/LICENSE +0 -0
- {pdd_cli-0.0.90.dist-info → pdd_cli-0.0.118.dist-info}/top_level.txt +0 -0
pdd/agentic_e2e_fix.py
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import re
|
|
5
|
+
import shutil
|
|
6
|
+
import subprocess
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import List, Optional, Tuple, Dict, Any
|
|
9
|
+
|
|
10
|
+
from rich.console import Console
|
|
11
|
+
|
|
12
|
+
from .agentic_e2e_fix_orchestrator import run_agentic_e2e_fix_orchestrator
|
|
13
|
+
|
|
14
|
+
# Initialize rich console for printing
|
|
15
|
+
console = Console()
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _check_gh_cli() -> bool:
|
|
19
|
+
"""Check if the GitHub CLI (gh) is installed and available."""
|
|
20
|
+
return shutil.which("gh") is not None
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _parse_github_url(url: str) -> Tuple[Optional[str], Optional[str], Optional[int]]:
|
|
24
|
+
"""
|
|
25
|
+
Parse a GitHub issue URL to extract owner, repo, and issue number.
|
|
26
|
+
|
|
27
|
+
Supported formats:
|
|
28
|
+
- https://github.com/{owner}/{repo}/issues/{number}
|
|
29
|
+
- https://www.github.com/{owner}/{repo}/issues/{number}
|
|
30
|
+
- github.com/{owner}/{repo}/issues/{number}
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
Tuple[owner, repo, number] or (None, None, None) if parsing fails.
|
|
34
|
+
"""
|
|
35
|
+
# Remove protocol and www
|
|
36
|
+
clean_url = url.replace("https://", "").replace("http://", "").replace("www.", "")
|
|
37
|
+
|
|
38
|
+
# Regex for github.com/owner/repo/issues/number
|
|
39
|
+
pattern = r"^github\.com/([^/]+)/([^/]+)/issues/(\d+)"
|
|
40
|
+
match = re.match(pattern, clean_url)
|
|
41
|
+
|
|
42
|
+
if match:
|
|
43
|
+
return match.group(1), match.group(2), int(match.group(3))
|
|
44
|
+
return None, None, None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _fetch_issue_data(owner: str, repo: str, number: int) -> Tuple[Optional[Dict[str, Any]], Optional[str]]:
|
|
48
|
+
"""
|
|
49
|
+
Fetch issue data using `gh api`.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
Tuple[issue_json, error_message]
|
|
53
|
+
"""
|
|
54
|
+
cmd = [
|
|
55
|
+
"gh", "api",
|
|
56
|
+
f"repos/{owner}/{repo}/issues/{number}",
|
|
57
|
+
"--header", "Accept: application/vnd.github+json"
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
try:
|
|
61
|
+
result = subprocess.run(cmd, capture_output=True, text=True, check=True)
|
|
62
|
+
return json.loads(result.stdout), None
|
|
63
|
+
except subprocess.CalledProcessError as e:
|
|
64
|
+
return None, f"Failed to fetch issue: {e.stderr.strip()}"
|
|
65
|
+
except json.JSONDecodeError:
|
|
66
|
+
return None, "Failed to parse GitHub API response"
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _fetch_issue_comments(comments_url: str) -> str:
|
|
70
|
+
"""
|
|
71
|
+
Fetch all comments for an issue to build full context.
|
|
72
|
+
The comments_url usually looks like: https://api.github.com/repos/{owner}/{repo}/issues/{number}/comments
|
|
73
|
+
"""
|
|
74
|
+
# gh api accepts full URLs if they are within github.com api
|
|
75
|
+
# We need to strip the base API URL to pass to `gh api` or pass the full URL
|
|
76
|
+
# `gh api` handles full URLs gracefully usually, but let's be safe and use the path relative to API root if possible,
|
|
77
|
+
# or just pass the full URL which `gh` supports.
|
|
78
|
+
|
|
79
|
+
cmd = ["gh", "api", comments_url, "--paginate"]
|
|
80
|
+
|
|
81
|
+
try:
|
|
82
|
+
result = subprocess.run(cmd, capture_output=True, text=True, check=True)
|
|
83
|
+
comments_data = json.loads(result.stdout)
|
|
84
|
+
|
|
85
|
+
full_text = []
|
|
86
|
+
for comment in comments_data:
|
|
87
|
+
author = comment.get("user", {}).get("login", "unknown")
|
|
88
|
+
body = comment.get("body", "")
|
|
89
|
+
full_text.append(f"--- Comment by {author} ---\n{body}\n")
|
|
90
|
+
|
|
91
|
+
return "\n".join(full_text)
|
|
92
|
+
except subprocess.CalledProcessError:
|
|
93
|
+
return "" # Return empty string on failure, don't block execution
|
|
94
|
+
except json.JSONDecodeError:
|
|
95
|
+
return ""
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def _find_worktree_for_issue(issue_number: int) -> Optional[Path]:
|
|
99
|
+
"""
|
|
100
|
+
Check .pdd/worktrees/ relative to git root for specific issue worktrees.
|
|
101
|
+
Returns the path if found and valid, else None.
|
|
102
|
+
"""
|
|
103
|
+
try:
|
|
104
|
+
# Find git root
|
|
105
|
+
git_root_cmd = subprocess.run(
|
|
106
|
+
["git", "rev-parse", "--show-toplevel"],
|
|
107
|
+
capture_output=True, text=True, check=True
|
|
108
|
+
)
|
|
109
|
+
git_root = Path(git_root_cmd.stdout.strip())
|
|
110
|
+
except subprocess.CalledProcessError:
|
|
111
|
+
return None
|
|
112
|
+
|
|
113
|
+
worktree_base = git_root / ".pdd" / "worktrees"
|
|
114
|
+
if not worktree_base.exists():
|
|
115
|
+
return None
|
|
116
|
+
|
|
117
|
+
# Candidate directory names
|
|
118
|
+
candidates = [
|
|
119
|
+
f"fix-issue-{issue_number}",
|
|
120
|
+
f"bug-issue-{issue_number}",
|
|
121
|
+
f"change-issue-{issue_number}"
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
for candidate in candidates:
|
|
125
|
+
path = worktree_base / candidate
|
|
126
|
+
if path.exists() and path.is_dir():
|
|
127
|
+
# Verify it's a git repo/worktree
|
|
128
|
+
if (path / ".git").exists():
|
|
129
|
+
return path
|
|
130
|
+
|
|
131
|
+
return None
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def _get_current_branch(cwd: Path) -> str:
|
|
135
|
+
"""Get the current git branch name for a given directory."""
|
|
136
|
+
try:
|
|
137
|
+
cmd = ["git", "rev-parse", "--abbrev-ref", "HEAD"]
|
|
138
|
+
result = subprocess.run(cmd, cwd=cwd, capture_output=True, text=True, check=True)
|
|
139
|
+
return result.stdout.strip()
|
|
140
|
+
except subprocess.CalledProcessError:
|
|
141
|
+
return ""
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def _extract_branch_from_comments(comments_text: str) -> Optional[str]:
|
|
145
|
+
"""
|
|
146
|
+
Attempt to parse the branch name created by `pdd bug` from issue comments.
|
|
147
|
+
Looks for patterns like 'Created branch: <name>' or similar indicators if standard pdd output is present.
|
|
148
|
+
"""
|
|
149
|
+
# Heuristic: pdd bug usually outputs "Switched to branch '...'" or "Created branch '...'"
|
|
150
|
+
# Regex to find branch names in typical pdd output logs pasted in comments
|
|
151
|
+
# Example: "Switched to a new branch 'fix-issue-123'"
|
|
152
|
+
|
|
153
|
+
patterns = [
|
|
154
|
+
r"Switched to a new branch '([^']+)'",
|
|
155
|
+
r"Switched to branch '([^']+)'",
|
|
156
|
+
r"Created branch '([^']+)'",
|
|
157
|
+
r"Branch: ([a-zA-Z0-9_\-/]+)"
|
|
158
|
+
]
|
|
159
|
+
|
|
160
|
+
for pattern in patterns:
|
|
161
|
+
match = re.search(pattern, comments_text)
|
|
162
|
+
if match:
|
|
163
|
+
return match.group(1)
|
|
164
|
+
return None
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def _find_working_directory(
|
|
168
|
+
issue_number: int,
|
|
169
|
+
issue_comments: str,
|
|
170
|
+
quiet: bool,
|
|
171
|
+
force: bool = False
|
|
172
|
+
) -> Tuple[Path, Optional[str], bool]:
|
|
173
|
+
"""
|
|
174
|
+
Determine the correct working directory.
|
|
175
|
+
|
|
176
|
+
Logic:
|
|
177
|
+
1. Check for local worktree.
|
|
178
|
+
2. If no worktree, check current directory branch against expected branch from comments.
|
|
179
|
+
3. If mismatch and not force, abort.
|
|
180
|
+
|
|
181
|
+
Returns:
|
|
182
|
+
(working_directory, warning_message, should_abort)
|
|
183
|
+
"""
|
|
184
|
+
# 1. Try finding a worktree
|
|
185
|
+
worktree_path = _find_worktree_for_issue(issue_number)
|
|
186
|
+
if worktree_path:
|
|
187
|
+
if not quiet:
|
|
188
|
+
console.print(f"[blue]Using worktree: {worktree_path}[/blue]")
|
|
189
|
+
return worktree_path, None, False
|
|
190
|
+
|
|
191
|
+
# 2. Fallback to current directory
|
|
192
|
+
cwd = Path.cwd()
|
|
193
|
+
|
|
194
|
+
# 3. Check branch safety
|
|
195
|
+
expected_branch = _extract_branch_from_comments(issue_comments)
|
|
196
|
+
|
|
197
|
+
if expected_branch:
|
|
198
|
+
current_branch = _get_current_branch(cwd)
|
|
199
|
+
# If we found an expected branch and it doesn't match current
|
|
200
|
+
if current_branch and expected_branch != current_branch:
|
|
201
|
+
warning = (
|
|
202
|
+
f"Expected branch '{expected_branch}' but on '{current_branch}'.\n"
|
|
203
|
+
f"Suggestion: git fetch origin && git checkout {expected_branch}"
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
if force:
|
|
207
|
+
if not quiet:
|
|
208
|
+
console.print(f"[yellow]Warning: {warning} (--force specified)[/yellow]")
|
|
209
|
+
return cwd, warning, False
|
|
210
|
+
else:
|
|
211
|
+
return cwd, warning, True
|
|
212
|
+
|
|
213
|
+
if not quiet:
|
|
214
|
+
console.print(f"[yellow]No worktree found for issue #{issue_number}, using current directory[/yellow]")
|
|
215
|
+
|
|
216
|
+
return cwd, None, False
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
def run_agentic_e2e_fix(
|
|
220
|
+
issue_url: str,
|
|
221
|
+
*,
|
|
222
|
+
timeout_adder: float = 0.0,
|
|
223
|
+
max_cycles: int = 5,
|
|
224
|
+
resume: bool = True,
|
|
225
|
+
force: bool = False,
|
|
226
|
+
verbose: bool = False,
|
|
227
|
+
quiet: bool = False,
|
|
228
|
+
use_github_state: bool = True
|
|
229
|
+
) -> Tuple[bool, str, float, str, List[str]]:
|
|
230
|
+
"""
|
|
231
|
+
CLI entry point for the agentic e2e fix workflow.
|
|
232
|
+
|
|
233
|
+
Args:
|
|
234
|
+
issue_url: The full GitHub issue URL.
|
|
235
|
+
timeout_adder: Additional seconds to add to each step's timeout.
|
|
236
|
+
max_cycles: Maximum outer loop cycles before giving up.
|
|
237
|
+
resume: Whether to resume from saved state.
|
|
238
|
+
force: Override branch mismatch safety checks.
|
|
239
|
+
verbose: Show detailed output.
|
|
240
|
+
quiet: Suppress non-error output.
|
|
241
|
+
use_github_state: Enable/disable GitHub comment-based state persistence.
|
|
242
|
+
|
|
243
|
+
Returns:
|
|
244
|
+
(success, message, total_cost, model_used, changed_files)
|
|
245
|
+
"""
|
|
246
|
+
# 1. Check dependencies
|
|
247
|
+
if not _check_gh_cli():
|
|
248
|
+
msg = "gh CLI not found. Please install GitHub CLI to use this feature."
|
|
249
|
+
if not quiet:
|
|
250
|
+
console.print(f"[red]{msg}[/red]")
|
|
251
|
+
return False, msg, 0.0, "", []
|
|
252
|
+
|
|
253
|
+
# 2. Parse URL
|
|
254
|
+
owner, repo, number = _parse_github_url(issue_url)
|
|
255
|
+
if not owner or not repo or not number:
|
|
256
|
+
msg = f"Invalid GitHub URL: {issue_url}"
|
|
257
|
+
if not quiet:
|
|
258
|
+
console.print(f"[red]{msg}[/red]")
|
|
259
|
+
return False, msg, 0.0, "", []
|
|
260
|
+
|
|
261
|
+
if not quiet:
|
|
262
|
+
console.print(f"[bold blue]Fetching issue #{number} from {owner}/{repo}...[/bold blue]")
|
|
263
|
+
|
|
264
|
+
# 3. Fetch Issue Data
|
|
265
|
+
issue_data, error = _fetch_issue_data(owner, repo, number)
|
|
266
|
+
if error or not issue_data:
|
|
267
|
+
msg = f"Issue not found: {error}"
|
|
268
|
+
if not quiet:
|
|
269
|
+
console.print(f"[red]{msg}[/red]")
|
|
270
|
+
return False, msg, 0.0, "", []
|
|
271
|
+
|
|
272
|
+
# Extract fields
|
|
273
|
+
issue_title = issue_data.get("title", "")
|
|
274
|
+
issue_body = issue_data.get("body", "")
|
|
275
|
+
issue_author = issue_data.get("user", {}).get("login", "unknown")
|
|
276
|
+
comments_url = issue_data.get("comments_url", "")
|
|
277
|
+
|
|
278
|
+
# 4. Fetch Comments (Context)
|
|
279
|
+
comments_text = ""
|
|
280
|
+
if comments_url:
|
|
281
|
+
comments_text = _fetch_issue_comments(comments_url)
|
|
282
|
+
|
|
283
|
+
# Combine body and comments for full context
|
|
284
|
+
full_issue_content = f"Title: {issue_title}\n\nDescription:\n{issue_body}\n\nComments:\n{comments_text}"
|
|
285
|
+
|
|
286
|
+
# 5. Determine Working Directory
|
|
287
|
+
cwd, warning_msg, should_abort = _find_working_directory(
|
|
288
|
+
number, comments_text, quiet, force
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
if should_abort:
|
|
292
|
+
if not quiet:
|
|
293
|
+
console.print(f"[red]Aborting to prevent working in wrong directory.[/red]")
|
|
294
|
+
if warning_msg:
|
|
295
|
+
console.print(f"[red]{warning_msg}[/red]")
|
|
296
|
+
console.print("[red]Use --force to override.[/red]")
|
|
297
|
+
return False, "Branch mismatch - use --force to override", 0.0, "", []
|
|
298
|
+
|
|
299
|
+
# 6. Run Orchestrator
|
|
300
|
+
if not quiet:
|
|
301
|
+
console.print(f"[bold green]Starting Agentic E2E Fix for Issue #{number}[/bold green]")
|
|
302
|
+
console.print(f"Working Directory: {cwd}")
|
|
303
|
+
|
|
304
|
+
return run_agentic_e2e_fix_orchestrator(
|
|
305
|
+
issue_url=issue_url,
|
|
306
|
+
issue_content=full_issue_content,
|
|
307
|
+
repo_owner=owner,
|
|
308
|
+
repo_name=repo,
|
|
309
|
+
issue_number=number,
|
|
310
|
+
issue_author=issue_author,
|
|
311
|
+
issue_title=issue_title,
|
|
312
|
+
cwd=cwd,
|
|
313
|
+
timeout_adder=timeout_adder,
|
|
314
|
+
max_cycles=max_cycles,
|
|
315
|
+
resume=resume,
|
|
316
|
+
verbose=verbose,
|
|
317
|
+
quiet=quiet,
|
|
318
|
+
use_github_state=use_github_state
|
|
319
|
+
)
|