orbi-cli 0.7.51__tar.gz → 0.7.52__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.52}/PKG-INFO +1 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/pyproject.toml +1 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/__init__.py +1 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/draft.py +129 -34
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/failure.py +22 -21
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/failure_report.py +35 -21
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/language_failure.py +19 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pi_process.py +21 -23
- orbi_cli-0.7.52/src/orbi/provider_balance.py +107 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/suggest.py +52 -55
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi_cli.egg-info/PKG-INFO +1 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi_cli.egg-info/SOURCES.txt +3 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_delivery.py +43 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_pi.py +80 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_draft.py +34 -1
- orbi_cli-0.7.52/tests/test_draft_repo_view.py +241 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_failure.py +173 -3
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_fix_needed_loop.py +33 -1
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_suggest.py +3 -0
- orbi_cli-0.7.52/tests/test_suggest_repo_view.py +181 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/LICENSE +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/README.md +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/docs/licenses/sustainable-use-license.md +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/setup.cfg +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/acceptance_section.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/amend_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/answer.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/base_ci_fix.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/base_ci_red.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/blocked_comment.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/blocked_record.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/blocked_scan.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/body_steering.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/branch_reclaim.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/check_permission.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/checks.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/claim.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/clarify.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/clarify_proposal.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/clarify_stop.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/cli.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/cli_commands.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/cli_doctor.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/cli_parser.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/cli_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/cli_status.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/cli_ticket_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/command_line.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/comment_kind.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/comment_rest_id.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/comment_trust.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/config_hint.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/delivery_comment.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/delivery_labels.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/delivery_push.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/delivery_scene.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/draft_cli.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/draft_document.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/draft_marker.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/engine_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/example_config.toml +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/extensions/clarify_verdict.ts +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/extensions/draft_tools.ts +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/failure_evidence.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/gh_response.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/git_identity.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/git_transport.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/github.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/github_feedback.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/gitops.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/human_review.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/implementation_delivery.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/journal.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/language.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/language_terms.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/language_terms_criteria.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/language_terms_fix.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/launchd_deploy.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/merge_blocked.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/merge_exec.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/merge_gate.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/merge_handoff.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/milestone.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/milestone_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/milestone_errors.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/notify.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/ops_delivery.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pi_activity.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pi_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pi_exec.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pi_idle.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pi_recovery.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pi_session.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pi_stream_log.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pilot_setup.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pilot_slots.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pr_head_sync.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/pr_verification.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/progress.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/progress_display.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/progress_outcome.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/progress_summary.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/question.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/release.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/release_closeout.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/release_comments.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/release_declaration.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/release_git.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/release_notes.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/release_run.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/repo_config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/requeue.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/restart_scan.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/resume_scan.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/resume_verification.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/review_merge.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/review_rounds.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/review_verdict.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/run_fields.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/run_state.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/runner.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/runner_health.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/runner_marker.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/runner_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/scene.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/scheduler.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/scheduler_units.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/session_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/setup_checks.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/setup_config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/source_pool.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/split_apply.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/split_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/status_observe.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/steering.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/stopped_scans.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/systemd_deploy.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/terminal_stops.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/tick_reads.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/ticket_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/ticket_command_registry.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/ticket_criteria.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/user_summary.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi/worktree_retention.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi_cli.egg-info/dependency_links.txt +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi_cli.egg-info/entry_points.txt +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/src/orbi_cli.egg-info/top_level.txt +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_agents_md.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_amend_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_answer.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_apply_label_patch.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_base_branch_failure.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_base_ci_red.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_blocked_comment.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_body_steering.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_adapters.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_preflight.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_release.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_runner_claim_resume.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_runner_failure_report.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_runner_main.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_runner_milestone.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_runner_outcome.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_runner_prompt.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_runner_reconcile.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_runner_session.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_bootstrap_runner_tickets.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_branch_reclaim.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_check_permission.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_ci_failure_issue_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_ci_failure_triage.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_ci_macos_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_ci_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_clarify.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_claude_plugin.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_cli_golden.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_cli_install.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_cli_milestone.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_cli_packaging.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_cli_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_cli_ticket_commands.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_command_receipt_contract.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_comment_identity.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_comment_readers_contract.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_comment_rest_id.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_comment_trust.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_concurrency_e2e.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_constitution.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_coverage_gate.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_deliver_pr_fakes.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_delivery_branch_delete.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_delivery_labels.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_delivery_scene.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_docker_docs.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_docker_entrypoint.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_docker_image_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_docs_i18n.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_docs_issue_shapes.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_docs_labels.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_docs_mermaid.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_docs_releases.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_docs_safety_matrix.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_docs_single_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_docs_site.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_engine_source.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_failure_report.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_gh_read_retry.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_gh_response.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_git_base_smoke.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_git_merge_smoke.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_git_network_retry.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_git_transport.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_github.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_github_fakes.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_gitops.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_gitops_fakes.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_human_review.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_import_graph.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_install_sh.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_issue_1367.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_issue_461.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_issue_template_config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_journal.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_journal_events.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_launchd_deploy.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_license.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_merge_exec_extraction.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_message_language.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_milestone_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_notify.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_ops_e2e.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_orbi.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_orbi_dashboard.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_orbi_exporter.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_patch_ratchet.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pi_activity.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pi_child_reap.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pi_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pi_exec.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pi_extensions.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pi_provider_templates.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pi_recovery.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pi_session.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pilot_setup.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pilot_slots.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pr_issue_link_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_pr_verification.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_prerequisite_check.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_progress.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_progress_wiring.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_prompt_contract.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_public_contracts.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_public_helpers.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_publish_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_question.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_question_resume.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_release_docs_workflow.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_release_extraction.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_release_ticket_templates.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_repo_config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_resume_continue_e2e.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_resume_e2e.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_resume_pr.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_review_merge.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_review_verdict.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_run_artifacts.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_run_fields.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_run_id_e2e.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_run_id_fixture.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_runner_config.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_runner_health.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_runner_source_freshness.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_scene.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_scheduler.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_seam.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_setup_output_golden.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_size_ratchet.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_split_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_src_layout.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_status_observe.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_steering_review.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_suite_hygiene.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_systemd_deploy.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_systemd_timer.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_tick_reads.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_ticket_command.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_ticket_command_registration.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_user_acceptance_contract.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_user_summary.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/tests/test_versioned_comment_block.py +0 -0
- {orbi_cli-0.7.51 → orbi_cli-0.7.52}/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.52
|
|
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.52"
|
|
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"
|
|
@@ -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
|
)
|
|
@@ -26,7 +26,7 @@ import json
|
|
|
26
26
|
import re
|
|
27
27
|
import subprocess
|
|
28
28
|
|
|
29
|
-
from orbi import gh_response, language, user_summary
|
|
29
|
+
from orbi import gh_response, language, provider_balance, user_summary
|
|
30
30
|
from orbi.comment_kind import parse_versioned_block
|
|
31
31
|
|
|
32
32
|
SCHEMA_VERSION = 1
|
|
@@ -57,6 +57,8 @@ REASON_CODES = frozenset({
|
|
|
57
57
|
"human_decision_required",
|
|
58
58
|
# The GitHub/provider credential is missing or rejected.
|
|
59
59
|
"credential_missing",
|
|
60
|
+
# The model provider ACCOUNT has no balance (#2283).
|
|
61
|
+
provider_balance.REASON_CODE,
|
|
60
62
|
# The model provider quota is exhausted (429/RESOURCE_EXHAUSTED).
|
|
61
63
|
"provider_quota",
|
|
62
64
|
# The configured base branch does not exist in the repository
|
|
@@ -87,6 +89,8 @@ ACTION_CODES = frozenset({
|
|
|
87
89
|
"decide",
|
|
88
90
|
# Verify and repair the credential, then retry.
|
|
89
91
|
"check_credentials",
|
|
92
|
+
# Top up the provider account (or switch the key), then retry.
|
|
93
|
+
provider_balance.ACTION_CODE,
|
|
90
94
|
# Retry after the provider quota window resets.
|
|
91
95
|
"wait_quota",
|
|
92
96
|
})
|
|
@@ -178,9 +182,7 @@ def _validate(record: Failure) -> None:
|
|
|
178
182
|
if record.action_code not in ACTION_CODES:
|
|
179
183
|
raise FailureError(f"unknown action_code: {record.action_code!r}")
|
|
180
184
|
if type(record.retry_safe) is not bool:
|
|
181
|
-
raise FailureError(
|
|
182
|
-
f"retry_safe must be a boolean, got {record.retry_safe!r}"
|
|
183
|
-
)
|
|
185
|
+
raise FailureError(f"retry_safe must be a boolean, got {record.retry_safe!r}")
|
|
184
186
|
|
|
185
187
|
|
|
186
188
|
def parse(body: object) -> Failure | None:
|
|
@@ -218,30 +220,24 @@ def _parse_block(data: dict) -> Failure:
|
|
|
218
220
|
# The classifier: exception detail -> closed reason/action codes
|
|
219
221
|
# --------------------------------------------------------------------------
|
|
220
222
|
|
|
221
|
-
# Failure-reason markers. The classifier reads only the bounded
|
|
222
|
-
#
|
|
223
|
-
#
|
|
224
|
-
# a code is never derived from a guess.
|
|
223
|
+
# Failure-reason markers. The classifier reads only the bounded exception
|
|
224
|
+
# detail; the caller (the runner, which owns the exception classes) passes
|
|
225
|
+
# the type-derived flags that win over these patterns, so no code is guessed.
|
|
225
226
|
_PROVIDER_QUOTA_RE = re.compile(
|
|
226
227
|
r"\b429\b|quota|resource_exhausted|retry in|usage limit has been reached",
|
|
227
228
|
re.IGNORECASE,
|
|
228
229
|
)
|
|
229
230
|
# The word markers `pi_process`'s early-exit classifier
|
|
230
|
-
# (`_classify_startup_exit`) matches
|
|
231
|
-
#
|
|
231
|
+
# (`_classify_startup_exit`) matches, read here by the one regex below
|
|
232
|
+
# (Issue #1465).
|
|
232
233
|
PROVIDER_AUTH_WORDS = ("unauthorized", "forbidden", "api key")
|
|
233
234
|
|
|
234
|
-
# The text-only credential markers. GitHub failures no longer read this
|
|
235
|
-
#
|
|
236
|
-
#
|
|
237
|
-
#
|
|
238
|
-
#
|
|
239
|
-
#
|
|
240
|
-
# `api key` is the provider's own missing/rejected-key sentence ("No API
|
|
241
|
-
# key found for provider …"), the marker `PROVIDER_AUTH_WORDS` still
|
|
242
|
-
# lists; only `incorrect api key` survived #1762, so the plain sentence
|
|
243
|
-
# regressed to `unclassified` (Issue #1768). An argv word cannot carry
|
|
244
|
-
# it — the space keeps it out of a branch, label or check name.
|
|
235
|
+
# The text-only credential markers. GitHub failures no longer read this one:
|
|
236
|
+
# they carry the exact response status (`gh_response`), while `forbidden`
|
|
237
|
+
# and `credential` matched a branch or check name in the command's argv
|
|
238
|
+
# (Issue #1760). The remaining markers serve the Pi / model-provider detail,
|
|
239
|
+
# which only gives text (Issue #1465). `api key` is the provider's own
|
|
240
|
+
# missing-key sentence, which no argv word can carry across the space (#1768).
|
|
245
241
|
_CREDENTIAL_MISSING_RE = re.compile(
|
|
246
242
|
r"bad credentials"
|
|
247
243
|
r"|(?:http|status)\s+401\b"
|
|
@@ -320,6 +316,7 @@ DISPOSITIONS: dict[str, tuple[str, bool]] = {
|
|
|
320
316
|
"review_budget_exhausted": ("decide", False),
|
|
321
317
|
"human_decision_required": ("decide", False),
|
|
322
318
|
"credential_missing": ("check_credentials", False),
|
|
319
|
+
"provider_balance": (provider_balance.ACTION_CODE, False),
|
|
323
320
|
"provider_quota": ("wait_quota", True),
|
|
324
321
|
"base_branch_missing": ("fix_ticket", False),
|
|
325
322
|
"base_ci_red": ("fix_ticket", False),
|
|
@@ -409,6 +406,10 @@ def classify(detail: str, *, outcome: str = "blocked",
|
|
|
409
406
|
# cannot grant: the existing `credential_missing` /
|
|
410
407
|
# `check_credentials` category, a repair required before retry.
|
|
411
408
|
reason_code = "credential_missing"
|
|
409
|
+
elif provider_balance.is_stop(detail):
|
|
410
|
+
# The provider ACCOUNT has no balance (a 402 refusal, #2283): its
|
|
411
|
+
# own stop, repaired by a top-up, not a credential re-check.
|
|
412
|
+
reason_code = provider_balance.REASON_CODE
|
|
412
413
|
elif _CREDENTIAL_MISSING_RE.search(detail):
|
|
413
414
|
reason_code = "credential_missing"
|
|
414
415
|
elif _timeout_is_text_only(error) and _TEXT_TIMEOUT_RE.search(detail):
|
|
@@ -27,8 +27,8 @@ import logging
|
|
|
27
27
|
from pathlib import Path
|
|
28
28
|
|
|
29
29
|
from orbi import (
|
|
30
|
-
base_ci_fix, base_ci_red, failure, failure_evidence, language,
|
|
31
|
-
requeue, runner_health, scene, user_summary,
|
|
30
|
+
base_ci_fix, base_ci_red, failure, failure_evidence, language,
|
|
31
|
+
provider_balance, question, requeue, runner_health, scene, user_summary,
|
|
32
32
|
)
|
|
33
33
|
from orbi.blocked_comment import post_blocked_comment
|
|
34
34
|
from orbi.comment_kind import (
|
|
@@ -538,19 +538,24 @@ def _update_reported_failure(*, number: int, source_repo: str,
|
|
|
538
538
|
def _typed_failure_wording(
|
|
539
539
|
exc: BaseException, *, pr_url: str | None, branch: str | None,
|
|
540
540
|
language_code: str,
|
|
541
|
-
) -> tuple[bool, tuple[str, str] | None]:
|
|
541
|
+
) -> tuple[bool, bool, tuple[str, str] | None]:
|
|
542
542
|
"""The reader-facing Action/Reason of a typed failure (#1651, #2273).
|
|
543
543
|
|
|
544
|
-
|
|
544
|
+
Three failures answer the reader themselves instead of with the generic
|
|
545
545
|
wording: the GitHub App Actions-workflow refusal (an authorization only
|
|
546
|
-
a human can grant, so the repair path names the permission)
|
|
546
|
+
a human can grant, so the repair path names the permission), the
|
|
547
547
|
delivery branch changed outside this run (Git answers with a "Note
|
|
548
548
|
about fast-forwards" hint that names neither the cause nor the next
|
|
549
|
-
step)
|
|
550
|
-
`
|
|
549
|
+
step) and the model provider's balance refusal (its exit's stderr is the
|
|
550
|
+
provider's `insufficient_balance_error` payload, not a reason a person
|
|
551
|
+
can act on, Issue #2278). Returns
|
|
552
|
+
`(terminal, milestone_shows_the_action, (action, reason))`, or
|
|
553
|
+
`(False, False, None)` for a failure that keeps the generic wording.
|
|
554
|
+
Only the two external authorizations are terminal; the balance stop
|
|
555
|
+
keeps the recovery its exit already had.
|
|
551
556
|
"""
|
|
552
557
|
if failure.workflow_permission_refused(failure_detail(exc)):
|
|
553
|
-
return True, (
|
|
558
|
+
return True, True, (
|
|
554
559
|
failure.workflow_permission_action(
|
|
555
560
|
pr_url, language_code=language_code),
|
|
556
561
|
failure.workflow_permission_cause(language_code),
|
|
@@ -560,14 +565,19 @@ def _typed_failure_wording(
|
|
|
560
565
|
language_code, "failure.delivery_branch_changed_cause",
|
|
561
566
|
branch=branch or "-",
|
|
562
567
|
)
|
|
563
|
-
return False, (
|
|
568
|
+
return True, False, (
|
|
564
569
|
language.text(
|
|
565
570
|
language_code, "failure.delivery_branch_changed_action",
|
|
566
571
|
cause=cause,
|
|
567
572
|
),
|
|
568
573
|
cause,
|
|
569
574
|
)
|
|
570
|
-
|
|
575
|
+
if provider_balance.is_stop(failure_detail(exc)):
|
|
576
|
+
return False, False, (
|
|
577
|
+
provider_balance.action(language_code),
|
|
578
|
+
provider_balance.cause(language_code),
|
|
579
|
+
)
|
|
580
|
+
return False, False, None
|
|
571
581
|
|
|
572
582
|
|
|
573
583
|
def report_delivery_failure(
|
|
@@ -649,13 +659,15 @@ def report_delivery_failure(
|
|
|
649
659
|
if diagnosis is None:
|
|
650
660
|
diagnosis = cause or failure_detail(exc)
|
|
651
661
|
blocked = not classify or is_unrecoverable_failure(exc)
|
|
652
|
-
# A typed failure carries its own cause and repair
|
|
653
|
-
# (`ai-blocked`) whichever path caught
|
|
654
|
-
|
|
662
|
+
# A typed failure carries its own cause and repair; the two external
|
|
663
|
+
# authorizations are terminal (`ai-blocked`) whichever path caught them
|
|
664
|
+
# (Issues #1651, #2273).
|
|
665
|
+
typed_terminal, milestone_shows_action, wording = _typed_failure_wording(
|
|
655
666
|
exc, pr_url=pr_url, branch=branch, language_code=language_code,
|
|
656
667
|
)
|
|
657
|
-
if
|
|
668
|
+
if typed_terminal:
|
|
658
669
|
blocked = True
|
|
670
|
+
if wording is not None:
|
|
659
671
|
action, reason = wording
|
|
660
672
|
# Issue #2220: a stop that carries one structured question shows its
|
|
661
673
|
# one-sentence summary as the visible Reason and — when the class is not
|
|
@@ -696,12 +708,14 @@ def report_delivery_failure(
|
|
|
696
708
|
streak = _failure_streak(history, run_id, fingerprint, repo=source_repo)
|
|
697
709
|
if streak + 1 >= FAILURE_STREAK_LIMIT:
|
|
698
710
|
blocked = True
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
711
|
+
# A typed failure already answered the reader (#2278).
|
|
712
|
+
if wording is None:
|
|
713
|
+
reason += language.text(
|
|
714
|
+
language_code,
|
|
715
|
+
"delivery.failure_streak_escalation",
|
|
716
|
+
count=streak + 1, run_id=run_id,
|
|
717
|
+
fingerprint=fingerprint,
|
|
718
|
+
)
|
|
705
719
|
event(
|
|
706
720
|
"failure_streak_escalated", level=logging.ERROR,
|
|
707
721
|
issue=number, run_id=run_id, streak=streak + 1,
|
|
@@ -777,7 +791,7 @@ def report_delivery_failure(
|
|
|
777
791
|
# the bare cause. Computed here, after the #825 guard may have
|
|
778
792
|
# extended `reason`.
|
|
779
793
|
milestone_summary = (
|
|
780
|
-
action if
|
|
794
|
+
action if milestone_shows_action and action
|
|
781
795
|
else failure_summary(reason, language_code)
|
|
782
796
|
)
|
|
783
797
|
scene = scene_line() or "- run: `-`"
|
|
@@ -143,6 +143,25 @@ FAILURE_MESSAGES: dict[str, tuple[str, str]] = {
|
|
|
143
143
|
"然后去掉 \u0060ai-blocked\u0060、重新加上 \u0060ai-ready\u0060,"
|
|
144
144
|
"下一轮会从分支当前的状态继续。整个过程没有强推,也没有覆盖任何提交。",
|
|
145
145
|
),
|
|
146
|
+
# Issue #2278: the model provider refused a request because the
|
|
147
|
+
# account has no balance (HTTP 402, `insufficient_balance_error`).
|
|
148
|
+
# The cause is the provider account, not the code, and the repair is a
|
|
149
|
+
# human's: top up or switch the key, then relabel — a plain re-queue
|
|
150
|
+
# meets the same empty account. The provider's raw payload never
|
|
151
|
+
# reaches these lines (it is not a reason a person can act on).
|
|
152
|
+
"failure.provider_balance_cause": (
|
|
153
|
+
"The model provider refused the request because the account has no "
|
|
154
|
+
"balance left (HTTP 402).",
|
|
155
|
+
"模型服务商拒绝了这次请求:账户余额不足(HTTP 402)。",
|
|
156
|
+
),
|
|
157
|
+
"failure.provider_balance_action": (
|
|
158
|
+
"Top up the model provider account or switch to an API key that has "
|
|
159
|
+
"balance, then remove `ai-blocked` and add `ai-ready` to run this "
|
|
160
|
+
"Issue again; nothing in the code needs to change.",
|
|
161
|
+
"请给模型服务商账户充值,或换用一个有余额的 API key,然后去掉 "
|
|
162
|
+
"`ai-blocked`、重新加上 `ai-ready`,以便重新运行这个 Issue;"
|
|
163
|
+
"代码本身不需要改动。",
|
|
164
|
+
),
|
|
146
165
|
"failure.blocked_precondition": (
|
|
147
166
|
"this is an external precondition the AI cannot safely judge or "
|
|
148
167
|
"fix, so it cannot be recovered automatically (the Issue stays "
|
|
@@ -24,6 +24,7 @@ from collections.abc import Callable
|
|
|
24
24
|
from pathlib import Path
|
|
25
25
|
from typing import NoReturn
|
|
26
26
|
|
|
27
|
+
from orbi import provider_balance
|
|
27
28
|
from orbi.delivery_scene import RunContext
|
|
28
29
|
from orbi.journal import (
|
|
29
30
|
RunIdFilter,
|
|
@@ -475,11 +476,11 @@ def stream_pi(
|
|
|
475
476
|
dir, so it keeps rising across runner restarts and the limit
|
|
476
477
|
actually bites) — with the `run_failed` scene marked
|
|
477
478
|
`reason=provider_rate_limited`. Long-term quota exhaustion stays out
|
|
478
|
-
of scope (#313) — no wait window is added.
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
479
|
+
of scope (#313) — no wait window is added. Two non-429 exits are
|
|
480
|
+
annotated: a usage-limit stop carried in the session journal's newest
|
|
481
|
+
`errorMessage` logs one `provider_quota` WARNING and rides into the
|
|
482
|
+
raised failure's detail (Issue #1374), and a provider 402 balance
|
|
483
|
+
refusal carries one plain sentence instead of its payload (#2278).
|
|
483
484
|
|
|
484
485
|
`progress` is invoked on EVERY poll — an activity change
|
|
485
486
|
or a heartbeat — with the current activity state, while the Pi
|
|
@@ -1122,21 +1123,20 @@ def _stream_pi_once(
|
|
|
1122
1123
|
),
|
|
1123
1124
|
)
|
|
1124
1125
|
if process.returncode != 0:
|
|
1125
|
-
# A
|
|
1126
|
-
#
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
#
|
|
1130
|
-
|
|
1126
|
+
# A missing-balance refusal is its own stop and never throttling;
|
|
1127
|
+
# its payload becomes the one plain sentence (Issue #2278).
|
|
1128
|
+
balance_stop = provider_balance.is_stop(stderr)
|
|
1129
|
+
stderr = provider_balance.stop_detail(stderr)
|
|
1130
|
+
# A provider 429 exit is TRANSIENT throttling: `stream_pi` backs
|
|
1131
|
+
# off and re-spawns this session.
|
|
1132
|
+
if not balance_stop and _is_rate_limited(stderr):
|
|
1131
1133
|
raise ProviderRateLimitedError(
|
|
1132
1134
|
returncode=process.returncode,
|
|
1133
1135
|
stdout=stdout, stderr=stderr, activity=activity,
|
|
1134
1136
|
)
|
|
1135
|
-
# A
|
|
1136
|
-
#
|
|
1137
|
-
#
|
|
1138
|
-
# looks like a crash. Log it, put the message into the exception
|
|
1139
|
-
# detail, and keep the existing recoverable raise (Issue #1374).
|
|
1137
|
+
# A Codex quota stop lives only in the journal's newest
|
|
1138
|
+
# `errorMessage` (stderr stays empty): log it and put the message
|
|
1139
|
+
# into the exception detail so it is not read as a crash (#1374).
|
|
1140
1140
|
quota_message = activity.get("error_message")
|
|
1141
1141
|
if (quota_message is not None
|
|
1142
1142
|
and _PROVIDER_QUOTA_MESSAGE in quota_message.lower()):
|
|
@@ -1146,17 +1146,15 @@ def _stream_pi_once(
|
|
|
1146
1146
|
)
|
|
1147
1147
|
stderr = f"{stderr}\n{quota_message}".strip()
|
|
1148
1148
|
# A Pi exit after it created a session is an interrupted run: its
|
|
1149
|
-
# work is resumable, including exits after idle recovery.
|
|
1150
|
-
# pre-session startup failure remains terminal unless it reaches
|
|
1151
|
-
# one of the explicit recovery classifications above.
|
|
1149
|
+
# work is resumable, including exits after idle recovery.
|
|
1152
1150
|
error_type = (
|
|
1153
1151
|
# A session file alone only proves that Pi initialized its
|
|
1154
1152
|
# journal; an exit before the first request is still a startup
|
|
1155
1153
|
# failure (for example provider initialization) and must keep
|
|
1156
|
-
# the existing terminal failure behavior.
|
|
1157
|
-
# session after a request
|
|
1158
|
-
#
|
|
1159
|
-
#
|
|
1154
|
+
# the existing terminal failure behavior. Only an interrupted
|
|
1155
|
+
# session after a request actually started is resumable —
|
|
1156
|
+
# judged from the journal on disk, never from a live poll that
|
|
1157
|
+
# can predate it.
|
|
1160
1158
|
RecoverablePiProcessError
|
|
1161
1159
|
if activity["first_request"]
|
|
1162
1160
|
else subprocess.CalledProcessError
|