alpiecode 2.0.13__tar.gz → 2.0.14__tar.gz

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.
Files changed (158) hide show
  1. {alpiecode-2.0.13 → alpiecode-2.0.14}/PKG-INFO +1 -1
  2. {alpiecode-2.0.13 → alpiecode-2.0.14}/pyproject.toml +1 -1
  3. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/alpiecode.egg-info/PKG-INFO +1 -1
  4. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/__init__.py +1 -1
  5. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/convergence.py +5 -1
  6. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/orchestrator.py +12 -2
  7. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/progress.py +3 -1
  8. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/prompt.py +6 -5
  9. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/tools.py +1 -1
  10. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_repair_evidence.py +1 -1
  11. {alpiecode-2.0.13 → alpiecode-2.0.14}/README.md +0 -0
  12. {alpiecode-2.0.13 → alpiecode-2.0.14}/setup.cfg +0 -0
  13. {alpiecode-2.0.13 → alpiecode-2.0.14}/setup.py +0 -0
  14. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/alpiecode/__init__.py +0 -0
  15. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/alpiecode.egg-info/SOURCES.txt +0 -0
  16. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/alpiecode.egg-info/dependency_links.txt +0 -0
  17. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/alpiecode.egg-info/entry_points.txt +0 -0
  18. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/alpiecode.egg-info/requires.txt +0 -0
  19. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/alpiecode.egg-info/top_level.txt +0 -0
  20. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/__main__.py +0 -0
  21. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/agent.py +0 -0
  22. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/assessment.py +0 -0
  23. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/backends/__init__.py +0 -0
  24. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/backends/base.py +0 -0
  25. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/backends/local_backend.py +0 -0
  26. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/backends/openai_backend.py +0 -0
  27. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/blueprints.py +0 -0
  28. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/cache.py +0 -0
  29. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/capabilities.py +0 -0
  30. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/chat_tags.py +0 -0
  31. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/cli.py +0 -0
  32. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/client.py +0 -0
  33. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/compaction.py +0 -0
  34. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/config.py +0 -0
  35. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/context.py +0 -0
  36. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/diff_preview.py +0 -0
  37. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/discovery.py +0 -0
  38. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/doctor.py +0 -0
  39. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/dream_rsi.py +0 -0
  40. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/evaluation.py +0 -0
  41. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/execution_safety.py +0 -0
  42. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/executor.py +0 -0
  43. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/git_ops.py +0 -0
  44. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/github.py +0 -0
  45. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/grounding.py +0 -0
  46. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/guardian.py +0 -0
  47. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/guardrails.py +0 -0
  48. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/ipython_ext.py +0 -0
  49. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/lifecycle.py +0 -0
  50. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/local_model.py +0 -0
  51. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/media.py +0 -0
  52. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/memory.py +0 -0
  53. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/metrics.py +0 -0
  54. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/onboarding.py +0 -0
  55. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/paths.py +0 -0
  56. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/project_template.py +0 -0
  57. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/rephraser.py +0 -0
  58. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/server.py +0 -0
  59. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/session.py +0 -0
  60. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/accessibility-audit/SKILL.md +0 -0
  61. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/accessibility-testing/SKILL.md +0 -0
  62. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/accessibility-ui-components/SKILL.md +0 -0
  63. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/agentic-workflows/SKILL.md +0 -0
  64. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/api-design/SKILL.md +0 -0
  65. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/architecture-design/SKILL.md +0 -0
  66. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/backend-engineering/SKILL.md +0 -0
  67. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/browser-automation/SKILL.md +0 -0
  68. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/cli-development/SKILL.md +0 -0
  69. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/cloud-infrastructure/SKILL.md +0 -0
  70. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/code-generation/SKILL.md +0 -0
  71. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/code-review/SKILL.md +0 -0
  72. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/codebase-onboarding/SKILL.md +0 -0
  73. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/cost-optimization/SKILL.md +0 -0
  74. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/data-analysis/SKILL.md +0 -0
  75. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/data-engineering/SKILL.md +0 -0
  76. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/database-engineering/SKILL.md +0 -0
  77. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/dependency-management/SKILL.md +0 -0
  78. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/dependency-security/SKILL.md +0 -0
  79. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/dependency-upgrades/SKILL.md +0 -0
  80. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/devops-ci-cd/SKILL.md +0 -0
  81. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/docker-containers/SKILL.md +0 -0
  82. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/documentation/SKILL.md +0 -0
  83. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/documentation-site/SKILL.md +0 -0
  84. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/e2e-testing/SKILL.md +0 -0
  85. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/error-handling-resilience/SKILL.md +0 -0
  86. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/feature-development/SKILL.md +0 -0
  87. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/frontend-engineering/SKILL.md +0 -0
  88. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/git-workflow/SKILL.md +0 -0
  89. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/incident-response/SKILL.md +0 -0
  90. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/legacy-code-modernization/SKILL.md +0 -0
  91. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/llm-application-engineering/SKILL.md +0 -0
  92. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/localization-i18n/SKILL.md +0 -0
  93. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/mcp-server-development/SKILL.md +0 -0
  94. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/migration-engineering/SKILL.md +0 -0
  95. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/mobile-development/SKILL.md +0 -0
  96. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/model-evaluation/SKILL.md +0 -0
  97. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/nodejs-services/SKILL.md +0 -0
  98. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/observability/SKILL.md +0 -0
  99. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/performance-optimization/SKILL.md +0 -0
  100. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/privacy-data-protection/SKILL.md +0 -0
  101. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/prompt-engineering/SKILL.md +0 -0
  102. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/python-engineering/SKILL.md +0 -0
  103. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/rag-retrieval/SKILL.md +0 -0
  104. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/react-engineering/SKILL.md +0 -0
  105. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/release-management/SKILL.md +0 -0
  106. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/requirements-analysis/SKILL.md +0 -0
  107. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/responsive-design/SKILL.md +0 -0
  108. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/safe-refactoring/SKILL.md +0 -0
  109. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/secure-coding/SKILL.md +0 -0
  110. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/systematic-debugging/SKILL.md +0 -0
  111. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/technical-planning/SKILL.md +0 -0
  112. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/technical-research/SKILL.md +0 -0
  113. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/technical-writing/SKILL.md +0 -0
  114. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/test-engineering/SKILL.md +0 -0
  115. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/tool-integration/SKILL.md +0 -0
  116. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/typescript-engineering/SKILL.md +0 -0
  117. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/visual-regression-testing/SKILL.md +0 -0
  118. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/web-performance/SKILL.md +0 -0
  119. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/web-security-testing/SKILL.md +0 -0
  120. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills/workflow-automation/SKILL.md +0 -0
  121. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/skills.py +0 -0
  122. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/slash.py +0 -0
  123. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/subagent.py +0 -0
  124. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/system1.py +0 -0
  125. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/updater.py +0 -0
  126. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/verifier.py +0 -0
  127. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/vision.py +0 -0
  128. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/vscode_installer.py +0 -0
  129. {alpiecode-2.0.13 → alpiecode-2.0.14}/src/codeagent/walkthrough.py +0 -0
  130. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_adaptive_resilience.py +0 -0
  131. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_chat_tags_and_offline_multimodal.py +0 -0
  132. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_cli_ui.py +0 -0
  133. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_context_and_trajectory.py +0 -0
  134. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_deloop_and_sessions.py +0 -0
  135. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_dream_rsi.py +0 -0
  136. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_execution_recovery.py +0 -0
  137. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_frontier_architecture.py +0 -0
  138. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_gpu_detection.py +0 -0
  139. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_lifecycle_and_portfolio.py +0 -0
  140. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_local_model_download.py +0 -0
  141. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_memory_optimization.py +0 -0
  142. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_nested_xml_tools.py +0 -0
  143. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_non_thinking_and_local_stream.py +0 -0
  144. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_onboarding.py +0 -0
  145. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_project_templates.py +0 -0
  146. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_release_foundations.py +0 -0
  147. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_report_convergence.py +0 -0
  148. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_security_config.py +0 -0
  149. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_skills_engine.py +0 -0
  150. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_slash_and_diff.py +0 -0
  151. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_subagents.py +0 -0
  152. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_task_assessment.py +0 -0
  153. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_token_economy_and_256k.py +0 -0
  154. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_truncation_resilience.py +0 -0
  155. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_verifier.py +0 -0
  156. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_visual_grounding.py +0 -0
  157. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_walkthrough.py +0 -0
  158. {alpiecode-2.0.13 → alpiecode-2.0.14}/test/test_web_resilience_and_guardrails.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alpiecode
3
- Version: 2.0.13
3
+ Version: 2.0.14
4
4
  Summary: AlpieCode
5
5
  Requires-Python: >=3.9
6
6
  Requires-Dist: huggingface_hub>=0.20.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "alpiecode"
7
- version = "2.0.13"
7
+ version = "2.0.14"
8
8
  description = "AlpieCode"
9
9
  requires-python = ">=3.9"
10
10
  dependencies = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alpiecode
3
- Version: 2.0.13
3
+ Version: 2.0.14
4
4
  Summary: AlpieCode
5
5
  Requires-Python: >=3.9
6
6
  Requires-Dist: huggingface_hub>=0.20.0
@@ -17,7 +17,7 @@ Supports:
17
17
  from pathlib import Path
18
18
  from typing import Optional, Any, Dict
19
19
 
20
- __version__ = "2.0.13"
20
+ __version__ = "2.0.14"
21
21
 
22
22
  def run(task: str, workdir: str = ".", reasoning_level: str = "thinking", **kwargs):
23
23
  """Run an autonomous coding task programmatically."""
@@ -15,7 +15,8 @@ class ConvergenceGuard:
15
15
  failed: bool) -> Optional[str]:
16
16
  target = str(args.get("path") or args.get("file") or args.get("filepath")
17
17
  or args.get("filename") or args.get("command") or "")
18
- key = json.dumps([name, target])
18
+ key_detail = str(args.get("old_str", ""))[:60] if name == "edit_file" else ""
19
+ key = json.dumps([name, target, key_detail])
19
20
  if failed:
20
21
  from .execution_safety import infrastructure_failure
21
22
  infrastructure = infrastructure_failure(output)
@@ -40,6 +41,9 @@ class ConvergenceGuard:
40
41
  )
41
42
  elif name in ("edit_file", "write_file", "append_file", "bash"):
42
43
  self._reads.clear()
44
+ if name in ("edit_file", "write_file", "append_file"):
45
+ # Clear bash command failure history when files are mutated
46
+ self._failures = {k: v for k, v in self._failures.items() if not k.startswith('["bash"')}
43
47
  if name == "write_file" and not args.get("append"):
44
48
  signature = hashlib.sha256(json.dumps(args, sort_keys=True).encode()).hexdigest()
45
49
  if self._writes.get(key) == signature:
@@ -123,8 +123,10 @@ def _check_tool_results_had_error(results) -> bool:
123
123
  except Exception:
124
124
  pass
125
125
 
126
- # 2. File tool or general error messages
126
+ # 2. File tool or general error messages (skip harmless no-op results)
127
127
  content_lower = content.lower()
128
+ if content_lower.startswith("skipped:"):
129
+ continue
128
130
  if content_lower.startswith("error:") or content_lower.startswith("error "):
129
131
  err_files = set()
130
132
  for ef in re.findall(r"['\"]([^'\"\n]+\.[a-zA-Z0-9]+)['\"]", content):
@@ -425,7 +427,15 @@ class AgentOrchestrator:
425
427
  "[PROJECT ENHANCEMENT DIRECTIVE: EXISTING CODEBASE]\n"
426
428
  "NON-DESTRUCTIVE WORKFLOW: Locate and read the relevant implementation, reproduce the issue, "
427
429
  "and use targeted edits. Preserve existing behavior. Do not invent replacement application "
428
- "files or treat shell startup failures as source-code bugs.\n\n" + effective_task
430
+ "files or treat shell startup failures as source-code bugs.\n"
431
+ "- DIAGNOSE ROOT CAUSE: Inspect the source code and error traceback carefully. "
432
+ "For undefined variables or missing logic, implement the missing calculation/definition "
433
+ "(check comments like '# encoding' and variable types) rather than blindly replacing variable names.\n"
434
+ "- TARGETED EDITS: Use edit_file for precise fixes. Verify line indentation matches the file exactly. "
435
+ "Do NOT emit redundant edits where old_str and new_str are identical.\n"
436
+ "- EXECUTE & VERIFY: Run the script or tests via bash to confirm the fix works. "
437
+ "If it fails with a new error, inspect the traceback and fix it.\n"
438
+ "- CONCLUDE: Only declare DONE when execution succeeds with exit code 0.\n\n" + effective_task
429
439
  )
430
440
  if bp:
431
441
  bp_type = getattr(bp, "blueprint_type", None)
@@ -132,7 +132,9 @@ class ProgressMonitor:
132
132
  elif '"exit_code":' in content:
133
133
  snap.bash_exit_codes.append(1)
134
134
  snap.errors.append(f"command failed: {content[:100]}")
135
- if content.lower().startswith("error:") or "error:" in content[:80].lower():
135
+ if content.lower().startswith("skipped:"):
136
+ pass # Harmless no-op (e.g. identical edit_file old_str/new_str)
137
+ elif content.lower().startswith("error:") or "error:" in content[:80].lower():
136
138
  snap.errors.append(content[:100])
137
139
 
138
140
  # Determine progress
@@ -925,11 +925,12 @@ class PromptBuilder:
925
925
  "If identity is uncertain, ask for clarification before recommending a purchase.\n"
926
926
  )
927
927
  if is_offline:
928
- repair_policy = ("Repair task: read the relevant source before editing. Use edit_file for minimal fixes; "
929
- "do not replace existing files or invent a new application. If execution is unavailable, "
930
- "report the environment failure and leave verification unconfirmed.\n"
931
- "For undefined variables, inspect their intended definition and all uses before changing names. "
932
- "A rejected edit changed nothing. Use the reported source lines and exact indentation for the next edit.\n"
928
+ repair_policy = ("Repair & Debug Policy: Read the relevant source file before making changes. Use edit_file for minimal, targeted fixes; "
929
+ "do not replace existing files or rewrite working logic.\n"
930
+ "- For NameError / undefined variables: Look at comments (e.g. # encoding, # setup) and downstream usage to find what calculation "
931
+ "or definition was missing. Define the missing variable properly — NEVER blindly rename downstream variables.\n"
932
+ "- Execute via bash after editing to verify the fix works. If it fails with a new error, read the traceback and fix the next issue.\n"
933
+ "- In edit_file, only specify lines that actually change. Do not emit edits where old_str and new_str are identical.\n"
933
934
  if task_context is not None and getattr(task_context, "intent", "") in ("debug", "modify", "refactor") else "")
934
935
  shell = getattr(task_context, "shell", "bash")
935
936
  shell_policy = SHELL_RULES_MAP.get(shell, "") if shell in ("powershell", "cmd") else ""
@@ -749,7 +749,7 @@ def _edit_file(workdir: Path, path: str, old_str: str, new_str: str) -> str:
749
749
  return f"error: file not found: {path}"
750
750
  text = p.read_text(encoding="utf-8", errors="replace")
751
751
  if old_str == new_str:
752
- return "error: old_str and new_str are identical. No change was applied; this is not a bug fix."
752
+ return "skipped: old_str and new_str are identical — no change needed."
753
753
  count = text.count(old_str)
754
754
 
755
755
  if count == 1:
@@ -19,7 +19,7 @@ def test_noop_edit_cannot_report_a_fix(tmp_path):
19
19
  path = tmp_path / "bigram.py"
20
20
  path.write_text("print()\n")
21
21
  result = _edit_file(tmp_path, path.name, "print()", "print()")
22
- assert result.startswith("error:")
22
+ assert result.startswith("skipped:")
23
23
  assert path.read_text() == "print()\n"
24
24
 
25
25
 
File without changes
File without changes
File without changes