lcode-cli 0.61.0__tar.gz → 0.62.0__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 (260) hide show
  1. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/CHANGELOG.md +41 -1
  2. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/PKG-INFO +1 -1
  3. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/automation.md +1 -1
  4. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/public-benchmarks.md +11 -5
  5. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/quickstart.md +1 -1
  6. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/usage.md +16 -5
  7. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/__init__.py +1 -1
  8. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/agent_checks.py +39 -6
  9. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/checkpoints.py +12 -0
  10. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/checks.py +83 -7
  11. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/harbor_bench.py +16 -5
  12. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_checkpoints.py +18 -0
  13. lcode_cli-0.62.0/tests/test_checks.py +498 -0
  14. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_harbor_bench.py +13 -0
  15. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_stuck.py +21 -2
  16. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/uv.lock +27 -27
  17. lcode_cli-0.61.0/tests/test_checks.py +0 -243
  18. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.editorconfig +0 -0
  19. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.github/CODEOWNERS +0 -0
  20. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  21. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  22. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  23. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.github/ISSUE_TEMPLATE/model_request.yml +0 -0
  24. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  25. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.github/dependabot.yml +0 -0
  26. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.github/workflows/ci.yml +0 -0
  27. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.github/workflows/docs.yml +0 -0
  28. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.github/workflows/release.yml +0 -0
  29. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.gitignore +0 -0
  30. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/.pre-commit-config.yaml +0 -0
  31. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/AGENTS.md +0 -0
  32. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/CODE_OF_CONDUCT.md +0 -0
  33. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/CONTRIBUTING.md +0 -0
  34. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/LICENSE +0 -0
  35. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/README.md +0 -0
  36. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/SECURITY.md +0 -0
  37. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/action.yml +0 -0
  38. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/agents.md +0 -0
  39. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/assets/demo.svg +0 -0
  40. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/assets/extra.css +0 -0
  41. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/assets/film-fox-and-kitten.jpg +0 -0
  42. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/assets/long-clip-tulip.jpg +0 -0
  43. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/bench.md +0 -0
  44. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/changelog.md +0 -0
  45. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/commands.md +0 -0
  46. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/configuration.md +0 -0
  47. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/contributing.md +0 -0
  48. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/editors.md +0 -0
  49. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/git.md +0 -0
  50. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/hooks.md +0 -0
  51. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/how-it-works.md +0 -0
  52. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/index.md +0 -0
  53. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/installation.md +0 -0
  54. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/lsp.md +0 -0
  55. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/mcp.md +0 -0
  56. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/memory.md +0 -0
  57. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/models.md +0 -0
  58. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/modes.md +0 -0
  59. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/sandbox.md +0 -0
  60. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/search.md +0 -0
  61. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/servers.md +0 -0
  62. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/traces.md +0 -0
  63. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/docs/troubleshooting.md +0 -0
  64. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/examples/README.md +0 -0
  65. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/examples/api/fix_tests.py +0 -0
  66. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/examples/commands/review.md +0 -0
  67. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/examples/skills/commit-message/SKILL.md +0 -0
  68. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/examples/skills/commit-message/scripts/staged.sh +0 -0
  69. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/install.sh +0 -0
  70. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/mkdocs.yml +0 -0
  71. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/overrides/main.html +0 -0
  72. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/pyproject.toml +0 -0
  73. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/scripts/make_logos.py +0 -0
  74. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/scripts/record_demo.py +0 -0
  75. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/scripts/social-preview.html +0 -0
  76. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/__main__.py +0 -0
  77. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/acp.py +0 -0
  78. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/action.py +0 -0
  79. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/agent.py +0 -0
  80. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/agent_base.py +0 -0
  81. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/agent_context.py +0 -0
  82. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/agent_model.py +0 -0
  83. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/agent_prompt.py +0 -0
  84. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/agent_sessions.py +0 -0
  85. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/api.py +0 -0
  86. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/assistant.py +0 -0
  87. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/backends.py +0 -0
  88. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/bench.py +0 -0
  89. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/bench_backend.py +0 -0
  90. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/bench_budgets.py +0 -0
  91. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/bench_checks.py +0 -0
  92. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/bench_dedupe.py +0 -0
  93. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/bench_flaky.py +0 -0
  94. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/bench_logsum.py +0 -0
  95. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/bench_quick.py +0 -0
  96. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/bench_quotes.py +0 -0
  97. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/bench_runtime.py +0 -0
  98. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/catalog.py +0 -0
  99. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/cli.py +0 -0
  100. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/cli_args.py +0 -0
  101. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/clipboard.py +0 -0
  102. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/clips.py +0 -0
  103. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/cloud.py +0 -0
  104. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/codesearch.py +0 -0
  105. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/comfy.py +0 -0
  106. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/config.py +0 -0
  107. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/context.py +0 -0
  108. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/doctor.py +0 -0
  109. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/edits.py +0 -0
  110. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/escalate.py +0 -0
  111. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/extensions.py +0 -0
  112. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/film.py +0 -0
  113. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/frontmatter.py +0 -0
  114. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/gitflow.py +0 -0
  115. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/harbor.py +0 -0
  116. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/hardware.py +0 -0
  117. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/hooks.py +0 -0
  118. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/imageopts.py +0 -0
  119. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/jobs.py +0 -0
  120. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/limits.py +0 -0
  121. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/lsp.py +0 -0
  122. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/manual.py +0 -0
  123. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/matching.py +0 -0
  124. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/__init__.py +0 -0
  125. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/auth.py +0 -0
  126. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/catalog.py +0 -0
  127. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/catalog.toml +0 -0
  128. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/client.py +0 -0
  129. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/commands.py +0 -0
  130. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/config.py +0 -0
  131. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/http.py +0 -0
  132. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/manager.py +0 -0
  133. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/protocol.py +0 -0
  134. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/server.py +0 -0
  135. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/mcp/stdio.py +0 -0
  136. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/media.py +0 -0
  137. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/media.toml +0 -0
  138. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/media_catalog.py +0 -0
  139. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/media_cloud.py +0 -0
  140. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/media_video.py +0 -0
  141. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/memory.py +0 -0
  142. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/models.toml +0 -0
  143. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/modes.py +0 -0
  144. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/notify.py +0 -0
  145. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/ollama.py +0 -0
  146. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/permissions.py +0 -0
  147. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/planning.py +0 -0
  148. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/preview.py +0 -0
  149. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/qt_hook.py +0 -0
  150. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/render.py +0 -0
  151. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/repeats.py +0 -0
  152. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/repl.py +0 -0
  153. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/repl_history.py +0 -0
  154. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/repl_media.py +0 -0
  155. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/repl_models.py +0 -0
  156. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/repl_sessions.py +0 -0
  157. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/replay.py +0 -0
  158. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/repoid.py +0 -0
  159. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/repomap.py +0 -0
  160. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/residency.py +0 -0
  161. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/review.py +0 -0
  162. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/sandbox.py +0 -0
  163. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/screenshots.py +0 -0
  164. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/screenshots_web.py +0 -0
  165. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/secretscan.py +0 -0
  166. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/servers/__init__.py +0 -0
  167. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/servers/encord.py +0 -0
  168. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/servers/valohai.py +0 -0
  169. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/servers/xai.py +0 -0
  170. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/sessions.py +0 -0
  171. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/steer.py +0 -0
  172. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/subagents.py +0 -0
  173. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/tool_helpers.py +0 -0
  174. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/tool_schemas.py +0 -0
  175. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/tools.py +0 -0
  176. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/tools_base.py +0 -0
  177. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/tools_edit.py +0 -0
  178. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/tools_shell.py +0 -0
  179. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/trace_export.py +0 -0
  180. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/trace_view.py +0 -0
  181. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/traces.py +0 -0
  182. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/unreachable.py +0 -0
  183. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/update.py +0 -0
  184. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/vision.py +0 -0
  185. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/web.py +0 -0
  186. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/__init__.py +0 -0
  187. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/flux2-klein-4b-t2i.json +0 -0
  188. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/remove-background.json +0 -0
  189. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/smooth-film.json +0 -0
  190. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/sound-stable-audio.json +0 -0
  191. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/upscale-esrgan.json +0 -0
  192. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/upscale-video-esrgan.json +0 -0
  193. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/wan21-fun-camera.json +0 -0
  194. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/wan21-vace.json +0 -0
  195. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/wan22-fun-inp-5b.json +0 -0
  196. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/wan22-ti2v-5b.json +0 -0
  197. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/src/lcode/workflows/z-image-turbo-t2i.json +0 -0
  198. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/comfy_standin.py +0 -0
  199. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/conftest.py +0 -0
  200. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/fake_lsp_server.py +0 -0
  201. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/fake_mcp_server.py +0 -0
  202. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_acp.py +0 -0
  203. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_action.py +0 -0
  204. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_agent.py +0 -0
  205. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_api.py +0 -0
  206. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_assistant.py +0 -0
  207. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_backends.py +0 -0
  208. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_bench.py +0 -0
  209. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_bench_work.py +0 -0
  210. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_catalog.py +0 -0
  211. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_cli.py +0 -0
  212. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_clipboard.py +0 -0
  213. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_cloud.py +0 -0
  214. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_codesearch.py +0 -0
  215. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_comfy.py +0 -0
  216. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_config.py +0 -0
  217. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_context.py +0 -0
  218. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_context_picker.py +0 -0
  219. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_conversations.py +0 -0
  220. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_escalate.py +0 -0
  221. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_extensions.py +0 -0
  222. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_film.py +0 -0
  223. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_gitflow.py +0 -0
  224. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_gpu_handover.py +0 -0
  225. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_hooks.py +0 -0
  226. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_image_edit.py +0 -0
  227. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_image_generate.py +0 -0
  228. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_jobs.py +0 -0
  229. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_long_clips.py +0 -0
  230. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_look.py +0 -0
  231. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_lsp.py +0 -0
  232. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_manual.py +0 -0
  233. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_matching.py +0 -0
  234. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_mcp.py +0 -0
  235. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_media_catalog.py +0 -0
  236. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_media_cloud.py +0 -0
  237. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_memory.py +0 -0
  238. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_model_picker.py +0 -0
  239. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_modes.py +0 -0
  240. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_permissions.py +0 -0
  241. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_plan_mode.py +0 -0
  242. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_repeats.py +0 -0
  243. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_repomap.py +0 -0
  244. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_residency.py +0 -0
  245. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_review.py +0 -0
  246. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_robustness.py +0 -0
  247. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_sandbox.py +0 -0
  248. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_screenshots.py +0 -0
  249. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_secretscan.py +0 -0
  250. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_servers.py +0 -0
  251. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_sessions.py +0 -0
  252. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_steer.py +0 -0
  253. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_subagents.py +0 -0
  254. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_tools.py +0 -0
  255. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_traces.py +0 -0
  256. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_update.py +0 -0
  257. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_video.py +0 -0
  258. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_vision.py +0 -0
  259. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_web.py +0 -0
  260. {lcode_cli-0.61.0 → lcode_cli-0.62.0}/tests/test_xai.py +0 -0
@@ -6,6 +6,45 @@ All notable changes to lcode are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.62.0] - 2026-11-06
10
+
11
+ ### Changed
12
+
13
+ - **A test run that stops before its first test no longer counts as a failure of the model's change.**
14
+ pytest stopping on an error while collecting, or unittest ending in a traceback instead of `Ran N
15
+ tests`, says nothing about the change, yet the model was told that the project's checks fail and to fix
16
+ what its changes broke. On the dev slice at 32K that was 19 of the 34 automatic checks (Django's
17
+ `tests/` can't be discovered by unittest; two other projects stop on modules and data that aren't there).
18
+ The model spent 26 minutes after those notes, ran `git stash` in 5 attempts to see for itself, and in 2
19
+ attempts kept editing: one downloaded a 244 MB database and changed a test file the request had excluded.
20
+ Now lcode tells you what stopped the run, and the model's answer stands. An error that names a file the
21
+ request changed still goes to the model, shell commands included, and so do tests that ran and failed.
22
+ `checks` in `lcode -p --output json`, the task sheet and `/status` now say these checks didn't run, also
23
+ for a project with no tests or no test runner. The notes weren't all loss: in that same attempt, 1 of 47
24
+ like it over four nights, the extra work also fixed a test the model had called pre-existing.
25
+ - **Checks that don't finish in 10 minutes are no longer called a failure.** The model is told that they
26
+ don't say whether its change works, instead of to fix what it broke.
27
+ - **A SPARQL query it never ran** now counts like code it never ran (#242): on the dev slice, 2 of 3
28
+ `sparql-university` attempts on 0.61.0 wrote `solution.sparql` and said they were done without running it.
29
+ lcode sends the model back once, and the note names `rdflib`. SQL files stay out, because one can be a
30
+ migration, and asking to run that could change a real database.
31
+
32
+ ### Fixed
33
+
34
+ - **The automatic checks run in the project's root.** They ran wherever the model's last `cd` left its
35
+ shell, though their command is written for the root: from `tests/`, `python -m unittest discover -s tests`
36
+ doesn't start and `.venv/bin/python` isn't there. 3 of the 34 checks on the dev slice ran from `tests/`. A
37
+ command from your own `checks` setting runs in the folder you started lcode in.
38
+ - **A failing test run piped into `tail` counted as passing.** When the model ran the project's checks
39
+ itself as `pytest -q | tail`, lcode read `tail`'s exit code of 0, took the checks as passed and didn't
40
+ run them, and `lcode -p --output json` reported them as passed. A run whose exit code isn't the check's
41
+ now counts only if its output shows a test summary with nothing failing. Otherwise lcode runs the
42
+ checks itself.
43
+ - **`lcode bench --compare`** took a task with one attempt as certain, so its noise came out too small,
44
+ and it said nothing when a run had far fewer attempts: a real run lost 18 of its 72 attempts and
45
+ compared as usual. A single attempt's pass rate now comes from both runs, and `--compare` warns when
46
+ the two runs didn't have the same number of attempts.
47
+
9
48
  ## [0.61.0] - 2026-11-05
10
49
 
11
50
  ### Added
@@ -1328,7 +1367,8 @@ First public release.
1328
1367
  - `AGENTS.md` project instructions and `/init` to generate them.
1329
1368
  - One-line installer for Linux and macOS.
1330
1369
 
1331
- [Unreleased]: https://github.com/nasser1941/lcode/compare/v0.61.0...HEAD
1370
+ [Unreleased]: https://github.com/nasser1941/lcode/compare/v0.62.0...HEAD
1371
+ [0.62.0]: https://github.com/nasser1941/lcode/compare/v0.61.0...v0.62.0
1332
1372
  [0.61.0]: https://github.com/nasser1941/lcode/compare/v0.60.0...v0.61.0
1333
1373
  [0.60.0]: https://github.com/nasser1941/lcode/compare/v0.59.0...v0.60.0
1334
1374
  [0.59.0]: https://github.com/nasser1941/lcode/compare/v0.58.0...v0.59.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: lcode-cli
3
- Version: 0.61.0
3
+ Version: 0.62.0
4
4
  Summary: A local-first terminal coding agent powered by open-weight models on your own GPU or Mac, via Ollama.
5
5
  Project-URL: Homepage, https://nasser1941.github.io/lcode/
6
6
  Project-URL: Documentation, https://nasser1941.github.io/lcode/
@@ -56,7 +56,7 @@ went: `0` success, `1` an error, `3` stopped at `--max-steps`, `4` stopped becau
56
56
  | `files_changed` | Files the request added (`A`), modified (`M`) or deleted (`D`), shell commands included |
57
57
  | `usage` | Model requests and tokens; `prompt_tokens` includes tokens served from the prompt cache |
58
58
  | `review` | What the [review](usage.md#a-review-before-the-answer) sent back to the model (`[]` when it found nothing; `null` when no review ran) |
59
- | `checks` | The [checks](usage.md#checks-before-done) that ran after the change: `command`, `exit_code` (`null` when they weren't allowed to run) and `by` (`lcode`, or `model` when the model ran them itself) |
59
+ | `checks` | The [checks](usage.md#checks-before-done) that ran after the change: `command`, `exit_code` (`null` when they say nothing about the change: they weren't allowed to run, no test ran, or they didn't finish) and `by` (`lcode`, or `model` when the model ran them itself) |
60
60
  | `error` | What went wrong, when `status` is `error` |
61
61
  | `session_id` | Continue the conversation later with `lcode --resume <id>` |
62
62
 
@@ -17,9 +17,13 @@ whether it passed.
17
17
  ## What you need
18
18
 
19
19
  - **Docker**, running.
20
- - **uv**: lcode runs Harbor with `uvx`, so there's nothing else to install.
20
+ - **uv**: lcode runs Harbor with `uvx`, so there's nothing else to install. Harbor runs from uv's
21
+ cache, so don't clear it during a run (`uv cache clean`): the attempts still to come can't start.
21
22
  - **Disk space** for the tasks' images: about 20 GB for the dev slice. Each SWE-bench task has an
22
- image of its own, 1–3 GB.
23
+ image of its own, 1–3 GB. Keep about 25 GB free beyond that while it runs: an attempt at
24
+ `torch-tensor-parallelism` takes about 21 GB until it ends, because the model and then the task's
25
+ tests each install torch with its GPU libraries. On a smaller disk, run the other tasks with
26
+ `--tasks` (`lcode bench --harbor dev --list` shows them).
23
27
  - **A model server the containers can reach.** lcode in a container finds your machine by itself:
24
28
  as `host.docker.internal` with Docker Desktop (macOS, Windows), or as the container's gateway on
25
29
  Linux. Ollama has to listen on more than `127.0.0.1` for that:
@@ -123,9 +127,11 @@ limits, so part of a difference can come from the machine rather than from lcode
123
127
 
124
128
  The noise is how far pass@1 moves between runs of the same setup, estimated from how much each
125
129
  task's attempts disagree: a task that always passes or always fails adds nothing, one that passes
126
- half the time the most. A change counts when it's more than twice the standard error of the
127
- difference. On the dev slice, with three attempts per task, that's about 9 points. `--compare` exits
128
- with 1 when the second result dropped beyond the noise, so a script can stop on it.
130
+ half the time the most. One attempt can't disagree with itself, so that task's pass rate comes from
131
+ both runs. A change counts when it's more than twice the standard error of the difference. On the dev
132
+ slice, with three attempts per task, that's about 9 points. `--compare` warns when the two runs didn't
133
+ have the same number of attempts (a container that didn't start, say), and exits with 1 when the second
134
+ result dropped beyond the noise, so a script can stop on it.
129
135
 
130
136
  **The release rule:** a release that changes lcode's prompts, tools or context handling ships only
131
137
  if the dev slice doesn't drop beyond the noise against the last baseline, and the comparison goes on
@@ -12,7 +12,7 @@ lcode
12
12
 
13
13
  ```text
14
14
  ╭──────────────────────────────────────────────╮
15
- │ lcode v0.61.0 — local coding agent │
15
+ │ lcode v0.62.0 — local coding agent │
16
16
  │ │
17
17
  │ model lcode-qwen3.6-35b │
18
18
  │ context 256K tokens │
@@ -224,9 +224,19 @@ runs the project's checks itself before the answer is final:
224
224
  - **When they fail,** the model gets the output and keeps working, twice at most. After that its answer
225
225
  says what still fails instead of claiming success. A failure that the change didn't cause is
226
226
  reported, not chased, and the checks run again only if the model changes something more.
227
- - **When nothing could run** (no tests collected, or the test runner isn't installed), lcode says so
228
- and doesn't send it to the model.
227
+ - **When no test ran,** lcode says so and doesn't send it to the model: no tests were collected, the
228
+ test runner isn't installed, or the run stopped before its first test (pytest on an error while
229
+ collecting, unittest with a traceback instead of `Ran N tests`). A project can be like that before
230
+ anything changes, and then the run says nothing about the change. If the error names a file the
231
+ request changed, shell commands included, it's the model's to fix, and it gets the output like any
232
+ other failure.
233
+ - **When they don't finish** in 10 minutes, lcode stops them and tells the model that they don't say
234
+ whether its change works. A suite that's simply this slow needs a faster command (below).
229
235
  - **When the model already ran them** after its last change and they passed, they aren't run again.
236
+ A run piped into another program (`pytest -q | tail`) exits with that program's code, so it counts
237
+ only if its output shows a test summary with nothing failing.
238
+ - **Where they run:** in the project's root, wherever the model's shell went last. A command from your
239
+ own `checks` setting runs in the folder you started lcode in.
230
240
  - **Permission:** they run like any other command, so in `ask` mode the first run asks (++a++ allows
231
241
  them for the session).
232
242
  - **Programs** using `lcode -p --output json` see the runs in the result's `checks`.
@@ -263,9 +273,10 @@ or reading it doesn't count as running it. `checks = "off"` turns this off too.
263
273
 
264
274
  **Code it never ran.** A model that writes a new module and finds no Python, or checks only its
265
275
  syntax, tends to call it done, and the first run shows the error. When a request wrote a new code
266
- file (Python, JavaScript, TypeScript, Rust, Go, C, Java and other languages that run) and no command
267
- since its last change ran it, lcode sends it back once: run it (import a module and call what it
268
- wrote; start a server in the background and try it) and fix what fails, or say plainly that it's
276
+ file (Python, JavaScript, TypeScript, Rust, Go, C, Java and other languages that run, or a SPARQL
277
+ query) and no command since its last change ran it, lcode sends it back once: run it (import a module
278
+ and call what it wrote; run a query on its data; start a server in the background and try it) and fix
279
+ what fails, or say plainly that it's
269
280
  untested and why. A command counts when it names the file or its module, or runs tests, and its
270
281
  program was there: a syntax, lint or type check, `python3: command not found` or a command that
271
282
  only reads doesn't count. When `uv` is installed, the note adds that `uv run --with PACKAGE python FILE` runs
@@ -3,7 +3,7 @@
3
3
  From a program: `from lcode import Session` (see lcode.api).
4
4
  """
5
5
 
6
- __version__ = "0.61.0"
6
+ __version__ = "0.62.0"
7
7
 
8
8
  API = ("Session", "Result", "Options", "SetupError")
9
9
 
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from collections.abc import Iterable
6
+ from pathlib import Path
6
7
  from typing import TYPE_CHECKING, cast
7
8
 
8
9
  from lcode import (
@@ -115,17 +116,30 @@ class Checks(AgentBase):
115
116
  def model_ran_checks(self, command: str, result: str) -> bool:
116
117
  """Whether a command the model ran was the project's checks, and they passed."""
117
118
  check = self.project_check()
118
- if check is None or not checks.covers(check, command) or checks.exit_code(result) != 0:
119
+ if check is None or not checks.covers(check, command) or not checks.run_passed(check, command, result):
119
120
  return False
120
121
  self.check_results.append({"command": check.command, "exit_code": 0, "by": "model"})
121
122
  return True
122
123
 
124
+ def check_folder(self, check: checks.Check) -> Path:
125
+ """Where the checks run: the project's root, wherever the model's last `cd` left its shell. A command from the
126
+ user's own setting runs where they started lcode."""
127
+ return self.workspace if check.source == checks.YOUR_SETTING else project_root_or_cwd(self.cwd)
128
+
129
+ def files_changed(self) -> list[str]:
130
+ """The files this request changed, with the model's file tools or with its shell commands."""
131
+ return [*self.tools.before, *self.checkpoints.changed_so_far()]
132
+
123
133
  def run_check(self, check: checks.Check, round_: int) -> str | None:
124
134
  """Run the checks after a change. Returns what to tell the model when they fail, else None."""
125
135
  self.say(f"Checking the work: {check.command} (from {check.source})")
126
136
  result = self.replay.check_result(check.command) if self.replay is not None else None
127
137
  if result is None:
128
- result = self.tools.run("bash", {"command": check.command, "timeout": checks.TIMEOUT})
138
+ here, self.cwd = self.cwd, self.check_folder(check)
139
+ try:
140
+ result = self.tools.run("bash", {"command": check.command, "timeout": checks.TIMEOUT})
141
+ finally:
142
+ self.cwd = here
129
143
  code = checks.exit_code(result)
130
144
  if self.trace is not None:
131
145
  self.trace.check(check.command, result, code)
@@ -138,15 +152,34 @@ class Checks(AgentBase):
138
152
  return None
139
153
  if checks.no_tests(check, result):
140
154
  self.say(f"The checks found no tests to run ({check.command}).")
141
- return None
142
- if checks.missing(check, result):
155
+ elif checks.missing(check, result):
143
156
  self.say(
144
157
  f"The checks couldn't run ({check.command}): {result.splitlines()[0][:160]}. Install what they need, "
145
158
  'or set the command: lcode config set checks "…" (or checks off).',
146
159
  warning=True,
147
160
  )
148
- return None
149
- if round_ >= checks.MAX_ROUNDS:
161
+ elif checks.no_test_ran(check, result) and not checks.names_any(result, self.files_changed()):
162
+ self.say(
163
+ f"The checks stopped before running a test ({check.command}): {checks.stop_reason(result)} It doesn't "
164
+ "name a file this request changed, so the model isn't asked to fix it. To get checks that run, fix "
165
+ 'that or set the command: lcode config set checks "…" (or checks off).',
166
+ warning=True,
167
+ )
168
+ else:
169
+ return self.failed_check(check, result, code, round_)
170
+ self.check_results[-1]["exit_code"] = None # no test ran: whoever reads this later shouldn't read a failure
171
+ return None
172
+
173
+ def failed_check(self, check: checks.Check, result: str, code: int, round_: int) -> str:
174
+ """Say that the checks failed, or didn't finish; what to tell the model."""
175
+ if checks.timed_out(result):
176
+ self.check_results[-1]["exit_code"] = None
177
+ self.say(
178
+ f"The checks didn't finish in {checks.TIMEOUT} seconds and were stopped ({check.command}). To use a "
179
+ 'faster command: lcode config set checks "…" (or checks off).',
180
+ warning=True,
181
+ )
182
+ elif round_ >= checks.MAX_ROUNDS:
150
183
  then = "" if self.can_escalate() else ": the model will say what's left"
151
184
  self.say(f"Checks still fail ({check.command}, exit code {code}){then}.", warning=True)
152
185
  else:
@@ -386,6 +386,18 @@ class Checkpoints:
386
386
  f"[dim]↶ Checkpoint {cp.n}: {count} file{'' if count == 1 else 's'} changed · /undo reverts them[/]"
387
387
  )
388
388
 
389
+ def changed_so_far(self) -> list[str]:
390
+ """The files changed so far in the running request, by shell commands too, without a nested repository's."""
391
+ cp = self._current
392
+ if cp is None:
393
+ return []
394
+ store = Store(Path(cp.worktree))
395
+ try:
396
+ changes = store.changes(cp.before, store.tree())
397
+ except CheckpointError:
398
+ return []
399
+ return [c["path"] for c in changes if not (store.worktree / c["path"]).is_dir()]
400
+
389
401
  def ref(self, n: int) -> str:
390
402
  return f"refs/lcode/{self.session_id}/{n}"
391
403
 
@@ -3,7 +3,8 @@
3
3
  Small models call work done after a syntax check, and telling them to verify isn't enough. So after a request
4
4
  that changed files, lcode runs the project's check command itself (its tests, or a linter) before the answer
5
5
  counts as final. When it fails, the output goes back to the model, which keeps working, at most `MAX_ROUNDS`
6
- times; then the answer says plainly that the checks still fail.
6
+ times; then the answer says plainly that the checks still fail. A run in which no test ran says nothing about the
7
+ change, so it only goes back to the model when its error names a file the request changed.
7
8
 
8
9
  The command is, in order: the repository's `.lcode/settings.toml` (`[checks] command = "…"`, used once the
9
10
  repository is trusted, like its hooks), the user's `checks` setting, or what the project looks like: pytest,
@@ -25,6 +26,7 @@ MAX_ROUNDS = 2 # times the model gets failing checks back before lcode stops as
25
26
  TIMEOUT = 600 # seconds a check may run
26
27
  OUTPUT_TAIL = 6000 # characters of a failing check's output the model gets back
27
28
  EXIT = re.compile(r"\[exit code: (-?\d+)\]\s*$")
29
+ YOUR_SETTING = "your configuration (checks)" # the source of a command from the user's own `checks` setting
28
30
 
29
31
 
30
32
  @dataclass
@@ -49,7 +51,7 @@ def find(root: Path, setting: str, trusted: bool) -> Check | None:
49
51
  if command:
50
52
  return Check(command, ".lcode/settings.toml")
51
53
  if setting != "auto":
52
- return Check(setting, "your configuration (checks)")
54
+ return Check(setting, YOUR_SETTING)
53
55
  return detect(root)
54
56
 
55
57
 
@@ -154,6 +156,51 @@ def no_tests(check: Check, result: str) -> bool:
154
156
  return exit_code(result) == NO_TESTS and bool(re.search(r"pytest|unittest", check.command))
155
157
 
156
158
 
159
+ PYTEST_STOPPED = (2, 3, 4) # pytest's exit codes for: interrupted (errors while collecting), internal error, bad usage
160
+ PYTEST_COUNTS = re.compile(r"\b\d+ (?:passed|failed)\b")
161
+ UNITTEST_COUNT = re.compile(r"^Ran \d+ tests? in ", re.M)
162
+ NOT_IMPORTED = re.compile(r"No module named '([\w.]+)'")
163
+
164
+
165
+ def no_test_ran(check: Check, result: str) -> bool:
166
+ """Whether the test runner stopped before its first test, so the run says nothing about the code.
167
+
168
+ pytest stops at an error while collecting. unittest ends in a traceback instead of `Ran N tests` when its discovery
169
+ fails; a test module that doesn't import is a failed test there (`Ran 1 test`), so that's not this.
170
+ """
171
+ code = exit_code(result)
172
+ if re.search(r"\bpytest\b", check.command):
173
+ return code in PYTEST_STOPPED and not PYTEST_COUNTS.search(result)
174
+ if re.search(r"\bunittest\b", check.command):
175
+ return code == 1 and "Traceback (most recent call last)" in result and not UNITTEST_COUNT.search(result)
176
+ return False
177
+
178
+
179
+ def names_any(result: str, files: Iterable[str]) -> bool:
180
+ """Whether a check's output points at one of these files: by its path, or as a module it can't find."""
181
+
182
+ def mentions(text: str, name: str) -> bool:
183
+ return re.search(rf"(?<![\w-]){re.escape(name)}(?![\w-])", text) is not None
184
+
185
+ modules = [module.replace(".", "/") for module in NOT_IMPORTED.findall(result)]
186
+ return any(mentions(result, rel) or any(mentions(rel, module) for module in modules) for rel in files)
187
+
188
+
189
+ REASON_LIMIT = 240 # Django's ImproperlyConfigured says what to set, in 224
190
+
191
+
192
+ def stop_reason(result: str) -> str:
193
+ """A sentence on why a test run stopped before its first test: pytest's first error, or a traceback's end."""
194
+ lines = [line.strip() for line in result.splitlines() if line.strip() and not line.startswith("[")]
195
+ reason = next((line[1:].strip() for line in lines if line.startswith("E ")), lines[-1] if lines else "no output")
196
+ return reason.rstrip(".") + "." if len(reason) <= REASON_LIMIT else reason[: REASON_LIMIT - 1] + "…"
197
+
198
+
199
+ def timed_out(result: str) -> bool:
200
+ """Whether lcode stopped the check at its time limit: it didn't fail, it didn't finish."""
201
+ return exit_code(result) == -9 and "\n[Command timed out after " in result
202
+
203
+
157
204
  def exit_code(result: str) -> int | None:
158
205
  """The exit code at the end of a bash tool result (None: it didn't run, e.g. not allowed)."""
159
206
  found = EXIT.search(result)
@@ -165,7 +212,31 @@ def covers(check: Check, command: str) -> bool:
165
212
  return " ".join(check.command.split()) in " ".join(command.split())
166
213
 
167
214
 
215
+ KEEPS_EXIT_CODE = re.compile(r"\d*>&\d+|&>>?|&&") # redirections and `&&`, after the check
216
+ HIDES_EXIT_CODE = re.compile(r"[|;&\n]") # a pipe, `||`, `;`, `&` or another line: the exit code isn't the check's
217
+ RUN_FAILED = re.compile(r"\b[1-9]\d* (?:failed|errors?)\b|^(?:FAILED|ERROR)\b", re.M)
218
+ RUN_PASSED = re.compile(r"\b[1-9]\d* passed\b|^OK\b", re.M)
219
+
220
+
221
+ def run_passed(check: Check, command: str, result: str) -> bool:
222
+ """Whether the model's own run of the check passed. `pytest -q | tail` exits with tail's 0 when tests fail, so when
223
+ the exit code isn't the check's, only the output can say: a test runner's summary, with nothing failing."""
224
+ if exit_code(result) != 0:
225
+ return False
226
+ found = re.search(r"\s+".join(map(re.escape, check.command.split())), command)
227
+ after = KEEPS_EXIT_CODE.sub(" ", command[found.end() :]).rstrip() if found else ""
228
+ if not HIDES_EXIT_CODE.search(after):
229
+ return True
230
+ return RUN_PASSED.search(result) is not None and RUN_FAILED.search(result) is None
231
+
232
+
168
233
  def failure_note(check: Check, result: str, round_: int) -> str:
234
+ if timed_out(result):
235
+ return (
236
+ f"[lcode] The project's checks (`{check.command}`) didn't finish in {TIMEOUT} seconds and were stopped, so "
237
+ "they don't say whether your changes work. If your change could make something hang, look at that. "
238
+ "Otherwise run the tests that cover your change, and say in your answer that the full checks didn't finish."
239
+ )
169
240
  output = result if len(result) <= OUTPUT_TAIL else "…" + result[-OUTPUT_TAIL:]
170
241
  last = round_ >= MAX_ROUNDS
171
242
  return (
@@ -267,10 +338,12 @@ def unrun_note(scripts: list[str]) -> str:
267
338
 
268
339
  # ----------------------------------------------------------------------------- code written, never run
269
340
 
341
+ # Not .sql: one can be a migration, and asking the model to run that could change a real database.
270
342
  CODE_SUFFIXES = frozenset(
271
343
  {".py", ".js", ".mjs", ".cjs", ".ts", ".tsx", ".jsx", ".rs", ".go", ".c", ".cc", ".cpp", ".java", ".kt", ".rb",
272
- ".php", ".pl", ".lua", ".jl", ".r", ".scala", ".swift", ".cs"}
344
+ ".php", ".pl", ".lua", ".jl", ".r", ".scala", ".swift", ".cs", ".sparql", ".rq"}
273
345
  ) # fmt: skip
346
+ SPARQL_SUFFIXES = (".sparql", ".rq")
274
347
  # Checks that read the code without running it (syntax, lint, types): they don't show that it works.
275
348
  STATIC_ONLY = re.compile(
276
349
  r"\bast\.parse\b|\bpy_compile\b|\bcompileall\b|(?:^|\s)-fsyntax-only\b|\b(?:node|deno)\s+(?:-c|--check)\b"
@@ -288,7 +361,7 @@ NOT_FOUND = re.compile(r"(?:^|:\s)([\w.+-]+): (?:command )?not found\s*$", re.M)
288
361
 
289
362
 
290
363
  def is_code(rel: str) -> bool:
291
- """Whether a file is a program or module in a language that runs (shell scripts have their own check)."""
364
+ """Whether a file is a program, module or query in a language that runs (shell scripts have their own check)."""
292
365
  return Path(rel).suffix.lower() in CODE_SUFFIXES
293
366
 
294
367
 
@@ -319,16 +392,19 @@ def untested_note(files: list[str], missing: list[str], uv: bool) -> str:
319
392
  note = (
320
393
  f"[lcode] You wrote {names} in this request but haven't run {it} since your last change. Run {it} now and fix "
321
394
  f"what fails, so you know {it} works before you say so: for a module, import it and call what you wrote; "
322
- "for a server or anything else that keeps running, start it in the background and try it. A syntax check "
323
- "doesn't show that it works."
395
+ "for a query, run it on its data; for a server or anything else that keeps running, start it in the "
396
+ "background and try it. A syntax check doesn't show that it works."
324
397
  )
325
398
  if missing:
326
399
  note += f" {', '.join(f'`{m}`' for m in missing)} isn't installed here."
327
- if uv and any(f.endswith(".py") for f in files):
400
+ sparql = any(f.lower().endswith(SPARQL_SUFFIXES) for f in files)
401
+ if uv and (sparql or any(f.endswith(".py") for f in files)):
328
402
  note += (
329
403
  " To run Python code without changing this machine's Python, `uv run --with PACKAGE python FILE` fetches "
330
404
  "Python and the packages it needs into a throwaway environment."
331
405
  )
406
+ if sparql:
407
+ note += " For a SPARQL query, the package is `rdflib`."
332
408
  return note + f" If you can't run {it}, say plainly in your answer that {it} is untested, and why."
333
409
 
334
410
 
@@ -602,10 +602,14 @@ def pass_at_1(passed: list[list[bool]]) -> float:
602
602
  return statistics.fmean(statistics.fmean(p) for p in passed)
603
603
 
604
604
 
605
- def standard_error(passed: list[list[bool]]) -> float:
605
+ def standard_error(passed: list[list[bool]], other: list[list[bool]]) -> float:
606
606
  """How much pass@1 would move between runs, from how much each task's attempts disagree: a task that always
607
- passes or always fails adds nothing, one that passes half the time the most."""
608
- variance = sum(statistics.fmean(p) * (1 - statistics.fmean(p)) / max(len(p) - 1, 1) for p in passed)
607
+ passes or always fails adds nothing, one that passes half the time the most. One attempt can't disagree with
608
+ itself, so that task's pass rate comes from both runs (`other` is the other run's attempts, task by task)."""
609
+ variance = 0.0
610
+ for attempts, others in zip(passed, other, strict=True):
611
+ rate = statistics.fmean(attempts if len(attempts) > 1 else attempts + others)
612
+ variance += rate * (1 - rate) / max(len(attempts) - 1, 1)
609
613
  return math.sqrt(variance) / len(passed)
610
614
 
611
615
 
@@ -638,8 +642,15 @@ def compare(old: Saved, new: Saved) -> tuple[list[str], bool]:
638
642
  lines.append(f" {task}: {sum(before)}/{len(before)} → {sum(after)}/{len(after)}")
639
643
  if not both:
640
644
  return [*lines, "[red]No task ran in both, so there's nothing to compare.[/]"], False
641
- a, b = pass_at_1([old.passed[t] for t in both]), pass_at_1([new.passed[t] for t in both])
642
- noise = 2 * math.hypot(standard_error([old.passed[t] for t in both]), standard_error([new.passed[t] for t in both]))
645
+ runs_before, runs_after = [old.passed[t] for t in both], [new.passed[t] for t in both]
646
+ ran_before, ran_after = sum(map(len, runs_before)), sum(map(len, runs_after))
647
+ if ran_before != ran_after:
648
+ lines.append(
649
+ f"[yellow]Not the same number of attempts ran: {ran_before} before and {ran_after} after, over the tasks "
650
+ "in both. With fewer attempts, a result says less.[/]"
651
+ )
652
+ a, b = pass_at_1(runs_before), pass_at_1(runs_after)
653
+ noise = 2 * math.hypot(standard_error(runs_before, runs_after), standard_error(runs_after, runs_before))
643
654
  change = f"{(b - a) * 100:+.0f} points; the noise is ±{noise * 100:.0f}"
644
655
  if a - b > noise + 1e-9:
645
656
  verdict = f"[red]a drop beyond the noise ({change})[/]"
@@ -224,3 +224,21 @@ def test_old_checkpoints_are_deleted(make_agent, repo):
224
224
  )
225
225
  def test_exclude_patterns_match_one_path(path, pattern):
226
226
  assert checkpoints._exclude_pattern(path) == pattern
227
+
228
+
229
+ def test_the_files_changed_so_far_include_shell_commands(make_agent, repo):
230
+ agent = make_agent()
231
+ assert agent.checkpoints.changed_so_far() == [] # no request is running
232
+ agent.checkpoints.begin_turn("20260101-000000-abcdef", "tidy up", 0)
233
+ agent.checkpoints.before_change(repo)
234
+ assert agent.checkpoints.changed_so_far() == []
235
+ (repo / "README.md").unlink()
236
+ (repo / "src" / "pkg" / "new.py").write_text("x = 1\n")
237
+ clone = repo / "cloned" # the model cloned a repository: its files aren't this project's changes
238
+ clone.mkdir()
239
+ (clone / "inside.py").write_text("y = 2\n")
240
+ identity = ("-c", "user.name=x", "-c", "user.email=x@example.com")
241
+ subprocess.run(["git", "init", "-q"], cwd=clone, check=True)
242
+ subprocess.run(["git", "add", "-A"], cwd=clone, check=True)
243
+ subprocess.run(["git", *identity, "commit", "-qm", "first"], cwd=clone, check=True)
244
+ assert sorted(agent.checkpoints.changed_so_far()) == ["README.md", "src/pkg/new.py"]