ayushm98 commited on
Commit
d0a1c53
·
1 Parent(s): bd867f1

Fix max_iterations causing premature failure before Reviewer runs

Browse files

- Increase max_iterations from 3 to 10
- The iteration counter was incrementing for every state transition
- With max_iterations=3, workflow failed before Reviewer could run:
EXPLORING(1) → CLARIFYING → PLANNING(2) → CODING(3) → FAILED

Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
  # HuggingFace Spaces Dockerfile for CodePilot
2
- # BUILD_VERSION: 13 (v3.3.4 resume-fix - fix tool_use/tool_result bug)
3
  FROM python:3.11-slim
4
 
5
  # Set working directory
 
1
  # HuggingFace Spaces Dockerfile for CodePilot
2
+ # BUILD_VERSION: 14 (v3.3.5 iteration-fix - increase max_iterations)
3
  FROM python:3.11-slim
4
 
5
  # Set working directory
chainlit_app.py CHANGED
@@ -20,8 +20,8 @@ from concurrent.futures import ThreadPoolExecutor
20
  # ============================================================
21
  # STARTUP VERSION CHECK - Change this to detect if rebuild worked
22
  # ============================================================
23
- APP_VERSION = "3.3.4-resume-fix"
24
- BUILD_ID = "2024-12-19-v12"
25
  print("=" * 60)
26
  print(f"[STARTUP] CodePilot Chainlit App")
27
  print(f"[STARTUP] APP_VERSION: {APP_VERSION}")
@@ -94,7 +94,7 @@ async def start():
94
 
95
  # Skip self-indexing - agents will only work with cloned GitHub repos
96
  # Create orchestrator and mark as ready
97
- cl.user_session.set("orchestrator", Orchestrator(max_iterations=3))
98
  cl.user_session.set("ready", True)
99
  print("[CHAINLIT] Orchestrator created, ready for GitHub repos")
100
 
 
20
  # ============================================================
21
  # STARTUP VERSION CHECK - Change this to detect if rebuild worked
22
  # ============================================================
23
+ APP_VERSION = "3.3.5-iteration-fix"
24
+ BUILD_ID = "2024-12-19-v13"
25
  print("=" * 60)
26
  print(f"[STARTUP] CodePilot Chainlit App")
27
  print(f"[STARTUP] APP_VERSION: {APP_VERSION}")
 
94
 
95
  # Skip self-indexing - agents will only work with cloned GitHub repos
96
  # Create orchestrator and mark as ready
97
+ cl.user_session.set("orchestrator", Orchestrator(max_iterations=10))
98
  cl.user_session.set("ready", True)
99
  print("[CHAINLIT] Orchestrator created, ready for GitHub repos")
100
 
codepilot/agents/orchestrator.py CHANGED
@@ -9,7 +9,7 @@ The orchestrator is the "brain" that:
9
  """
10
 
11
  # VERSION CHECK - If you see this, new code is running!
12
- ORCHESTRATOR_VERSION = "3.3.4-resume-fix"
13
  print(f"[ORCHESTRATOR] ========== LOADING VERSION {ORCHESTRATOR_VERSION} ==========")
14
 
15
  from enum import Enum
 
9
  """
10
 
11
  # VERSION CHECK - If you see this, new code is running!
12
+ ORCHESTRATOR_VERSION = "3.3.5-iteration-fix"
13
  print(f"[ORCHESTRATOR] ========== LOADING VERSION {ORCHESTRATOR_VERSION} ==========")
14
 
15
  from enum import Enum