orbi-cli 0.7.46__tar.gz → 0.7.47__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 (282) hide show
  1. {orbi_cli-0.7.46/src/orbi_cli.egg-info → orbi_cli-0.7.47}/PKG-INFO +1 -1
  2. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/pyproject.toml +1 -1
  3. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/__init__.py +1 -1
  4. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/acceptance_section.py +42 -2
  5. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/answer.py +12 -2
  6. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/question.py +29 -4
  7. {orbi_cli-0.7.46 → orbi_cli-0.7.47/src/orbi_cli.egg-info}/PKG-INFO +1 -1
  8. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_answer.py +150 -0
  9. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_public_contracts.py +9 -0
  10. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_question.py +28 -1
  11. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/LICENSE +0 -0
  12. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/README.md +0 -0
  13. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/docs/licenses/sustainable-use-license.md +0 -0
  14. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/setup.cfg +0 -0
  15. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/amend_command.py +0 -0
  16. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/base_ci_fix.py +0 -0
  17. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/base_ci_red.py +0 -0
  18. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/blocked_comment.py +0 -0
  19. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/body_steering.py +0 -0
  20. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/branch_reclaim.py +0 -0
  21. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/check_permission.py +0 -0
  22. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/checks.py +0 -0
  23. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/claim.py +0 -0
  24. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/clarify.py +0 -0
  25. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/clarify_proposal.py +0 -0
  26. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/clarify_stop.py +0 -0
  27. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/cli.py +0 -0
  28. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/cli_commands.py +0 -0
  29. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/cli_doctor.py +0 -0
  30. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/cli_parser.py +0 -0
  31. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/cli_source.py +0 -0
  32. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/cli_status.py +0 -0
  33. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/cli_ticket_command.py +0 -0
  34. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/command_line.py +0 -0
  35. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/comment_kind.py +0 -0
  36. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/comment_rest_id.py +0 -0
  37. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/comment_trust.py +0 -0
  38. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/config.py +0 -0
  39. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/config_hint.py +0 -0
  40. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/delivery_comment.py +0 -0
  41. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/delivery_labels.py +0 -0
  42. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/delivery_scene.py +0 -0
  43. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/draft.py +0 -0
  44. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/draft_cli.py +0 -0
  45. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/draft_document.py +0 -0
  46. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/draft_marker.py +0 -0
  47. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/engine_source.py +0 -0
  48. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/example_config.toml +0 -0
  49. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/extensions/clarify_verdict.ts +0 -0
  50. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/extensions/draft_tools.ts +0 -0
  51. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/failure.py +0 -0
  52. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/failure_evidence.py +0 -0
  53. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/failure_report.py +0 -0
  54. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/gh_response.py +0 -0
  55. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/git_identity.py +0 -0
  56. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/git_transport.py +0 -0
  57. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/github.py +0 -0
  58. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/github_feedback.py +0 -0
  59. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/gitops.py +0 -0
  60. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/human_review.py +0 -0
  61. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/implementation_delivery.py +0 -0
  62. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/journal.py +0 -0
  63. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/language.py +0 -0
  64. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/language_failure.py +0 -0
  65. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/language_terms.py +0 -0
  66. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/language_terms_criteria.py +0 -0
  67. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/language_terms_fix.py +0 -0
  68. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/launchd_deploy.py +0 -0
  69. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/merge_blocked.py +0 -0
  70. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/merge_exec.py +0 -0
  71. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/merge_gate.py +0 -0
  72. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/merge_handoff.py +0 -0
  73. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/milestone.py +0 -0
  74. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/milestone_command.py +0 -0
  75. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/milestone_errors.py +0 -0
  76. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/notify.py +0 -0
  77. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/ops_delivery.py +0 -0
  78. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/pi_activity.py +0 -0
  79. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/pi_command.py +0 -0
  80. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/pi_exec.py +0 -0
  81. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/pi_idle.py +0 -0
  82. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/pi_process.py +0 -0
  83. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/pi_recovery.py +0 -0
  84. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/pi_session.py +0 -0
  85. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/pi_stream_log.py +0 -0
  86. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/pilot_setup.py +0 -0
  87. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/pilot_slots.py +0 -0
  88. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/pr_verification.py +0 -0
  89. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/progress.py +0 -0
  90. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/progress_display.py +0 -0
  91. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/progress_outcome.py +0 -0
  92. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/progress_summary.py +0 -0
  93. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/release.py +0 -0
  94. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/release_closeout.py +0 -0
  95. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/release_comments.py +0 -0
  96. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/release_declaration.py +0 -0
  97. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/release_git.py +0 -0
  98. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/release_notes.py +0 -0
  99. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/release_run.py +0 -0
  100. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/repo_config.py +0 -0
  101. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/requeue.py +0 -0
  102. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/resume_scan.py +0 -0
  103. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/resume_verification.py +0 -0
  104. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/review_merge.py +0 -0
  105. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/review_rounds.py +0 -0
  106. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/review_verdict.py +0 -0
  107. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/run_fields.py +0 -0
  108. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/run_state.py +0 -0
  109. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/runner.py +0 -0
  110. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/runner_health.py +0 -0
  111. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/runner_marker.py +0 -0
  112. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/runner_source.py +0 -0
  113. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/scene.py +0 -0
  114. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/scheduler.py +0 -0
  115. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/scheduler_units.py +0 -0
  116. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/session_command.py +0 -0
  117. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/setup_checks.py +0 -0
  118. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/setup_config.py +0 -0
  119. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/source_pool.py +0 -0
  120. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/split_apply.py +0 -0
  121. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/split_command.py +0 -0
  122. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/status_observe.py +0 -0
  123. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/steering.py +0 -0
  124. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/stopped_scans.py +0 -0
  125. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/suggest.py +0 -0
  126. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/systemd_deploy.py +0 -0
  127. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/terminal_stops.py +0 -0
  128. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/ticket_command.py +0 -0
  129. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/ticket_command_registry.py +0 -0
  130. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/ticket_criteria.py +0 -0
  131. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/user_summary.py +0 -0
  132. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi/worktree_retention.py +0 -0
  133. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi_cli.egg-info/SOURCES.txt +0 -0
  134. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi_cli.egg-info/dependency_links.txt +0 -0
  135. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi_cli.egg-info/entry_points.txt +0 -0
  136. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/src/orbi_cli.egg-info/top_level.txt +0 -0
  137. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_agents_md.py +0 -0
  138. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_amend_command.py +0 -0
  139. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_apply_label_patch.py +0 -0
  140. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_base_branch_failure.py +0 -0
  141. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_base_ci_red.py +0 -0
  142. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_blocked_comment.py +0 -0
  143. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_body_steering.py +0 -0
  144. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_adapters.py +0 -0
  145. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_delivery.py +0 -0
  146. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_pi.py +0 -0
  147. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_preflight.py +0 -0
  148. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_release.py +0 -0
  149. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_runner_claim_resume.py +0 -0
  150. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_runner_failure_report.py +0 -0
  151. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_runner_main.py +0 -0
  152. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_runner_milestone.py +0 -0
  153. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_runner_outcome.py +0 -0
  154. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_runner_prompt.py +0 -0
  155. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_runner_reconcile.py +0 -0
  156. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_runner_session.py +0 -0
  157. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_bootstrap_runner_tickets.py +0 -0
  158. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_branch_reclaim.py +0 -0
  159. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_check_permission.py +0 -0
  160. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_ci_failure_issue_workflow.py +0 -0
  161. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_ci_failure_triage.py +0 -0
  162. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_ci_macos_workflow.py +0 -0
  163. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_ci_workflow.py +0 -0
  164. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_clarify.py +0 -0
  165. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_claude_plugin.py +0 -0
  166. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_cli_golden.py +0 -0
  167. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_cli_install.py +0 -0
  168. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_cli_milestone.py +0 -0
  169. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_cli_packaging.py +0 -0
  170. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_cli_source.py +0 -0
  171. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_cli_ticket_commands.py +0 -0
  172. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_command_receipt_contract.py +0 -0
  173. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_comment_identity.py +0 -0
  174. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_comment_readers_contract.py +0 -0
  175. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_comment_rest_id.py +0 -0
  176. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_comment_trust.py +0 -0
  177. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_concurrency_e2e.py +0 -0
  178. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_constitution.py +0 -0
  179. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_coverage_gate.py +0 -0
  180. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_deliver_pr_fakes.py +0 -0
  181. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_delivery_branch_delete.py +0 -0
  182. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_delivery_labels.py +0 -0
  183. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_delivery_scene.py +0 -0
  184. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_docker_docs.py +0 -0
  185. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_docker_entrypoint.py +0 -0
  186. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_docker_image_workflow.py +0 -0
  187. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_docs_i18n.py +0 -0
  188. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_docs_issue_shapes.py +0 -0
  189. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_docs_labels.py +0 -0
  190. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_docs_mermaid.py +0 -0
  191. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_docs_releases.py +0 -0
  192. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_docs_safety_matrix.py +0 -0
  193. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_docs_single_source.py +0 -0
  194. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_docs_site.py +0 -0
  195. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_draft.py +0 -0
  196. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_engine_source.py +0 -0
  197. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_failure.py +0 -0
  198. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_failure_report.py +0 -0
  199. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_fix_needed_loop.py +0 -0
  200. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_gh_read_retry.py +0 -0
  201. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_gh_response.py +0 -0
  202. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_git_base_smoke.py +0 -0
  203. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_git_merge_smoke.py +0 -0
  204. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_git_network_retry.py +0 -0
  205. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_git_transport.py +0 -0
  206. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_github.py +0 -0
  207. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_github_fakes.py +0 -0
  208. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_gitops.py +0 -0
  209. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_gitops_fakes.py +0 -0
  210. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_human_review.py +0 -0
  211. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_import_graph.py +0 -0
  212. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_install_sh.py +0 -0
  213. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_issue_1367.py +0 -0
  214. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_issue_461.py +0 -0
  215. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_issue_template_config.py +0 -0
  216. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_journal.py +0 -0
  217. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_journal_events.py +0 -0
  218. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_launchd_deploy.py +0 -0
  219. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_license.py +0 -0
  220. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_merge_exec_extraction.py +0 -0
  221. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_message_language.py +0 -0
  222. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_milestone_command.py +0 -0
  223. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_notify.py +0 -0
  224. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_ops_e2e.py +0 -0
  225. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_orbi.py +0 -0
  226. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_orbi_dashboard.py +0 -0
  227. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_orbi_exporter.py +0 -0
  228. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_patch_ratchet.py +0 -0
  229. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pi_activity.py +0 -0
  230. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pi_child_reap.py +0 -0
  231. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pi_command.py +0 -0
  232. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pi_exec.py +0 -0
  233. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pi_extensions.py +0 -0
  234. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pi_provider_templates.py +0 -0
  235. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pi_recovery.py +0 -0
  236. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pi_session.py +0 -0
  237. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pilot_setup.py +0 -0
  238. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pilot_slots.py +0 -0
  239. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pr_issue_link_workflow.py +0 -0
  240. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_pr_verification.py +0 -0
  241. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_prerequisite_check.py +0 -0
  242. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_progress.py +0 -0
  243. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_progress_wiring.py +0 -0
  244. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_prompt_contract.py +0 -0
  245. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_public_helpers.py +0 -0
  246. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_publish_workflow.py +0 -0
  247. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_question_resume.py +0 -0
  248. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_release_docs_workflow.py +0 -0
  249. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_release_extraction.py +0 -0
  250. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_release_ticket_templates.py +0 -0
  251. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_repo_config.py +0 -0
  252. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_resume_continue_e2e.py +0 -0
  253. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_resume_e2e.py +0 -0
  254. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_resume_pr.py +0 -0
  255. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_review_merge.py +0 -0
  256. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_review_verdict.py +0 -0
  257. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_run_artifacts.py +0 -0
  258. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_run_fields.py +0 -0
  259. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_run_id_e2e.py +0 -0
  260. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_run_id_fixture.py +0 -0
  261. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_runner_config.py +0 -0
  262. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_runner_health.py +0 -0
  263. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_runner_source_freshness.py +0 -0
  264. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_scene.py +0 -0
  265. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_scheduler.py +0 -0
  266. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_seam.py +0 -0
  267. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_setup_output_golden.py +0 -0
  268. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_size_ratchet.py +0 -0
  269. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_split_command.py +0 -0
  270. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_src_layout.py +0 -0
  271. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_status_observe.py +0 -0
  272. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_steering_review.py +0 -0
  273. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_suggest.py +0 -0
  274. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_suite_hygiene.py +0 -0
  275. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_systemd_deploy.py +0 -0
  276. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_systemd_timer.py +0 -0
  277. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_ticket_command.py +0 -0
  278. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_ticket_command_registration.py +0 -0
  279. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_user_acceptance_contract.py +0 -0
  280. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_user_summary.py +0 -0
  281. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/tests/test_versioned_comment_block.py +0 -0
  282. {orbi_cli-0.7.46 → orbi_cli-0.7.47}/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.46
3
+ Version: 0.7.47
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.46"
47
+ version = "0.7.47"
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.46"
21
+ __version__ = "0.7.47"
@@ -38,28 +38,68 @@ from orbi.progress import run_marker
38
38
  ACCEPTANCE_HEADING_KEY = "criteria.acceptance_heading"
39
39
  ACCEPTANCE_MARKER = "orbi:acceptance:v1"
40
40
 
41
+ # The marker beside one criterion an ANSWER appended names the question that
42
+ # asked for it (Issue #2241): answering that same question again replaces the
43
+ # line instead of appending a contradictory one, and another question's
44
+ # criterion is never touched.
45
+ CRITERION_MARKER = "orbi:criterion:v1"
46
+
41
47
 
42
48
  def appended_marker() -> str:
43
49
  """The hidden line the appended section ends with."""
44
50
  return f"<!-- {ACCEPTANCE_MARKER} -->"
45
51
 
46
52
 
53
+ def criterion_marker(question_id: str) -> str:
54
+ """The hidden attribution one answer's criterion line carries."""
55
+ return f"<!-- {CRITERION_MARKER} {question_id} -->"
56
+
57
+
47
58
  def acceptance_heading(language_code: str) -> str:
48
59
  """The section heading in one message language."""
49
60
  return language.text(language_code, ACCEPTANCE_HEADING_KEY)
50
61
 
51
62
 
63
+ def criterion_line(criterion: str, question_id: str | None = None) -> str:
64
+ """One `- <criterion>` line, attributed when an answer asked for it."""
65
+ line = f"- {criterion}"
66
+ if question_id is None:
67
+ return line
68
+ return f"{line} {criterion_marker(question_id)}"
69
+
70
+
71
+ def _attributed(line: str, tag: str) -> str | None:
72
+ """The criterion of one line attributed to `tag`, or None."""
73
+ if not line.startswith("- ") or not line.endswith(f" {tag}"):
74
+ return None
75
+ return line[2:-(len(tag) + 1)]
76
+
77
+
78
+ def tagged_criterion(body: object, question_id: str) -> str | None:
79
+ """The criterion the engine already appended for one question, or None."""
80
+ tag = criterion_marker(question_id)
81
+ for line in (body if isinstance(body, str) else "").split("\n"):
82
+ criterion = _attributed(line, tag)
83
+ if criterion is not None:
84
+ return criterion
85
+ return None
86
+
87
+
52
88
  def render_acceptance(
53
89
  conditions: Sequence[str], language_code: str,
90
+ *, question_id: str | None = None,
54
91
  ) -> str:
55
92
  """The section appended to the ticket body: the conditions, verbatim.
56
93
 
57
94
  The heading and the list grammar are the ones a filed Issue uses, so the
58
95
  result reads like an acceptance section a person wrote, and the hidden
59
- marker after it records that Orbi appended it.
96
+ marker after it records that Orbi appended it. `question_id` attributes
97
+ the conditions to the answer that asked for them (Issue #2241).
60
98
  """
61
99
  lines = [acceptance_heading(language_code)]
62
- lines.extend(f"- {condition}" for condition in conditions)
100
+ lines.extend(
101
+ criterion_line(condition, question_id) for condition in conditions
102
+ )
63
103
  lines.extend(["", appended_marker()])
64
104
  return "\n".join(lines)
65
105
 
@@ -538,15 +538,24 @@ def _carry_out(
538
538
  return _amend(
539
539
  issue, text, stage=stage, repo=repo, issue_number=issue_number,
540
540
  dispatch_label=dispatch_label, language_code=language_code,
541
+ question_id=decision.stop.question.id,
541
542
  )
542
543
 
543
544
 
544
545
  def _amend(
545
546
  issue: dict, text: str, *, stage: object, repo: str,
546
547
  issue_number: int, dispatch_label: str, language_code: str,
548
+ question_id: str,
547
549
  ) -> str:
548
- """Append the criterion through the `/orbi amend` logic, then re-queue."""
549
- amended = question.amended_body(issue.get("body"), text, language_code)
550
+ """Append the criterion through the `/orbi amend` logic, then re-queue.
551
+
552
+ 'question_id' attributes it to the question answered, so a later answer
553
+ to the same question REPLACES it instead of adding a contradictory line
554
+ (Issue #2241).
555
+ """
556
+ amended = question.amended_body(
557
+ issue.get("body"), text, language_code, question_id=question_id,
558
+ )
550
559
  if amended is not None:
551
560
  run_step(
552
561
  "append the answer to the Issue body",
@@ -885,6 +894,7 @@ def apply_steering(
885
894
  written = question.amended_body(
886
895
  amended if amended is not None else body,
887
896
  word.decision.text or "", language_code,
897
+ question_id=word.decision.stop.question.id,
888
898
  )
889
899
  # An amendment the body already carries is a no-op write, not
890
900
  # an uncarried answer: the receipt below is what tells the merge
@@ -659,23 +659,47 @@ def comment_body(stop: StopQuestion, option: Option, *, issue: dict,
659
659
  ))
660
660
 
661
661
 
662
- def amended_body(body: object, criterion: str,
663
- language_code: str) -> str | None:
662
+ def amended_body(body: object, criterion: str, language_code: str,
663
+ *, question_id: str | None = None) -> str | None:
664
664
  """'body' with 'criterion' as an acceptance criterion, or None if there.
665
665
 
666
666
  The criterion joins an acceptance section Orbi already appended, and
667
667
  creates one (with its hidden marker) when the ticket has none, so the
668
668
  ticket keeps ONE acceptance block however the amendment arrives.
669
+
670
+ 'question_id' is the question the answer replies to (Issue #2241): a
671
+ criterion Orbi already appended for THAT question is replaced, so a
672
+ person who answers A and then B gets a ticket stating B alone, while
673
+ another question's criterion stays. Without it (the criteria proposal
674
+ of /orbi amend) the append is never a replacement.
669
675
  """
670
676
  existing = body if isinstance(body, str) else ""
677
+ earlier = (
678
+ acceptance_section.tagged_criterion(existing, question_id)
679
+ if question_id is not None else None
680
+ )
681
+ if earlier == criterion:
682
+ # The same answer again: the body already states it.
683
+ return None
684
+ if earlier is not None:
685
+ # The line is rewritten in place, so every other byte of the body
686
+ # -- the ticket's own text included -- stays exactly as it is.
687
+ return existing.replace(
688
+ acceptance_section.criterion_line(earlier, question_id),
689
+ acceptance_section.criterion_line(criterion, question_id),
690
+ 1,
691
+ )
671
692
  if criterion in existing:
672
693
  return None
673
694
  marker = acceptance_section.appended_marker()
695
+ item = acceptance_section.criterion_line(criterion, question_id)
674
696
  if marker in existing:
675
- return existing.replace(marker, f"- {criterion}\n\n{marker}", 1)
697
+ return existing.replace(marker, f"{item}\n\n{marker}", 1)
676
698
  return acceptance_section.appended_body(
677
699
  existing,
678
- acceptance_section.render_acceptance((criterion,), language_code),
700
+ acceptance_section.render_acceptance(
701
+ (criterion,), language_code, question_id=question_id,
702
+ ),
679
703
  )
680
704
 
681
705
 
@@ -709,6 +733,7 @@ def report_once(stop: StopQuestion | None, *, issue: dict, source_repo: str,
709
733
  return None
710
734
  amended = amended_body(
711
735
  issue.get("body"), option.description, language_code,
736
+ question_id=stop.question.id,
712
737
  )
713
738
  if amended is not None:
714
739
  acceptance_section.write_body(number, repo=source_repo, body=amended)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orbi-cli
3
- Version: 0.7.46
3
+ Version: 0.7.47
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
@@ -894,6 +894,156 @@ def test_a_refused_last_answer_supersedes_the_earlier_one(monkeypatch):
894
894
  assert "ai-blocked" in rejection(gh)
895
895
 
896
896
 
897
+ # --------------------------------------------------------------------------
898
+ # one answer per question: a changed answer replaces the earlier amendment
899
+ # (Issue #2241)
900
+ # --------------------------------------------------------------------------
901
+
902
+ # The second question the same ticket asks after it stops again: its own
903
+ # options and its own id, so its criterion is a different decision.
904
+ NEXT_QUESTION = {
905
+ "id": "q2",
906
+ "kind": "choice",
907
+ "summary": "The note's tag outlived the note's name.",
908
+ "question": "Should a tag survive a rename?",
909
+ "options": [
910
+ {
911
+ "label": "Keep the tag on rename",
912
+ "description": SECOND_CRITERION,
913
+ "action": "amend_requeue",
914
+ },
915
+ {
916
+ "label": "Drop the tag on rename",
917
+ "description": "A renamed note loses its tag.",
918
+ "action": "amend_requeue",
919
+ },
920
+ ],
921
+ }
922
+
923
+ THIRD_LABEL = "Drop the tag on rename"
924
+ THIRD_CRITERION = "A renamed note loses its tag."
925
+
926
+
927
+ def _stop_again(gh: FakeGh, payload: dict = NEXT_QUESTION) -> None:
928
+ """The ticket stops a second time and asks a NEW question (new id)."""
929
+ gh.comment(
930
+ TICKET,
931
+ f"{RUN_MARKER}\n<!-- orbi:comment=failure -->\n\n"
932
+ f"The delivery stopped again.\n\n"
933
+ f"{question.render_stop(stop(payload), 'en')}",
934
+ login="orbi-bot",
935
+ )
936
+
937
+
938
+ def test_a_changed_answer_replaces_the_earlier_amendment(monkeypatch):
939
+ """Acceptance 1 (Issue #2241): A is amended by one scan, B arrives after
940
+ that amendment was written, and the next scan REPLACES A's criterion --
941
+ the body never carries two contradictory acceptance lines."""
942
+ gh = _gh(monkeypatch)
943
+ stopped_ticket(gh, TWO_WAYS, labels=(PR_OPENED_LABEL,))
944
+ post(gh, value="Add the assumption")
945
+
946
+ stopped_scans.run(REPO, language_code="en")
947
+
948
+ assert f"- {CRITERION}" in gh.issues[TICKET]["body"]
949
+
950
+ post(gh, value=SECOND_LABEL)
951
+
952
+ stopped_scans.run(REPO, language_code="en")
953
+
954
+ body = gh.issues[TICKET]["body"]
955
+ assert f"- {SECOND_CRITERION}" in body
956
+ assert CRITERION not in body
957
+ assert body.count(APPENDED_MARKER) == 1
958
+ assert len(successes(gh)) == 2
959
+
960
+
961
+ def test_a_changed_answer_at_ai_blocked_replaces_the_earlier_amendment(
962
+ monkeypatch, tmp_path,
963
+ ):
964
+ """Acceptance 1 through the real tick: the first answer is carried out
965
+ and re-queues the ticket, then the SAME question is answered again and
966
+ the earlier criterion goes."""
967
+ gh = _gh(monkeypatch)
968
+ stopped_ticket(gh, TWO_WAYS, labels=(BLOCKED_LABEL,), body=BODY)
969
+ post(gh, value="Add the assumption")
970
+
971
+ tick(monkeypatch, tmp_path, gh)
972
+
973
+ assert f"- {CRITERION}" in gh.issues[TICKET]["body"]
974
+
975
+ # The delivery stops again on the same question and the person changes
976
+ # their answer.
977
+ gh.issues[TICKET]["labels"] = [BLOCKED_LABEL]
978
+ post(gh, value=SECOND_LABEL)
979
+
980
+ tick(monkeypatch, tmp_path, gh)
981
+
982
+ body = gh.issues[TICKET]["body"]
983
+ assert f"- {SECOND_CRITERION}" in body
984
+ assert CRITERION not in body
985
+ assert len(successes(gh)) == 2
986
+
987
+
988
+ def test_an_answer_to_another_question_keeps_both_criteria(monkeypatch):
989
+ """Acceptance 2: two different questions answered on the same Issue --
990
+ both sentences stay, because each belongs to its own question."""
991
+ gh = _gh(monkeypatch)
992
+ stopped_ticket(gh, TWO_WAYS, labels=(PR_OPENED_LABEL,))
993
+ post(gh, value="Add the assumption")
994
+
995
+ stopped_scans.run(REPO, language_code="en")
996
+
997
+ assert f"- {CRITERION}" in gh.issues[TICKET]["body"]
998
+
999
+ _stop_again(gh)
1000
+ post(gh, value=SECOND_LABEL, q="q2")
1001
+
1002
+ stopped_scans.run(REPO, language_code="en")
1003
+
1004
+ body = gh.issues[TICKET]["body"]
1005
+ assert f"- {CRITERION}" in body
1006
+ assert f"- {SECOND_CRITERION}" in body
1007
+ assert body.count(APPENDED_MARKER) == 1
1008
+ assert len(successes(gh)) == 2
1009
+
1010
+ # A third answer to that second question replaces only ITS criterion.
1011
+ post(gh, value=THIRD_LABEL, q="q2")
1012
+
1013
+ stopped_scans.run(REPO, language_code="en")
1014
+
1015
+ body = gh.issues[TICKET]["body"]
1016
+ assert f"- {CRITERION}" in body
1017
+ assert f"- {THIRD_CRITERION}" in body
1018
+ assert SECOND_CRITERION not in body
1019
+
1020
+
1021
+ def test_a_changed_answer_leaves_the_tickets_own_text_untouched(monkeypatch):
1022
+ """Acceptance 3: everything outside the engine's amendment section is
1023
+ unchanged byte for byte, before and after the answer changes."""
1024
+ own = (
1025
+ "## Outcome\nUsers keep notes.\n\n"
1026
+ "## Acceptance\n- The notes list loads in under a second."
1027
+ )
1028
+ gh = _gh(monkeypatch)
1029
+ stopped_ticket(gh, TWO_WAYS, labels=(PR_OPENED_LABEL,), body=own)
1030
+ post(gh, value="Add the assumption")
1031
+
1032
+ stopped_scans.run(REPO, language_code="en")
1033
+
1034
+ post(gh, value=SECOND_LABEL)
1035
+
1036
+ stopped_scans.run(REPO, language_code="en")
1037
+
1038
+ body = gh.issues[TICKET]["body"]
1039
+ assert body.startswith(own)
1040
+ # The engine's section is the ONE block after the ticket's own text and
1041
+ # it states B alone.
1042
+ section = body[len(own):]
1043
+ assert f"- {SECOND_CRITERION}" in section
1044
+ assert CRITERION not in section
1045
+
1046
+
897
1047
  # --------------------------------------------------------------------------
898
1048
  # the decision rules: what one answer asks for, and what is refused
899
1049
  # --------------------------------------------------------------------------
@@ -319,6 +319,15 @@ def test_the_clarification_proposal_contract_is_documented():
319
319
  assert marker in text, f"proposal contract misses: {marker!r}"
320
320
 
321
321
 
322
+ def test_the_changed_answer_contract_is_documented():
323
+ """Issue #2241: the attribution a criterion carries is public, so a
324
+ consumer reads which question an amendment answers from the marker."""
325
+ assert "orbi:criterion:v1" in public_contracts_text()
326
+ assert "orbi:criterion:v1" in ZH_PUBLIC_CONTRACTS.read_text(
327
+ encoding="utf-8",
328
+ )
329
+
330
+
322
331
  def test_the_command_receipt_contract_is_documented():
323
332
  text = public_contracts_text()
324
333
  for marker in RECEIPT_CONTRACT_MARKERS:
@@ -15,7 +15,7 @@ from pathlib import Path
15
15
 
16
16
  import pytest
17
17
 
18
- from orbi import question, review_verdict
18
+ from orbi import acceptance_section, question, review_verdict
19
19
 
20
20
  FIXTURE = (
21
21
  Path(__file__).resolve().parent / "fixtures" / "question"
@@ -631,6 +631,33 @@ def test_amended_body_appends_once_and_joins_an_existing_section():
631
631
  )
632
632
 
633
633
 
634
+ def test_amended_body_replaces_the_criterion_of_the_same_question():
635
+ """Issue #2241: a criterion carries the question that asked for it, so
636
+ answering THAT question again replaces it instead of appending a
637
+ contradictory line, while another question's criterion stays."""
638
+ ticket = "## Outcome\n\nUsers keep notes."
639
+ first = question.amended_body(
640
+ ticket, "A criterion", "en", question_id="q1",
641
+ )
642
+ assert f"- A criterion {acceptance_section.criterion_marker('q1')}" in first
643
+ # The same answer again is no write at all.
644
+ assert question.amended_body(
645
+ first, "A criterion", "en", question_id="q1",
646
+ ) is None
647
+
648
+ second = question.amended_body(first, "B criterion", "en", question_id="q1")
649
+ assert "B criterion" in second and "A criterion" not in second
650
+ assert second.count(acceptance_section.appended_marker()) == 1
651
+
652
+ # Another question's answer keeps its own line.
653
+ other = question.amended_body(second, "C criterion", "en", question_id="q2")
654
+ assert "- B criterion" in other and "- C criterion" in other
655
+
656
+ # No question id: the append-only rule of the criteria proposal path.
657
+ appended = question.amended_body(first, "D criterion", "en")
658
+ assert "- A criterion" in appended and "- D criterion" in appended
659
+
660
+
634
661
  @pytest.mark.parametrize("payload", [
635
662
  {"id": "q1", "summary": "s", "question": "q",
636
663
  "options": [{"label": "a", "description": "d"},
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes