orbi-cli 0.7.51__tar.gz → 0.7.53__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.
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/PKG-INFO +1 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/pyproject.toml +1 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/__init__.py +1 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/answer.py +14 -5
- orbi_cli-0.7.53/src/orbi/blocked_comment.py +12 -0
- orbi_cli-0.7.53/src/orbi/claim_race.py +238 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/clarify.py +11 -10
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/command_line.py +25 -2
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/draft.py +129 -34
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/failure.py +22 -21
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/failure_report.py +35 -21
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/github.py +15 -15
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/implementation_delivery.py +51 -128
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/language.py +5 -2
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/language_failure.py +19 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/language_terms.py +24 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/milestone.py +0 -10
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/notify.py +88 -122
- orbi_cli-0.7.53/src/orbi/notify_text.py +316 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pi_process.py +21 -23
- orbi_cli-0.7.53/src/orbi/plan_milestone.py +55 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/progress.py +41 -65
- orbi_cli-0.7.53/src/orbi/provider_balance.py +107 -0
- orbi_cli-0.7.53/src/orbi/recoverable_failure.py +282 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/resume_scan.py +44 -44
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/runner.py +0 -1
- orbi_cli-0.7.53/src/orbi/stop_comment.py +55 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/suggest.py +52 -55
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/ticket_command.py +5 -3
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi_cli.egg-info/PKG-INFO +1 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi_cli.egg-info/SOURCES.txt +10 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_answer.py +122 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_delivery.py +43 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_pi.py +80 -1
- orbi_cli-0.7.53/tests/test_claim_race.py +381 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_clarify.py +3 -3
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_draft.py +34 -1
- orbi_cli-0.7.53/tests/test_draft_repo_view.py +241 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_failure.py +173 -3
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_fix_needed_loop.py +33 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_message_language.py +27 -14
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_notify.py +393 -85
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_progress.py +77 -12
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_progress_wiring.py +200 -22
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_resume_e2e.py +29 -8
- orbi_cli-0.7.53/tests/test_resume_other_executor.py +245 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_run_id_e2e.py +167 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_suggest.py +3 -0
- orbi_cli-0.7.53/tests/test_suggest_repo_view.py +181 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_user_summary.py +4 -2
- orbi_cli-0.7.51/src/orbi/blocked_comment.py +0 -36
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/LICENSE +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/README.md +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/docs/licenses/sustainable-use-license.md +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/setup.cfg +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/acceptance_section.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/amend_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/base_ci_fix.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/base_ci_red.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/blocked_record.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/blocked_scan.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/body_steering.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/branch_reclaim.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/check_permission.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/checks.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/claim.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/clarify_proposal.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/clarify_stop.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/cli.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/cli_commands.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/cli_doctor.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/cli_parser.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/cli_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/cli_status.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/cli_ticket_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/comment_kind.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/comment_rest_id.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/comment_trust.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/config_hint.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/delivery_comment.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/delivery_labels.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/delivery_push.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/delivery_scene.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/draft_cli.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/draft_document.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/draft_marker.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/engine_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/example_config.toml +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/extensions/clarify_verdict.ts +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/extensions/draft_tools.ts +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/failure_evidence.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/gh_response.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/git_identity.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/git_transport.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/github_feedback.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/gitops.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/human_review.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/journal.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/language_terms_criteria.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/language_terms_fix.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/launchd_deploy.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/merge_blocked.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/merge_exec.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/merge_gate.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/merge_handoff.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/milestone_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/milestone_errors.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/ops_delivery.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pi_activity.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pi_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pi_exec.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pi_idle.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pi_recovery.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pi_session.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pi_stream_log.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pilot_setup.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pilot_slots.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pr_head_sync.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/pr_verification.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/progress_display.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/progress_outcome.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/progress_summary.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/question.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/release.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/release_closeout.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/release_comments.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/release_declaration.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/release_git.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/release_notes.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/release_run.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/repo_config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/requeue.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/restart_scan.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/resume_verification.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/review_merge.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/review_rounds.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/review_verdict.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/run_fields.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/run_state.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/runner_health.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/runner_marker.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/runner_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/scene.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/scheduler.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/scheduler_units.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/session_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/setup_checks.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/setup_config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/source_pool.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/split_apply.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/split_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/status_observe.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/steering.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/stopped_scans.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/systemd_deploy.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/terminal_stops.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/tick_reads.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/ticket_command_registry.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/ticket_criteria.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/user_summary.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi/worktree_retention.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi_cli.egg-info/dependency_links.txt +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi_cli.egg-info/entry_points.txt +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/src/orbi_cli.egg-info/top_level.txt +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_agents_md.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_amend_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_apply_label_patch.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_base_branch_failure.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_base_ci_red.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_blocked_comment.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_body_steering.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_adapters.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_preflight.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_release.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_runner_claim_resume.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_runner_failure_report.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_runner_main.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_runner_milestone.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_runner_outcome.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_runner_prompt.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_runner_reconcile.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_runner_session.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_bootstrap_runner_tickets.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_branch_reclaim.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_check_permission.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_ci_failure_issue_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_ci_failure_triage.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_ci_macos_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_ci_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_claude_plugin.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_cli_golden.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_cli_install.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_cli_milestone.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_cli_packaging.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_cli_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_cli_ticket_commands.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_command_receipt_contract.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_comment_identity.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_comment_readers_contract.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_comment_rest_id.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_comment_trust.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_concurrency_e2e.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_constitution.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_coverage_gate.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_deliver_pr_fakes.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_delivery_branch_delete.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_delivery_labels.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_delivery_scene.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_docker_docs.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_docker_entrypoint.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_docker_image_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_docs_i18n.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_docs_issue_shapes.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_docs_labels.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_docs_mermaid.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_docs_releases.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_docs_safety_matrix.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_docs_single_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_docs_site.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_engine_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_failure_report.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_gh_read_retry.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_gh_response.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_git_base_smoke.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_git_merge_smoke.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_git_network_retry.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_git_transport.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_github.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_github_fakes.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_gitops.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_gitops_fakes.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_human_review.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_import_graph.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_install_sh.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_issue_1367.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_issue_461.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_issue_template_config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_journal.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_journal_events.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_launchd_deploy.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_license.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_merge_exec_extraction.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_milestone_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_ops_e2e.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_orbi.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_orbi_dashboard.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_orbi_exporter.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_patch_ratchet.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pi_activity.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pi_child_reap.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pi_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pi_exec.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pi_extensions.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pi_provider_templates.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pi_recovery.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pi_session.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pilot_setup.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pilot_slots.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pr_issue_link_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_pr_verification.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_prerequisite_check.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_prompt_contract.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_public_contracts.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_public_helpers.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_publish_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_question.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_question_resume.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_release_docs_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_release_extraction.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_release_ticket_templates.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_repo_config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_resume_continue_e2e.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_resume_pr.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_review_merge.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_review_verdict.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_run_artifacts.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_run_fields.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_run_id_fixture.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_runner_config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_runner_health.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_runner_source_freshness.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_scene.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_scheduler.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_seam.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_setup_output_golden.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_size_ratchet.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_split_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_src_layout.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_status_observe.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_steering_review.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_suite_hygiene.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_systemd_deploy.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_systemd_timer.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_tick_reads.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_ticket_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_ticket_command_registration.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_user_acceptance_contract.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/tests/test_versioned_comment_block.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.53}/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.
|
|
3
|
+
Version: 0.7.53
|
|
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.
|
|
47
|
+
version = "0.7.53"
|
|
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"
|
|
@@ -25,9 +25,10 @@ The answer is a RECORD command of the ticket-command layer
|
|
|
25
25
|
hidden block, not a `/orbi` line, so it has no typed spelling and no CLI
|
|
26
26
|
entry, and the layer's one receipt writer and idempotency rule are the ones
|
|
27
27
|
it uses (`_post_command_receipt`, `runner_receipt`). Engine output is told
|
|
28
|
-
apart by its RUN MARKER prefix (`ticket_command.carries_run_marker`)
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
apart by its RUN MARKER prefix (`ticket_command.carries_run_marker`) or its
|
|
29
|
+
own command receipt (`ticket_command.carries_command_receipt`), never by the
|
|
30
|
+
`<!-- orbi` marker the record itself carries -- otherwise the answer would
|
|
31
|
+
be skipped exactly like engine output and never read at all.
|
|
31
32
|
|
|
32
33
|
What the engine does with one answer, and nothing else:
|
|
33
34
|
|
|
@@ -96,6 +97,7 @@ from orbi.ticket_command import (
|
|
|
96
97
|
CommandSpec,
|
|
97
98
|
TicketCommandError,
|
|
98
99
|
_post_command_receipt,
|
|
100
|
+
carries_command_receipt,
|
|
99
101
|
carries_run_marker,
|
|
100
102
|
command_comment_key,
|
|
101
103
|
command_receipt_marker,
|
|
@@ -717,8 +719,9 @@ def _pending(
|
|
|
717
719
|
holds a merge. "Not carried out" is read from the ticket, never from
|
|
718
720
|
memory: the engine's one receipt (success or rejection) is keyed on the
|
|
719
721
|
answer comment, so a scanned answer is not pending. The other rules are
|
|
720
|
-
the scan's too: a run-marked comment
|
|
721
|
-
|
|
722
|
+
the scan's too: a run-marked comment or one of the engine's own command
|
|
723
|
+
receipts is engine output, an answer older than the newest stop is
|
|
724
|
+
stale, and the author must be trusted.
|
|
722
725
|
"""
|
|
723
726
|
try:
|
|
724
727
|
located = question.latest_stop(comments)
|
|
@@ -732,6 +735,9 @@ def _pending(
|
|
|
732
735
|
for comment in comments:
|
|
733
736
|
if not isinstance(comment, dict) or carries_run_marker(comment):
|
|
734
737
|
continue
|
|
738
|
+
if carries_command_receipt(
|
|
739
|
+
comment, command_receipt_marker(ANSWER_COMMAND)):
|
|
740
|
+
continue
|
|
735
741
|
if not _newer(comment, stop_comment, comments):
|
|
736
742
|
continue
|
|
737
743
|
blocks = answer_occurrences(comment.get("body"))
|
|
@@ -854,6 +860,9 @@ def apply_steering(
|
|
|
854
860
|
for comment in fresh:
|
|
855
861
|
if not isinstance(comment, dict) or carries_run_marker(comment):
|
|
856
862
|
continue
|
|
863
|
+
if carries_command_receipt(
|
|
864
|
+
comment, command_receipt_marker(ANSWER_COMMAND)):
|
|
865
|
+
continue
|
|
857
866
|
occurrences.extend(
|
|
858
867
|
(comment, block)
|
|
859
868
|
for block in answer_occurrences(comment.get("body"))
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""The ONE exit for a comment that blocks an Issue (Issues #1730, #2245).
|
|
2
|
+
|
|
3
|
+
Every blocked scene imports `post_blocked_comment` from here; the exit itself
|
|
4
|
+
lives in `orbi.stop_comment` since Issue #2287, because it now also sends the
|
|
5
|
+
stop's Telegram alert and this module sits at its size-ratchet ceiling. The
|
|
6
|
+
name stays importable from this module exactly as before — the same
|
|
7
|
+
re-export the `failure_evidence` split used (Issue #2202).
|
|
8
|
+
"""
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from orbi.delivery_labels import EVENT_BLOCKED, READY_LABEL # noqa: F401
|
|
12
|
+
from orbi.stop_comment import post_blocked_comment as post_blocked_comment
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"""The fresh-claim race between two Orbi executors (Issue #2298).
|
|
2
|
+
|
|
3
|
+
One Issue can be served by two Orbi deployments under two GitHub accounts —
|
|
4
|
+
an Orbi Cloud sandbox and a self-hosted engine are the observed pair — and
|
|
5
|
+
both claim it: the ai-in-progress label each reads is written by the other
|
|
6
|
+
side only later (self-hosted claimed at 04:31:45, Cloud at 04:31:52, and
|
|
7
|
+
Cloud saw no label). Two guards cover the race, in this order:
|
|
8
|
+
|
|
9
|
+
- claim_window_yield — the label or the stable branch the OTHER side wrote
|
|
10
|
+
before our claim write (the pre-#2298 guard, moved here unchanged);
|
|
11
|
+
- yield_to_another_executor — after both sides posted their own started
|
|
12
|
+
comment and before either runs Pi, the started comments themselves
|
|
13
|
+
(other_executor_live_started).
|
|
14
|
+
|
|
15
|
+
No new label, no new marker and no state store: GitHub's own comment list is
|
|
16
|
+
the state both sides read, and both reach the same answer because they read
|
|
17
|
+
the same list. A yield is not a failure — no failure comment, no label
|
|
18
|
+
change, no orbi#2292 streak — and no staleness timeout is added: a removed
|
|
19
|
+
deployment is a human relabel (orbi#2256), while same-host instances stay
|
|
20
|
+
governed by the orbi#1319 claim.lock.
|
|
21
|
+
|
|
22
|
+
The module is a sibling of the claim domain (Article 3): it imports the
|
|
23
|
+
journal seam and the comment readers, never orbi.runner.
|
|
24
|
+
"""
|
|
25
|
+
from __future__ import annotations
|
|
26
|
+
|
|
27
|
+
from collections.abc import Callable
|
|
28
|
+
|
|
29
|
+
from orbi import clarify
|
|
30
|
+
from orbi.comment_kind import (
|
|
31
|
+
COMMENT_KIND_FAILURE,
|
|
32
|
+
COMMENT_KIND_MERGED,
|
|
33
|
+
COMMENT_KIND_REQUEUED,
|
|
34
|
+
COMMENT_KIND_STARTED,
|
|
35
|
+
comment_kind,
|
|
36
|
+
)
|
|
37
|
+
from orbi.comment_trust import trusted_comments
|
|
38
|
+
from orbi.config import RunnerConfig
|
|
39
|
+
from orbi.github import (
|
|
40
|
+
authenticated_github_login,
|
|
41
|
+
has_in_progress_label,
|
|
42
|
+
strip_bot_suffix,
|
|
43
|
+
)
|
|
44
|
+
from orbi.gitops import stable_branch_exists
|
|
45
|
+
from orbi.journal import event
|
|
46
|
+
|
|
47
|
+
# The kinds that END an account's own started run. Paired by ACCOUNT, never
|
|
48
|
+
# by run marker: a failure comment does not always carry the marker (the
|
|
49
|
+
# self-hosted failure on paseo-orbi#61 has none), and another account's
|
|
50
|
+
# terminal comment must never end this one's run (Cloud's 05:11 failure on
|
|
51
|
+
# paseo-orbi#62 landed while the self-hosted run was still reviewing).
|
|
52
|
+
_RUN_END_KINDS = frozenset({
|
|
53
|
+
COMMENT_KIND_FAILURE, COMMENT_KIND_MERGED, COMMENT_KIND_REQUEUED,
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _with_comment_author(comment: dict) -> dict:
|
|
58
|
+
"""The comment carrying GraphQL's "author" (Issue #2298).
|
|
59
|
+
|
|
60
|
+
GitHub names one comment author twice: "author.login" in the GraphQL
|
|
61
|
+
read ("gh issue view --json comments") and "user.login" in the REST
|
|
62
|
+
list the progress publisher reads with complete pagination. Every
|
|
63
|
+
comment reader in orbi reads "author", so the REST shape is renamed
|
|
64
|
+
here once and the trust rule and the scan stay shape-agnostic.
|
|
65
|
+
"""
|
|
66
|
+
if "author" in comment or not isinstance(comment.get("user"), dict):
|
|
67
|
+
return comment
|
|
68
|
+
return {**comment, "author": comment["user"]}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _author_login(comment: dict) -> str | None:
|
|
72
|
+
"""The author login of one comment, or None when it carries none."""
|
|
73
|
+
author = comment.get("author")
|
|
74
|
+
login = author.get("login") if isinstance(author, dict) else None
|
|
75
|
+
return login if isinstance(login, str) else None
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def _comment_account(comment: dict) -> str:
|
|
79
|
+
"""The account that wrote the comment, [bot] suffix normalized.
|
|
80
|
+
|
|
81
|
+
Both readers hand this only comments carrying an author login: the
|
|
82
|
+
trusted mode refuses one without it (comment_is_trusted) and the
|
|
83
|
+
untrusted mode filters on `_author_login`.
|
|
84
|
+
"""
|
|
85
|
+
return strip_bot_suffix(comment["author"]["login"])
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def other_executor_live_started(
|
|
89
|
+
comments: list[dict], *, repo: str, require_trust: bool = True,
|
|
90
|
+
) -> dict | None:
|
|
91
|
+
"""Another executor's started comment that is still live, or None.
|
|
92
|
+
|
|
93
|
+
The race is decided from the comment list, and both sides reach the
|
|
94
|
+
same answer because they read the same list:
|
|
95
|
+
|
|
96
|
+
- the list ORDER is the timeline (oldest first). createdAt is only
|
|
97
|
+
second-resolution and two starts in one second are common, so it is
|
|
98
|
+
never compared: a same-second start is resolved by position;
|
|
99
|
+
- a started comment is live from its own position until a LATER
|
|
100
|
+
merged/failure/requeued comment by the SAME account ends it; another
|
|
101
|
+
account's terminal comment never ends it;
|
|
102
|
+
- a started comment posted while ANOTHER account already had a live
|
|
103
|
+
started comment is the yielding side of the race and is never live,
|
|
104
|
+
so a yielded start can never block a later claim by either side;
|
|
105
|
+
- with `require_trust` (the fresh claim, orbi#2298) the author must
|
|
106
|
+
pass the trusted-author rule every comment reader uses
|
|
107
|
+
(comment_trust.trusted_comments): the run marker does not
|
|
108
|
+
authenticate an author, so a copied marker from a drive-by account
|
|
109
|
+
can never stall a CLAIM. The resume guard (orbi#2299) turns the rule
|
|
110
|
+
off because it must yield to a run whose author this deployment does
|
|
111
|
+
not trust at all — an Orbi Cloud bot has no repository write
|
|
112
|
+
permission here, which is exactly why its scene lookup fails — and a
|
|
113
|
+
yield never blocks the Issue: the next tick re-reads.
|
|
114
|
+
|
|
115
|
+
The surviving live start of an account other than the local one (the
|
|
116
|
+
active gh credential's login) is returned; None means no other
|
|
117
|
+
executor is running this Issue. Our own account is never "another
|
|
118
|
+
executor": a same-account restart is this deployment's own run. A
|
|
119
|
+
re-read that lags our own post (our started comment missing) leaves
|
|
120
|
+
the other executor's live start standing - the order cannot be
|
|
121
|
+
established, so this side yields; with no other live start there is
|
|
122
|
+
nothing to yield to.
|
|
123
|
+
|
|
124
|
+
A pure scan over an already-fetched comment list (either GitHub shape).
|
|
125
|
+
"""
|
|
126
|
+
normalized = [_with_comment_author(comment) for comment in comments]
|
|
127
|
+
accounts = (
|
|
128
|
+
trusted_comments(normalized, repo=repo) if require_trust
|
|
129
|
+
else [comment for comment in normalized
|
|
130
|
+
if _author_login(comment) is not None]
|
|
131
|
+
)
|
|
132
|
+
live: dict[str, dict] = {}
|
|
133
|
+
for comment in accounts:
|
|
134
|
+
kind = comment_kind(comment.get("body"))
|
|
135
|
+
if kind != COMMENT_KIND_STARTED and kind not in _RUN_END_KINDS:
|
|
136
|
+
continue
|
|
137
|
+
account = _comment_account(comment)
|
|
138
|
+
if kind in _RUN_END_KINDS:
|
|
139
|
+
live.pop(account, None)
|
|
140
|
+
elif not any(account != other for other in live):
|
|
141
|
+
live[account] = comment
|
|
142
|
+
# else: posted after another account's live start - the yielding
|
|
143
|
+
# side, never live itself.
|
|
144
|
+
if not live:
|
|
145
|
+
# Nobody started: there is nothing to compare and no reason to
|
|
146
|
+
# read the local identity at all (the common, uncontended claim).
|
|
147
|
+
return None
|
|
148
|
+
own = strip_bot_suffix(authenticated_github_login())
|
|
149
|
+
return next(
|
|
150
|
+
(comment for account, comment in live.items() if account != own),
|
|
151
|
+
None,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def claim_window_yield(
|
|
156
|
+
issue: dict, facts, config: RunnerConfig, *, source_repo: str,
|
|
157
|
+
run_id: str,
|
|
158
|
+
) -> str | None:
|
|
159
|
+
"""The delivery kind a yield needs when the prepare window was claimed.
|
|
160
|
+
|
|
161
|
+
"claim-yielded" when another instance claimed this Issue inside the
|
|
162
|
+
window, "needs-detail" when the thin-ticket gate stops it, None when
|
|
163
|
+
the claim may proceed. The pickup scan and the in-progress recheck
|
|
164
|
+
both predate freeze_base (a seconds-long network round trip), so a
|
|
165
|
+
label - or the stable branch - appearing inside that window means
|
|
166
|
+
another instance got there first: yield without a label write, a
|
|
167
|
+
comment or anything else that could interrupt the winner's in-flight
|
|
168
|
+
delivery; the next tick's scan picks work up again on its own. The
|
|
169
|
+
predicate keys on the repository's dispatch label (#527), not the
|
|
170
|
+
default constant - a custom-label repository's tickets never carry
|
|
171
|
+
ai-ready, and the guard must guard them too.
|
|
172
|
+
"""
|
|
173
|
+
number = int(issue["number"])
|
|
174
|
+
if (facts.in_progress or facts.dispatch_label not in facts.claim_labels
|
|
175
|
+
or facts.takeover_pr is not None):
|
|
176
|
+
return None
|
|
177
|
+
if has_in_progress_label(number, source_repo):
|
|
178
|
+
event("claim_yield", issue=number, reason="in_progress_label")
|
|
179
|
+
return "claim-yielded"
|
|
180
|
+
if not facts.stable_branch_present and stable_branch_exists(
|
|
181
|
+
config.repo_dir, facts.stable_branch,
|
|
182
|
+
):
|
|
183
|
+
event("claim_yield", issue=number, reason="stable_branch_appeared")
|
|
184
|
+
return "claim-yielded"
|
|
185
|
+
if config.clarify_thin_tickets and not clarify.enforce(
|
|
186
|
+
issue, config, source_repo, run_id):
|
|
187
|
+
return "needs-detail"
|
|
188
|
+
return None
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def resume_yields_to_another_executor(
|
|
192
|
+
*, issue: int, source_repo: str, comments: list[dict],
|
|
193
|
+
) -> bool:
|
|
194
|
+
"""Yield this round when another executor's run owns the opened PR.
|
|
195
|
+
|
|
196
|
+
The opened-PR scan (orbi#2299) reads this BEFORE `resume_scene` and
|
|
197
|
+
before the external-PR route: the scene of a delivery another
|
|
198
|
+
deployment is running is not this executor's to recover. Without the
|
|
199
|
+
check a self-hosted engine that does not trust the Cloud bot's
|
|
200
|
+
comments found no trusted scene at all and wrote the
|
|
201
|
+
`failure.scene_blocked` stop onto a live Cloud delivery — and Cloud,
|
|
202
|
+
which trusts the owner, would resume the self-hosted PR. Both sides now
|
|
203
|
+
yield to the live run the comment list names.
|
|
204
|
+
|
|
205
|
+
The trust rule is OFF (see `other_executor_live_started`): the other
|
|
206
|
+
executor's account need not be one this repository trusts, and that
|
|
207
|
+
is the observed pair. A yield is not a failure — no label write, no
|
|
208
|
+
comment, nothing pushed, and no worktree of the other run is touched
|
|
209
|
+
(this executor never opened one for it); the caller moves on to the
|
|
210
|
+
next candidate.
|
|
211
|
+
"""
|
|
212
|
+
if other_executor_live_started(
|
|
213
|
+
comments, repo=source_repo, require_trust=False) is None:
|
|
214
|
+
return False
|
|
215
|
+
event("claim_yield", issue=issue, reason="other_executor_live")
|
|
216
|
+
return True
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
def yield_to_another_executor(
|
|
220
|
+
*, issue: int, source_repo: str, comments: list[dict],
|
|
221
|
+
retire: Callable[[], None],
|
|
222
|
+
) -> bool:
|
|
223
|
+
"""Yield this round when another executor already started the Issue.
|
|
224
|
+
|
|
225
|
+
Runs AFTER this executor posted its own started comment and BEFORE the
|
|
226
|
+
progress comment and Pi: the loser stops here instead of running. It
|
|
227
|
+
keeps the labels, keeps its own started comment, pushes nothing and
|
|
228
|
+
removes only its own local worktree (retire) - the winner's labels and
|
|
229
|
+
branch are left untouched. A yield is not a failure: no failure
|
|
230
|
+
comment, no label change and no orbi#2292 streak. No staleness timeout
|
|
231
|
+
is added - a removed deployment is a human relabel (orbi#2256) - and
|
|
232
|
+
same-host instances stay governed by the orbi#1319 claim.lock.
|
|
233
|
+
"""
|
|
234
|
+
if other_executor_live_started(comments, repo=source_repo) is None:
|
|
235
|
+
return False
|
|
236
|
+
event("claim_yield", issue=issue, reason="other_executor_started")
|
|
237
|
+
retire()
|
|
238
|
+
return True
|
|
@@ -496,12 +496,12 @@ def stop(issue: dict, verdict: ClarifyVerdict, run_id: str, *,
|
|
|
496
496
|
(`ai-ready` by default, #527) and the run's message language.
|
|
497
497
|
"""
|
|
498
498
|
try:
|
|
499
|
-
|
|
500
|
-
issue
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
499
|
+
body = render_comment(
|
|
500
|
+
issue, verdict, run_id, ready_label=ready_label,
|
|
501
|
+
language_code=language_code, status_url=status_url,
|
|
502
|
+
)
|
|
503
|
+
comment_url = comment_issue(
|
|
504
|
+
issue["number"], repo=source_repo, body=body,
|
|
505
505
|
)
|
|
506
506
|
edit_issue(
|
|
507
507
|
issue["number"], repo=source_repo,
|
|
@@ -516,10 +516,11 @@ def stop(issue: dict, verdict: ClarifyVerdict, run_id: str, *,
|
|
|
516
516
|
# Tell the person outside GitHub (Issue #1673): OUTSIDE the try (a
|
|
517
517
|
# notify problem must never turn the failed-write branch into "deliver
|
|
518
518
|
# anyway") and every stop sends — the old `ai-needs-detail` can still
|
|
519
|
-
# be on a ticket someone just re-readied.
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
issue.get("title"),
|
|
519
|
+
# be on a ticket someone just re-readied. The alert quotes the comment
|
|
520
|
+
# this call posted and links it (Issue #2287).
|
|
521
|
+
notify.needs_detail_stop(
|
|
522
|
+
source_repo, issue["number"], issue.get("title"), comment_url=comment_url,
|
|
523
|
+
ready_label=ready_label, language_code=language_code,
|
|
523
524
|
)
|
|
524
525
|
event(
|
|
525
526
|
"clarify_needs_detail", issue=issue["number"],
|
|
@@ -4,8 +4,9 @@ Split out of `orbi.ticket_command` (Issue #2221) so the layer could take the
|
|
|
4
4
|
record command's occurrence (`CommandSpec.occurrence`) and stay inside its
|
|
5
5
|
recorded size ceiling (`tools/size_ratchet.py`). What lives here is exactly
|
|
6
6
|
the spelling side of a command — the anchored matcher the layer compiles from
|
|
7
|
-
a spec, the fenced-code filter, and the per-comment
|
|
8
|
-
`ticket_command` still owns which command wins and
|
|
7
|
+
a spec, the fenced-code filter, the receipt-line reader, and the per-comment
|
|
8
|
+
parse — never a decision: `ticket_command` still owns which command wins and
|
|
9
|
+
what it does.
|
|
9
10
|
|
|
10
11
|
A command author supplies `subcommand` (`/orbi <subcommand>`) plus optional
|
|
11
12
|
legacy `aliases` (`/milestone`), never a regex, so the anchor and the
|
|
@@ -52,6 +53,28 @@ def strip_fenced_code_blocks(text: str) -> str:
|
|
|
52
53
|
return "\n".join(kept)
|
|
53
54
|
|
|
54
55
|
|
|
56
|
+
def carries_command_receipt(comment: object, marker: str) -> bool:
|
|
57
|
+
"""True when a comment body ends with one command receipt's marker.
|
|
58
|
+
|
|
59
|
+
`_post_command_receipt` writes the hidden marker as the receipt's last
|
|
60
|
+
line, and the receipt quotes the occurrence it answers -- for the answer
|
|
61
|
+
record that is the answer block itself. Reading it back would make the
|
|
62
|
+
engine answer its own receipt on every tick (Issue #2295). Only that
|
|
63
|
+
official trailing line counts, so a person's longer comment quoting a
|
|
64
|
+
receipt is still a person's comment.
|
|
65
|
+
"""
|
|
66
|
+
if not isinstance(comment, dict):
|
|
67
|
+
return False
|
|
68
|
+
body = comment.get("body")
|
|
69
|
+
if not isinstance(body, str):
|
|
70
|
+
return False
|
|
71
|
+
last_line = body.rstrip().rsplit("\n", 1)[-1].strip()
|
|
72
|
+
return (
|
|
73
|
+
last_line.startswith(f"<!-- {marker}")
|
|
74
|
+
and last_line.endswith("-->")
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
|
|
55
78
|
def _command_pattern(spec: "CommandSpec") -> re.Pattern[str]:
|
|
56
79
|
"""The anchored matcher the shared layer compiles from a spec."""
|
|
57
80
|
# The spelling must end at whitespace or the line end: `/orbi
|
|
@@ -31,9 +31,13 @@ import json
|
|
|
31
31
|
import logging
|
|
32
32
|
import re
|
|
33
33
|
import subprocess
|
|
34
|
+
from contextlib import contextmanager
|
|
34
35
|
from pathlib import Path
|
|
35
36
|
|
|
36
|
-
from orbi import
|
|
37
|
+
from orbi import (
|
|
38
|
+
clarify, draft_marker, failure, gitops, journal, provider_balance,
|
|
39
|
+
split_command,
|
|
40
|
+
)
|
|
37
41
|
from orbi.acceptance_section import appended_body, write_body
|
|
38
42
|
from orbi.claim import _repo_scan_keys
|
|
39
43
|
from orbi.config import RunnerConfig
|
|
@@ -58,8 +62,9 @@ from orbi.draft_document import (
|
|
|
58
62
|
taken_message,
|
|
59
63
|
taken_options,
|
|
60
64
|
)
|
|
65
|
+
from orbi.failure import failure_detail
|
|
61
66
|
from orbi.github import edit_issue, issue_view, list_issues, list_milestones
|
|
62
|
-
from orbi.journal import event
|
|
67
|
+
from orbi.journal import LOGGER, event, run_command
|
|
63
68
|
from orbi.pi_command import (
|
|
64
69
|
IMPLEMENT_EXCLUDED_SKILLS,
|
|
65
70
|
ROLE_SUGGEST,
|
|
@@ -209,6 +214,90 @@ def _round_payload(payload: dict) -> dict:
|
|
|
209
214
|
return payload
|
|
210
215
|
|
|
211
216
|
|
|
217
|
+
DRAFT_VIEW_DIRNAME = "draft-view"
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def draft_view_path(repo_dir: Path, run_id: str) -> Path:
|
|
221
|
+
"""Where one draft's view of `origin/<base>` lives.
|
|
222
|
+
|
|
223
|
+
Inside the checkout's gitignored `.orbi/` run dirs, so the deployment
|
|
224
|
+
checkout's working tree is never moved (Issue #2276) and no delivery
|
|
225
|
+
worktree ever sees a file it would call dirty.
|
|
226
|
+
"""
|
|
227
|
+
return Path(repo_dir) / ".orbi" / DRAFT_VIEW_DIRNAME / run_id
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def add_draft_view(repo_dir: Path, base_branch: str, run_id: str) -> Path:
|
|
231
|
+
"""Fetch `origin/<base>` under the base-sync lock, then check it out.
|
|
232
|
+
|
|
233
|
+
The detached worktree of the fetched commit IS the drafting session's
|
|
234
|
+
repository view: a delivery never advances the checkout, so its working
|
|
235
|
+
tree can be arbitrarily old. `--detach` keeps the view off every branch,
|
|
236
|
+
so a draft can neither move the checkout nor touch a delivery's
|
|
237
|
+
worktree, and only the fetch writes shared state (the one remote-tracking
|
|
238
|
+
ref the lock guards). `--force` re-creates over the `prunable` entry a
|
|
239
|
+
killed draft left at the same path.
|
|
240
|
+
"""
|
|
241
|
+
gitops.fetch_base_ref(repo_dir, base_branch)
|
|
242
|
+
path = draft_view_path(repo_dir, run_id)
|
|
243
|
+
run_command(
|
|
244
|
+
["git", "worktree", "add", "--detach", "--force", str(path),
|
|
245
|
+
f"origin/{base_branch}"],
|
|
246
|
+
cwd=repo_dir,
|
|
247
|
+
)
|
|
248
|
+
return path
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
def remove_draft_view(repo_dir: Path, path: Path) -> None:
|
|
252
|
+
"""Remove a draft's view; a view already gone is nothing to remove.
|
|
253
|
+
|
|
254
|
+
No `git worktree prune` here: the next view is created with
|
|
255
|
+
`--force`, which re-creates over the `prunable` registration a killed
|
|
256
|
+
draft left behind, while a prune would touch the one `worktrees/`
|
|
257
|
+
registry a delivery running at the same time is writing to.
|
|
258
|
+
"""
|
|
259
|
+
if not Path(path).is_dir():
|
|
260
|
+
return
|
|
261
|
+
run_command(
|
|
262
|
+
["git", "worktree", "remove", "--force", str(path)], cwd=repo_dir,
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
@contextmanager
|
|
267
|
+
def draft_repo_view(config: RunnerConfig, *, run_id: str):
|
|
268
|
+
"""The repository state ONE draft reads (Issue #2276).
|
|
269
|
+
|
|
270
|
+
Yields a detached worktree of `origin/<base_branch>`, fetched at the
|
|
271
|
+
moment the draft starts. The deployment checkout is never advanced —
|
|
272
|
+
deliveries build their worktrees from the remote — so its working tree
|
|
273
|
+
can predate the base by weeks, and a draft that reads it reports
|
|
274
|
+
existing files as missing and cites names the base renamed.
|
|
275
|
+
|
|
276
|
+
A failed fetch FAILS the draft (`draft_failed`): a failed draft is
|
|
277
|
+
recoverable, a stale read is the defect this replaces, so there is no
|
|
278
|
+
fallback to the checkout. The view is removed when the draft ends; the
|
|
279
|
+
checkout and every delivery worktree are never touched.
|
|
280
|
+
"""
|
|
281
|
+
repo_dir = Path(config.repo_dir)
|
|
282
|
+
base_branch = config.base_branch
|
|
283
|
+
try:
|
|
284
|
+
view = add_draft_view(repo_dir, base_branch, run_id)
|
|
285
|
+
except (RuntimeError, subprocess.SubprocessError) as exc:
|
|
286
|
+
raise DraftError(
|
|
287
|
+
"draft_failed", f"read the repository at origin/{base_branch}",
|
|
288
|
+
failure_detail(exc),
|
|
289
|
+
) from exc
|
|
290
|
+
try:
|
|
291
|
+
yield view
|
|
292
|
+
finally:
|
|
293
|
+
try:
|
|
294
|
+
remove_draft_view(repo_dir, view)
|
|
295
|
+
except subprocess.SubprocessError as exc:
|
|
296
|
+
LOGGER.warning(
|
|
297
|
+
"draft view %s could not be removed: %s", view, exc,
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
|
|
212
301
|
def render_context(payload: dict, *, repo_dir: Path) -> str:
|
|
213
302
|
"""The one context a round hands the session.
|
|
214
303
|
|
|
@@ -357,7 +446,10 @@ def _run_answer_session(
|
|
|
357
446
|
The answer file is removed first, so an answer found after a failure is
|
|
358
447
|
the one THIS round wrote: a round that timed out after the model wrote
|
|
359
448
|
its draft still returns that draft, and a round that wrote nothing
|
|
360
|
-
fails.
|
|
449
|
+
fails. A model-provider balance refusal is its own code with the plain
|
|
450
|
+
sentence as its detail — never `session_failed` and never the Python
|
|
451
|
+
exception text, which is where the provider's raw payload lives
|
|
452
|
+
(Issue #2278).
|
|
361
453
|
"""
|
|
362
454
|
out_path.unlink(missing_ok=True)
|
|
363
455
|
try:
|
|
@@ -368,6 +460,11 @@ def _run_answer_session(
|
|
|
368
460
|
)
|
|
369
461
|
except Exception as exc:
|
|
370
462
|
if not out_path.is_file():
|
|
463
|
+
if provider_balance.is_stop(failure.failure_detail(exc)):
|
|
464
|
+
raise DraftError(
|
|
465
|
+
provider_balance.DRAFT_CODE, "run the drafting session",
|
|
466
|
+
provider_balance.DETAIL,
|
|
467
|
+
) from exc
|
|
371
468
|
code = (
|
|
372
469
|
"timeout"
|
|
373
470
|
if isinstance(exc, subprocess.TimeoutExpired)
|
|
@@ -545,36 +642,38 @@ def run_round(
|
|
|
545
642
|
session_root = Path(session_dir).resolve()
|
|
546
643
|
session_root.mkdir(parents=True, exist_ok=True)
|
|
547
644
|
out_path = session_root / DRAFT_ANSWER_FILE
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
645
|
+
with draft_repo_view(config, run_id=run_id) as repo_view:
|
|
646
|
+
payload, answer, taken = _answered_round(
|
|
647
|
+
config, repo, session_root=session_root, payload=payload,
|
|
648
|
+
out_path=out_path, run_id=run_id, repo_view=repo_view,
|
|
649
|
+
)
|
|
650
|
+
if answer.questions:
|
|
651
|
+
return DraftRound(
|
|
652
|
+
reply=named_in_reply(answer.reply, taken),
|
|
653
|
+
questions=answer.questions,
|
|
654
|
+
)
|
|
655
|
+
if not answer.issues:
|
|
656
|
+
# Issue #2201: a reply-only answer asks for no code change, so
|
|
657
|
+
# neither the fidelity pass nor the pre-work check runs.
|
|
658
|
+
return DraftRound(reply=named_in_reply(answer.reply, taken))
|
|
659
|
+
issues, warning = fidelity_pass(
|
|
660
|
+
config, repo, session_root=session_root, run_id=run_id,
|
|
661
|
+
request=_fidelity_request(payload), issues=answer.issues,
|
|
662
|
+
)
|
|
663
|
+
issues, check, warning, reply = _apply_check(
|
|
664
|
+
config, repo, session_root=session_root, payload=payload,
|
|
665
|
+
run_id=run_id, issues=issues, warning=warning, reply=answer.reply,
|
|
666
|
+
repo_view=repo_view,
|
|
667
|
+
)
|
|
553
668
|
return DraftRound(
|
|
554
|
-
reply=named_in_reply(
|
|
555
|
-
|
|
669
|
+
reply=named_in_reply(reply, taken), issues=issues,
|
|
670
|
+
check=check, warning=warning,
|
|
556
671
|
)
|
|
557
|
-
if not answer.issues:
|
|
558
|
-
# Issue #2201: a reply-only answer asks for no code change, so
|
|
559
|
-
# neither the fidelity pass nor the pre-work check runs.
|
|
560
|
-
return DraftRound(reply=named_in_reply(answer.reply, taken))
|
|
561
|
-
issues, warning = fidelity_pass(
|
|
562
|
-
config, repo, session_root=session_root, run_id=run_id,
|
|
563
|
-
request=_fidelity_request(payload), issues=answer.issues,
|
|
564
|
-
)
|
|
565
|
-
issues, check, warning, reply = _apply_check(
|
|
566
|
-
config, repo, session_root=session_root, payload=payload,
|
|
567
|
-
run_id=run_id, issues=issues, warning=warning, reply=answer.reply,
|
|
568
|
-
)
|
|
569
|
-
return DraftRound(
|
|
570
|
-
reply=named_in_reply(reply, taken), issues=issues,
|
|
571
|
-
check=check, warning=warning,
|
|
572
|
-
)
|
|
573
672
|
|
|
574
673
|
|
|
575
674
|
def _answered_round(
|
|
576
675
|
config: RunnerConfig, repo: str, *, session_root: Path, payload: dict,
|
|
577
|
-
out_path: Path, run_id: str,
|
|
676
|
+
out_path: Path, run_id: str, repo_view: Path,
|
|
578
677
|
) -> tuple[dict, DraftAnswer, tuple[Option, ...]]:
|
|
579
678
|
"""Run the session until it drafts or asks what only the person can answer.
|
|
580
679
|
|
|
@@ -592,9 +691,7 @@ def _answered_round(
|
|
|
592
691
|
round_payload = {**payload, "message": message, "conversation": turns}
|
|
593
692
|
_run_answer_session(
|
|
594
693
|
config, repo, session_root=session_root,
|
|
595
|
-
context=render_context(
|
|
596
|
-
round_payload, repo_dir=Path(config.repo_dir),
|
|
597
|
-
),
|
|
694
|
+
context=render_context(round_payload, repo_dir=repo_view),
|
|
598
695
|
out_path=out_path, run_id=run_id,
|
|
599
696
|
resume=any((session_root / DRAFT_SESSION_DIR).glob("*.jsonl")),
|
|
600
697
|
)
|
|
@@ -622,7 +719,7 @@ def _answered_round(
|
|
|
622
719
|
def _apply_check(
|
|
623
720
|
config: RunnerConfig, repo: str, *, session_root: Path, payload: dict,
|
|
624
721
|
run_id: str, issues: tuple[DraftIssue, ...], warning: str | None,
|
|
625
|
-
reply: str,
|
|
722
|
+
reply: str, repo_view: Path,
|
|
626
723
|
) -> tuple[tuple[DraftIssue, ...], str, str | None, str]:
|
|
627
724
|
"""Judge the draft; on a failure rewrite it ONCE and judge again.
|
|
628
725
|
|
|
@@ -645,9 +742,7 @@ def _apply_check(
|
|
|
645
742
|
try:
|
|
646
743
|
_run_answer_session(
|
|
647
744
|
config, repo, session_root=session_root,
|
|
648
|
-
context=render_context(rewrite_payload, repo_dir=
|
|
649
|
-
config.repo_dir,
|
|
650
|
-
)),
|
|
745
|
+
context=render_context(rewrite_payload, repo_dir=repo_view),
|
|
651
746
|
out_path=session_root / DRAFT_ANSWER_FILE, run_id=run_id,
|
|
652
747
|
resume=True,
|
|
653
748
|
)
|