certo 0.2.2__tar.gz → 0.2.3__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 (298) hide show
  1. {certo-0.2.2 → certo-0.2.3}/.env.example +14 -0
  2. {certo-0.2.2 → certo-0.2.3}/PKG-INFO +3 -2
  3. {certo-0.2.2 → certo-0.2.3}/README.md +1 -1
  4. {certo-0.2.2 → certo-0.2.3}/pyproject.toml +3 -1
  5. {certo-0.2.2 → certo-0.2.3}/src/certo/__init__.py +1 -1
  6. {certo-0.2.2 → certo-0.2.3}/src/certo/acceptance.py +10 -2
  7. {certo-0.2.2 → certo-0.2.3}/src/certo/agent.py +31 -3
  8. {certo-0.2.2 → certo-0.2.3}/src/certo/api.py +248 -6
  9. {certo-0.2.2 → certo-0.2.3}/src/certo/bench.py +130 -20
  10. {certo-0.2.2 → certo-0.2.3}/src/certo/bench_config.py +37 -0
  11. {certo-0.2.2 → certo-0.2.3}/src/certo/bench_report.py +53 -5
  12. {certo-0.2.2 → certo-0.2.3}/src/certo/bench_strategies.py +13 -1
  13. {certo-0.2.2 → certo-0.2.3}/src/certo/bench_tasks.py +13 -2
  14. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/testing/pytest-conventions.md +4 -4
  15. {certo-0.2.2 → certo-0.2.3}/src/certo/catalog_check.py +18 -2
  16. {certo-0.2.2 → certo-0.2.3}/src/certo/catalog_report.py +153 -24
  17. {certo-0.2.2 → certo-0.2.3}/src/certo/check_files.py +69 -12
  18. {certo-0.2.2 → certo-0.2.3}/src/certo/cli.py +187 -18
  19. {certo-0.2.2 → certo-0.2.3}/src/certo/config.py +33 -0
  20. certo-0.2.3/src/certo/credits.py +111 -0
  21. {certo-0.2.2 → certo-0.2.3}/src/certo/escalation.py +21 -0
  22. {certo-0.2.2 → certo-0.2.3}/src/certo/examples/models_list.yaml.example +199 -117
  23. {certo-0.2.2 → certo-0.2.3}/src/certo/examples/task_profiles.yaml.example +52 -23
  24. {certo-0.2.2 → certo-0.2.3}/src/certo/init_cmd.py +79 -1
  25. {certo-0.2.2 → certo-0.2.3}/src/certo/init_models.py +60 -13
  26. certo-0.2.3/src/certo/leftovers.py +157 -0
  27. {certo-0.2.2 → certo-0.2.3}/src/certo/llm_check.py +53 -6
  28. {certo-0.2.2 → certo-0.2.3}/src/certo/mcp_server.py +7 -0
  29. {certo-0.2.2 → certo-0.2.3}/src/certo/milestones.py +248 -42
  30. {certo-0.2.2 → certo-0.2.3}/src/certo/model_catalog.py +333 -33
  31. certo-0.2.3/src/certo/model_files.py +171 -0
  32. certo-0.2.3/src/certo/model_price_check.py +149 -0
  33. certo-0.2.3/src/certo/model_pricing.py +110 -0
  34. certo-0.2.3/src/certo/model_reachability.py +98 -0
  35. {certo-0.2.2 → certo-0.2.3}/src/certo/model_selection.py +84 -10
  36. certo-0.2.3/src/certo/models_choose.py +151 -0
  37. certo-0.2.3/src/certo/models_cmd.py +607 -0
  38. certo-0.2.3/src/certo/models_secure.py +190 -0
  39. certo-0.2.3/src/certo/models_slim.py +131 -0
  40. certo-0.2.3/src/certo/profile_choice.py +202 -0
  41. {certo-0.2.2 → certo-0.2.3}/src/certo/project_env.py +18 -11
  42. certo-0.2.3/src/certo/project_models.py +65 -0
  43. certo-0.2.3/src/certo/project_root.py +115 -0
  44. {certo-0.2.2 → certo-0.2.3}/src/certo/project_state.py +14 -0
  45. {certo-0.2.2 → certo-0.2.3}/src/certo/result.py +9 -1
  46. certo-0.2.3/src/certo/root_guard.py +456 -0
  47. {certo-0.2.2 → certo-0.2.3}/src/certo/run_report.py +47 -4
  48. certo-0.2.3/src/certo/run_stats.py +247 -0
  49. {certo-0.2.2 → certo-0.2.3}/src/certo/run_summary.py +17 -1
  50. {certo-0.2.2 → certo-0.2.3}/src/certo/runner.py +600 -88
  51. {certo-0.2.2 → certo-0.2.3}/src/certo/runs.py +1 -4
  52. certo-0.2.3/src/certo/skill_assess.py +394 -0
  53. {certo-0.2.2 → certo-0.2.3}/src/certo/skill_library.py +27 -0
  54. certo-0.2.3/src/certo/skill_match.py +281 -0
  55. certo-0.2.3/src/certo/skill_sources.py +110 -0
  56. {certo-0.2.2 → certo-0.2.3}/src/certo/skills_cmd.py +165 -7
  57. {certo-0.2.2 → certo-0.2.3}/src/certo/starter/README.md +24 -0
  58. {certo-0.2.2 → certo-0.2.3}/src/certo/starter/providers.toml +4 -2
  59. certo-0.2.3/src/certo/starter/tasks/alien-trekking.md +243 -0
  60. certo-0.2.3/src/certo/starter/tasks/iron-horizon.md +108 -0
  61. certo-0.2.3/src/certo/starter/tasks/sky-hopper.md +126 -0
  62. certo-0.2.3/src/certo/starter/tasks/star-swarm.md +193 -0
  63. certo-0.2.3/src/certo/starter/tasks/team-board.md +153 -0
  64. {certo-0.2.2 → certo-0.2.3}/src/certo/text_tool_calls.py +26 -0
  65. {certo-0.2.2 → certo-0.2.3}/src/certo/third_party_skills.py +35 -12
  66. {certo-0.2.2 → certo-0.2.3}/src/certo/verification.py +34 -11
  67. certo-0.2.3/src/certo/wrap_up.py +175 -0
  68. {certo-0.2.2 → certo-0.2.3}/tests/conftest.py +22 -4
  69. {certo-0.2.2 → certo-0.2.3}/tests/custom_tools/test_run_tests_tool.py +33 -3
  70. {certo-0.2.2 → certo-0.2.3}/tests/test_acceptance.py +12 -0
  71. {certo-0.2.2 → certo-0.2.3}/tests/test_agent.py +25 -0
  72. certo-0.2.3/tests/test_api.py +252 -0
  73. {certo-0.2.2 → certo-0.2.3}/tests/test_bench.py +122 -0
  74. {certo-0.2.2 → certo-0.2.3}/tests/test_bench_config.py +162 -2
  75. {certo-0.2.2 → certo-0.2.3}/tests/test_bench_tasks.py +18 -0
  76. {certo-0.2.2 → certo-0.2.3}/tests/test_catalog_check.py +25 -6
  77. {certo-0.2.2 → certo-0.2.3}/tests/test_check_files.py +40 -1
  78. {certo-0.2.2 → certo-0.2.3}/tests/test_cli.py +454 -9
  79. certo-0.2.3/tests/test_credits.py +127 -0
  80. {certo-0.2.2 → certo-0.2.3}/tests/test_escalation.py +17 -0
  81. certo-0.2.3/tests/test_fit_ranking.py +101 -0
  82. {certo-0.2.2 → certo-0.2.3}/tests/test_init_cmd.py +173 -12
  83. {certo-0.2.2 → certo-0.2.3}/tests/test_init_models.py +59 -12
  84. certo-0.2.3/tests/test_leftovers.py +88 -0
  85. {certo-0.2.2 → certo-0.2.3}/tests/test_llm.py +36 -0
  86. {certo-0.2.2 → certo-0.2.3}/tests/test_llm_check.py +73 -0
  87. {certo-0.2.2 → certo-0.2.3}/tests/test_milestones.py +131 -0
  88. {certo-0.2.2 → certo-0.2.3}/tests/test_model_catalog.py +115 -2
  89. {certo-0.2.2 → certo-0.2.3}/tests/test_model_files.py +4 -1
  90. certo-0.2.3/tests/test_model_layers.py +223 -0
  91. certo-0.2.3/tests/test_model_price_check.py +179 -0
  92. certo-0.2.3/tests/test_model_reachability.py +103 -0
  93. {certo-0.2.2 → certo-0.2.3}/tests/test_model_selection.py +112 -0
  94. certo-0.2.3/tests/test_models_cmd.py +198 -0
  95. certo-0.2.3/tests/test_models_secure.py +264 -0
  96. certo-0.2.3/tests/test_profile_choice.py +147 -0
  97. {certo-0.2.2 → certo-0.2.3}/tests/test_project_env.py +16 -0
  98. certo-0.2.3/tests/test_project_models.py +266 -0
  99. certo-0.2.3/tests/test_project_root.py +119 -0
  100. {certo-0.2.2 → certo-0.2.3}/tests/test_project_state.py +17 -0
  101. {certo-0.2.2 → certo-0.2.3}/tests/test_result.py +6 -0
  102. certo-0.2.3/tests/test_root_guard.py +320 -0
  103. {certo-0.2.2 → certo-0.2.3}/tests/test_run_report.py +61 -2
  104. certo-0.2.3/tests/test_run_stats.py +232 -0
  105. {certo-0.2.2 → certo-0.2.3}/tests/test_runner.py +509 -25
  106. {certo-0.2.2 → certo-0.2.3}/tests/test_server.py +1 -1
  107. certo-0.2.3/tests/test_skill_assess.py +256 -0
  108. {certo-0.2.2 → certo-0.2.3}/tests/test_skill_library.py +38 -1
  109. certo-0.2.3/tests/test_skill_match.py +311 -0
  110. {certo-0.2.2 → certo-0.2.3}/tests/test_skills_cmd.py +11 -0
  111. {certo-0.2.2 → certo-0.2.3}/tests/test_text_tool_calls.py +7 -0
  112. certo-0.2.3/tests/test_wrap_up.py +178 -0
  113. certo-0.2.2/src/certo/model_files.py +0 -101
  114. certo-0.2.2/src/certo/model_pricing.py +0 -58
  115. certo-0.2.2/src/certo/models_cmd.py +0 -414
  116. certo-0.2.2/tests/test_api.py +0 -111
  117. certo-0.2.2/tests/test_models_cmd.py +0 -216
  118. {certo-0.2.2 → certo-0.2.3}/.gitignore +0 -0
  119. {certo-0.2.2 → certo-0.2.3}/LICENSE +0 -0
  120. {certo-0.2.2 → certo-0.2.3}/MANUAL.md +0 -0
  121. {certo-0.2.2 → certo-0.2.3}/docker/agent-server.Dockerfile +0 -0
  122. {certo-0.2.2 → certo-0.2.3}/src/certo/__main__.py +0 -0
  123. {certo-0.2.2 → certo-0.2.3}/src/certo/admin_cli.py +0 -0
  124. {certo-0.2.2 → certo-0.2.3}/src/certo/artifacts.py +0 -0
  125. {certo-0.2.2 → certo-0.2.3}/src/certo/banner.py +0 -0
  126. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/VERSION +0 -0
  127. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/duration-parser/hidden_tests/test_hidden_durations.py +0 -0
  128. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/duration-parser/reference/durations.py +0 -0
  129. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/duration-parser/task.md +0 -0
  130. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/inventory-fix/hidden_tests/test_hidden_inventory.py +0 -0
  131. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/inventory-fix/reference/inventory.py +0 -0
  132. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/inventory-fix/reference/test_inventory.py +0 -0
  133. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/inventory-fix/starter/inventory.py +0 -0
  134. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/inventory-fix/starter/test_inventory.py +0 -0
  135. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/inventory-fix/task.md +0 -0
  136. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/hidden_tests/test_hidden_ledger.py +0 -0
  137. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/reference/ledger/money.py +0 -0
  138. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/reference/ledger/reports.py +0 -0
  139. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/reference/ledger/store.py +0 -0
  140. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/reference/ledger/transfers.py +0 -0
  141. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/reference/tests/test_money.py +0 -0
  142. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/reference/tests/test_store.py +0 -0
  143. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/reference/tests/test_transfers.py +0 -0
  144. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/README.md +0 -0
  145. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/ledger/__init__.py +0 -0
  146. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/ledger/__main__.py +0 -0
  147. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/ledger/categorize.py +0 -0
  148. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/ledger/cli.py +0 -0
  149. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/ledger/importers.py +0 -0
  150. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/ledger/models.py +0 -0
  151. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/ledger/money.py +0 -0
  152. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/ledger/reports.py +0 -0
  153. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/ledger/store.py +0 -0
  154. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/pyproject.toml +0 -0
  155. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/samples/alpha.csv +0 -0
  156. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/samples/beta.csv +0 -0
  157. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/samples/rules.txt +0 -0
  158. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/tests/__init__.py +0 -0
  159. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/tests/helpers.py +0 -0
  160. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/tests/test_categorize.py +0 -0
  161. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/tests/test_cli.py +0 -0
  162. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/tests/test_importers.py +0 -0
  163. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/tests/test_money.py +0 -0
  164. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/tests/test_reports.py +0 -0
  165. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/starter/tests/test_store.py +0 -0
  166. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/ledger-transfers/task.md +0 -0
  167. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/library-loans/hidden_tests/loans_test.go +0 -0
  168. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/library-loans/reference/api/api.go +0 -0
  169. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/library-loans/reference/api/api_test.go +0 -0
  170. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/library-loans/starter/api/api.go +0 -0
  171. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/library-loans/starter/cmd/server/main.go +0 -0
  172. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/library-loans/starter/go.mod +0 -0
  173. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/library-loans/task.md +0 -0
  174. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/page-ranges/hidden_tests/test_hidden_pages.py +0 -0
  175. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/page-ranges/reference/pages.py +0 -0
  176. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/page-ranges/task.md +0 -0
  177. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/pedestrian-crossing/hidden_tests/test_hidden_crossing.py +0 -0
  178. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/pedestrian-crossing/reference/crossing.py +0 -0
  179. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/pedestrian-crossing/task.md +0 -0
  180. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/room-bookings/hidden_tests/room_bookings.test.js +0 -0
  181. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/room-bookings/reference/rooms.js +0 -0
  182. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/room-bookings/reference/server.js +0 -0
  183. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/room-bookings/reference/test/app.test.js +0 -0
  184. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/room-bookings/reference/ui.js +0 -0
  185. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/room-bookings/starter/README.md +0 -0
  186. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/room-bookings/starter/package-lock.json +0 -0
  187. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/room-bookings/starter/package.json +0 -0
  188. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/room-bookings/starter/server.js +0 -0
  189. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/room-bookings/starter/ui.js +0 -0
  190. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/room-bookings/task.md +0 -0
  191. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/semver-order/hidden_tests/versions.test.js +0 -0
  192. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/semver-order/reference/package.json +0 -0
  193. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/semver-order/reference/versions.js +0 -0
  194. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/semver-order/starter/package.json +0 -0
  195. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/semver-order/task.md +0 -0
  196. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/slugify/hidden_tests/slugify.test.js +0 -0
  197. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/slugify/reference/package.json +0 -0
  198. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/slugify/reference/slugify.js +0 -0
  199. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/slugify/starter/package.json +0 -0
  200. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/slugify/task.md +0 -0
  201. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/temperature-table/hidden_tests/test_hidden_temperature.py +0 -0
  202. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/temperature-table/reference/temperature.py +0 -0
  203. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/temperature-table/task.md +0 -0
  204. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/todo-deps/hidden_tests/todo_cli.rs +0 -0
  205. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/todo-deps/reference/src/board.rs +0 -0
  206. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/todo-deps/reference/src/main.rs +0 -0
  207. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/todo-deps/reference/src/store.rs +0 -0
  208. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/todo-deps/starter/Cargo.toml +0 -0
  209. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/todo-deps/starter/src/main.rs +0 -0
  210. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/todo-deps/task.md +0 -0
  211. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/token-bucket/hidden_tests/tokenBucket.test.js +0 -0
  212. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/token-bucket/reference/package.json +0 -0
  213. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/token-bucket/reference/tokenBucket.js +0 -0
  214. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/token-bucket/starter/package.json +0 -0
  215. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/token-bucket/task.md +0 -0
  216. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/wordle-score/hidden_tests/test_hidden_wordle_score.py +0 -0
  217. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/wordle-score/reference/wordle_score.py +0 -0
  218. {certo-0.2.2 → certo-0.2.3}/src/certo/benchmark_tasks/wordle-score/task.md +0 -0
  219. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/git/commit-conventions.md +0 -0
  220. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/lifecycle/completion-and-release-readiness.md +0 -0
  221. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/lifecycle/debugging-and-failure-repair.md +0 -0
  222. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/lifecycle/documentation-and-operational-readiness.md +0 -0
  223. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/lifecycle/implementation-planning.md +0 -0
  224. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/lifecycle/repository-discovery.md +0 -0
  225. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/lifecycle/requirements-analysis.md +0 -0
  226. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/lifecycle/security-review.md +0 -0
  227. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/lifecycle/testing-and-verification.md +0 -0
  228. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/node/node-project-setup.md +0 -0
  229. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/python/python-environment.md +0 -0
  230. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/python-web/fastapi-conventions.md +0 -0
  231. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/python-web/pin-dependencies.md +0 -0
  232. {certo-0.2.2 → certo-0.2.3}/src/certo/builtin_skills/testing/testable-interactive-apps.md +0 -0
  233. {certo-0.2.2 → certo-0.2.3}/src/certo/cancel.py +0 -0
  234. {certo-0.2.2 → certo-0.2.3}/src/certo/checkpoints.py +0 -0
  235. {certo-0.2.2 → certo-0.2.3}/src/certo/checkpoints_cmd.py +0 -0
  236. {certo-0.2.2 → certo-0.2.3}/src/certo/console.py +0 -0
  237. {certo-0.2.2 → certo-0.2.3}/src/certo/context_window.py +0 -0
  238. {certo-0.2.2 → certo-0.2.3}/src/certo/cost_limit.py +0 -0
  239. {certo-0.2.2 → certo-0.2.3}/src/certo/custom_tools/__init__.py +0 -0
  240. {certo-0.2.2 → certo-0.2.3}/src/certo/custom_tools/example_tool.py +0 -0
  241. {certo-0.2.2 → certo-0.2.3}/src/certo/custom_tools/run_tests_tool.py +0 -0
  242. {certo-0.2.2 → certo-0.2.3}/src/certo/deadline.py +0 -0
  243. {certo-0.2.2 → certo-0.2.3}/src/certo/examples/bench.yaml.example +0 -0
  244. {certo-0.2.2 → certo-0.2.3}/src/certo/examples/escalation.yaml.example +0 -0
  245. {certo-0.2.2 → certo-0.2.3}/src/certo/examples/models.yaml.example +0 -0
  246. {certo-0.2.2 → certo-0.2.3}/src/certo/independent_tests.py +0 -0
  247. {certo-0.2.2 → certo-0.2.3}/src/certo/llm.py +0 -0
  248. {certo-0.2.2 → certo-0.2.3}/src/certo/menus.py +0 -0
  249. {certo-0.2.2 → certo-0.2.3}/src/certo/plugins.py +0 -0
  250. {certo-0.2.2 → certo-0.2.3}/src/certo/run_history.py +0 -0
  251. {certo-0.2.2 → certo-0.2.3}/src/certo/run_progress.py +0 -0
  252. {certo-0.2.2 → certo-0.2.3}/src/certo/server.py +0 -0
  253. {certo-0.2.2 → certo-0.2.3}/src/certo/skills.py +0 -0
  254. {certo-0.2.2 → certo-0.2.3}/src/certo/starter/gitignore +0 -0
  255. {certo-0.2.2 → certo-0.2.3}/src/certo/starter/tasks/hanoi.md +0 -0
  256. {certo-0.2.2 → certo-0.2.3}/src/certo/starter/tasks/invaders.md +0 -0
  257. {certo-0.2.2 → certo-0.2.3}/src/certo/starter/tasks/mazeman.md +0 -0
  258. {certo-0.2.2 → certo-0.2.3}/src/certo/starter/tasks/space-rocks.md +0 -0
  259. {certo-0.2.2 → certo-0.2.3}/src/certo/starter/tasks/wordle.md +0 -0
  260. {certo-0.2.2 → certo-0.2.3}/src/certo/task_store.py +0 -0
  261. {certo-0.2.2 → certo-0.2.3}/src/certo/tools.py +0 -0
  262. {certo-0.2.2 → certo-0.2.3}/src/certo/update_check.py +0 -0
  263. {certo-0.2.2 → certo-0.2.3}/src/certo/workspace.py +0 -0
  264. {certo-0.2.2 → certo-0.2.3}/src/certo/worktree.py +0 -0
  265. {certo-0.2.2 → certo-0.2.3}/tests/model_file_helpers.py +0 -0
  266. {certo-0.2.2 → certo-0.2.3}/tests/test_admin_cli.py +0 -0
  267. {certo-0.2.2 → certo-0.2.3}/tests/test_artifacts.py +0 -0
  268. {certo-0.2.2 → certo-0.2.3}/tests/test_banner.py +0 -0
  269. {certo-0.2.2 → certo-0.2.3}/tests/test_bench_report.py +0 -0
  270. {certo-0.2.2 → certo-0.2.3}/tests/test_checkpoints.py +0 -0
  271. {certo-0.2.2 → certo-0.2.3}/tests/test_checkpoints_cmd.py +0 -0
  272. {certo-0.2.2 → certo-0.2.3}/tests/test_config.py +0 -0
  273. {certo-0.2.2 → certo-0.2.3}/tests/test_console.py +0 -0
  274. {certo-0.2.2 → certo-0.2.3}/tests/test_context_window.py +0 -0
  275. {certo-0.2.2 → certo-0.2.3}/tests/test_cost_limit.py +0 -0
  276. {certo-0.2.2 → certo-0.2.3}/tests/test_deadline.py +0 -0
  277. {certo-0.2.2 → certo-0.2.3}/tests/test_docker_image.py +0 -0
  278. {certo-0.2.2 → certo-0.2.3}/tests/test_docs.py +0 -0
  279. {certo-0.2.2 → certo-0.2.3}/tests/test_escalation_runner.py +0 -0
  280. {certo-0.2.2 → certo-0.2.3}/tests/test_independent_tests.py +0 -0
  281. {certo-0.2.2 → certo-0.2.3}/tests/test_mcp_server.py +0 -0
  282. {certo-0.2.2 → certo-0.2.3}/tests/test_menus.py +0 -0
  283. {certo-0.2.2 → certo-0.2.3}/tests/test_packaging.py +0 -0
  284. {certo-0.2.2 → certo-0.2.3}/tests/test_plugins.py +0 -0
  285. {certo-0.2.2 → certo-0.2.3}/tests/test_project_env_layouts.py +0 -0
  286. {certo-0.2.2 → certo-0.2.3}/tests/test_readme.py +0 -0
  287. {certo-0.2.2 → certo-0.2.3}/tests/test_run_history.py +0 -0
  288. {certo-0.2.2 → certo-0.2.3}/tests/test_run_progress.py +0 -0
  289. {certo-0.2.2 → certo-0.2.3}/tests/test_run_summary.py +0 -0
  290. {certo-0.2.2 → certo-0.2.3}/tests/test_runs.py +0 -0
  291. {certo-0.2.2 → certo-0.2.3}/tests/test_skills.py +0 -0
  292. {certo-0.2.2 → certo-0.2.3}/tests/test_task_store.py +0 -0
  293. {certo-0.2.2 → certo-0.2.3}/tests/test_third_party_skills.py +0 -0
  294. {certo-0.2.2 → certo-0.2.3}/tests/test_update_check.py +0 -0
  295. {certo-0.2.2 → certo-0.2.3}/tests/test_verification_wrappers.py +0 -0
  296. {certo-0.2.2 → certo-0.2.3}/tests/test_version.py +0 -0
  297. {certo-0.2.2 → certo-0.2.3}/tests/test_workspace.py +0 -0
  298. {certo-0.2.2 → certo-0.2.3}/tests/test_worktree.py +0 -0
@@ -94,6 +94,9 @@ CERTO_MAX_VERIFY_RETRIES=2
94
94
  # Spans the whole task — the initial run plus every verify/retry cycle —
95
95
  # not just one SDK conversation.run() call.
96
96
  CERTO_MAX_TASK_SECONDS=1800
97
+ # Milestone mode: a milestone whose time ran out after it changed files goes
98
+ # on in a fresh conversation this many times (0: stop there, as before).
99
+ CERTO_MILESTONE_TIME_RETRIES=1
97
100
 
98
101
  # Opt-in: allow the agent to pause and ask a question instead of always
99
102
  # pushing forward autonomously (only the CLI's --interactive prompts a real
@@ -125,6 +128,12 @@ CERTO_VERBOSE=no
125
128
  # fix attempt, last checks, time, cost so far), in seconds. 0 turns it off.
126
129
  CERTO_PROGRESS_SECONDS=120
127
130
 
131
+ # Skills from your trusted repositories (skill_sources.yaml, then
132
+ # certo skills assess) that fit a run's project and task are added to it,
133
+ # up to this many tokens (about four characters each). 0 turns them off.
134
+ # See docs/guides/manage-skills.md.
135
+ CERTO_TRUSTED_SKILLS_TOKENS=4000
136
+
128
137
  # --- Model selection (see docs/guides/pick-models-automatically.md and
129
138
  # docs/guides/escalate-between-models.md). With manual (the default),
130
139
  # CERTO_LLM_MODEL above is used and no model file is read. With auto or
@@ -182,6 +191,11 @@ CERTO_SAVE_STATE=
182
191
  # this off.
183
192
  CERTO_CHECKPOINTS=
184
193
 
194
+ # In a project Certo created from scratch, a "Generated with Certo" line in
195
+ # README.md and a generator meta tag in index.html. Set to 0 to turn this
196
+ # off.
197
+ CERTO_CREDITS=
198
+
185
199
  # --- Only consulted when CERTO_EXECUTION=docker ---
186
200
  # The agent-server image, built automatically on first use.
187
201
  CERTO_DOCKER_IMAGE=certo/agent-server:local
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: certo
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: A coding-agent harness that isn't tied to one model or provider: it picks a model per task, switches when one fails, and checks the work with your own tests.
5
5
  Project-URL: Homepage, https://github.com/alessioricco/certo
6
6
  Project-URL: Repository, https://github.com/alessioricco/certo
@@ -25,6 +25,7 @@ Requires-Dist: mcp<3,>=2.2.0
25
25
  Requires-Dist: openhands-sdk==1.47.0
26
26
  Requires-Dist: openhands-tools==1.47.0
27
27
  Requires-Dist: prompt-toolkit>=3.0.53
28
+ Requires-Dist: psutil>=5.9
28
29
  Requires-Dist: python-dotenv>=1.0
29
30
  Requires-Dist: pyyaml>=6.0
30
31
  Provides-Extra: dev
@@ -239,7 +240,7 @@ certo tasks/wordle.md --project wordle
239
240
  - `models_list.yaml`, the catalog: every model's id and ratings.
240
241
  - `models.yaml`, your settings: the models you enabled, with their key or server address.
241
242
  - `escalation.yaml`, your ladders, for `--escalate`; optional: without it, Certo builds a ladder from the ratings.
242
- - `task_profiles.yaml`, the kinds of task and what matters for each, for `--auto-model`; optional.
243
+ - `task_profiles.yaml`, the kinds of task and what matters for each, for `--auto-model`, which needs it (`certo init models --profiles` writes it and asks which model you want for each).
243
244
 
244
245
  Then add `--escalate` (with a ladder from [One task, more than one model](https://github.com/alessioricco/certo#one-task-more-than-one-model)) or `--auto-model` to a run. `certo check --models` tests every model you enabled before you rely on it.
245
246
 
@@ -187,7 +187,7 @@ certo tasks/wordle.md --project wordle
187
187
  - `models_list.yaml`, the catalog: every model's id and ratings.
188
188
  - `models.yaml`, your settings: the models you enabled, with their key or server address.
189
189
  - `escalation.yaml`, your ladders, for `--escalate`; optional: without it, Certo builds a ladder from the ratings.
190
- - `task_profiles.yaml`, the kinds of task and what matters for each, for `--auto-model`; optional.
190
+ - `task_profiles.yaml`, the kinds of task and what matters for each, for `--auto-model`, which needs it (`certo init models --profiles` writes it and asks which model you want for each).
191
191
 
192
192
  Then add `--escalate` (with a ladder from [One task, more than one model](https://github.com/alessioricco/certo#one-task-more-than-one-model)) or `--auto-model` to a run. `certo check --models` tests every model you enabled before you rely on it.
193
193
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "certo"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  description = "A coding-agent harness that isn't tied to one model or provider: it picks a model per task, switches when one fails, and checks the work with your own tests."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -39,6 +39,8 @@ dependencies = [
39
39
  "openhands-sdk==1.47.0",
40
40
  "openhands-tools==1.47.0",
41
41
  "python-dotenv>=1.0",
42
+ # Comes with openhands-tools; listed because leftovers.py uses it directly.
43
+ "psutil>=5.9",
42
44
  # Already ships transitively via openhands-sdk — listed explicitly here
43
45
  # since model_catalog.py imports it directly, not ad hoc. (runner.py's
44
46
  # provider/API-failure detection for auto model selection uses the
@@ -19,4 +19,4 @@ os.environ.setdefault("OPENHANDS_SUPPRESS_BANNER", "1")
19
19
  # which config.py loads without overriding. Certo reads only ./.env.
20
20
  os.environ.setdefault("LITELLM_MODE", "PRODUCTION")
21
21
 
22
- __version__ = "0.2.2"
22
+ __version__ = "0.2.3"
@@ -179,14 +179,22 @@ def evaluate_acceptance_check(workspace: str, check: AcceptanceCheck) -> Accepta
179
179
  )
180
180
  note = " (checked only the first 1MB)" if truncated else ""
181
181
  found = check.contains in content
182
+ # The text itself, so rows on the same file can be told apart.
183
+ text = _shown(check.contains)
182
184
  detail = (
183
- f"{check.path} contains the expected text{note}"
185
+ f'{check.path} contains "{text}"{note}'
184
186
  if found
185
- else f"{check.path} does not contain the expected text{note}"
187
+ else f'{check.path} does not contain "{text}"{note}'
186
188
  )
187
189
  return AcceptanceCheckResult(check=check, passed=found, detail=detail)
188
190
 
189
191
 
192
+ def _shown(text: str, limit: int = 80) -> str:
193
+ """`text` on one line, cut to `limit` characters."""
194
+ one_line = " ".join(text.split())
195
+ return one_line if len(one_line) <= limit else one_line[: limit - 3] + "..."
196
+
197
+
190
198
  def evaluate_acceptance_checks(
191
199
  workspace: str, checks: Sequence[AcceptanceCheck]
192
200
  ) -> list[AcceptanceCheckResult]:
@@ -2,15 +2,17 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from collections.abc import Mapping
5
+ import os
6
+ from collections.abc import Mapping, Sequence
6
7
 
7
8
  from openhands.sdk import LLM, Agent, AgentContext
9
+ from openhands.sdk.skills import Skill
8
10
  from openhands.sdk.context.condenser import LLMSummarizingCondenser
9
11
 
10
12
  from .config import Config
11
13
  from .llm import build_llm
12
14
  from .project_env import ProjectEnv
13
- from .skill_library import collect, disabled_project_skills
15
+ from .skill_library import collect, disabled_project_skills, off_for_language, project_language
14
16
  from .tools import build_tools
15
17
 
16
18
  # The SDK ends a conversation turn (execution_status -> FINISHED) whenever the
@@ -67,6 +69,23 @@ _README_SUFFIX = (
67
69
  # harness already points the terminal at it; this says so, so the agent
68
70
  # installs into it rather than reaching for some other interpreter — live,
69
71
  # an agent tried `<Certo's own python> -m pip install pytest`.
72
+ def project_root(cfg: Config) -> str:
73
+ """The folder the agent works in, as its tools see it: the project's
74
+ absolute path, or the container's mount in Docker (workspace.py)."""
75
+ return "/workspace" if cfg.execution == "docker" else os.path.abspath(cfg.workspace)
76
+
77
+
78
+ def _project_root_suffix(root: str) -> str:
79
+ return (
80
+ f"The project root is {root}. Work only inside it: create, edit, read, "
81
+ "list and search files there, and run commands from there. Never read, "
82
+ "list or search anything above or outside it (its parent folders, other "
83
+ "projects, your home folder): none of it is part of the task, and "
84
+ "another project's files are not yours to copy or change. Tools may "
85
+ "still use their own installs and caches."
86
+ )
87
+
88
+
70
89
  def _project_env_suffix(env: ProjectEnv) -> str:
71
90
  return (
72
91
  f"This project has its own Python environment at {env.venv_dir}, and "
@@ -205,6 +224,7 @@ def build_agent(
205
224
  usage_id: str = "certo",
206
225
  project_env: ProjectEnv | None = None,
207
226
  terminal_env: Mapping[str, str] | None = None,
227
+ trusted_skills: Sequence[Skill] = (),
208
228
  ) -> Agent:
209
229
  # usage_id is forwarded to build_llm() unchanged (default preserves the
210
230
  # single-model behavior everything used before). Auto model selection
@@ -220,6 +240,8 @@ def build_agent(
220
240
  # non-interactive tool flags, keeping .certo/, verify-before-finish,
221
241
  # lifecycle skills).
222
242
  suffixes = [_AUTONOMOUS_SUFFIX] if not cfg.interactive else []
243
+ if cfg.root_prompt:
244
+ suffixes.append(_project_root_suffix(project_root(cfg)))
223
245
  suffixes.extend(
224
246
  [
225
247
  _README_SUFFIX,
@@ -236,7 +258,13 @@ def build_agent(
236
258
  # Official, then third-party (global, then this project's), one skill
237
259
  # per name: AgentContext rejects duplicate names (skill_library.py).
238
260
  # Minus the official ones a benchmark arm turned off.
239
- skills = collect(cfg, cfg.workspace, own=False).without_official(cfg.skills_off)
261
+ # trusted_skills: the run's picks from trusted repositories
262
+ # (skill_match.skills_for_run), after every skill already named.
263
+ # Minus the official skills that don't fit the project's language
264
+ # (a pytest skill in a JavaScript project).
265
+ off = [*cfg.skills_off, *off_for_language(project_language(cfg.workspace))]
266
+ skills = collect(cfg, cfg.workspace, own=False).without_official(off)
267
+ skills += list(trusted_skills)
240
268
  agent_context = AgentContext(
241
269
  skills=skills,
242
270
  # Resolved lazily by the Conversation once the real workspace path is
@@ -12,10 +12,11 @@ says `model`.
12
12
  from __future__ import annotations
13
13
 
14
14
  import os
15
- from collections.abc import Callable
15
+ from collections.abc import Callable, Mapping
16
16
  from dataclasses import dataclass, replace
17
17
  from typing import TYPE_CHECKING, Any
18
18
 
19
+ from .project_models import apply_project_models
19
20
  from .config import (
20
21
  Config,
21
22
  ConfigError,
@@ -24,7 +25,7 @@ from .config import (
24
25
  override_llm,
25
26
  resolve_project_dir,
26
27
  )
27
- from .escalation import ResolvedLadder, load_ladder
28
+ from .escalation import ResolvedLadder, load_ladder, workspace_listing
28
29
 
29
30
  if TYPE_CHECKING:
30
31
  from .milestones import MilestoneState
@@ -64,6 +65,8 @@ class RunOptions:
64
65
  independent_tests_strict: bool = False
65
66
  verbose: bool = False
66
67
  agents_md: str | None = None
68
+ max_steps: int | None = None
69
+ max_minutes: int | None = None
67
70
 
68
71
 
69
72
  def resolve_config(
@@ -105,6 +108,18 @@ def resolve_config(
105
108
  base_url=options.base_url,
106
109
  reasoning_effort=options.reasoning_effort,
107
110
  )
111
+ # The project's own model choice (certo-models.yaml in the --project
112
+ # folder, or the folder given, or the current one): its strategy
113
+ # applies when no flag or CERTO_MODEL_SELECTION chose one.
114
+ if options.project is not None:
115
+ folder = resolve_project_dir(cfg.projects_dir, options.project)
116
+ else:
117
+ folder = options.workspace or cfg.workspace
118
+ cfg = apply_project_models(
119
+ cfg,
120
+ folder,
121
+ mode_chosen=options.escalate is not None or options.auto_model or options.model is not None,
122
+ )
108
123
  # With a ladder or --auto-model the model files name every model and its
109
124
  # key, so CERTO_LLM_MODEL isn't needed (DECISIONS.md).
110
125
  if options.escalate is None and not options.auto_model and cfg.model_selection == "manual":
@@ -122,6 +137,14 @@ def resolve_config(
122
137
  cfg = replace(cfg, independent_tests=True, independent_tests_strict=True)
123
138
  if options.verbose:
124
139
  cfg = replace(cfg, verbose=True)
140
+ if options.max_steps is not None:
141
+ if options.max_steps < 1:
142
+ raise UsageError(f"{spell('max_steps')} must be 1 or more")
143
+ cfg = replace(cfg, max_iterations=options.max_steps)
144
+ if options.max_minutes is not None:
145
+ if options.max_minutes < 1:
146
+ raise UsageError(f"{spell('max_time')} must be 1 or more (minutes)")
147
+ cfg = replace(cfg, max_task_seconds=options.max_minutes * 60)
125
148
 
126
149
  if options.escalate is not None:
127
150
  cfg = replace(cfg, model_selection="escalate", escalation_ladder=options.escalate)
@@ -140,6 +163,86 @@ def resolve_config(
140
163
  return cfg
141
164
 
142
165
 
166
+ _MODE_FLAGS = {"auto": "--auto-model", "escalate": "--escalate"}
167
+
168
+
169
+ def continue_model_selection(
170
+ cfg: Config,
171
+ record: Any,
172
+ *,
173
+ model_flag: bool,
174
+ environ: Mapping[str, str] | None = None,
175
+ ) -> tuple[Config, str | None]:
176
+ """A resume, or a milestone file run again, keeps how the run it
177
+ continues chose its models (`record.model_selection`): `--auto-model`
178
+ or `--escalate` (with its ladder), unless the user chose now: a flag
179
+ (`--model` included), `CERTO_MODEL_SELECTION`, or a project's
180
+ certo-models.yaml (which already set `cfg.model_selection`). Returns
181
+ the config and a line to show, or None when nothing changed."""
182
+ environ = os.environ if environ is None else environ
183
+ saved = getattr(record, "model_selection", "manual") or "manual"
184
+ if (
185
+ record is None
186
+ or saved not in _MODE_FLAGS
187
+ or model_flag
188
+ or cfg.model_selection != "manual"
189
+ or (environ.get("CERTO_MODEL_SELECTION") or "").strip()
190
+ ):
191
+ return cfg, None
192
+ ladder = getattr(record, "escalation_ladder", "") or cfg.escalation_ladder
193
+ cfg = replace(cfg, model_selection=saved, escalation_ladder=ladder)
194
+ flag = _MODE_FLAGS[saved] + (f" {ladder}" if saved == "escalate" and ladder else "")
195
+ return cfg, (
196
+ f"Certo: continuing with {flag}, as the run it continues chose its models "
197
+ "(--model NAME or CERTO_MODEL_SELECTION chooses otherwise)."
198
+ )
199
+
200
+
201
+ def continue_budgets(
202
+ cfg: Config,
203
+ record: Any,
204
+ *,
205
+ time_flag: bool,
206
+ steps_flag: bool,
207
+ environ: Mapping[str, str] | None = None,
208
+ ) -> tuple[Config, str | None]:
209
+ """A resume, or a milestone file run again, keeps the time budget and
210
+ step limit of the run it continues, unless `--max-time`/`--max-steps`
211
+ or CERTO_MAX_TASK_SECONDS/CERTO_MAX_ITERATIONS set them now. Returns
212
+ the config and a line to show, or None when nothing changed."""
213
+ environ = os.environ if environ is None else environ
214
+ if record is None:
215
+ return cfg, None
216
+ changes: dict[str, int] = {}
217
+ seconds = int(getattr(record, "max_task_seconds", 0) or 0)
218
+ steps = int(getattr(record, "max_iterations", 0) or 0)
219
+ if (
220
+ seconds
221
+ and seconds != cfg.max_task_seconds
222
+ and not time_flag
223
+ and not (environ.get("CERTO_MAX_TASK_SECONDS") or "").strip()
224
+ ):
225
+ changes["max_task_seconds"] = seconds
226
+ if (
227
+ steps
228
+ and steps != cfg.max_iterations
229
+ and not steps_flag
230
+ and not (environ.get("CERTO_MAX_ITERATIONS") or "").strip()
231
+ ):
232
+ changes["max_iterations"] = steps
233
+ if not changes:
234
+ return cfg, None
235
+ parts = []
236
+ if "max_task_seconds" in changes:
237
+ parts.append(f"{changes['max_task_seconds'] // 60} minutes")
238
+ if "max_iterations" in changes:
239
+ parts.append(f"{changes['max_iterations']} steps")
240
+ return replace(cfg, **changes), (
241
+ f"Certo: keeping the budget of the run it continues: {' and '.join(parts)} "
242
+ "(--max-time or --max-steps sets another)."
243
+ )
244
+
245
+
143
246
  def load_run_ladder(
144
247
  cfg: Config, on_warning: Callable[[str], None] | None = None
145
248
  ) -> ResolvedLadder | None:
@@ -154,17 +257,31 @@ def load_run_ladder(
154
257
  escalation_file=cfg.escalation_file,
155
258
  task_profiles_file=cfg.task_profiles_file,
156
259
  on_warning=on_warning,
260
+ project_dir=cfg.workspace,
157
261
  )
158
262
  if cfg.model_selection == "auto":
159
263
  from .catalog_check import load_checked_catalog
264
+ from .model_catalog import ModelCatalogError
265
+ from .model_files import resolve_optional
266
+ from .profile_choice import NO_PROFILES
160
267
 
161
- load_checked_catalog(
268
+ # Without task profiles every model ranks the same and the first in
269
+ # models_list.yaml would go first: refused (DECISIONS.md, 2026-11-11).
270
+ catalog = load_checked_catalog(
162
271
  cfg.models_file,
163
272
  cfg.models_list_file,
164
273
  task_profiles_file=cfg.task_profiles_file,
165
274
  escalation_file=cfg.escalation_file,
166
275
  mode="auto",
276
+ project_dir=cfg.workspace,
277
+ )
278
+ profiles_path, _ = resolve_optional(
279
+ cfg.task_profiles_file, cfg.escalation_file, cfg.workspace
167
280
  )
281
+ if profiles_path is None:
282
+ raise ModelCatalogError(NO_PROFILES)
283
+ if not catalog.task_profiles:
284
+ raise ModelCatalogError(f"{profiles_path} has no task profile. {NO_PROFILES}")
168
285
  return None
169
286
 
170
287
 
@@ -207,6 +324,72 @@ class RunPlan:
207
324
  resume_from: Any = None
208
325
  milestones: Any = None
209
326
  restart: Any = None
327
+ # What the caller shows before the run: where a milestone run starts.
328
+ note: str | None = None
329
+
330
+
331
+ def _continue_milestones(
332
+ state: Any,
333
+ saved: Any,
334
+ text: str,
335
+ workspace: str,
336
+ from_milestone: int | None,
337
+ spell: Spell,
338
+ ) -> RunPlan:
339
+ """A new run of a milestones file: it goes on from where an earlier run
340
+ of the same, unedited file stopped (2026-11-10: running the file again
341
+ started over from milestone 1 and wiped the verdicts), or from
342
+ `from_milestone`. The milestone it starts at gets a fresh conversation,
343
+ told how its last try ended, when the last run was that milestone's."""
344
+ from .milestones import is_milestone_task
345
+ from .project_state import load_record
346
+
347
+ total = len(state.plan)
348
+ same = state.continue_from(saved, text)
349
+ if from_milestone is not None:
350
+ if not 1 <= from_milestone <= total:
351
+ raise UsageError(
352
+ f"{spell('from_milestone')} must be between 1 and {total}, the "
353
+ "milestones' numbers as Certo shows them (Milestone N of "
354
+ f"{total})"
355
+ )
356
+ state.verdicts = {n: v for n, v in state.verdicts.items() if n < from_milestone}
357
+ state.start = from_milestone
358
+ note = f"Milestones: starting at {from_milestone} of {total}, as asked."
359
+ elif same:
360
+ number = state.next_number()
361
+ if number is None:
362
+ raise NothingToDo(
363
+ f"All {total} milestones of {saved.source} are already 'verified' here. "
364
+ f"To run them again: {spell('from_milestone')} 1."
365
+ )
366
+ done = [n for n in range(1, number) if state.verdicts.get(n) == "verified"]
367
+ if not done:
368
+ return RunPlan(milestones=state)
369
+ shown = f"1 to {done[-1]}" if len(done) > 1 else str(done[0])
370
+ note = (
371
+ f"Milestones: {shown} of {total} already verified here (.certo/milestones.json); "
372
+ f"starting at {number}: {state.plan.get(number).label}. "
373
+ f"To start again: {spell('from_milestone')} 1."
374
+ )
375
+ elif saved is not None and saved.source == state.source:
376
+ note = (
377
+ "Milestones: the task file changed since its last run here, so they start "
378
+ f"from 1. To skip some: {spell('from_milestone')} N."
379
+ )
380
+ else:
381
+ return RunPlan(milestones=state)
382
+ number = state.next_number()
383
+ record = load_record(workspace)
384
+ restart = (
385
+ record
386
+ if number is not None
387
+ and record is not None
388
+ and record.verdict != "verified"
389
+ and is_milestone_task(record.task, state.plan, number)
390
+ else None
391
+ )
392
+ return RunPlan(milestones=state, restart=restart, note=note)
210
393
 
211
394
 
212
395
  def plan_run(
@@ -217,6 +400,8 @@ def plan_run(
217
400
  milestones_file: str | None = None,
218
401
  from_project: bool = False,
219
402
  want_milestones: bool = False,
403
+ from_milestone: int | None = None,
404
+ spell: Spell = _plain,
220
405
  ) -> RunPlan:
221
406
  """Read what a run continues from the project's `.certo/` folder (with
222
407
  `resume`) or from a milestones task file. Raises `UsageError` when
@@ -246,9 +431,17 @@ def plan_run(
246
431
  try:
247
432
  with open(milestones_file, encoding="utf-8") as f:
248
433
  text = f.read()
249
- return RunPlan(milestones=MilestoneState.from_text(text, milestones_file))
434
+ state = MilestoneState.from_text(text, milestones_file)
250
435
  except MilestoneError as exc:
251
436
  raise UsageError(f"{milestones_file}: {exc}") from exc
437
+ return _continue_milestones(
438
+ state, load_milestones(cfg.workspace), text, cfg.workspace, from_milestone, spell
439
+ )
440
+ if from_milestone is not None:
441
+ raise UsageError(
442
+ f"{spell('from_milestone')} needs a task file in milestones, run without "
443
+ f"{spell('resume')}"
444
+ )
252
445
  if resume and saved is None and want_milestones:
253
446
  raise UsageError(
254
447
  f"no milestones to resume in {workspace}: Certo "
@@ -283,7 +476,7 @@ def plan_run(
283
476
  "the last run's state in .certo/, and there is none here (or it can't "
284
477
  "be read). Run a task first."
285
478
  )
286
- if record.verdict == "verified" and task is None:
479
+ if record.verdict == "verified" and task is None and not record.cut_short:
287
480
  raise NothingToDo(
288
481
  "The last run here already ended with 'verified'. To continue anyway, "
289
482
  'say what to do next: certo --resume "..."'
@@ -292,6 +485,27 @@ def plan_run(
292
485
  return RunPlan()
293
486
 
294
487
 
488
+ def _out_of_time_note(outcome: Any, cfg: Config) -> str:
489
+ """What a milestone that ran out of time tells its fresh conversation:
490
+ that the work so far is in the folder, and how the last one ended (its
491
+ limitations, which name unfinished task items, and its check results)."""
492
+ minutes = cfg.max_task_seconds / 60
493
+ lines = [
494
+ "",
495
+ "",
496
+ f"Your earlier try at this milestone ran out of its time ({minutes:g} minutes) "
497
+ "before you said it was done. Its work is in the folder: go on from it, don't "
498
+ "start again. Finish what is left, run the checks, then stop.",
499
+ ]
500
+ notes = [n for n in outcome.completion_contract.limitations if "--max-time" not in n]
501
+ if notes:
502
+ lines += ["", "How it ended, from Certo:"] + [f"- {note}" for note in notes]
503
+ if outcome.checks:
504
+ lines += ["", "The project's checks after it:"]
505
+ lines += [f"- `{check.status}` {check.name}" for check in outcome.checks]
506
+ return "\n".join(lines)
507
+
508
+
295
509
  def run_milestones(
296
510
  state: MilestoneState,
297
511
  cfg: Config,
@@ -330,6 +544,9 @@ def run_milestones(
330
544
  # What the milestone before left; a resume past milestone 1 has only
331
545
  # the folder, its conversation was in an earlier session.
332
546
  left = handover(workspace, [], number - 1) if number is not None and number > 1 else None
547
+ first_number = number
548
+ time_retries = 0 # this milestone's goes after running out of time
549
+ carry_on: str | None = None
333
550
  while number is not None:
334
551
  milestone = state.plan.get(number)
335
552
  state.current = number
@@ -346,6 +563,11 @@ def run_milestones(
346
563
  "it ended is below; the files it left are in the folder.\n\n"
347
564
  + render_status(restart)
348
565
  )
566
+ if carry_on is not None:
567
+ text += carry_on
568
+ carry_on = None
569
+ if instruction and number == first_number:
570
+ extra = instruction
349
571
  if extra and resume is None:
350
572
  text += f"\n\nAdditional instruction from the user:\n{extra.strip()}"
351
573
  extra = None
@@ -353,11 +575,12 @@ def run_milestones(
353
575
  if number == total and acceptance_checks:
354
576
  checks += list(acceptance_checks)
355
577
  history["task"] = f"Milestone {number} of {total}: {milestone.label}"
578
+ files_before = workspace_listing(workspace)
356
579
  result = run_one(text, resume, extra, checks or None)
357
580
  outcome = result.outcome
358
581
  if outcome.run_summary is not None:
359
582
  summaries.append(outcome.run_summary)
360
- state.verdicts[number] = outcome.verification_state
583
+ state.record(number, outcome.verification_state, outcome.skills_used, outcome.run_summary)
361
584
  save_milestones(workspace, state)
362
585
  record = load_record(workspace)
363
586
  if record is not None: # STATUS.md shows the new verdict in its list
@@ -376,7 +599,26 @@ def run_milestones(
376
599
 
377
600
  say(report_line(outcome.independent_tests, strict=cfg.independent_tests_strict))
378
601
  if outcome.verification_state != "verified":
602
+ if (
603
+ outcome.verification_state == "budget_exhausted"
604
+ and time_retries < cfg.milestone_time_retries
605
+ and workspace_listing(workspace) != files_before
606
+ ):
607
+ # Out of time, but working: go on in a fresh conversation, with
608
+ # how the last one ended (DECISIONS.md, 2026-11-11).
609
+ time_retries += 1
610
+ say(
611
+ f"Milestone {number} of {total} ran out of time after changing "
612
+ "files: it goes on in a fresh conversation "
613
+ f"({time_retries} of {cfg.milestone_time_retries}, "
614
+ "CERTO_MILESTONE_TIME_RETRIES)."
615
+ )
616
+ carry_on = _out_of_time_note(outcome, cfg)
617
+ left = handover(workspace, [], number - 1) if number > 1 else None
618
+ first = False
619
+ continue
379
620
  break
621
+ time_retries = 0
380
622
  left = handover(workspace, result, number)
381
623
  number = state.next_number()
382
624
  first = False