ctrlrelay 0.23.0__tar.gz → 0.24.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 (237) hide show
  1. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/CHANGELOG.md +68 -1
  2. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/PKG-INFO +1 -1
  3. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/architecture.md +8 -0
  4. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/configuration.md +188 -7
  5. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/operations.md +70 -1
  6. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/pyproject.toml +1 -1
  7. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/cli.py +77 -17
  8. ctrlrelay-0.24.0/src/ctrlrelay/core/budget.py +596 -0
  9. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/config.py +117 -2
  10. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/dispatcher.py +140 -37
  11. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/events.py +5 -2
  12. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/poller.py +78 -0
  13. ctrlrelay-0.24.0/src/ctrlrelay/core/proof.py +1226 -0
  14. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/state.py +18 -1
  15. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/weekly_summary.py +25 -2
  16. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/pipelines/base.py +6 -0
  17. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/pipelines/dev.py +414 -27
  18. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/pipelines/task.py +31 -6
  19. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/web/fleet.py +4 -0
  20. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/web/numbers.py +106 -9
  21. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/web/server.py +3 -0
  22. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/web/static/index.html +65 -3
  23. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/web/status.py +61 -2
  24. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_agent_routing.py +4 -0
  25. ctrlrelay-0.24.0/tests/test_budget.py +661 -0
  26. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_dev_stuck.py +143 -1
  27. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_dev_work_steps.py +5 -3
  28. ctrlrelay-0.24.0/tests/test_poller_priority_order.py +265 -0
  29. ctrlrelay-0.24.0/tests/test_proof.py +1479 -0
  30. ctrlrelay-0.24.0/tests/test_sandbox_visibility.py +155 -0
  31. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_web_drift.py +2 -1
  32. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_web_numbers.py +166 -5
  33. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_web_status.py +76 -0
  34. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_weekly_summary.py +34 -0
  35. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  36. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  37. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  38. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/.github/dependabot.yml +0 -0
  39. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/.github/workflows/build.yml +0 -0
  40. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/.github/workflows/cla.yml +0 -0
  41. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/.github/workflows/pages.yml +0 -0
  42. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/.github/workflows/publish.yml +0 -0
  43. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/.github/workflows/test.yml +0 -0
  44. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/.gitignore +0 -0
  45. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/CODE_OF_CONDUCT.md +0 -0
  46. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/CONTRIBUTING.md +0 -0
  47. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/LICENSE +0 -0
  48. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/README.md +0 -0
  49. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/SECURITY.md +0 -0
  50. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/config/orchestrator.yaml.example +0 -0
  51. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/Gemfile +0 -0
  52. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/_config.yml +0 -0
  53. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/adding-a-machine.md +0 -0
  54. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/bridge.md +0 -0
  55. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/cli.md +0 -0
  56. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/development.md +0 -0
  57. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/feedback-loop.md +0 -0
  58. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/getting-started.md +0 -0
  59. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/index.md +0 -0
  60. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/llms.txt +0 -0
  61. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/personalization.md +0 -0
  62. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/registered-mode.md +0 -0
  63. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/superpowers/plans/2026-10-30-status-page.md +0 -0
  64. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/docs/superpowers/specs/2026-10-30-status-page-design.md +0 -0
  65. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/__init__.py +0 -0
  66. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/bridge/__init__.py +0 -0
  67. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/bridge/__main__.py +0 -0
  68. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/bridge/factory.py +0 -0
  69. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/bridge/handler.py +0 -0
  70. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/bridge/mattermost_handler.py +0 -0
  71. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/bridge/node_tag.py +0 -0
  72. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/bridge/protocol.py +0 -0
  73. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/bridge/server.py +0 -0
  74. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/bridge/telegram_handler.py +0 -0
  75. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/__init__.py +0 -0
  76. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/agent_env.py +0 -0
  77. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/archived.py +0 -0
  78. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/audit.py +0 -0
  79. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/binaries.py +0 -0
  80. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/blockers.py +0 -0
  81. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/checkpoint.py +0 -0
  82. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/claims.py +0 -0
  83. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/code_review.py +0 -0
  84. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/dispatch_health.py +0 -0
  85. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/github.py +0 -0
  86. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/github_budget.py +0 -0
  87. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/heartbeat.py +0 -0
  88. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/intake_hold.py +0 -0
  89. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/issue_questions.py +0 -0
  90. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/job_claims.py +0 -0
  91. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/network.py +0 -0
  92. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/node_check.py +0 -0
  93. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/obs.py +0 -0
  94. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/orphans.py +0 -0
  95. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/pr_verifier.py +0 -0
  96. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/pr_watcher.py +0 -0
  97. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/publish.py +0 -0
  98. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/question_expiry.py +0 -0
  99. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/redact.py +0 -0
  100. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/reopens.py +0 -0
  101. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/scheduler.py +0 -0
  102. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/self_update.py +0 -0
  103. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/stuck.py +0 -0
  104. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/usage.py +0 -0
  105. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/core/worktree.py +0 -0
  106. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/dashboard/__init__.py +0 -0
  107. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/dashboard/client.py +0 -0
  108. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/gh_protocol.py +0 -0
  109. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/install.py +0 -0
  110. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/personalization/__init__.py +0 -0
  111. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/personalization/manager.py +0 -0
  112. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/personalization/merge.py +0 -0
  113. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/personalization/paths.py +0 -0
  114. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/pipelines/__init__.py +0 -0
  115. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/pipelines/post_merge.py +0 -0
  116. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/pipelines/secops.py +0 -0
  117. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/setup.py +0 -0
  118. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/templates/__init__.py +0 -0
  119. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/templates/global-CLAUDE.md.snippet +0 -0
  120. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/templates/launchd/__init__.py +0 -0
  121. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/templates/launchd/bridge.plist.template +0 -0
  122. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/templates/launchd/poller.plist.template +0 -0
  123. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/templates/systemd/__init__.py +0 -0
  124. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/templates/systemd/bridge.service.template +0 -0
  125. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/templates/systemd/poller.service.template +0 -0
  126. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/templates/systemd/web.service.template +0 -0
  127. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/transports/__init__.py +0 -0
  128. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/transports/base.py +0 -0
  129. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/transports/file_mock.py +0 -0
  130. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/transports/socket_client.py +0 -0
  131. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/web/__init__.py +0 -0
  132. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/web/drift.py +0 -0
  133. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/web/health.py +0 -0
  134. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/web/links.py +0 -0
  135. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/web/transcript.py +0 -0
  136. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/src/ctrlrelay/web/waiting.py +0 -0
  137. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/__init__.py +0 -0
  138. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/_poller_fakes.py +0 -0
  139. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/_publish_fakes.py +0 -0
  140. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/conftest.py +0 -0
  141. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/fixtures/gh_search_issues.json +0 -0
  142. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/fixtures/stream_json_rate_limit.jsonl +0 -0
  143. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/fixtures/transcript_sample.jsonl +0 -0
  144. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_agent_backend_wiring.py +0 -0
  145. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_agent_no_keys.py +0 -0
  146. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_agent_sandbox.py +0 -0
  147. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_archived.py +0 -0
  148. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_audit.py +0 -0
  149. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_binary_resolution.py +0 -0
  150. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_bridge_protocol.py +0 -0
  151. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_bridge_server.py +0 -0
  152. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_bridge_start_command.py +0 -0
  153. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_chat_machines.py +0 -0
  154. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_checkpoint.py +0 -0
  155. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_claim_reconciliation.py +0 -0
  156. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_cli_ci_wait.py +0 -0
  157. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_cli_dev.py +0 -0
  158. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_cli_repos.py +0 -0
  159. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_cli_secops.py +0 -0
  160. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_cli_start.py +0 -0
  161. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_cli_version.py +0 -0
  162. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_code_review.py +0 -0
  163. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_config.py +0 -0
  164. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_dashboard_client.py +0 -0
  165. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_dev_integration.py +0 -0
  166. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_dev_pipeline.py +0 -0
  167. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_dev_plan_step.py +0 -0
  168. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_dev_step_switches.py +0 -0
  169. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_dispatch_health.py +0 -0
  170. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_dispatch_outcome_hook.py +0 -0
  171. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_dispatcher.py +0 -0
  172. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_docs_site.py +0 -0
  173. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_event_emission.py +0 -0
  174. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_events.py +0 -0
  175. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_fleet.py +0 -0
  176. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_gh_protocol.py +0 -0
  177. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_github.py +0 -0
  178. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_github_budget.py +0 -0
  179. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_install.py +0 -0
  180. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_intake_hold.py +0 -0
  181. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_intake_hold_poller.py +0 -0
  182. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_issue_blockers.py +0 -0
  183. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_issue_outcome_announcement.py +0 -0
  184. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_issue_questions.py +0 -0
  185. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_job_claims.py +0 -0
  186. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_mattermost_handler.py +0 -0
  187. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_network.py +0 -0
  188. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_no_change_run.py +0 -0
  189. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_node_check.py +0 -0
  190. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_node_claims.py +0 -0
  191. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_notify_transport.py +0 -0
  192. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_obs.py +0 -0
  193. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_opencode_adapter.py +0 -0
  194. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_orphans.py +0 -0
  195. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_personalization.py +0 -0
  196. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_personalization_merge.py +0 -0
  197. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_pipeline_base.py +0 -0
  198. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_poller.py +0 -0
  199. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_poller_recheck.py +0 -0
  200. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_poller_search.py +0 -0
  201. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_post_merge.py +0 -0
  202. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_pr_verifier.py +0 -0
  203. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_pr_watcher.py +0 -0
  204. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_pre_dispatch_retry.py +0 -0
  205. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_publish_failure_retry.py +0 -0
  206. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_question_backoff.py +0 -0
  207. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_question_expiry.py +0 -0
  208. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_question_survives_restart.py +0 -0
  209. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_redact.py +0 -0
  210. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_relay_alert_off_lock.py +0 -0
  211. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_relay_git_263.py +0 -0
  212. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_reopens.py +0 -0
  213. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_resume_prompt_contract.py +0 -0
  214. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_review_copy.py +0 -0
  215. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_review_gate.py +0 -0
  216. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_scheduler.py +0 -0
  217. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_secops_integration.py +0 -0
  218. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_secops_operator_prs.py +0 -0
  219. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_secops_pipeline.py +0 -0
  220. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_self_update.py +0 -0
  221. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_setup.py +0 -0
  222. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_state.py +0 -0
  223. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_stuck.py +0 -0
  224. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_task_pipeline.py +0 -0
  225. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_telegram_handler.py +0 -0
  226. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_timeout_save.py +0 -0
  227. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_transport.py +0 -0
  228. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_transport_resolution.py +0 -0
  229. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_unreviewed_pr_announcement.py +0 -0
  230. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_usage.py +0 -0
  231. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_web_health.py +0 -0
  232. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_web_links.py +0 -0
  233. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_web_peer_links.py +0 -0
  234. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_web_server.py +0 -0
  235. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_web_transcript.py +0 -0
  236. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_web_waiting.py +0 -0
  237. {ctrlrelay-0.23.0 → ctrlrelay-0.24.0}/tests/test_worktree.py +0 -0
@@ -7,6 +7,72 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.24.0] - 2026-11-05
11
+
12
+ ### Added
13
+
14
+ - Each poll's new issues run in priority order, oldest first (#356). The
15
+ batch is sorted by the position of the issue's priority label in
16
+ `intake.priority_labels` (default `["P0", "P1", "P2", "P3"]`, compared
17
+ without case; an issue with several runs at its earliest; unlabeled
18
+ last), then by when the issue was opened, then by number. An issue whose
19
+ creation time cannot be read runs after the others with its label. `[]`
20
+ keeps the oldest-first order only. Each poll that found issues logs the
21
+ order once as `poll.batch.order`. The re-read before each dispatch and
22
+ the blocker hold are unchanged; the order is per machine and fixed for
23
+ the batch.
24
+
25
+ - Cost per run in the numbers (#230). Each 7- and 30-day window's
26
+ `cost_per_run` (in `/api/status` and the status page's **Numbers** box)
27
+ now gives the median and total tokens per run that ended (`done` or
28
+ `failed`), counted as the run budget counts them (#223), and the median
29
+ and total `total_cost_usd` where the agent reported one. Runs with no
30
+ usage recorded (from before #223, or on a backend that is not measured)
31
+ are left out and counted in `runs_without_usage`, never read as 0; a
32
+ window with no measured run is `null` with the reason in `unavailable`.
33
+ The weekly chat summary gets a `tokens per run` line, `unknown` when not
34
+ measured.
35
+
36
+ - A dev run's PR goes ready only with proof the change works (#221). The
37
+ agent names a proving test in its DONE checkpoint. The relay runs it on
38
+ the pushed commit (must pass) and on the base with only the branch's test
39
+ changes (must fail), in fresh copies, with a time limit, without the
40
+ GitHub token, and under bwrap with no network when the agent was
41
+ sandboxed. It also flags deleted, skipped or loosened tests and empty or
42
+ whitespace-only diffs. A result counts only with evidence the named test
43
+ ran (pytest's junit report, or the exit code and the test in the output
44
+ for other runners), and the PR's head must still be the proven commit when
45
+ it is marked ready. The outcome is `proven`, `failed` or `not proven`;
46
+ only `proven` (or a docs-only diff) lets the PR go ready. Otherwise the PR
47
+ stays a draft and the run fails with `PR #N held as a draft`. The PR gets
48
+ one comment, edited in place, with the test, the command and both results.
49
+ Off by default: set `repos[].automation.require_proof: true` for a repo
50
+ whose tests can run offline in a fresh copy. With it off, the agent is not
51
+ asked for a proof and nothing is posted.
52
+
53
+ - Each machine's agent sandbox mode is shown (#305). `/api/status` carries
54
+ `node.sandbox` (`"none"` or `"bwrap"`; `null` for a peer on an older
55
+ version), each machine's card on the status page says `sandbox off` in the
56
+ warning colour when the agent runs unconfined, and the poller logs
57
+ `poller.sandbox_off` once at start with what to do about it.
58
+ - A token budget for each run (#223). `agent.budget.soft_tokens` warns once
59
+ in chat and the log; `agent.budget.hard_tokens` stops the agent, records the
60
+ run as failed with the reason `budget: used N tokens, hard limit M`, and
61
+ says `💸 Over budget` in chat. `agent.budget.rules` sets other limits by
62
+ issue label, which covers `size:*`; the first match wins. Nothing is limited
63
+ until a limit is set. The count is input + cache writes + output tokens,
64
+ read live from the agent's transcript, and covers the whole issue session
65
+ across resumes and fix rounds. Cache reads are recorded but not counted.
66
+ A run stopped over budget or as stuck after it opened a PR puts the PR back
67
+ to draft (or posts a "Do not merge" comment when that fails), starts no
68
+ merge watcher for it, and names it in chat and the issue comment.
69
+ - Each session records the tokens it used (`sessions.usage_tokens` and
70
+ `sessions.usage_detail`, with the cost the agent CLI reported). Running
71
+ cards on the status page and `/api/status` show `tokens_used`,
72
+ `cache_read_tokens`, `cost_usd`, `token_soft_limit` and `token_hard_limit`.
73
+ A reading that could not be parsed shows as unknown (`null`), never as 0,
74
+ and never stops a run on its own (#223).
75
+
10
76
  ## [0.23.0] - 2026-11-05
11
77
 
12
78
  ### Added
@@ -2525,7 +2591,8 @@ pipeline).
2525
2591
  per-phase implementation plans (Phase 0 through Phase 4).
2526
2592
  - `docs/Claude_Code_Project_Guide.md` — project development guide.
2527
2593
 
2528
- [Unreleased]: https://github.com/AInvirion/ctrlrelay/compare/v0.23.0...HEAD
2594
+ [Unreleased]: https://github.com/AInvirion/ctrlrelay/compare/v0.24.0...HEAD
2595
+ [0.24.0]: https://github.com/AInvirion/ctrlrelay/compare/v0.23.0...v0.24.0
2529
2596
  [0.23.0]: https://github.com/AInvirion/ctrlrelay/compare/v0.22.0...v0.23.0
2530
2597
  [0.22.0]: https://github.com/AInvirion/ctrlrelay/compare/v0.21.0...v0.22.0
2531
2598
  [0.21.0]: https://github.com/AInvirion/ctrlrelay/compare/v0.20.2...v0.21.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ctrlrelay
3
- Version: 0.23.0
3
+ Version: 0.24.0
4
4
  Summary: Local-first orchestrator for headless coding agents across multiple GitHub repos
5
5
  Project-URL: Homepage, https://github.com/AInvirion/ctrlrelay
6
6
  Project-URL: Documentation, https://ainvirion.github.io/ctrlrelay/
@@ -140,6 +140,14 @@ to confirm the PR is mergeable and CI is green. If not, it builds a fix prompt
140
140
  fix"), resumes the same agent session with that prompt, and re-verifies. Up
141
141
  to `DEFAULT_MAX_FIX_ATTEMPTS` (3) attempts.
142
142
 
143
+ Then the proof step
144
+ ([`src/ctrlrelay/core/proof.py`](https://github.com/AInvirion/ctrlrelay/blob/main/src/ctrlrelay/core/proof.py),
145
+ #221) runs the test the agent named, in fresh copies of the pushed commit
146
+ (must pass) and of the base with only the branch's test changes (must fail),
147
+ and scans the diff for weakened tests, when the repo turns it on. Only a proven run's PR is marked
148
+ ready; any other outcome leaves it a draft and fails the run. See
149
+ [`automation.require_proof`](configuration.md#reposautomationrequire_proof).
150
+
143
151
  `PRWatcher` (in
144
152
  [`src/ctrlrelay/core/pr_watcher.py`](https://github.com/AInvirion/ctrlrelay/blob/main/src/ctrlrelay/core/pr_watcher.py))
145
153
  polls a PR for merge status; the post-merge handler in
@@ -40,6 +40,7 @@ repos: [ ... ]
40
40
  | `transport` | object | **yes** | — | See [transport](#transport). |
41
41
  | `dashboard` | object | no | (defaults) | See [dashboard](#dashboard). |
42
42
  | `web` | object | no | (defaults) | The read-only status page. See [web](#web). |
43
+ | `intake` | object | no | (defaults) | The order each poll's new issues run in. See [intake](#intake). |
43
44
  | `claims` | object | no | (defaults) | Claim timings for several machines on one account. See [claims](#claims). |
44
45
  | `repos` | list | no | `[]` | See [repos](#repos). |
45
46
  | `schedules` | object | no | (defaults) | See [schedules](#schedules). |
@@ -217,6 +218,41 @@ modes either need every shell command allow-listed or filter by command text,
217
218
  which a wrapper script walks past, so they are not used as a guard. The guard
218
219
  is the next section: the agent holds no GitHub credentials.
219
220
 
221
+ ### agent.budget
222
+
223
+ A token budget for each run (#223). Both limits unset (the default): no limit,
224
+ and nothing changes. Usage is measured and shown on the status page either
225
+ way. See [run budgets](operations.md#run-budgets) for what is counted.
226
+
227
+ ```yaml
228
+ agent:
229
+ budget:
230
+ soft_tokens: 2000000 # warn once in chat and the log
231
+ hard_tokens: 6000000 # stop the agent
232
+ rules: # first rule naming any of the issue's labels wins
233
+ - labels: ["size:S", "size:XS"]
234
+ soft_tokens: 500000
235
+ hard_tokens: 1500000
236
+ - labels: ["size:L", "size:XL"]
237
+ hard_tokens: 15000000 # soft_tokens left out: 2000000 from above
238
+ - labels: ["no-budget"]
239
+ soft_tokens: null # null: no limit for these runs
240
+ hard_tokens: null
241
+ ```
242
+
243
+ | Key | Type | Default | Description |
244
+ |---|---|---|---|
245
+ | `soft_tokens` | int or null | `null` | When a run's total first reaches it, chat gets one line and the log gets `budget.soft_limit`. Once per session. |
246
+ | `hard_tokens` | int or null | `null` | When a run's total reaches it, the agent is stopped and the run is recorded as failed with the reason `budget: used N tokens, hard limit M`. Must be at least `soft_tokens`. |
247
+ | `rules` | list | `[]` | Other limits by issue label. Each rule has `labels` (a non-empty list) and optionally `soft_tokens` and `hard_tokens`. Labels match without regard to case. A size is a label (`size:S`), so this covers sizes too. A limit a rule leaves out comes from the top level; one set to `null` is no limit. |
248
+
249
+ The count is input tokens + cache writes + output tokens; cache reads are
250
+ recorded but not counted. The budget is for the whole issue session, across
251
+ resumes and CI fix rounds. Unknown keys and a hard limit below the soft one
252
+ (after a rule inherits from the top level) are refused when the config loads.
253
+ Only the `claude` backend is measured. Runs with no issue (secops) get the
254
+ top-level limits for each spawn.
255
+
220
256
  ### What the agent can reach (#219)
221
257
 
222
258
  The dev and task agents run **without GitHub access**. ctrlrelay starts them
@@ -290,6 +326,14 @@ your user. With `sandbox: "none"` a deliberately hostile agent can read
290
326
  and use them by hand, and it can write anywhere your user can, including your
291
327
  dotfiles and ctrlrelay's install. On macOS the login keychain is reachable
292
328
  whatever the environment says. `sandbox: "bwrap"` closes this on Linux.
329
+ macOS has no sandbox yet, so a macOS node should only take issues from
330
+ repositories you trust.
331
+
332
+ So that an unconfined node is never a surprise (#305), each machine's mode is
333
+ in `/api/status` as `node.sandbox` (`"none"` or `"bwrap"`; `null` for a peer on
334
+ an older version), its card on the status page says `sandbox off` in the
335
+ warning colour when it is `"none"`, and the poller logs `poller.sandbox_off`
336
+ once at start.
293
337
 
294
338
  **`sandbox: "bwrap"` (#236).** The dev and task agents run under bubblewrap
295
339
  in a read-only copy of the machine (the secops agent, which needs your GitHub
@@ -545,6 +589,29 @@ web:
545
589
  The page has no login and shows repository names, issue titles and the
546
590
  questions agents asked. **Never expose it to the internet.**
547
591
 
592
+ ## intake
593
+
594
+ The order each poll's new issues run in (#356). A poll gathers one batch of
595
+ new issues and works through it before the next poll; this sets the order of
596
+ that batch.
597
+
598
+ ```yaml
599
+ intake:
600
+ priority_labels: ["P0", "P1", "P2", "P3"]
601
+ ```
602
+
603
+ | Key | Type | Default | Description |
604
+ |---|---|---|---|
605
+ | `priority_labels` | list of strings | `["P0", "P1", "P2", "P3"]` | Issues carrying an earlier label in this list run first; labels are compared without case, and an issue carrying several runs at its earliest. Issues carrying none of them run last. Within the same label, the oldest issue runs first (by when it was opened, then by number). An issue whose creation time cannot be read runs after the others with its label. `[]` keeps the oldest-first order only. Each label must be a non-empty string and listed once. |
606
+
607
+ Each poll that found new issues logs the order it will run them in, as one
608
+ `poll.batch.order` event (`order`: `owner/repo#N` in run order). The order is
609
+ fixed when the poll ends: an urgent issue opened while a batch runs waits for
610
+ the next poll. Each issue is still read again just before it starts, and an
611
+ issue blocked by an open issue is still held until the blocker closes; those
612
+ can skip an issue, never reorder the batch. The order applies to this machine
613
+ only, not across machines.
614
+
548
615
  ## claims
549
616
 
550
617
  How machines that share one GitHub account keep off each other's issues.
@@ -719,9 +786,11 @@ and ask the operator), or `never` (skip).
719
786
  | `include_labels` | `[]` | Issue labels that opt an issue **into** the dev pipeline regardless of who is (or isn't) assigned. See [include_labels](#reposautomationinclude_labels) below. |
720
787
  | `require_labels` | `[]` | Issue labels that gate the plain-assignment trigger: when set, assignment alone is no longer enough — the issue must also carry one of these labels. See [require_labels](#reposautomationrequire_labels) below. |
721
788
  | `ci_wait_timeout_seconds` | `600` | Unused since #219 (the agent no longer waits on CI; ctrlrelay does). Still accepted so existing configs load. See [ci_wait_timeout_seconds](#reposautomationci_wait_timeout_seconds) below. |
789
+ | `require_proof` | `false` | A dev run's PR goes ready only when the relay itself proved the change: a test that fails on the base and passes on the branch, and no weakened tests. See [require_proof](#reposautomationrequire_proof) below. |
722
790
 
723
- The current secops and dev pipelines read these settings to bias their prompts
724
- to the agent — they're not enforced by hard-coded checks.
791
+ The current secops and dev pipelines read the policy settings to bias their
792
+ prompts to the agent — they're not enforced by hard-coded checks.
793
+ `require_proof` is the exception: the relay enforces it.
725
794
 
726
795
  ### repos[].automation.operator_prs
727
796
 
@@ -922,13 +991,120 @@ repos:
922
991
  - This does not change the overall session timeout (`agent.default_timeout_seconds`,
923
992
  default 1800s) — it only bounds the one `ci wait` call.
924
993
 
994
+ ### repos[].automation.require_proof
995
+
996
+ Off by default (#221). Green CI says a change did not break what was already
997
+ tested; it does not say the issue was fixed. With `require_proof` the relay
998
+ checks real evidence before it hands a dev run's PR over as ready.
999
+
1000
+ The agent names its proof in its DONE checkpoint:
1001
+
1002
+ ```json
1003
+ "proof": {"command": ["uv", "run", "--offline", "pytest", "tests/test_x.py::test_y"],
1004
+ "tests": ["tests/test_x.py::test_y"]}
1005
+ ```
1006
+
1007
+ After CI is green, the relay runs `command` twice, as an argument list with
1008
+ no shell, each time in a fresh copy of committed content (never the agent's
1009
+ worktree):
1010
+
1011
+ - on the commit it pushed, where it must pass;
1012
+ - on the base commit (the merge base with the default branch) with only the
1013
+ branch's changes to test files applied, where it must fail.
1014
+
1015
+ Each run has a 10-minute limit and never gets the operator's GitHub token.
1016
+ When the agent ran under `agent.sandbox: bwrap`, the proof runs under the
1017
+ same kind of bwrap confinement, with no network and only the copy and the
1018
+ agent's cache dir writable. When the agent ran with `sandbox: none`, it
1019
+ already ran arbitrary code as this user, so the proof runs unconfined too.
1020
+ The copies have no untracked files, so the command must set up what it needs
1021
+ offline.
1022
+
1023
+ A run counts only with evidence that the named tests ran. For a pytest
1024
+ command (`pytest`, `uv run pytest`, `python -m pytest`) the relay adds
1025
+ `--junitxml` and reads the report: on the branch each named test must have
1026
+ passed, on the base each must have failed or errored. pytest exiting 2 to 5
1027
+ (a collection error, a usage error, no tests collected, or `uv run` failing
1028
+ to start it), no report, or a named test missing from it is no evidence.
1029
+ One exception, on the base only: a collection error in the file of a named
1030
+ test (a new test file that imports code only the branch has) counts as
1031
+ failing before, recorded as "could not import on base". A collection error
1032
+ only in other files does not. For any other runner the command must exit 0 on the
1033
+ branch and 1 on the base, and each named test (the part after the last
1034
+ `::`) must appear in its output.
1035
+
1036
+ There are three outcomes:
1037
+
1038
+ | Outcome | When |
1039
+ |---|---|
1040
+ | `proven` | The named tests failed on the base and passed on the branch. |
1041
+ | `failed` | The named tests ran on the branch and did not pass; they ran on the base and passed, so they prove nothing; the diff has no real change (empty or whitespace only); or the diff weakens tests. |
1042
+ | `not proven` | No proof was named, the proof is malformed or names a test outside the test files, there is no evidence the named tests ran (a setup, dependency or network failure, a usage error, a collection error), the command could not start, it timed out, or the branch moved after the proof ran. |
1043
+
1044
+ Only `proven` lets the PR go ready. Two exemptions, recorded as `not
1045
+ required`: a diff that only touches docs (`*.md`, `*.rst`, `*.adoc`,
1046
+ `docs/**`), and a repo with `require_proof: false`.
1047
+
1048
+ **The test weakening scan** reads the diff's test files (`tests/`, `test_*.py`,
1049
+ `*_test.py`, `conftest.py`, `*.test.ts`, `*.spec.js`, `__tests__/` and the
1050
+ like) and the test runner's config. These are blockers:
1051
+
1052
+ - a deleted test file, in any language;
1053
+ - a test file renamed to a name the runner does not collect, or moved out
1054
+ of the tests;
1055
+ - a removed test function;
1056
+ - an added skip, xfail or `.only` marker: decorators, a module-level
1057
+ `pytestmark`, `pytest.importorskip`, unittest skips, and JS `.skip`,
1058
+ `xit`, `it.only`;
1059
+ - an added line in runner config that can deselect or skip: `addopts`,
1060
+ `--deselect`, `-k`, `testpaths`, `norecursedirs`, `collect_ignore` (in
1061
+ `pytest.ini`, `pyproject.toml`, `setup.cfg`, `tox.ini`, `conftest.py`),
1062
+ and jest's `testPathIgnorePatterns`, `testMatch`, `testRegex`;
1063
+ - a bare `return` added as the first statement of an existing Python test;
1064
+ - an assert line removed from a diff hunk that adds no assert.
1065
+
1066
+ An assert line removed from a hunk that also adds one is an edit. The scan
1067
+ cannot tell a corrected expectation from a loosened one, so it is shown as a
1068
+ warning on the PR and does not block. Lines are matched by text, so a test or
1069
+ an assert moved to another file is not a hit. Any blocker makes the run
1070
+ `failed`, unless the plan's acceptance criteria say the change is intended
1071
+ with an item `Test removal intended: <why>`. Python and JS/TS are read; a
1072
+ test file in another language makes the scan report `not checked`, never
1073
+ `clean`.
1074
+
1075
+ If no test can show the change, the plan's acceptance criteria can say `No
1076
+ test possible: <why>`. The run is still `not proven` and the PR stays a
1077
+ draft for a person to decide; the PR comment says why.
1078
+
1079
+ **What the PR shows.** One comment, edited in place on a later run: the
1080
+ outcome and why, the proving test, the command, the fail-before and
1081
+ pass-after results with a short redacted tail of each, and any scan hits.
1082
+ A run that is not proven fails like any required step after the PR exists
1083
+ (see [below](#reposteps)): the PR stays a draft, and chat gets `❌ Failed on
1084
+ #N: PR #M held as a draft: not proven …`. A PR GitHub would not open as a
1085
+ draft gets a comment telling readers not to merge it.
1086
+
1087
+ With `require_proof` on, the PR is opened as a draft, as with
1088
+ `steps.review: required`. When both are on, the review step marks it ready
1089
+ after the proof passed and the review posted. Right before it is marked
1090
+ ready, the relay reads the PR's head from GitHub: if it is not the commit the
1091
+ proof ran on, or cannot be read, the run is `not proven` and the PR stays a
1092
+ draft.
1093
+
1094
+ Turn it on only for a repo whose tests can run offline in a fresh copy of
1095
+ the commit. With it off (the default) the agent is not asked for a proof,
1096
+ the PR is opened as before, and no proof comment is posted.
1097
+
925
1098
  ### repos[].steps
926
1099
 
927
1100
  The dev pipeline does its work in a fixed order: **plan** (an optional
928
1101
  planning session, off unless asked for), **code** (the agent run and
929
1102
  any questions it asks), **publish** (the relay pushes the branch and opens the
930
1103
  pull request), **verify** (wait for CI and mergeability, asking the agent to
931
- fix what fails, up to `max_fix_attempts` rounds) and **review** (the
1104
+ fix what fails, up to `max_fix_attempts` rounds), **proof** (the relay runs
1105
+ the agent's proving test before and after; switched by
1106
+ [`automation.require_proof`](#reposautomationrequire_proof), not here) and
1107
+ **review** (the
932
1108
  configured reviewer reads the pushed commit and posts its findings). The order
933
1109
  is not configurable. `steps` says how strict each step is for this repo.
934
1110
  Only the dev pipeline reads it. The task and secops pipelines have no
@@ -976,7 +1152,10 @@ that can each be checked by a command or by reading the diff. The relay then:
976
1152
  outside the worktree, so it is never committed;
977
1153
  - posts the criteria list as one comment on the issue;
978
1154
  - adds the plan to the code session's prompt under `## Plan`, telling the
979
- agent the criteria are what "done" means.
1155
+ agent the criteria are what "done" means;
1156
+ - reads two items from the criteria for the proof step: `Test removal
1157
+ intended: <why>` and `No test possible: <why>` (see
1158
+ [require_proof](#reposautomationrequire_proof)).
980
1159
 
981
1160
  If the issue is too vague to plan, the planning session asks one question,
982
1161
  through the same chat loop the code session uses. No code session runs and no
@@ -1047,7 +1226,7 @@ exists.** The ordinary failure path, unchanged:
1047
1226
  - chat gets `❌ Failed on #N: …`, never `✅ PR ready`.
1048
1227
 
1049
1228
  A resumed session (an answer that arrived after the run stopped to ask) goes
1050
- through the same publish and verify steps. It did not run the review before
1229
+ through the same publish, verify and proof steps. It did not run the review before
1051
1230
  these switches, and with `review` unset or `on` it still does not; with
1052
1231
  `review: required` it does.
1053
1232
 
@@ -1101,8 +1280,10 @@ schedules:
1101
1280
  Once a week, each node sends one chat message with its own numbers for
1102
1281
  the last 7 days, the same ones its status page shows: runs started, done,
1103
1282
  failed, blocked and stuck, the success rate, the median time to PR and to
1104
- merge, and how many issues the relay finished were reopened. A number the
1105
- node cannot read is written `unknown`, with the reason, never 0.
1283
+ merge, how many issues the relay finished were reopened, and the median
1284
+ tokens per run (with the cost, when the agent reported one) over the runs
1285
+ that ended with their usage recorded. A number the node cannot read is
1286
+ written `unknown`, with the reason, never 0.
1106
1287
 
1107
1288
  The daemon checks every five minutes. It sends at the first check after
1108
1289
  `day` at `hour`:00 that finds nothing delivered since then, so a node that
@@ -304,6 +304,18 @@ Added in #247:
304
304
  |---|---|
305
305
  | `node` | This machine's own block: `name` (`node_id`); `usage`, the agent subscription's usage as the last run or probe read it: `status`, `read_at`, and for `five_hour` and `seven_day` each `{used (0 to 1), resets_at}`, or `"unknown"` for a window it could not read; the whole `usage` is `"unknown"` before any reading. `pause_at` is `usage.pause_at`, and `paused` is `{reason, until}` while the machine takes no new issues, else `null`. The page shows it in the **Usage** box. `node` is `null`, with a line in `errors`, only if reading it failed outright. |
306
306
 
307
+ Added in #223, on every `running` card (see [Run budgets](#run-budgets)):
308
+
309
+ | Field | What |
310
+ |---|---|
311
+ | `tokens_used` | Tokens the session has used so far, over all its spawns: input + cache writes + output, what the budget counts. `null` before anything was measured, on a backend that is not measured, or when a transcript row could not be read (then `reason` gives the number of rows and the floor). Never `0` for unknown. |
312
+ | `cache_read_tokens` | Cache reads, recorded but not counted. `null` as for `tokens_used`. |
313
+ | `cost_usd` | The sum of `total_cost_usd` the agent CLI reported at the end of each spawn. Information only. `null` until a spawn reported one. |
314
+ | `token_soft_limit`, `token_hard_limit` | The limits applied to this run. `null` when no limit applies or nothing was measured yet. |
315
+
316
+ The page shows them in a `tokens:` row on each running card; the count is in
317
+ the warning colour once it passes the soft limit.
318
+
307
319
  Added in #237: `node.github_api` is the account's GitHub API budget as this
308
320
  machine last read it: `read_at`, and for `core`, `search` and `graphql` each
309
321
  `{remaining, limit, resets_at, state}` with `state` one of `ok`, `low`, `out`,
@@ -340,6 +352,12 @@ Added in #307:
340
352
  | `node.config_fingerprint` | `{v, repos_hash, profiles, repos, schedules}`, `v` is `2`. `profiles` maps a profile hash to `{automation, steps}`, each a map of field name to a hash of its value; `repos` maps each repo name to its profile hash, so repos with the same configuration share one profile; `repos_hash` is the hash of the sorted, lowercased repo names; `schedules` maps each `schedules` field to a hash. Hashes and repo names only, never a value. `null` if it could not be built. A peer's fingerprint is unknown unless every hash is 16 lowercase hex characters, `repos_hash` is the hash of its own repo names, each profile key is the hash of that profile, and each repo names a profile it carries. A field's hash cannot be checked against its value, which is never sent. |
341
353
  | `fleet.peers[].drift` | `{status, reason, only_here, only_there, fields, lines}`. `status` is `same`, `differs` or `unknown` (with `reason`: not read yet, not reachable, the peer sends no fingerprint in this format, or the comparison failed); `fields` maps a field path such as `automation.exclude_labels` to the repos it differs on; `lines` is what the page shows. Leaves out `fleet.expected_drift`. The peer's own fingerprint is not repeated in `fleet.peers[].node`. |
342
354
 
355
+ Added in #305:
356
+
357
+ | Field | What |
358
+ |---|---|
359
+ | `node.sandbox` | This machine's `agent.sandbox`: `"none"` (the agent runs with the user's full access) or `"bwrap"`. In `fleet.peers[].node` it is `null` when the peer is on an older version or sent anything else, which means unknown, never off. The page shows `sandbox off` in the warning colour for `"none"`. |
360
+
343
361
  Added in #230: `numbers` is how this machine's runs went, for the last 7 and
344
362
  the last 30 days (`numbers.windows`, each with `days`, `since`/`since_ts`,
345
363
  `until`/`until_ts`). The page shows it in the **Numbers** box, with a table
@@ -354,7 +372,7 @@ control plane. Every field is defined in `src/ctrlrelay/web/numbers.py`.
354
372
  | `time_to_pr_s`, `time_to_merge_s` | `{median, n}`: seconds from the run's start to its first `pr_opened` (or `merged`) event, over the `n` runs that have one. Events stamped after now are not read. `null` when events cannot be read, or when a run in the window started before the oldest event still kept: its PR event may have been deleted. The daemon deletes events older than `web.history_days` (7 by default), so with the default the 30-day times are `null`. **To get them, set `web.history_days` to 30**; they appear once the events kept reach back past every run in the window (up to 30 days after the change, since deleted events do not come back). |
355
373
  | `came_back` | Distinct issues dispatched again in the window after an earlier run on the same issue had ended `done`. The window's `came_back_issues` lists them (`repo`, `issue_number`, `url`; at most 50). |
356
374
  | `reopened` | Issues the relay finished (it saw their PR merge and closed them) that were reopened on GitHub in the window, dated by GitHub's `reopened` event. Counted whether or not the relay picks the issue up again; one per finish. The window's `reopened_issues` lists them. The poller notices a reopen only for an issue its search returns (open and assigned to the operator, or wearing a trigger label), with no extra GitHub call unless a finished issue shows up open. Finishes are recorded in the state database from this version on, plus those still in the kept `merged` events when the table is created. `null` on a database the daemon has not migrated yet. A `reopened` event goes to the feed when one is recorded. |
357
- | `cost_per_run` | Always `null` for now: cost per run is not recorded yet (#223). The window's `unavailable` says this, and why any other field is `null`. |
375
+ | `cost_per_run` | What the runs that ended (`done` or `failed`) in the window used, from the token usage the run budget records on each run (#223, see [Run budgets](#run-budgets)): `{tokens, cost_usd, runs_without_usage}`. `tokens` is `{median, total, n}` over the `n` ended runs whose usage was recorded and read in full, counted as the budget counts (input + cache writes + output; cache reads left out). `cost_usd` is `{median, total, n}` in US dollars over those of them whose agent reported a cost (`total_cost_usd`, information only), or `null` when none did. `runs_without_usage` is how many ended runs are left out: no usage recorded (runs from before #223, or a backend that is not measured, such as `opencode`) or usage that could not be read in full. They are never counted as 0. Blocked and running runs are left out, since their count still grows. `null` when no ended run in the window has its usage measured, or on a database the daemon has not migrated yet; the window's `unavailable` says which, and why any other field is `null`. |
358
376
  | `stuck` | Runs the relay stopped as stuck (#224), also counted in `failed`. `null` only on a database the daemon has not migrated yet. |
359
377
 
360
378
  `numbers` is `null`, with a line in `errors`, when the sessions cannot be read.
@@ -712,6 +730,57 @@ A stopped run is recorded as `failed` with a `stuck_reason` in the
712
730
  the reason, and chat gets `🔁 Stuck on #<n>, stopped: <reason>`. The status
713
731
  page's numbers count these runs in `stuck`.
714
732
 
733
+ ## Run budgets
734
+
735
+ Each run can have a token budget (#223), set in
736
+ [`agent.budget`]({{ '/configuration/' | relative_url }}#agentbudget). There is no
737
+ limit until one is set.
738
+
739
+ - **What is counted.** Every 30 seconds ctrlrelay adds up the usage in the
740
+ agent's live transcript, sub-agents included: input tokens, cache writes
741
+ and output tokens. Cache reads are recorded but not counted. One API
742
+ message written as several rows is counted once.
743
+ - **Per session, not per spawn.** A dev or task run spawns the agent more
744
+ than once (the first run, resumes after a question, CI fix rounds). They
745
+ all count against the same budget, because each spawn starts from what the
746
+ session row already holds.
747
+ - **Soft limit.** The first time the total passes it, chat gets one line
748
+ (`💰 #<n> (<repo>) has used <N> tokens, past its soft limit ...`) and the
749
+ log gets `budget.soft_limit`. Once per session.
750
+ - **Hard limit.** The agent is stopped through the same path as a stuck run.
751
+ The run is recorded as `failed` with `stuck_reason` set to
752
+ `budget: used <N> tokens, hard limit <M>`, its summary starts with
753
+ `Stopped:`, the issue comment gives the reason, and chat gets
754
+ `💸 Over budget on #<n>, stopped: <reason>`. A checkpoint the agent wrote
755
+ just before the stop is not used: the work is not handed over as ready.
756
+ When no pull request exists yet, the unfinished work is not saved to a
757
+ branch (only a timeout does that). The status page's numbers count the
758
+ run in `failed`, not in `stuck`.
759
+ - **A stop after the PR was opened** (over budget in a CI fix round, or
760
+ stuck there): the PR is put back to draft and kept with the work so far,
761
+ no merge watcher is started for it, and chat and the issue comment say
762
+ `PR #<n> was kept as a draft with the work so far.` If GitHub refuses the
763
+ draft, a "Do not merge" comment goes on the PR instead, and the messages
764
+ say so.
765
+ - **A floor, not an exact bill.** Only API calls that write an assistant
766
+ row to the transcript are counted; calls the CLI makes on its own without
767
+ one (for example, short helper calls) are not. The count can be a little
768
+ under what the subscription was charged.
769
+ - **Unknown is not zero.** A transcript row whose usage cannot be read adds
770
+ nothing and is counted as unreadable; the log gets `budget.usage_unreadable`
771
+ and the page shows the total as unknown. What could be read is still a
772
+ true floor, so a run is stopped only when that floor reaches the hard limit.
773
+ An unreadable row on its own never stops a run.
774
+ - **What is stored.** `sessions.usage_tokens` is the counted total (a floor
775
+ when rows were unreadable) and `sessions.usage_detail` holds the breakdown,
776
+ the unreadable row count, the cost and the limits applied, as JSON.
777
+ `cost_usd` is what the agent CLI's final `result` event reported
778
+ (`total_cost_usd`), summed over the session's spawns; it is information
779
+ only.
780
+ - **Backends.** Only the `claude` backend writes a transcript ctrlrelay can
781
+ read. A run on `opencode` is not measured; with a limit set, the log gets
782
+ `dispatcher.budget.unmeasured` and nothing is enforced.
783
+
715
784
  ## When to restart
716
785
 
717
786
  | You changed... | Restart... |
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ctrlrelay"
3
- version = "0.23.0"
3
+ version = "0.24.0"
4
4
  description = "Local-first orchestrator for headless coding agents across multiple GitHub repos"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"