orbi-cli 0.7.48__tar.gz → 0.7.49__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 (288) hide show
  1. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/PKG-INFO +1 -1
  2. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/pyproject.toml +1 -1
  3. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/__init__.py +1 -1
  4. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/base_ci_fix.py +112 -76
  5. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/base_ci_red.py +38 -23
  6. orbi_cli-0.7.49/src/orbi/blocked_scan.py +91 -0
  7. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/check_permission.py +18 -18
  8. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/claim.py +7 -102
  9. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/failure_report.py +1 -1
  10. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/journal.py +3 -0
  11. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/language_terms.py +16 -18
  12. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/language_terms_fix.py +3 -3
  13. orbi_cli-0.7.49/src/orbi/pr_head_sync.py +141 -0
  14. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/pr_verification.py +24 -36
  15. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/repo_config.py +7 -7
  16. orbi_cli-0.7.49/src/orbi/restart_scan.py +230 -0
  17. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/runner.py +26 -72
  18. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/stopped_scans.py +20 -6
  19. orbi_cli-0.7.49/src/orbi/tick_reads.py +63 -0
  20. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi_cli.egg-info/PKG-INFO +1 -1
  21. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi_cli.egg-info/SOURCES.txt +5 -0
  22. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_base_ci_red.py +169 -26
  23. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_delivery.py +143 -9
  24. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_cli_ticket_commands.py +1 -1
  25. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_docs_site.py +9 -1
  26. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_fix_needed_loop.py +4 -0
  27. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_git_base_smoke.py +184 -0
  28. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pr_verification.py +116 -0
  29. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_repo_config.py +122 -1
  30. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_resume_pr.py +61 -3
  31. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_review_merge.py +1 -1
  32. orbi_cli-0.7.49/tests/test_tick_reads.py +286 -0
  33. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/LICENSE +0 -0
  34. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/README.md +0 -0
  35. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/docs/licenses/sustainable-use-license.md +0 -0
  36. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/setup.cfg +0 -0
  37. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/acceptance_section.py +0 -0
  38. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/amend_command.py +0 -0
  39. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/answer.py +0 -0
  40. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/blocked_comment.py +0 -0
  41. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/blocked_record.py +0 -0
  42. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/body_steering.py +0 -0
  43. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/branch_reclaim.py +0 -0
  44. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/checks.py +0 -0
  45. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/clarify.py +0 -0
  46. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/clarify_proposal.py +0 -0
  47. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/clarify_stop.py +0 -0
  48. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/cli.py +0 -0
  49. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/cli_commands.py +0 -0
  50. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/cli_doctor.py +0 -0
  51. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/cli_parser.py +0 -0
  52. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/cli_source.py +0 -0
  53. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/cli_status.py +0 -0
  54. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/cli_ticket_command.py +0 -0
  55. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/command_line.py +0 -0
  56. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/comment_kind.py +0 -0
  57. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/comment_rest_id.py +0 -0
  58. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/comment_trust.py +0 -0
  59. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/config.py +0 -0
  60. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/config_hint.py +0 -0
  61. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/delivery_comment.py +0 -0
  62. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/delivery_labels.py +0 -0
  63. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/delivery_scene.py +0 -0
  64. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/draft.py +0 -0
  65. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/draft_cli.py +0 -0
  66. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/draft_document.py +0 -0
  67. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/draft_marker.py +0 -0
  68. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/engine_source.py +0 -0
  69. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/example_config.toml +0 -0
  70. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/extensions/clarify_verdict.ts +0 -0
  71. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/extensions/draft_tools.ts +0 -0
  72. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/failure.py +0 -0
  73. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/failure_evidence.py +0 -0
  74. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/gh_response.py +0 -0
  75. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/git_identity.py +0 -0
  76. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/git_transport.py +0 -0
  77. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/github.py +0 -0
  78. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/github_feedback.py +0 -0
  79. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/gitops.py +0 -0
  80. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/human_review.py +0 -0
  81. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/implementation_delivery.py +0 -0
  82. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/language.py +0 -0
  83. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/language_failure.py +0 -0
  84. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/language_terms_criteria.py +0 -0
  85. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/launchd_deploy.py +0 -0
  86. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/merge_blocked.py +0 -0
  87. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/merge_exec.py +0 -0
  88. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/merge_gate.py +0 -0
  89. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/merge_handoff.py +0 -0
  90. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/milestone.py +0 -0
  91. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/milestone_command.py +0 -0
  92. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/milestone_errors.py +0 -0
  93. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/notify.py +0 -0
  94. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/ops_delivery.py +0 -0
  95. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/pi_activity.py +0 -0
  96. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/pi_command.py +0 -0
  97. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/pi_exec.py +0 -0
  98. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/pi_idle.py +0 -0
  99. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/pi_process.py +0 -0
  100. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/pi_recovery.py +0 -0
  101. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/pi_session.py +0 -0
  102. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/pi_stream_log.py +0 -0
  103. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/pilot_setup.py +0 -0
  104. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/pilot_slots.py +0 -0
  105. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/progress.py +0 -0
  106. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/progress_display.py +0 -0
  107. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/progress_outcome.py +0 -0
  108. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/progress_summary.py +0 -0
  109. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/question.py +0 -0
  110. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/release.py +0 -0
  111. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/release_closeout.py +0 -0
  112. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/release_comments.py +0 -0
  113. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/release_declaration.py +0 -0
  114. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/release_git.py +0 -0
  115. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/release_notes.py +0 -0
  116. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/release_run.py +0 -0
  117. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/requeue.py +0 -0
  118. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/resume_scan.py +0 -0
  119. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/resume_verification.py +0 -0
  120. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/review_merge.py +0 -0
  121. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/review_rounds.py +0 -0
  122. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/review_verdict.py +0 -0
  123. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/run_fields.py +0 -0
  124. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/run_state.py +0 -0
  125. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/runner_health.py +0 -0
  126. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/runner_marker.py +0 -0
  127. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/runner_source.py +0 -0
  128. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/scene.py +0 -0
  129. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/scheduler.py +0 -0
  130. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/scheduler_units.py +0 -0
  131. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/session_command.py +0 -0
  132. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/setup_checks.py +0 -0
  133. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/setup_config.py +0 -0
  134. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/source_pool.py +0 -0
  135. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/split_apply.py +0 -0
  136. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/split_command.py +0 -0
  137. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/status_observe.py +0 -0
  138. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/steering.py +0 -0
  139. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/suggest.py +0 -0
  140. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/systemd_deploy.py +0 -0
  141. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/terminal_stops.py +0 -0
  142. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/ticket_command.py +0 -0
  143. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/ticket_command_registry.py +0 -0
  144. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/ticket_criteria.py +0 -0
  145. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/user_summary.py +0 -0
  146. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi/worktree_retention.py +0 -0
  147. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi_cli.egg-info/dependency_links.txt +0 -0
  148. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi_cli.egg-info/entry_points.txt +0 -0
  149. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/src/orbi_cli.egg-info/top_level.txt +0 -0
  150. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_agents_md.py +0 -0
  151. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_amend_command.py +0 -0
  152. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_answer.py +0 -0
  153. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_apply_label_patch.py +0 -0
  154. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_base_branch_failure.py +0 -0
  155. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_blocked_comment.py +0 -0
  156. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_body_steering.py +0 -0
  157. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_adapters.py +0 -0
  158. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_pi.py +0 -0
  159. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_preflight.py +0 -0
  160. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_release.py +0 -0
  161. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_runner_claim_resume.py +0 -0
  162. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_runner_failure_report.py +0 -0
  163. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_runner_main.py +0 -0
  164. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_runner_milestone.py +0 -0
  165. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_runner_outcome.py +0 -0
  166. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_runner_prompt.py +0 -0
  167. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_runner_reconcile.py +0 -0
  168. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_runner_session.py +0 -0
  169. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_bootstrap_runner_tickets.py +0 -0
  170. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_branch_reclaim.py +0 -0
  171. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_check_permission.py +0 -0
  172. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_ci_failure_issue_workflow.py +0 -0
  173. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_ci_failure_triage.py +0 -0
  174. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_ci_macos_workflow.py +0 -0
  175. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_ci_workflow.py +0 -0
  176. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_clarify.py +0 -0
  177. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_claude_plugin.py +0 -0
  178. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_cli_golden.py +0 -0
  179. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_cli_install.py +0 -0
  180. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_cli_milestone.py +0 -0
  181. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_cli_packaging.py +0 -0
  182. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_cli_source.py +0 -0
  183. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_command_receipt_contract.py +0 -0
  184. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_comment_identity.py +0 -0
  185. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_comment_readers_contract.py +0 -0
  186. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_comment_rest_id.py +0 -0
  187. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_comment_trust.py +0 -0
  188. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_concurrency_e2e.py +0 -0
  189. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_constitution.py +0 -0
  190. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_coverage_gate.py +0 -0
  191. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_deliver_pr_fakes.py +0 -0
  192. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_delivery_branch_delete.py +0 -0
  193. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_delivery_labels.py +0 -0
  194. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_delivery_scene.py +0 -0
  195. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_docker_docs.py +0 -0
  196. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_docker_entrypoint.py +0 -0
  197. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_docker_image_workflow.py +0 -0
  198. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_docs_i18n.py +0 -0
  199. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_docs_issue_shapes.py +0 -0
  200. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_docs_labels.py +0 -0
  201. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_docs_mermaid.py +0 -0
  202. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_docs_releases.py +0 -0
  203. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_docs_safety_matrix.py +0 -0
  204. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_docs_single_source.py +0 -0
  205. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_draft.py +0 -0
  206. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_engine_source.py +0 -0
  207. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_failure.py +0 -0
  208. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_failure_report.py +0 -0
  209. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_gh_read_retry.py +0 -0
  210. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_gh_response.py +0 -0
  211. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_git_merge_smoke.py +0 -0
  212. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_git_network_retry.py +0 -0
  213. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_git_transport.py +0 -0
  214. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_github.py +0 -0
  215. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_github_fakes.py +0 -0
  216. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_gitops.py +0 -0
  217. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_gitops_fakes.py +0 -0
  218. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_human_review.py +0 -0
  219. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_import_graph.py +0 -0
  220. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_install_sh.py +0 -0
  221. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_issue_1367.py +0 -0
  222. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_issue_461.py +0 -0
  223. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_issue_template_config.py +0 -0
  224. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_journal.py +0 -0
  225. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_journal_events.py +0 -0
  226. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_launchd_deploy.py +0 -0
  227. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_license.py +0 -0
  228. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_merge_exec_extraction.py +0 -0
  229. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_message_language.py +0 -0
  230. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_milestone_command.py +0 -0
  231. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_notify.py +0 -0
  232. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_ops_e2e.py +0 -0
  233. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_orbi.py +0 -0
  234. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_orbi_dashboard.py +0 -0
  235. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_orbi_exporter.py +0 -0
  236. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_patch_ratchet.py +0 -0
  237. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pi_activity.py +0 -0
  238. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pi_child_reap.py +0 -0
  239. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pi_command.py +0 -0
  240. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pi_exec.py +0 -0
  241. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pi_extensions.py +0 -0
  242. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pi_provider_templates.py +0 -0
  243. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pi_recovery.py +0 -0
  244. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pi_session.py +0 -0
  245. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pilot_setup.py +0 -0
  246. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pilot_slots.py +0 -0
  247. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_pr_issue_link_workflow.py +0 -0
  248. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_prerequisite_check.py +0 -0
  249. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_progress.py +0 -0
  250. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_progress_wiring.py +0 -0
  251. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_prompt_contract.py +0 -0
  252. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_public_contracts.py +0 -0
  253. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_public_helpers.py +0 -0
  254. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_publish_workflow.py +0 -0
  255. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_question.py +0 -0
  256. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_question_resume.py +0 -0
  257. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_release_docs_workflow.py +0 -0
  258. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_release_extraction.py +0 -0
  259. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_release_ticket_templates.py +0 -0
  260. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_resume_continue_e2e.py +0 -0
  261. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_resume_e2e.py +0 -0
  262. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_review_verdict.py +0 -0
  263. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_run_artifacts.py +0 -0
  264. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_run_fields.py +0 -0
  265. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_run_id_e2e.py +0 -0
  266. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_run_id_fixture.py +0 -0
  267. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_runner_config.py +0 -0
  268. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_runner_health.py +0 -0
  269. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_runner_source_freshness.py +0 -0
  270. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_scene.py +0 -0
  271. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_scheduler.py +0 -0
  272. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_seam.py +0 -0
  273. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_setup_output_golden.py +0 -0
  274. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_size_ratchet.py +0 -0
  275. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_split_command.py +0 -0
  276. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_src_layout.py +0 -0
  277. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_status_observe.py +0 -0
  278. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_steering_review.py +0 -0
  279. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_suggest.py +0 -0
  280. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_suite_hygiene.py +0 -0
  281. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_systemd_deploy.py +0 -0
  282. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_systemd_timer.py +0 -0
  283. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_ticket_command.py +0 -0
  284. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_ticket_command_registration.py +0 -0
  285. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_user_acceptance_contract.py +0 -0
  286. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_user_summary.py +0 -0
  287. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/tests/test_versioned_comment_block.py +0 -0
  288. {orbi_cli-0.7.48 → orbi_cli-0.7.49}/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.48
3
+ Version: 0.7.49
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.48"
47
+ version = "0.7.49"
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.48"
21
+ __version__ = "0.7.49"
@@ -7,9 +7,10 @@ eligibility rule. This module owns the actions:
7
7
  * every path that OPENS the fix Issue — the engine's own run when the
8
8
  scene is recorded (`ensure_fix_issues`, once per scene) and the
9
9
  in-ticket `/orbi fix-base` command (`FIX_BASE_COMMAND`). Both call
10
- `open_fix_issues`, the ONE lookup/create loop, so a command run and an
11
- engine run can never open two Issues for one check and each reply says
12
- which Issue it reused;
10
+ `open_fix_issues`, the ONE lookup/create path keyed on the BASE BRANCH
11
+ (Issue #2259: one Issue whose PR makes every red check green), so a
12
+ command run and an engine run can never open two Issues for one base
13
+ branch and each reply says which Issue it reused;
13
14
  * the pause comment that names them (`scene_comment`), so the reader never
14
15
  has to reply a command the engine already ran;
15
16
  * the bounded recovery scan (`recover`): run a pending command, read the
@@ -21,7 +22,7 @@ from __future__ import annotations
21
22
  import logging
22
23
  from datetime import datetime, timezone
23
24
 
24
- from orbi import failure, language
25
+ from orbi import blocked_scan, failure, language
25
26
  from orbi.base_ci_red import (
26
27
  PASSING_CONCLUSIONS, REMINDER_AFTER_SECONDS,
27
28
  STATE_MERGED, STATE_RESUMING, BaseCIRed, FailingCheck, comment_body,
@@ -33,45 +34,78 @@ from orbi.delivery_labels import (
33
34
  )
34
35
  from orbi.github import (
35
36
  branch_head_sha, comment_issue, commit_check_runs, edit_issue,
36
- issue_comments, list_issues, pr_view,
37
+ issue_comments, pr_view,
37
38
  )
38
39
  from orbi.journal import LOGGER, event, run_command
39
40
  from orbi.pi_activity import parse_iso_utc
40
41
  from orbi.progress import fenced
41
42
  from orbi.ticket_command import (
42
43
  CommandSpec, TicketCommandError, command_comment_key,
43
- command_receipt_marker, failure_reason, process_commands,
44
+ command_receipt_marker, execute_command, failure_reason,
44
45
  runner_receipt,
45
46
  )
46
47
 
47
48
 
48
- def _triage_body(check: FailingCheck, record: BaseCIRed,
49
+ def _triage_body(checks: list[FailingCheck], record: BaseCIRed,
49
50
  language_code: str) -> str:
51
+ """The fix Issue's body: EVERY red base check, with its run link.
52
+
53
+ One Issue per base branch (Issue #2259), so its PR has to make every
54
+ check listed here green: the list is every check red on the base
55
+ commit (`_base_red_checks`, a superset of the pause comment's
56
+ own evidence), and the reason states that rule in as many words.
57
+ """
50
58
  parts = [
51
59
  language.text(language_code, "base_ci_red.triage_check",
52
- name=check.name, base_branch=record.base_branch),
60
+ base_branch=record.base_branch),
53
61
  language.text(language_code, "base_ci_red.triage_reason",
54
62
  base_branch=record.base_branch,
55
- base_sha=record.base_sha),
63
+ base_sha=record.base_sha,
64
+ checks=_check_list(checks)),
56
65
  ]
57
- if check.url:
58
- parts.append(language.text(language_code, "base_ci_red.check_run",
59
- name=check.name, url=check.url))
60
- if check.errors:
61
- parts.append(
62
- f"{language.text(language_code, 'base_ci_red.triage_errors')}\n"
63
- f"{fenced('\n'.join(check.errors))}"
64
- )
66
+ for check in checks:
67
+ if check.url:
68
+ parts.append(language.text(language_code, "base_ci_red.check_run",
69
+ name=check.name, url=check.url))
70
+ if check.errors:
71
+ parts.append(
72
+ language.text(language_code, "base_ci_red.check_errors",
73
+ name=check.name)
74
+ + "\n" + fenced("\n".join(check.errors))
75
+ )
65
76
  return "\n\n".join(parts)
66
77
 
67
78
 
68
- def _create_triage_issue(repo: str, check: FailingCheck, record: BaseCIRed,
69
- *, milestone: str | None, dispatch_label: str,
70
- language_code: str) -> int:
79
+ def _check_list(checks: list[FailingCheck]) -> str:
80
+ """The red base checks as the body's inline list (`ci`, `e2e`)."""
81
+ return ", ".join(f"`{check.name}`" for check in checks)
82
+
83
+
84
+ def _base_red_checks(repo: str, record: BaseCIRed) -> list[FailingCheck]:
85
+ """EVERY check failing on the base commit of the pause (Issue #2259).
86
+
87
+ `record.failing_checks` holds only the names the PAUSED PR itself
88
+ failed, and the fix Issue must name every check red on the base
89
+ branch: a check the PR happened to keep green is still red on the
90
+ base, so a fix PR that leaves it out cannot turn the base green. The
91
+ record's names stay first (the merge gate's order, the order the
92
+ pause comment shows), then the rest of the base's red checks.
93
+ """
94
+ names = list(record.failing_checks)
95
+ names += [
96
+ name for name in _newest_runs(commit_check_runs(repo, record.base_sha))
97
+ if name not in names
98
+ ]
99
+ return failing_checks(repo, names, record.base_sha)
100
+
101
+
102
+ def _create_triage_issue(repo: str, checks: list[FailingCheck],
103
+ record: BaseCIRed, *, milestone: str | None,
104
+ dispatch_label: str, language_code: str) -> int:
71
105
  command = [
72
106
  "gh", "issue", "create", "--repo", repo,
73
- "--title", triage_title(check.name, record.base_branch),
74
- "--body", _triage_body(check, record, language_code),
107
+ "--title", triage_title(record.base_branch),
108
+ "--body", _triage_body(checks, record, language_code),
75
109
  "--label", dispatch_label,
76
110
  "--label", P0_LABEL,
77
111
  ]
@@ -91,54 +125,54 @@ def open_fix_issues(
91
125
  milestone: str | None = None, dispatch_label: str = READY_LABEL,
92
126
  language_code: str = language.DEFAULT_LANGUAGE,
93
127
  ) -> list[str]:
94
- """Open (or reuse) ONE open fix Issue per failing base check.
128
+ """Open (or reuse) the ONE open fix Issue of this base branch.
129
+
130
+ Issue #2259: the Issue is keyed on the BASE BRANCH, never on a check.
131
+ Its PR has to turn EVERY red check green — a fix that repairs only its
132
+ own check stays red on the others and is paused as "the base is
133
+ already red", so per-check Issues could never merge.
95
134
 
96
- The ONE creation path: `/orbi fix-base` posts the returned lines as
135
+ The ONE creation path: `/orbi fix-base` posts the returned line as
97
136
  its receipt comment, and the scene record (Issue #2203) renders the
98
- same lines into the pause comment — same lookup, same create, same
137
+ same line into the pause comment — same lookup, same create, same
99
138
  journal line, so a command run and an engine run can never open two
100
- Issues for one check.
139
+ Issues for one base branch.
101
140
 
102
141
  Raises `TicketCommandError` when a lookup fails: opening a second
103
142
  Issue beside one the read could not see is never the smaller risk. An
104
143
  empty evidence read returns the one "no evidence" sentence — no Issue
105
144
  is invented for a check GitHub no longer reports.
106
145
  """
107
- checks = failing_checks(repo, list(record.failing_checks), record.base_sha)
146
+ checks = _base_red_checks(repo, record)
108
147
  if not checks:
109
148
  return [language.text(
110
149
  language_code, "base_ci_red.triage_no_evidence",
111
150
  base_branch=record.base_branch,
112
151
  )]
113
- lines: list[str] = []
114
- for check in checks:
115
- try:
116
- existing = open_triage_issue(
117
- repo, check.name, record.base_branch)
118
- except Exception as exc:
119
- # Never open a second Issue beside one this read could not
120
- # see: the caller fails its own step and reports the reason.
121
- raise TicketCommandError(
122
- "look up the triage Issue", str(exc)) from exc
123
- if existing is not None and isinstance(existing.get("number"), int):
124
- number = existing["number"]
125
- key = "base_ci_red.triage_reused"
126
- else:
127
- number = _create_triage_issue(
128
- repo, check, record, milestone=milestone,
129
- dispatch_label=dispatch_label, language_code=language_code,
130
- )
131
- key = "base_ci_red.triage_created"
132
- event(
133
- "base_ci_red_triage", repo=repo, issue=f"#{issue_number}",
134
- created=f"#{number}", check=check.name,
135
- base_branch=record.base_branch,
136
- )
137
- lines.append(language.text(
138
- language_code, key, number=number, check=check.name,
152
+ try:
153
+ existing = open_triage_issue(repo, record.base_branch)
154
+ except Exception as exc:
155
+ # Never open a second Issue beside one this read could not
156
+ # see: the caller fails its own step and reports the reason.
157
+ raise TicketCommandError(
158
+ "look up the triage Issue", str(exc)) from exc
159
+ if existing is not None and isinstance(existing.get("number"), int):
160
+ number = existing["number"]
161
+ key = "base_ci_red.triage_reused"
162
+ else:
163
+ number = _create_triage_issue(
164
+ repo, checks, record, milestone=milestone,
165
+ dispatch_label=dispatch_label, language_code=language_code,
166
+ )
167
+ key = "base_ci_red.triage_created"
168
+ event(
169
+ "base_ci_red_triage", repo=repo, issue=f"#{issue_number}",
170
+ created=f"#{number}", checks=_check_list(checks),
139
171
  base_branch=record.base_branch,
140
- ))
141
- return lines
172
+ )
173
+ return [language.text(
174
+ language_code, key, number=number, base_branch=record.base_branch,
175
+ )]
142
176
 
143
177
 
144
178
  def ensure_fix_issues(
@@ -146,7 +180,7 @@ def ensure_fix_issues(
146
180
  milestone: str | None = None, dispatch_label: str = READY_LABEL,
147
181
  language_code: str = language.DEFAULT_LANGUAGE,
148
182
  ) -> list[str] | None:
149
- """The engine-initiated run: the fix Issue(s), ONCE per scene.
183
+ """The engine-initiated run: the fix Issue, ONCE per scene.
150
184
 
151
185
  Returns the reader-facing lines the pause comment renders, or
152
186
  `None` when this scene already ran — the pause comment it already
@@ -247,13 +281,14 @@ def recover(repo: str, *, language_code: str,
247
281
 
248
282
  One bounded scan per tick, before the resume scan: an `ai-blocked`
249
283
  Issue is a terminal state no claim scan picks up, so this is the only
250
- path back. The base branch is the BLOCK's (the configured one the
251
- delivery reported) — never a hard-coded `main`. For each Issue whose
252
- LATEST TRUSTED failure is the `base_ci_red` one and whose record in
253
- that SAME comment is `waiting` (an older record a newer trusted
254
- failure superseded — including a newer failure that carries no record
255
- or no base-CI block — and a copied record from an author without
256
- write permission, are never eligible — Issue #1833):
284
+ path back. The state it walks is the tick's ONE read
285
+ (`orbi.blocked_scan`, Issue #2218). The base branch is the BLOCK's (the
286
+ configured one the delivery reported) — never a hard-coded `main`.
287
+ For each Issue whose LATEST TRUSTED failure is the `base_ci_red` one
288
+ and whose record in that SAME comment is `waiting` (an older record a
289
+ newer trusted failure superseded — including a newer failure that
290
+ carries no record or no base-CI block — and a copied record from an
291
+ author without write permission, are never eligible — Issue #1833):
257
292
 
258
293
  1. run the in-ticket `/orbi fix-base` command (its own permission
259
294
  gate and receipts);
@@ -267,19 +302,19 @@ def recover(repo: str, *, language_code: str,
267
302
  Returns the Issue numbers that were resumed.
268
303
  """
269
304
  stamp = now or datetime.now(timezone.utc)
305
+ reads = blocked_scan.blocked_reads(repo)
270
306
  resumed: list[int] = []
271
- issues = list_issues(
272
- repo, state="open", label=BLOCKED_LABEL,
273
- json_fields="number,title", limit=200,
274
- )
275
- for issue in issues:
307
+ for issue in reads.blocked_issues():
276
308
  number = issue["number"]
277
- scene = paused_scene(issue_comments(number, repo=repo), repo=repo)
309
+ comments = reads.comments(number)
310
+ scene = paused_scene(
311
+ comments, repo=repo, trusted=reads.trusted(number),
312
+ )
278
313
  if scene is None:
279
314
  continue
280
315
  record, comment = scene
281
- process_commands(
282
- repo, number, [FIX_BASE_COMMAND],
316
+ execute_command(
317
+ repo, number, FIX_BASE_COMMAND, comments=comments,
283
318
  language_code=language_code, record=record,
284
319
  milestone=milestone, dispatch_label=dispatch_label,
285
320
  )
@@ -309,6 +344,7 @@ def recover(repo: str, *, language_code: str,
309
344
  "base_ci_red_recovered", issue=number, pr=record.pr,
310
345
  base_branch=record.base_branch, base_head=base_head,
311
346
  )
347
+ reads.retire(number)
312
348
  resumed.append(number)
313
349
  continue
314
350
  if _aged_out(comment, stamp):
@@ -318,7 +354,7 @@ def recover(repo: str, *, language_code: str,
318
354
 
319
355
 
320
356
  # --------------------------------------------------------------------------
321
- # The pause comment: naming the fix Issues the engine already opened
357
+ # The pause comment: naming the fix Issue the engine already opened
322
358
  # --------------------------------------------------------------------------
323
359
 
324
360
  def scene_comment(
@@ -327,9 +363,9 @@ def scene_comment(
327
363
  status_url: str | None = None, milestone: str | None = None,
328
364
  dispatch_label: str = READY_LABEL,
329
365
  ) -> str:
330
- """The base-branch-red comment, with the fix Issues Orbi opened itself.
366
+ """The base-branch-red comment, with the fix Issue Orbi opened itself.
331
367
 
332
- Recording the scene and opening its fix Issues are ONE step (Issue
368
+ Recording the scene and opening its fix Issue are ONE step (Issue
333
369
  #2203): the comment names what `ensure_fix_issues` opened or reused,
334
370
  and that run is once per scene — its receipt rides in this same
335
371
  comment. A failed run is a bypass (it is logged inside
@@ -395,7 +431,7 @@ def _fix_base_apply(
395
431
  language_code: str = language.DEFAULT_LANGUAGE,
396
432
  **_context: object,
397
433
  ) -> None:
398
- """Open (or reuse) ONE open fix Issue per failing base check.
434
+ """Open (or reuse) the ONE open fix Issue of this base branch.
399
435
 
400
436
  Idempotent per COMMENT: the reply carries the command layer's own
401
437
  receipt marker, so a second tick that still sees the same command
@@ -405,7 +441,7 @@ def _fix_base_apply(
405
441
  text, so a copied one must never read as "the fix Issue was opened"
406
442
  (Issue #1992).
407
443
 
408
- The lookup/create loop is `open_fix_issues`, the SAME code the scene
444
+ The lookup/create path is `open_fix_issues`, the SAME code the scene
409
445
  record runs by itself (Issue #2203): a fix Issue the engine opened is
410
446
  therefore reused here, and the reply says so.
411
447
  """
@@ -16,7 +16,7 @@ This module owns that one scene:
16
16
  commit with its run link and first error lines, from the ONE
17
17
  `check-runs` response — no annotations/logs API;
18
18
  * the ONE readable comment (`comment_body`): what the user already has,
19
- why it paused, the evidence, the fix Issues Orbi opened itself and the
19
+ why it paused, the evidence, the fix Issue Orbi opened itself and the
20
20
  remaining repair — and no empty evidence section (this is not a
21
21
  subprocess failure);
22
22
  * the in-place edits of that comment (`rewrite_state`, `remind`,
@@ -24,7 +24,7 @@ This module owns that one scene:
24
24
  * the eligibility rule the command and the scan share (`paused_scene`).
25
25
 
26
26
  The ACTION side lives beside it: `base_ci_fix` opens (or reuses) the ONE
27
- open `ai-ready` + `p0` fix Issue per failing base check — by itself when
27
+ open `ai-ready` + `p0` fix Issue of the base branch — by itself when
28
28
  the scene is recorded (Issue #2203) and on the `/orbi fix-base` command —
29
29
  and runs the recovery scan (`recover`) that takes `ai-blocked` back to
30
30
  `ai-fix-needed` once the base turns green, then `stale` after
@@ -98,8 +98,8 @@ SCENE_RECEIPT = "orbi-base-ci-red-fix-issues"
98
98
  # re-read in the fix module (Issue #2203).
99
99
  PASSING_CONCLUSIONS = ("success", "neutral", "skipped")
100
100
 
101
- # The issue search that finds a triage Issue: one bounded page is enough
102
- # for a check name and branch (the title is unique per pair).
101
+ # The issue search that finds a fix Issue: one bounded page is enough
102
+ # for one title (the title is unique per base branch).
103
103
  _TRIAGE_SEARCH_LIMIT = 20
104
104
 
105
105
 
@@ -319,29 +319,31 @@ def repr_name(record: BaseCIRed) -> str:
319
319
 
320
320
 
321
321
  # --------------------------------------------------------------------------
322
- # The triage Issue: one open Issue per (check, base branch)
322
+ # The fix Issue: ONE open Issue per base branch (Issue #2259)
323
323
  # --------------------------------------------------------------------------
324
324
 
325
- def triage_title(check_name: str, base_branch: str) -> str:
325
+ def triage_title(base_branch: str) -> str:
326
326
  """The one title format shared by the lookup and the create.
327
327
 
328
- It is the format the CI triage workflow already writes
329
- (`CI failure: <check> on branch <branch>`), so a delivery-side fix
330
- Issue and a workflow-side one are the same record, not two.
328
+ Keyed on the BASE BRANCH, never on a check (Issue #2259): the fix
329
+ Issue's PR has to turn every red check green, because a PR that
330
+ repairs only its own check stays red on the others and is paused as
331
+ "the base is already red" — so per-check Issues could never merge. The
332
+ CI triage workflow's per-check `CI failure: <check> on branch <branch>`
333
+ titles stay its own record and are not reused here.
331
334
  """
332
- return f"CI failure: {check_name} on branch {base_branch}"
335
+ return f"CI failure on branch {base_branch}"
333
336
 
334
337
 
335
- def open_triage_issue(repo: str, check_name: str,
336
- base_branch: str) -> dict | None:
337
- """The OPEN triage Issue for this check, or None.
338
+ def open_triage_issue(repo: str, base_branch: str) -> dict | None:
339
+ """The OPEN fix Issue of this base branch, or None.
338
340
 
339
341
  `state="open"` on purpose: a CLOSED Issue is done and must never be
340
342
  reused as the tracker of a new red base. A failed read PROPAGATES: a
341
343
  lookup that silently read as "none" would make `/orbi fix-base`
342
344
  open a SECOND fix Issue beside the one it could not see.
343
345
  """
344
- prefix = triage_title(check_name, base_branch)
346
+ prefix = triage_title(base_branch)
345
347
  issues = list_issues(
346
348
  repo, state="open", search=f'"{prefix}" in:title',
347
349
  json_fields="number,url,title", limit=_TRIAGE_SEARCH_LIMIT,
@@ -352,18 +354,18 @@ def open_triage_issue(repo: str, check_name: str,
352
354
  return None
353
355
 
354
356
 
355
- def triage_url(repo: str, check_name: str, base_branch: str) -> str | None:
356
- """The existing OPEN triage Issue's URL (best effort, never fails).
357
+ def triage_url(repo: str, base_branch: str) -> str | None:
358
+ """The existing OPEN fix Issue's URL (best effort, never fails).
357
359
 
358
360
  The failure comment is a bypass: a failed lookup drops the link, it
359
361
  never changes the delivery's own outcome.
360
362
  """
361
363
  try:
362
- issue = open_triage_issue(repo, check_name, base_branch)
364
+ issue = open_triage_issue(repo, base_branch)
363
365
  except Exception:
364
366
  LOGGER.exception(
365
- "delivery_ci_triage_lookup_failed repo=%s check=%s",
366
- repo, check_name,
367
+ "delivery_ci_triage_lookup_failed repo=%s base_branch=%s",
368
+ repo, base_branch,
367
369
  )
368
370
  return None
369
371
  url = issue.get("url") if issue else None
@@ -403,7 +405,7 @@ def comment_body(record: BaseCIRed, checks: list[FailingCheck], *,
403
405
  """The ONE readable base-branch-red comment.
404
406
 
405
407
  Order is the user's: what they already have (a ready PR), why it
406
- paused, the evidence, the fix Issues, the remaining repairs. The hidden
408
+ paused, the evidence, the fix Issue, the remaining repairs. The hidden
407
409
  `orbi:failure:v1` block leads (the resume path reads it there) and
408
410
  the `orbi:base-ci-red:v1` block closes the body. An empty evidence
409
411
  segment is never rendered: this failure is not a subprocess exit. The
@@ -580,6 +582,7 @@ def edit_state(repo: str, issue_number: int, comment: dict,
580
582
 
581
583
  def _latest_trusted_failure(
582
584
  comments: list[dict], *, repo: str,
585
+ trusted: list[dict] | None = None,
583
586
  ) -> tuple[failure.Failure | None, dict] | None:
584
587
  """The Issue's LATEST trusted failure comment, and its record.
585
588
 
@@ -602,9 +605,15 @@ def _latest_trusted_failure(
602
605
  (`failure.parse`), so none of them may fall back to an older record it
603
606
  superseded. A `None` record is therefore the newest failure's own
604
607
  answer: this stop states no machine-readable reason.
608
+
609
+ `trusted` is the caller's already-trusted comment list
610
+ (`orbi.blocked_scan.BlockedReads.trusted`): a scan that shares a tick's
611
+ one comments read passes it, so that read pays one trust read instead
612
+ of one per scan (Issue #2218). Without it the list is trusted here.
605
613
  """
606
- for comment in reversed(
607
- comment_trust.trusted_comments(comments, repo=repo)):
614
+ if trusted is None:
615
+ trusted = comment_trust.trusted_comments(comments, repo=repo)
616
+ for comment in reversed(trusted):
608
617
  body = comment.get("body")
609
618
  if comment_kind(body) != COMMENT_KIND_FAILURE:
610
619
  continue
@@ -621,6 +630,7 @@ def _latest_trusted_failure(
621
630
 
622
631
  def paused_scene(
623
632
  comments: list[dict], *, repo: str,
633
+ trusted: list[dict] | None = None,
624
634
  ) -> tuple[BaseCIRed, dict] | None:
625
635
  """The `waiting` base-CI-red record this Issue pauses on, and its comment.
626
636
 
@@ -630,8 +640,13 @@ def paused_scene(
630
640
  `/orbi fix-base` command's own context both read it from here — the
631
641
  terminal spelling acts on exactly the scene the scan would (Issue
632
642
  #1930).
643
+
644
+ `trusted` is passed straight through to `_latest_trusted_failure`:
645
+ the tick's readiness scan hands over the trust read it already paid.
633
646
  """
634
- located = _latest_trusted_failure(comments, repo=repo)
647
+ located = _latest_trusted_failure(
648
+ comments, repo=repo, trusted=trusted,
649
+ )
635
650
  if located is None:
636
651
  return None
637
652
  failure_record, comment = located
@@ -0,0 +1,91 @@
1
+ """One tick's `ai-blocked` read, shared by every scan walking it (#2218).
2
+
3
+ An `ai-blocked` Issue is terminal for the claim scans, so a tick reads
4
+ that state in three places: the missing check-read permission scan
5
+ (`orbi.check_permission.recover`), the base-branch-red scan
6
+ (`orbi.base_ci_fix.recover`) and the stopped-ticket answer scan for the
7
+ same label (`orbi.stopped_scans.run`). Each used to list the label and
8
+ read the comments of every blocked Issue, so an idle tick issued the same
9
+ `gh issue list --label ai-blocked` and the same
10
+ `gh issue view N --json comments` two or three times over.
11
+
12
+ `blocked_reads` is that read, taken once per repository and tick
13
+ (`orbi.tick_reads`): the first scan fills it and the others answer from
14
+ it. Sharing is safe because an Issue's newest trusted failure names
15
+ exactly ONE reason, so at most one scan acts on an Issue; the others skip
16
+ it on the reason they read from the same, still-valid comments. A scan
17
+ that DOES act calls `retire`, so a later scan never acts on the label its
18
+ predecessor just removed. The trust read (the collaborator permission)
19
+ stays inside `orbi.comment_trust`, and the tick pays it once too: `trusted`
20
+ keeps the tick's one trust read of an Issue, so the permission check is one
21
+ read for the tick's one comments read — unchanged in what it decides.
22
+ """
23
+ from __future__ import annotations
24
+
25
+ import dataclasses
26
+
27
+ from orbi import comment_trust, tick_reads
28
+ from orbi.delivery_labels import BLOCKED_LABEL
29
+ from orbi.github import issue_comments, list_issues
30
+
31
+ # One bounded page per tick: `ai-blocked` Issues are few, and an unbounded
32
+ # scan would multiply the per-tick read cost.
33
+ SCAN_LIMIT = 200
34
+
35
+
36
+ @dataclasses.dataclass
37
+ class BlockedReads:
38
+ """One repository's open `ai-blocked` Issues, and their comments."""
39
+
40
+ repo: str
41
+ _issues: list[dict] | None = None
42
+ _comments: dict[int, list[dict]] = dataclasses.field(default_factory=dict)
43
+ _trusted: dict[int, list[dict]] = dataclasses.field(default_factory=dict)
44
+
45
+ def blocked_issues(self) -> list[dict]:
46
+ """Every open `ai-blocked` Issue, read once for the tick."""
47
+ if self._issues is None:
48
+ self._issues = list_issues(
49
+ self.repo, state="open", label=BLOCKED_LABEL,
50
+ json_fields="number,title", limit=SCAN_LIMIT,
51
+ )
52
+ return self._issues
53
+
54
+ def comments(self, number: int) -> list[dict]:
55
+ """One blocked Issue's comment history, read once for the tick."""
56
+ if number not in self._comments:
57
+ self._comments[number] = issue_comments(number, repo=self.repo)
58
+ return self._comments[number]
59
+
60
+ def trusted(self, number: int) -> list[dict]:
61
+ """One blocked Issue's trusted comments, read once for the tick.
62
+
63
+ Trust is the existing comment rule (`orbi.comment_trust`): one
64
+ permission read per author. Reading it here, once per tick and
65
+ per Issue, keeps the permission check as it was — one read for the
66
+ tick's one read of that Issue's comments — instead of one read per
67
+ scan walking the same list (Issue #2218).
68
+ """
69
+ if number not in self._trusted:
70
+ self._trusted[number] = comment_trust.trusted_comments(
71
+ self.comments(number), repo=self.repo,
72
+ )
73
+ return self._trusted[number]
74
+
75
+ def retire(self, number: int) -> None:
76
+ """Drop an Issue a scan just acted on (its label changed)."""
77
+ self._trusted.pop(number, None)
78
+ self._comments.pop(number, None)
79
+ if self._issues is not None:
80
+ self._issues = [
81
+ issue for issue in self._issues if issue["number"] != number
82
+ ]
83
+
84
+
85
+ def blocked_reads(repo: str) -> BlockedReads:
86
+ """The tick's ONE `ai-blocked` read for `repo`.
87
+
88
+ Outside a tick every caller gets its own reader, which is the
89
+ pre-#2218 behavior of a scan run on its own.
90
+ """
91
+ return tick_reads.once(("blocked", repo), lambda: BlockedReads(repo))