orbi-cli 0.7.53__tar.gz → 0.7.54__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 (306) hide show
  1. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/PKG-INFO +1 -1
  2. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/pyproject.toml +1 -1
  3. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/__init__.py +1 -1
  4. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/amend_command.py +9 -2
  5. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/answer.py +2 -2
  6. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/claim.py +111 -78
  7. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/delivery_labels.py +75 -90
  8. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/draft.py +70 -6
  9. orbi_cli-0.7.54/src/orbi/draft_validate.py +48 -0
  10. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/example_config.toml +12 -4
  11. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/extensions/draft_tools.ts +117 -11
  12. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/failure_report.py +1 -1
  13. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/github_feedback.py +9 -12
  14. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/implementation_delivery.py +6 -1
  15. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/journal.py +1 -0
  16. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/language_terms.py +9 -0
  17. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/merge_exec.py +19 -4
  18. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/milestone.py +44 -32
  19. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/notify.py +3 -4
  20. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/notify_text.py +6 -2
  21. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/progress.py +19 -0
  22. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/release_closeout.py +5 -6
  23. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/release_run.py +2 -3
  24. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/repo_config.py +20 -20
  25. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/restart_scan.py +10 -11
  26. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/resume_scan.py +17 -18
  27. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/resume_verification.py +5 -8
  28. orbi_cli-0.7.54/src/orbi/review_ci_status.py +42 -0
  29. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/review_merge.py +43 -44
  30. orbi_cli-0.7.54/src/orbi/review_wait.py +298 -0
  31. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/run_state.py +17 -88
  32. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/runner.py +22 -21
  33. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/runner_health.py +66 -66
  34. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/suggest.py +8 -5
  35. orbi_cli-0.7.54/src/orbi/waiting_checks.py +167 -0
  36. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi_cli.egg-info/PKG-INFO +1 -1
  37. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi_cli.egg-info/SOURCES.txt +7 -2
  38. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_amend_command.py +22 -1
  39. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_apply_label_patch.py +7 -7
  40. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_delivery.py +83 -20
  41. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_release.py +4 -2
  42. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_runner_milestone.py +39 -4
  43. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_runner_outcome.py +6 -2
  44. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_runner_tickets.py +3 -1
  45. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_constitution.py +31 -0
  46. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_coverage_gate.py +8 -5
  47. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_delivery_labels.py +32 -22
  48. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_docs_i18n.py +7 -27
  49. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_docs_labels.py +57 -31
  50. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_docs_site.py +7 -26
  51. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_draft.py +115 -2
  52. orbi_cli-0.7.54/tests/test_draft_validate.py +150 -0
  53. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_github.py +10 -7
  54. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_github_fakes.py +4 -2
  55. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_human_review.py +25 -15
  56. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_notify.py +16 -2
  57. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_progress_wiring.py +29 -3
  58. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_release_docs_workflow.py +30 -0
  59. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_release_extraction.py +4 -2
  60. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_repo_config.py +41 -15
  61. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_resume_e2e.py +19 -10
  62. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_resume_pr.py +58 -16
  63. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_review_merge.py +115 -59
  64. orbi_cli-0.7.54/tests/test_review_waiting.py +469 -0
  65. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_runner_health.py +44 -0
  66. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_suggest.py +6 -2
  67. orbi_cli-0.7.54/tests/test_waiting_checks.py +313 -0
  68. orbi_cli-0.7.53/tests/test_ci_failure_issue_workflow.py +0 -222
  69. orbi_cli-0.7.53/tests/test_ci_failure_triage.py +0 -1597
  70. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/LICENSE +0 -0
  71. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/README.md +0 -0
  72. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/docs/licenses/sustainable-use-license.md +0 -0
  73. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/setup.cfg +0 -0
  74. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/acceptance_section.py +0 -0
  75. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/base_ci_fix.py +0 -0
  76. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/base_ci_red.py +0 -0
  77. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/blocked_comment.py +0 -0
  78. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/blocked_record.py +0 -0
  79. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/blocked_scan.py +0 -0
  80. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/body_steering.py +0 -0
  81. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/branch_reclaim.py +0 -0
  82. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/check_permission.py +0 -0
  83. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/checks.py +0 -0
  84. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/claim_race.py +0 -0
  85. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/clarify.py +0 -0
  86. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/clarify_proposal.py +0 -0
  87. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/clarify_stop.py +0 -0
  88. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/cli.py +0 -0
  89. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/cli_commands.py +0 -0
  90. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/cli_doctor.py +0 -0
  91. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/cli_parser.py +0 -0
  92. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/cli_source.py +0 -0
  93. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/cli_status.py +0 -0
  94. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/cli_ticket_command.py +0 -0
  95. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/command_line.py +0 -0
  96. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/comment_kind.py +0 -0
  97. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/comment_rest_id.py +0 -0
  98. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/comment_trust.py +0 -0
  99. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/config.py +0 -0
  100. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/config_hint.py +0 -0
  101. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/delivery_comment.py +0 -0
  102. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/delivery_push.py +0 -0
  103. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/delivery_scene.py +0 -0
  104. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/draft_cli.py +0 -0
  105. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/draft_document.py +0 -0
  106. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/draft_marker.py +0 -0
  107. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/engine_source.py +0 -0
  108. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/extensions/clarify_verdict.ts +0 -0
  109. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/failure.py +0 -0
  110. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/failure_evidence.py +0 -0
  111. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/gh_response.py +0 -0
  112. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/git_identity.py +0 -0
  113. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/git_transport.py +0 -0
  114. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/github.py +0 -0
  115. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/gitops.py +0 -0
  116. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/human_review.py +0 -0
  117. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/language.py +0 -0
  118. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/language_failure.py +0 -0
  119. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/language_terms_criteria.py +0 -0
  120. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/language_terms_fix.py +0 -0
  121. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/launchd_deploy.py +0 -0
  122. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/merge_blocked.py +0 -0
  123. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/merge_gate.py +0 -0
  124. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/merge_handoff.py +0 -0
  125. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/milestone_command.py +0 -0
  126. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/milestone_errors.py +0 -0
  127. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/ops_delivery.py +0 -0
  128. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pi_activity.py +0 -0
  129. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pi_command.py +0 -0
  130. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pi_exec.py +0 -0
  131. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pi_idle.py +0 -0
  132. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pi_process.py +0 -0
  133. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pi_recovery.py +0 -0
  134. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pi_session.py +0 -0
  135. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pi_stream_log.py +0 -0
  136. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pilot_setup.py +0 -0
  137. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pilot_slots.py +0 -0
  138. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/plan_milestone.py +0 -0
  139. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pr_head_sync.py +0 -0
  140. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/pr_verification.py +0 -0
  141. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/progress_display.py +0 -0
  142. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/progress_outcome.py +0 -0
  143. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/progress_summary.py +0 -0
  144. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/provider_balance.py +0 -0
  145. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/question.py +0 -0
  146. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/recoverable_failure.py +0 -0
  147. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/release.py +0 -0
  148. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/release_comments.py +0 -0
  149. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/release_declaration.py +0 -0
  150. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/release_git.py +0 -0
  151. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/release_notes.py +0 -0
  152. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/requeue.py +0 -0
  153. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/review_rounds.py +0 -0
  154. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/review_verdict.py +0 -0
  155. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/run_fields.py +0 -0
  156. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/runner_marker.py +0 -0
  157. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/runner_source.py +0 -0
  158. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/scene.py +0 -0
  159. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/scheduler.py +0 -0
  160. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/scheduler_units.py +0 -0
  161. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/session_command.py +0 -0
  162. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/setup_checks.py +0 -0
  163. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/setup_config.py +0 -0
  164. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/source_pool.py +0 -0
  165. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/split_apply.py +0 -0
  166. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/split_command.py +0 -0
  167. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/status_observe.py +0 -0
  168. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/steering.py +0 -0
  169. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/stop_comment.py +0 -0
  170. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/stopped_scans.py +0 -0
  171. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/systemd_deploy.py +0 -0
  172. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/terminal_stops.py +0 -0
  173. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/tick_reads.py +0 -0
  174. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/ticket_command.py +0 -0
  175. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/ticket_command_registry.py +0 -0
  176. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/ticket_criteria.py +0 -0
  177. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/user_summary.py +0 -0
  178. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi/worktree_retention.py +0 -0
  179. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi_cli.egg-info/dependency_links.txt +0 -0
  180. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi_cli.egg-info/entry_points.txt +0 -0
  181. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/src/orbi_cli.egg-info/top_level.txt +0 -0
  182. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_agents_md.py +0 -0
  183. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_answer.py +0 -0
  184. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_base_branch_failure.py +0 -0
  185. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_base_ci_red.py +0 -0
  186. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_blocked_comment.py +0 -0
  187. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_body_steering.py +0 -0
  188. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_adapters.py +0 -0
  189. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_pi.py +0 -0
  190. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_preflight.py +0 -0
  191. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_runner_claim_resume.py +0 -0
  192. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_runner_failure_report.py +0 -0
  193. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_runner_main.py +0 -0
  194. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_runner_prompt.py +0 -0
  195. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_runner_reconcile.py +0 -0
  196. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_bootstrap_runner_session.py +0 -0
  197. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_branch_reclaim.py +0 -0
  198. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_check_permission.py +0 -0
  199. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_ci_macos_workflow.py +0 -0
  200. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_ci_workflow.py +0 -0
  201. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_claim_race.py +0 -0
  202. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_clarify.py +0 -0
  203. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_claude_plugin.py +0 -0
  204. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_cli_golden.py +0 -0
  205. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_cli_install.py +0 -0
  206. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_cli_milestone.py +0 -0
  207. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_cli_packaging.py +0 -0
  208. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_cli_source.py +0 -0
  209. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_cli_ticket_commands.py +0 -0
  210. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_command_receipt_contract.py +0 -0
  211. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_comment_identity.py +0 -0
  212. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_comment_readers_contract.py +0 -0
  213. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_comment_rest_id.py +0 -0
  214. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_comment_trust.py +0 -0
  215. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_concurrency_e2e.py +0 -0
  216. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_deliver_pr_fakes.py +0 -0
  217. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_delivery_branch_delete.py +0 -0
  218. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_delivery_scene.py +0 -0
  219. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_docker_docs.py +0 -0
  220. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_docker_entrypoint.py +0 -0
  221. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_docker_image_workflow.py +0 -0
  222. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_docs_issue_shapes.py +0 -0
  223. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_docs_mermaid.py +0 -0
  224. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_docs_releases.py +0 -0
  225. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_docs_safety_matrix.py +0 -0
  226. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_docs_single_source.py +0 -0
  227. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_draft_repo_view.py +0 -0
  228. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_engine_source.py +0 -0
  229. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_failure.py +0 -0
  230. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_failure_report.py +0 -0
  231. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_fix_needed_loop.py +0 -0
  232. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_gh_read_retry.py +0 -0
  233. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_gh_response.py +0 -0
  234. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_git_base_smoke.py +0 -0
  235. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_git_merge_smoke.py +0 -0
  236. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_git_network_retry.py +0 -0
  237. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_git_transport.py +0 -0
  238. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_gitops.py +0 -0
  239. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_gitops_fakes.py +0 -0
  240. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_import_graph.py +0 -0
  241. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_install_sh.py +0 -0
  242. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_issue_1367.py +0 -0
  243. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_issue_461.py +0 -0
  244. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_issue_template_config.py +0 -0
  245. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_journal.py +0 -0
  246. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_journal_events.py +0 -0
  247. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_launchd_deploy.py +0 -0
  248. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_license.py +0 -0
  249. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_merge_exec_extraction.py +0 -0
  250. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_message_language.py +0 -0
  251. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_milestone_command.py +0 -0
  252. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_ops_e2e.py +0 -0
  253. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_orbi.py +0 -0
  254. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_orbi_dashboard.py +0 -0
  255. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_orbi_exporter.py +0 -0
  256. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_patch_ratchet.py +0 -0
  257. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pi_activity.py +0 -0
  258. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pi_child_reap.py +0 -0
  259. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pi_command.py +0 -0
  260. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pi_exec.py +0 -0
  261. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pi_extensions.py +0 -0
  262. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pi_provider_templates.py +0 -0
  263. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pi_recovery.py +0 -0
  264. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pi_session.py +0 -0
  265. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pilot_setup.py +0 -0
  266. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pilot_slots.py +0 -0
  267. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pr_issue_link_workflow.py +0 -0
  268. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_pr_verification.py +0 -0
  269. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_prerequisite_check.py +0 -0
  270. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_progress.py +0 -0
  271. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_prompt_contract.py +0 -0
  272. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_public_contracts.py +0 -0
  273. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_public_helpers.py +0 -0
  274. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_publish_workflow.py +0 -0
  275. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_question.py +0 -0
  276. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_question_resume.py +0 -0
  277. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_release_ticket_templates.py +0 -0
  278. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_resume_continue_e2e.py +0 -0
  279. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_resume_other_executor.py +0 -0
  280. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_review_verdict.py +0 -0
  281. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_run_artifacts.py +0 -0
  282. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_run_fields.py +0 -0
  283. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_run_id_e2e.py +0 -0
  284. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_run_id_fixture.py +0 -0
  285. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_runner_config.py +0 -0
  286. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_runner_source_freshness.py +0 -0
  287. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_scene.py +0 -0
  288. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_scheduler.py +0 -0
  289. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_seam.py +0 -0
  290. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_setup_output_golden.py +0 -0
  291. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_size_ratchet.py +0 -0
  292. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_split_command.py +0 -0
  293. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_src_layout.py +0 -0
  294. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_status_observe.py +0 -0
  295. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_steering_review.py +0 -0
  296. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_suggest_repo_view.py +0 -0
  297. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_suite_hygiene.py +0 -0
  298. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_systemd_deploy.py +0 -0
  299. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_systemd_timer.py +0 -0
  300. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_tick_reads.py +0 -0
  301. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_ticket_command.py +0 -0
  302. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_ticket_command_registration.py +0 -0
  303. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_user_acceptance_contract.py +0 -0
  304. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_user_summary.py +0 -0
  305. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_versioned_comment_block.py +0 -0
  306. {orbi_cli-0.7.53 → orbi_cli-0.7.54}/tests/test_worktree_reclaim.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orbi-cli
3
- Version: 0.7.53
3
+ Version: 0.7.54
4
4
  Summary: Orbi — local AI development worker: claims GitHub Issues, runs Pi in isolated worktrees, and delivers PRs (GitHub Issues + labels are the only state store).
5
5
  Author: xqliu
6
6
  License-Expression: AGPL-3.0-only OR LicenseRef-Sustainable-Use-1.0
@@ -44,7 +44,7 @@ build-backend = "setuptools.build_meta"
44
44
 
45
45
  [project]
46
46
  name = "orbi-cli"
47
- version = "0.7.53"
47
+ version = "0.7.54"
48
48
  description = "Orbi — local AI development worker: claims GitHub Issues, runs Pi in isolated worktrees, and delivers PRs (GitHub Issues + labels are the only state store)."
49
49
  readme = "README.md"
50
50
  requires-python = ">=3.14"
@@ -18,4 +18,4 @@ the package would shadow the installed package for every process with
18
18
  the checkout root on sys.path. The direct-execution compatibility entry
19
19
  is `python3 -m orbi.cli` (development path only).
20
20
  """
21
- __version__ = "0.7.53"
21
+ __version__ = "0.7.54"
@@ -53,7 +53,9 @@ from orbi.acceptance_section import (
53
53
  render_acceptance,
54
54
  write_body,
55
55
  )
56
- from orbi.delivery_labels import NEEDS_DETAIL_LABEL, READY_LABEL, label_names
56
+ from orbi.delivery_labels import (
57
+ NEEDS_DETAIL_LABEL, READY_LABEL, has_delivery_state, label_names,
58
+ )
57
59
  from orbi.github import comment_issue, edit_issue, issue_view
58
60
  from orbi.ticket_command import (
59
61
  CommandSpec,
@@ -164,7 +166,12 @@ def _criteria_apply(
164
166
  body=appended_body(current, section),
165
167
  ),
166
168
  )
167
- if dispatch_label not in label_names(issue):
169
+ # The retry queues the ticket ONLY while nothing has started
170
+ # (Issue #2309): the claim removes the dispatch label, so its
171
+ # absence no longer means "not yet dispatched".
172
+ current_labels = label_names(issue)
173
+ if dispatch_label not in current_labels and not has_delivery_state(
174
+ current_labels):
168
175
  run_step(
169
176
  "add the dispatch label",
170
177
  lambda: edit_issue(
@@ -820,7 +820,7 @@ def refuse_superseded_merge(
820
820
 
821
821
  def stop_for_fix_round(
822
822
  number: int, *, repo: str, pr_number: int, reason: str, marker: str,
823
- language_code: str,
823
+ language_code: str, ready_label: str = READY_LABEL,
824
824
  ) -> None:
825
825
  """Send the delivery to a fix round: the Issue comment, then the label.
826
826
 
@@ -836,7 +836,7 @@ def stop_for_fix_round(
836
836
  )
837
837
  apply_label_patch(
838
838
  number, repo=repo, event=EVENT_FIX_NEEDED,
839
- current_labels=issue_labels(number, repo),
839
+ current_labels=issue_labels(number, repo), ready_label=ready_label,
840
840
  )
841
841
 
842
842
 
@@ -40,7 +40,7 @@ from orbi.restart_scan import (
40
40
  from orbi.resume_scan import (
41
41
  ResumeHooks, pick_awaiting_merge_delivery, pick_resumable_delivery,
42
42
  )
43
- from orbi import language, user_summary
43
+ from orbi import language, review_wait, user_summary
44
44
  from orbi.progress import run_marker
45
45
  from orbi.release import release_target_milestone
46
46
  from orbi.release_comments import _epic_audit, epic_audit_posted
@@ -454,9 +454,9 @@ def pick_issue(repo: str, active_milestone: str | None = None,
454
454
  held: frozenset = frozenset(),
455
455
  timeout: int | None = None,
456
456
  raise_on_read_failure: bool = False) -> dict | None:
457
- # A merged delivery keeps `ai-ready` + `ai-merged` on the (still
458
- # open) Issue; `ai-merged` is the success terminal state, so it is
459
- # excluded from the ready scan like every other delivery state.
457
+ # A merged delivery keeps `ai-merged` on the (still open) Issue;
458
+ # `ai-merged` is the success terminal state, so it is excluded from
459
+ # the ready scan like every other delivery state.
460
460
  # The scan fetches the ready queue (not just the first Issue) and
461
461
  # reads the native GitHub dependency per Issue: an
462
462
  # Issue with open blockers is skipped — no claim, no label change,
@@ -590,6 +590,89 @@ def pick_next_issue(
590
590
  return None
591
591
 
592
592
 
593
+ def _run_preclaim_sweeps(
594
+ repo: str, *, tick_run_id: str, repo_language: str,
595
+ milestone: str | None, dispatch_label: str, slot_dir: Path,
596
+ config: RunnerConfig | None, hooks: ResumeHooks,
597
+ ) -> None:
598
+ """The per-tick sweeps that run before the claim scans (bypasses).
599
+
600
+ Epic and Milestone reconciliation, the orphan-PR sweep and the three
601
+ automatic-recovery/stopped-ticket scans. Each is a pure bypass: a
602
+ broken GitHub query is journaled and never prevents the ordinary
603
+ delivery scans. Extracted from `pick_next_delivery` unchanged,
604
+ because the size ratchet (`tools/size_ratchet.py`) keeps that
605
+ function within its recorded ceiling (`claim.py::pick_next_delivery`).
606
+ """
607
+ # Epic reconciliation is a per-tick bypass: a broken GitHub query or
608
+ # mutation must never prevent the ordinary delivery scans.
609
+ try:
610
+ reconcile_open_epics(repo, tick_run_id, repo_language)
611
+ except Exception:
612
+ LOGGER.exception("epic_reconcile_failed repo=%s", repo)
613
+ # Milestone reconciliation intentionally follows the Epic sweep so a
614
+ # just-closed final Epic can make its Milestone eligible this tick.
615
+ # A classified 401/404 leaves a cross-process retry marker: systemd
616
+ # starts a fresh Runner for every timer tick, so process-local
617
+ # suppression would still issue and log the same failure every time.
618
+ milestone_state_dir = slot_dir.parent
619
+ if milestone_bookkeeping.milestone_reconcile_due(
620
+ milestone_state_dir, repo,
621
+ ):
622
+ try:
623
+ milestone_bookkeeping.reconcile_release_milestones(
624
+ repo, tick_run_id,
625
+ )
626
+ milestone_bookkeeping.clear_milestone_reconcile_failure(
627
+ milestone_state_dir, repo,
628
+ )
629
+ except milestone_bookkeeping.MilestoneReconcileError as exc:
630
+ milestone_bookkeeping.record_milestone_reconcile_failure(
631
+ milestone_state_dir, repo, exc,
632
+ )
633
+ except Exception:
634
+ LOGGER.exception("milestone_reconcile_failed repo=%s", repo)
635
+ # Orphan-PR reconciliation follows the same bypass
636
+ # pattern: a broken GitHub query must never prevent the ordinary
637
+ # delivery scans.
638
+ try:
639
+ reconcile_orphan_prs(
640
+ repo, tick_run_id, hooks=hooks,
641
+ language_code=repo_language,
642
+ status_url=config.status_url if config is not None else None,
643
+ )
644
+ except Exception:
645
+ LOGGER.exception("orphan_pr_reconcile_failed repo=%s", repo)
646
+ # The two automatic-recovery scans run BEFORE the resume scan: an
647
+ # `ai-blocked` Issue is terminal for every claim scan, and a
648
+ # recovered precondition must put it back on the resumable path in
649
+ # THIS tick — the missing check-read permission (Issue #1918), then
650
+ # the base-branch-red scan (Issue #1825). Bypasses like the sweeps
651
+ # above: a failed scan never prevents the ordinary delivery scans.
652
+ try:
653
+ check_permission.recover(repo)
654
+ except Exception:
655
+ LOGGER.exception("check_permission_scan_failed repo=%s", repo)
656
+ try:
657
+ base_ci_fix.recover(
658
+ repo, language_code=repo_language, milestone=milestone,
659
+ dispatch_label=dispatch_label,
660
+ )
661
+ except Exception:
662
+ LOGGER.exception("base_ci_red_scan_failed repo=%s", repo)
663
+ # The stopped-ticket scans: `ai-needs-detail` carries the typed
664
+ # in-ticket commands (`/orbi split`, Issue #1927) and the three
665
+ # delivery stops carry the stop answer (Issue #2221). A bypass like
666
+ # the two recovery scans above.
667
+ try:
668
+ stopped_scans.run(
669
+ repo, dispatch_label=dispatch_label,
670
+ language_code=repo_language,
671
+ )
672
+ except Exception:
673
+ LOGGER.exception("ticket_command_scan_failed repo=%s", repo)
674
+
675
+
593
676
  def pick_next_delivery(
594
677
  repos: Sequence[str], slot_dir: Path, max_concurrency: int,
595
678
  active_milestone: str | None = None, config: RunnerConfig | None = None,
@@ -621,6 +704,10 @@ def pick_next_delivery(
621
704
  resume states, and running an in-flight or opened-PR delivery to
622
705
  completion is never gated by a Milestone change.
623
706
  """
707
+ # Issue #2305: the deliveries this tick's opened-PR scan found waiting
708
+ # only for their own checks (an out-parameter of that scan, no second
709
+ # query). They are the bounded reason to hold the fresh claim below.
710
+ review_waiting: list[dict] = []
624
711
  # The sweep runs before a delivery is selected, so a fresh tick has no
625
712
  # task attempt yet. Give its auditable comments one tick-scoped marker;
626
713
  # a selected delivery will replace this binding with its own attempt id.
@@ -634,97 +721,43 @@ def pick_next_delivery(
634
721
  milestone, dispatch_label = _repo_scan_keys(
635
722
  config, repo, active_milestone,
636
723
  )
637
- # Epic reconciliation is a per-tick bypass: a broken GitHub query or
638
- # mutation must never prevent the ordinary delivery scans.
639
- try:
640
- reconcile_open_epics(repo, tick_run_id, repo_language)
641
- except Exception:
642
- LOGGER.exception("epic_reconcile_failed repo=%s", repo)
643
- # Milestone reconciliation intentionally follows the Epic sweep so a
644
- # just-closed final Epic can make its Milestone eligible this tick.
645
- # A classified 401/404 leaves a cross-process retry marker: systemd
646
- # starts a fresh Runner for every timer tick, so process-local
647
- # suppression would still issue and log the same failure every time.
648
- milestone_state_dir = slot_dir.parent
649
- if milestone_bookkeeping.milestone_reconcile_due(
650
- milestone_state_dir, repo,
651
- ):
652
- try:
653
- milestone_bookkeeping.reconcile_release_milestones(
654
- repo, tick_run_id,
655
- )
656
- milestone_bookkeeping.clear_milestone_reconcile_failure(
657
- milestone_state_dir, repo,
658
- )
659
- except milestone_bookkeeping.MilestoneReconcileError as exc:
660
- milestone_bookkeeping.record_milestone_reconcile_failure(
661
- milestone_state_dir, repo, exc,
662
- )
663
- except Exception:
664
- LOGGER.exception("milestone_reconcile_failed repo=%s", repo)
665
- # Orphan-PR reconciliation follows the same bypass
666
- # pattern: a broken GitHub query must never prevent the ordinary
667
- # delivery scans.
668
- try:
669
- reconcile_orphan_prs(
670
- repo, tick_run_id, hooks=hooks,
671
- language_code=repo_language,
672
- status_url=config.status_url if config is not None else None,
673
- )
674
- except Exception:
675
- LOGGER.exception("orphan_pr_reconcile_failed repo=%s", repo)
676
- # The two automatic-recovery scans run BEFORE the resume scan: an
677
- # `ai-blocked` Issue is terminal for every claim scan, and a
678
- # recovered precondition must put it back on the resumable path in
679
- # THIS tick — the missing check-read permission (Issue #1918), then
680
- # the base-branch-red scan (Issue #1825). Bypasses like the sweeps
681
- # above: a failed scan never prevents the ordinary delivery scans.
682
- try:
683
- check_permission.recover(repo)
684
- except Exception:
685
- LOGGER.exception("check_permission_scan_failed repo=%s", repo)
686
- try:
687
- base_ci_fix.recover(
688
- repo, language_code=repo_language, milestone=milestone,
689
- dispatch_label=dispatch_label,
690
- )
691
- except Exception:
692
- LOGGER.exception("base_ci_red_scan_failed repo=%s", repo)
693
- # The stopped-ticket scans: `ai-needs-detail` carries the typed
694
- # in-ticket commands (`/orbi split`, Issue #1927) and the three
695
- # delivery stops carry the stop answer (Issue #2221). A bypass like
696
- # the two recovery scans above.
697
- try:
698
- stopped_scans.run(
699
- repo, dispatch_label=dispatch_label,
700
- language_code=repo_language,
701
- )
702
- except Exception:
703
- LOGGER.exception("ticket_command_scan_failed repo=%s", repo)
724
+ _run_preclaim_sweeps(
725
+ repo, tick_run_id=tick_run_id, repo_language=repo_language,
726
+ milestone=milestone, dispatch_label=dispatch_label,
727
+ slot_dir=slot_dir, config=config, hooks=hooks,
728
+ )
704
729
  selected = pick_resumable_delivery(
705
730
  repo, slot_dir, max_concurrency,
706
731
  repo_dir=config.repo_dir if config is not None else None,
707
732
  hooks=hooks, language_code=repo_language,
708
733
  ready_label=dispatch_label,
709
734
  status_url=config.status_url if config is not None else None,
735
+ review_waiting=review_waiting,
710
736
  )
711
737
  if selected is not None:
712
738
  issue, scene = selected
713
739
  return repo, issue, scene
740
+ # The restart scan keys on ai-in-progress alone (Issue #2309: the claim
741
+ # removes the dispatch label), so it needs no repository policy read.
714
742
  for repo in repos:
715
- _, dispatch_label = _repo_scan_keys(config, repo, active_milestone)
716
743
  issue = pick_in_progress_issue(
717
744
  repo, slot_dir, max_concurrency,
718
- dispatch_label=dispatch_label,
719
745
  repo_dir=config.repo_dir if config is not None else None,
720
746
  )
721
747
  if issue is not None:
722
748
  return repo, issue, None
723
- for repo in repos:
724
- held = slot_held_deliveries(slot_dir, max_concurrency)
725
- issue = pick_ready_issue(repo, active_milestone, config, held)
726
- if issue is not None:
727
- return repo, issue, None
749
+ # Issue #2305: the bounded exception to Issue #1473 — a delivery that
750
+ # passed review and only waits for its checks keeps the last free slot.
751
+ # ONLY the fresh claim is held: the restart resume above and the
752
+ # awaiting-merge re-check below move as they always did, so an idle
753
+ # tick still merges a delivery a maintainer already answered.
754
+ if not review_wait.hold_fresh_claim(
755
+ review_waiting, slot_dir, max_concurrency):
756
+ for repo in repos:
757
+ held = slot_held_deliveries(slot_dir, max_concurrency)
758
+ issue = pick_ready_issue(repo, active_milestone, config, held)
759
+ if issue is not None:
760
+ return repo, issue, None
728
761
  # Issue #1745: a delivery waiting for a maintainer is re-checked LAST —
729
762
  # only on a tick where nothing above could move. Everything it needs
730
763
  # (the merge gate, the de-duplicated #1422 handoff) already exists; it
@@ -26,21 +26,13 @@ LIFECYCLE_STATES = frozenset({
26
26
  })
27
27
 
28
28
  # --- Scheduling metadata (NOT delivery lifecycle states) ---
29
- # `p0` and `bug` only order the ready pickup; `ai-epic` marks a
30
- # coordination Issue the claim scan never touches; `ai-release` routes
31
- # to the deterministic release state machine; `ai-ops-only` routes to
32
- # the full-execution ops session (shell/gh/network like a
33
- # dev ticket, the ops playbook instead of the dev one, the deliverable
34
- # is evidence posted to the Issue); `ai-content-only` marks a pure
35
- # content task (the content agent, no execution, the deliverable is
36
- # posted to the Issue); `ai-human-review` is the human acceptance gate
37
- # — the Runner never adds or removes it (the `ai-release`
38
- # shape: no event's patch names it in either direction);
39
- # `ai-needs-detail` is the thin-ticket clarification gate's terminal
40
- # state (Issue #1088) — the delivery is stopped and the Issue waits for
41
- # a human to add the missing pieces, exactly like `ai-blocked`. None of
42
- # them is a delivery state, and `blockedBy` (a GitHub relation, not a
43
- # label) is handled by the dependency scan.
29
+ # `p0`/`bug` order the ready pickup; `ai-epic` is a coordination
30
+ # Issue the claim never touches; `ai-release` routes to the release
31
+ # state machine; `ai-ops-only`/`ai-content-only` route the ops and
32
+ # content playbooks; `ai-human-review` is the human acceptance gate the
33
+ # Runner never adds or removes; `ai-needs-detail` is the thin-ticket
34
+ # gate's stop (Issue #1088). None of them is a delivery state, and
35
+ # `blockedBy` (a GitHub relation, not a label) is the dependency scan's.
44
36
  P0_LABEL = "p0"
45
37
  BUG_LABEL = "bug"
46
38
  EPIC_LABEL = "ai-epic"
@@ -50,6 +42,15 @@ OPS_LABEL = "ai-ops-only"
50
42
  HUMAN_REVIEW_LABEL = "ai-human-review"
51
43
  NEEDS_DETAIL_LABEL = "ai-needs-detail"
52
44
 
45
+ # Every non-lifecycle marker above. A repository's `dispatch_label` may
46
+ # be none of them either (Issue #2309): the claim REMOVES the queue
47
+ # label, so a marker that named one would be removed and re-added by the
48
+ # engine's own transitions.
49
+ NON_LIFECYCLE_LABELS = frozenset({
50
+ P0_LABEL, BUG_LABEL, EPIC_LABEL, RELEASE_LABEL, CONTENT_ONLY_LABEL,
51
+ OPS_LABEL, HUMAN_REVIEW_LABEL, NEEDS_DETAIL_LABEL,
52
+ })
53
+
53
54
  # --- Reading an Issue's label names ---
54
55
 
55
56
  def label_names(issue: dict) -> list[str]:
@@ -99,64 +100,59 @@ def label_patch(event: str, current_labels,
99
100
  ready_label: str = READY_LABEL) -> tuple[list[str], list[str]]:
100
101
  """Return the (to_add, to_remove) label patch for one event.
101
102
 
102
- A pure function of the event and the current labels: the same
103
- inputs always produce the same deterministic, idempotent patch.
104
- `ready_label` is the repository's RESOLVED queue entry — the same
105
- label the claim scanned (`dispatch_label`, default `ai-ready`) —
106
- so a custom-label repository's blocked/merged/waiting terminal never
107
- keeps a queue-label residue (Issue #1775).
103
+ A pure function of the event and the current labels (the same inputs
104
+ always produce the same deterministic, idempotent patch).
105
+
106
+ `ready_label` is the repository's RESOLVED queue entry (`dispatch_label`,
107
+ default `ai-ready`). It means "queued, work has not started" (Issue
108
+ #2309): the claim REMOVES it and adds `ai-in-progress`, and every
109
+ non-terminal stage event after it removes it too, so a ticket claimed
110
+ under the old rule converges without migration.
108
111
 
109
- - claim: add `ai-in-progress`, remove a stale `ai-fix-needed` from
110
- a resumed fix round and a stale `ai-needs-detail` left by the
111
- thin-ticket gate once the author re-readied the ticket (the
112
- `ai-ready` residue is kept).
113
- - pr_opened: add `ai-pr-opened`, remove `ai-in-progress`.
114
- - fix_needed: add `ai-fix-needed`, remove any stale opened-PR or
115
- in-flight label. A TERMINAL Issue (`ai-merged` or `ai-blocked`
116
- present) changes nothing: the delivery is over or waiting for a
117
- human, and a fix-needed label beside it would let a later terminal
118
- label removal resume an automatic fix nobody asked for (Issue
119
- #1786). The engine never sends this event to a terminal Issue; the
120
- CI triage does, from a late run on an already-merged PR.
121
- - merged: add `ai-merged`, remove the current delivery-state label
122
- (the one present in `current_labels`): `ai-pr-opened` for the
123
- normal PR delivery, `ai-in-progress` for the release state
124
- machine (which never enters the PR states). The resolved queue
125
- label (`ready_label`, default `ai-ready`) is cleared too: it is
126
- the queue entry, not a delivery state, so a merged Issue must not
127
- keep showing it (Issue #1526) — the terminal state is
128
- `ai-merged` ALONE.
129
- - blocked: add `ai-blocked`, remove every delivery-state label that
130
- is present AND the resolved queue label (`ready_label`), so the
131
- terminal state is `ai-blocked` ALONE — even in a repository
132
- whose claim label is a custom `dispatch_label` (Issue #1775).
133
- - awaiting_merge: add `ai-awaiting-merge`, remove every delivery-state
134
- label and the resolved queue label (a maintainer action is
135
- required before Orbi retries).
112
+ - claim: add `ai-in-progress`; remove the queue label and a stale
113
+ `ai-fix-needed` / `ai-needs-detail` (a resumed fix round, the
114
+ thin-ticket gate once the author re-readied the ticket).
115
+ - pr_opened / fix_needed: add the opened-PR state, remove
116
+ `ai-in-progress` and the queue label. A TERMINAL Issue
117
+ (`ai-merged` / `ai-blocked`) changes nothing on fix_needed: the
118
+ delivery is over or waiting for a human, and a fix-needed label
119
+ beside it would let a later terminal label removal resume an
120
+ automatic fix nobody asked for (Issue #1786).
121
+ - human_review_waiting: add NOTHING, clear `ai-in-progress` and the
122
+ queue label; the opened-PR anchor stays (the resume scan needs it).
123
+ - requeue / release_waiting: add the queue label back (the ticket is
124
+ queued again) and clear the in-flight/opened-PR labels.
125
+ - merged / blocked / awaiting_merge: the terminals — the resolved
126
+ queue label and every delivery state go, so `ai-merged` and
127
+ `ai-blocked` end ALONE (Issues #1526, #1775).
136
128
 
137
- An unknown event raises `ValueError` (fail fast — never a guessed
138
- patch).
129
+ An unknown event raises `ValueError` (fail fast — never a guessed patch).
139
130
  """
140
131
  current = set(current_labels)
141
132
  if event == EVENT_CLAIM:
142
133
  # The thin-ticket gate's `ai-needs-detail` is not a lifecycle
143
- # state: a ticket the author edited and re-readied is claimed
144
- # normally, so the stop label must go with the claim or the
145
- # ticket is delivered while every status surface still says a
146
- # human must supply detail (Issue #1379).
134
+ # state: a re-readied ticket is claimed normally, so the stop
135
+ # label goes with the claim or the ticket is delivered while every
136
+ # status surface still says a human must supply detail (#1379).
147
137
  to_remove = [
148
- label for label in (FIX_NEEDED_LABEL, NEEDS_DETAIL_LABEL)
138
+ label for label in (
139
+ FIX_NEEDED_LABEL, NEEDS_DETAIL_LABEL, ready_label,
140
+ )
149
141
  if label in current
150
142
  ]
151
143
  return ([IN_PROGRESS_LABEL], to_remove)
152
144
  if event == EVENT_PR_OPENED:
153
- return ([PR_OPENED_LABEL], [IN_PROGRESS_LABEL])
145
+ return ([PR_OPENED_LABEL], [
146
+ label for label in (IN_PROGRESS_LABEL, ready_label)
147
+ if label in current
148
+ ])
154
149
  if event == EVENT_FIX_NEEDED:
155
150
  if MERGED_LABEL in current or BLOCKED_LABEL in current:
156
151
  return ([], [])
157
152
  to_remove = [
158
153
  label for label in (
159
154
  IN_PROGRESS_LABEL, PR_OPENED_LABEL, AWAITING_MERGE_LABEL,
155
+ ready_label,
160
156
  )
161
157
  if label in current
162
158
  ]
@@ -164,19 +160,20 @@ def label_patch(event: str, current_labels,
164
160
  if event == EVENT_RELEASE_WAITING:
165
161
  return ([ready_label], [IN_PROGRESS_LABEL])
166
162
  if event == EVENT_HUMAN_REVIEW_WAITING:
167
- # The human acceptance gate holds the delivery — the
168
- # same clean, recoverable tick as the release waiting: the
169
- # ticket returns to `ai-ready` and a stale in-flight label is
170
- # cleared. The opened-PR state anchor (`ai-pr-opened` /
171
- # `ai-fix-needed`) STAYS: the resume scan finds waiting
172
- # deliveries through it, so each next tick costs one label read
173
- # and no Pi session; removing the anchor would drop the Issue
174
- # into the fresh-claim queue for a full re-implement. Never
175
- # EVENT_FIX_NEEDED (that would burn the review-round budget).
176
- to_remove = (
177
- [IN_PROGRESS_LABEL] if IN_PROGRESS_LABEL in current else []
178
- )
179
- return ([ready_label], to_remove)
163
+ # The human acceptance gate holds the delivery: the stale
164
+ # in-flight label and the queue label are cleared and NOTHING is
165
+ # added (Issue #2309) — a waiting ticket is not queued, so the
166
+ # ready scan must not see it. The opened-PR state anchor
167
+ # (`ai-pr-opened` / `ai-fix-needed`) STAYS: the resume scan
168
+ # finds waiting deliveries through it, so each next tick costs
169
+ # one label read and no Pi session; removing the anchor would
170
+ # drop the Issue into the fresh-claim queue for a full
171
+ # re-implement. Never EVENT_FIX_NEEDED (that would burn the
172
+ # review-round budget).
173
+ return ([], [
174
+ label for label in (IN_PROGRESS_LABEL, ready_label)
175
+ if label in current
176
+ ])
180
177
  if event == EVENT_REQUEUE:
181
178
  # The external takeover delivery ended without a merge
182
179
  # (the contributor withdrew the PR, or a maintainer closed it) —
@@ -232,27 +229,17 @@ def label_patch(event: str, current_labels,
232
229
  def has_delivery_state(current_labels,
233
230
  ready_label: str = READY_LABEL) -> bool:
234
231
  """True when the labels carry a delivery state, not just the queue
235
- entry.
236
-
237
- The one answer to "is this Issue a delivery?" — any lifecycle state
238
- other than the `ready_label` queue entry counts, terminal states
239
- included. The CI triage uses it to own the open Issue a PR's
240
- `Fixes #N` names, so the script carries no lifecycle label set of its
241
- own (Issue #1786).
232
+ entry: any lifecycle state other than `ready_label`, terminals
233
+ included. The CI triage's `Fixes #N` ownership lookup (Issue #1786).
242
234
  """
243
235
  return bool(set(current_labels) & (LIFECYCLE_STATES - {ready_label}))
244
236
 
245
237
 
246
238
  def is_pickup_eligible(current_labels) -> bool:
247
- """True when the Issue is fresh-ready: `ai-ready` and not yet in any
248
- OTHER delivery state (the ready scan's code-layer guard, Issue
249
- #93/#101).
250
-
251
- `ai-ready` itself is the queue entry, not a delivery state — it is
252
- excluded from the check. `p0`/`bug` are scheduling metadata, not
253
- lifecycle states — they never affect eligibility (they only order the
254
- pickup). The "other delivery state" check is `has_delivery_state`'s
255
- single decision (Issue #1795), never a second set expression here.
239
+ """True when the Issue is fresh-ready: `ai-ready` and in no OTHER
240
+ delivery state (the ready scan's code-layer guard, Issue #93/#101).
241
+ The "other delivery state" answer is `has_delivery_state`'s single
242
+ decision (Issue #1795), never a second set expression here.
256
243
  """
257
244
  current = set(current_labels)
258
245
  if READY_LABEL not in current:
@@ -262,11 +249,9 @@ def is_pickup_eligible(current_labels) -> bool:
262
249
 
263
250
  def is_resumable(current_labels) -> bool:
264
251
  """True when the Issue is in an opened-PR state awaiting review or the
265
- next review session (`ai-pr-opened` or `ai-fix-needed`).
266
-
267
- `ai-in-progress` alone is NOT resumable here: an implement-phase Issue
268
- has neither opened-PR label, so it never matches (the in-flight restart
269
- scan handles it separately).
252
+ next review session. `ai-in-progress` alone is NOT resumable: an
253
+ implement-phase Issue has neither opened-PR label (the in-flight
254
+ restart scan handles it separately).
270
255
  """
271
256
  current = set(current_labels)
272
257
  return (