orbi-cli 0.7.55__tar.gz → 0.7.57__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.55/src/orbi_cli.egg-info → orbi_cli-0.7.57}/PKG-INFO +1 -1
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/pyproject.toml +1 -1
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/__init__.py +1 -1
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/claim.py +10 -7
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/delivery_labels.py +6 -7
- orbi_cli-0.7.57/src/orbi/epic_reconciliation.py +239 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/failure.py +9 -25
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/failure_evidence.py +72 -9
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/failure_report.py +19 -3
- orbi_cli-0.7.57/src/orbi/failure_stop.py +131 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/github.py +35 -98
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/language_failure.py +93 -2
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/language_terms.py +2 -1
- orbi_cli-0.7.57/src/orbi/language_terms_epic.py +48 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/progress.py +9 -4
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/progress_outcome.py +21 -22
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/release_closeout.py +10 -10
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/release_comments.py +3 -41
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/resume_verification.py +7 -22
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/review_merge.py +16 -16
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/runner.py +1 -1
- orbi_cli-0.7.57/src/orbi/terminal_labels.py +56 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57/src/orbi_cli.egg-info}/PKG-INFO +1 -1
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi_cli.egg-info/SOURCES.txt +5 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_apply_label_patch.py +105 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_blocked_comment.py +4 -1
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_adapters.py +0 -75
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_delivery.py +113 -62
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_release.py +191 -52
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_runner_claim_resume.py +4 -5
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_runner_failure_report.py +15 -6
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_runner_outcome.py +47 -17
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_runner_reconcile.py +162 -61
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_runner_tickets.py +14 -9
- orbi_cli-0.7.57/tests/test_epic_reconciliation.py +283 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_failure.py +169 -2
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_failure_report.py +382 -6
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_fix_needed_loop.py +48 -33
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_git_merge_smoke.py +6 -4
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_message_language.py +0 -46
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_notify.py +7 -2
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pr_verification.py +8 -6
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_progress_wiring.py +41 -35
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_public_helpers.py +9 -1
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_release_extraction.py +4 -3
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_resume_e2e.py +28 -24
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_resume_pr.py +102 -137
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_review_merge.py +22 -17
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_user_acceptance_contract.py +23 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/LICENSE +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/README.md +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/docs/licenses/sustainable-use-license.md +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/setup.cfg +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/acceptance_section.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/amend_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/answer.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/base_ci_fix.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/base_ci_red.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/blocked_comment.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/blocked_record.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/blocked_scan.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/body_steering.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/branch_reclaim.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/check_permission.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/checks.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/claim_race.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/clarify.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/clarify_proposal.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/clarify_stop.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/cli.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/cli_commands.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/cli_doctor.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/cli_parser.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/cli_source.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/cli_status.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/cli_ticket_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/command_line.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/comment_kind.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/comment_rest_id.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/comment_trust.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/config.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/config_hint.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/delivery_comment.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/delivery_push.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/delivery_scene.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/draft.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/draft_cli.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/draft_document.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/draft_marker.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/draft_validate.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/engine_source.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/example_config.toml +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/extensions/clarify_verdict.ts +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/extensions/draft_tools.ts +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/gh_response.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/git_identity.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/git_transport.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/github_feedback.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/gitops.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/human_review.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/implementation_delivery.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/journal.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/labels.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/labels.toml +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/language.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/language_terms_criteria.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/language_terms_fix.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/launchd_deploy.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/merge_blocked.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/merge_exec.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/merge_gate.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/merge_handoff.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/milestone.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/milestone_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/milestone_errors.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/notify.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/notify_text.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/ops_delivery.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pi_activity.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pi_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pi_exec.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pi_idle.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pi_process.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pi_recovery.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pi_session.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pi_stream_log.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pilot_setup.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pilot_slots.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/plan_milestone.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pr_head_sync.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/pr_verification.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/progress_display.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/progress_summary.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/provider_balance.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/question.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/recoverable_failure.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/release.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/release_declaration.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/release_git.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/release_notes.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/release_run.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/repo_config.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/requeue.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/restart_scan.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/resume_scan.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/review_ci_status.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/review_rounds.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/review_verdict.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/review_wait.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/run_fields.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/run_state.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/runner_health.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/runner_marker.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/runner_source.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/scene.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/scheduler.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/scheduler_units.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/session_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/setup_checks.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/setup_config.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/source_pool.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/split_apply.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/split_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/status_observe.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/steering.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/stop_comment.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/stopped_scans.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/suggest.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/systemd_deploy.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/terminal_stops.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/tick_reads.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/ticket_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/ticket_command_registry.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/ticket_criteria.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/user_summary.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/waiting_checks.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi/worktree_retention.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi_cli.egg-info/dependency_links.txt +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi_cli.egg-info/entry_points.txt +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/src/orbi_cli.egg-info/top_level.txt +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_agents_md.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_amend_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_answer.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_base_branch_failure.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_base_ci_red.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_body_steering.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_pi.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_preflight.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_runner_main.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_runner_milestone.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_runner_prompt.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_bootstrap_runner_session.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_branch_reclaim.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_check_permission.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_ci_macos_workflow.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_ci_workflow.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_claim_race.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_clarify.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_claude_plugin.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_cli_golden.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_cli_install.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_cli_milestone.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_cli_packaging.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_cli_source.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_cli_ticket_commands.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_command_receipt_contract.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_comment_identity.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_comment_readers_contract.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_comment_rest_id.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_comment_trust.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_concurrency_e2e.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_constitution.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_coverage_gate.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_deliver_pr_fakes.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_delivery_branch_delete.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_delivery_labels.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_delivery_scene.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_docker_docs.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_docker_entrypoint.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_docker_image_workflow.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_docs_i18n.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_docs_issue_shapes.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_docs_labels.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_docs_mermaid.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_docs_releases.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_docs_safety_matrix.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_docs_single_source.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_docs_site.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_draft.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_draft_repo_view.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_draft_validate.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_engine_source.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_gh_read_retry.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_gh_response.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_git_base_smoke.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_git_network_retry.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_git_transport.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_github.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_github_fakes.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_gitops.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_gitops_fakes.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_human_review.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_import_graph.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_install_sh.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_issue_1367.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_issue_461.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_issue_template_config.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_journal.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_journal_events.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_labels.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_launchd_deploy.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_license.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_merge_exec_extraction.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_milestone_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_ops_e2e.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_orbi.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_orbi_dashboard.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_orbi_exporter.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_patch_ratchet.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pi_activity.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pi_child_reap.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pi_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pi_exec.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pi_extensions.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pi_provider_templates.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pi_recovery.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pi_session.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pilot_setup.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pilot_slots.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_pr_issue_link_workflow.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_prerequisite_check.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_progress.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_prompt_contract.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_public_contracts.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_publish_workflow.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_question.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_question_resume.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_release_docs_workflow.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_release_ticket_templates.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_repo_config.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_resume_continue_e2e.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_resume_other_executor.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_review_verdict.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_review_waiting.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_run_artifacts.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_run_fields.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_run_id_e2e.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_run_id_fixture.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_runner_config.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_runner_health.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_runner_source_freshness.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_scene.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_scheduler.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_seam.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_setup_output_golden.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_size_ratchet.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_split_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_src_layout.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_status_observe.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_steering_review.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_suggest.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_suggest_repo_view.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_suite_hygiene.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_systemd_deploy.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_systemd_timer.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_tick_reads.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_ticket_command.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_ticket_command_registration.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_user_summary.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_versioned_comment_block.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/tests/test_waiting_checks.py +0 -0
- {orbi_cli-0.7.55 → orbi_cli-0.7.57}/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.57
|
|
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.57"
|
|
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"
|
|
@@ -22,8 +22,12 @@ from orbi import delivery_labels
|
|
|
22
22
|
from orbi.delivery_scene import (
|
|
23
23
|
EXTERNAL_PR_MARKER, body_markers, classify,
|
|
24
24
|
)
|
|
25
|
+
from orbi.epic_reconciliation import (
|
|
26
|
+
epic_audit, epic_audit_posted, epic_close_reason, epic_closed_evidence,
|
|
27
|
+
verify_epic_complete,
|
|
28
|
+
)
|
|
25
29
|
from orbi.github import (
|
|
26
|
-
|
|
30
|
+
close_issue,
|
|
27
31
|
comment_issue, issue_comments, issue_priority, issue_view,
|
|
28
32
|
list_issues, milestone_open_issue_count,
|
|
29
33
|
open_blocker_numbers, pr_comments,
|
|
@@ -40,7 +44,6 @@ from orbi.resume_scan import (
|
|
|
40
44
|
from orbi import language, review_wait, user_summary
|
|
41
45
|
from orbi.progress import run_marker
|
|
42
46
|
from orbi.release import release_target_milestone
|
|
43
|
-
from orbi.release_comments import _epic_audit, epic_audit_posted
|
|
44
47
|
from orbi.repo_config import (
|
|
45
48
|
RepoConfigError, RepoPolicy, load_repo_policy, merged_repo_language,
|
|
46
49
|
)
|
|
@@ -208,20 +211,20 @@ def reconcile_open_epics(repo: str, run_id: str, language_code: str) -> list[str
|
|
|
208
211
|
for listed_epic in epics:
|
|
209
212
|
number = listed_epic.get("number")
|
|
210
213
|
try:
|
|
211
|
-
|
|
214
|
+
children = verify_epic_complete(repo, listed_epic)
|
|
212
215
|
except (ValueError, json.JSONDecodeError) as exc:
|
|
213
216
|
reason = str(exc)
|
|
214
217
|
event("epic_kept_open", issue=number, repo=repo, reason=reason)
|
|
215
218
|
evidence.append(f"Epic #{number} kept open: {reason}")
|
|
216
219
|
continue
|
|
217
|
-
audit =
|
|
220
|
+
audit = epic_audit(children, None, language_code)
|
|
218
221
|
comments = issue_comments(int(number), repo=repo)
|
|
219
|
-
if not epic_audit_posted(comments,
|
|
222
|
+
if not epic_audit_posted(comments, children):
|
|
220
223
|
comment_issue(int(number), repo=repo,
|
|
221
224
|
body=f"{run_marker(run_id)}\n{audit}\nrun_id={run_id}")
|
|
222
|
-
close_issue(int(number), repo=repo)
|
|
225
|
+
close_issue(int(number), repo=repo, reason=epic_close_reason(children))
|
|
223
226
|
event("epic_closed", issue=number, repo=repo)
|
|
224
|
-
evidence.append(
|
|
227
|
+
evidence.append(epic_closed_evidence(number, children))
|
|
225
228
|
return evidence
|
|
226
229
|
|
|
227
230
|
|
|
@@ -120,11 +120,10 @@ def label_patch(event: str, current_labels,
|
|
|
120
120
|
- claim: add in-progress; remove the queue label and a stale
|
|
121
121
|
fix-needed / needs-detail (a resumed fix round, the thin-ticket gate
|
|
122
122
|
once the author re-readied the ticket).
|
|
123
|
-
- pr_opened
|
|
124
|
-
and the queue label. A TERMINAL Issue
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
removal resume an automatic fix nobody asked for (Issue #1786).
|
|
123
|
+
- pr_opened: add the opened-PR state, remove in-progress, fix-needed
|
|
124
|
+
and the queue label. A TERMINAL Issue changes nothing on fix_needed:
|
|
125
|
+
the delivery is over or waits for a human, and a stale label would
|
|
126
|
+
resume an automatic fix nobody asked for (Issue #1786).
|
|
128
127
|
- human_review_waiting: add NOTHING, clear in-progress and the queue
|
|
129
128
|
label; the opened-PR anchor stays (the resume scan needs it).
|
|
130
129
|
- requeue / release_waiting: add the queue label back (the ticket is
|
|
@@ -157,8 +156,8 @@ def label_patch(event: str, current_labels,
|
|
|
157
156
|
return ([in_progress], to_remove)
|
|
158
157
|
if event == EVENT_PR_OPENED:
|
|
159
158
|
return ([pr_opened], [
|
|
160
|
-
label for label in (in_progress, queue)
|
|
161
|
-
|
|
159
|
+
label for label in (in_progress, fix_needed, queue)
|
|
160
|
+
if label in current])
|
|
162
161
|
if event == EVENT_FIX_NEEDED:
|
|
163
162
|
if merged in current or blocked in current:
|
|
164
163
|
return ([], [])
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"""One Epic's children and how each of them ended (Issue #2356).
|
|
2
|
+
|
|
3
|
+
The verification used to reduce every closed child to "Issue #N closed", so
|
|
4
|
+
an Epic whose children a person closed without any delivery received the
|
|
5
|
+
same "complete" comment and the same completed close reason as a fully
|
|
6
|
+
delivered one. The verification now returns one :class:`EpicChild` per
|
|
7
|
+
child carrying its outcome — delivered by Orbi (a merged PR child, or an
|
|
8
|
+
Issue carrying `ai-merged`), closed while it carried `ai-blocked`, or
|
|
9
|
+
closed by a person with GitHub's own `state_reason` — and this module owns
|
|
10
|
+
the two decisions built on it: the reconciliation sentence (catalog text,
|
|
11
|
+
both languages) and the Epic's close reason.
|
|
12
|
+
|
|
13
|
+
Both sweeps render through these functions — the per-tick
|
|
14
|
+
`claim.reconcile_open_epics` and the release
|
|
15
|
+
`release_closeout.reconcile_release_epics` — so the same children can never
|
|
16
|
+
produce two different comments or close reasons. The module imports the
|
|
17
|
+
`gh` read primitives from :mod:`orbi.github`, which imports neither this
|
|
18
|
+
module nor a sweep owner, so there is no cycle.
|
|
19
|
+
"""
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import json
|
|
23
|
+
from typing import NamedTuple
|
|
24
|
+
|
|
25
|
+
from orbi import delivery_labels, language
|
|
26
|
+
from orbi.delivery_labels import label_name_set
|
|
27
|
+
from orbi.github import (
|
|
28
|
+
epic_issue_with_blockers,
|
|
29
|
+
open_blocker_numbers,
|
|
30
|
+
parse_paginated_issue_array,
|
|
31
|
+
run_gh_read_command,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# How one Epic child ended.
|
|
35
|
+
CHILD_DELIVERED = "delivered"
|
|
36
|
+
CHILD_BLOCKED = "blocked"
|
|
37
|
+
CHILD_COMPLETED = "completed"
|
|
38
|
+
CHILD_NOT_PLANNED = "not_planned"
|
|
39
|
+
|
|
40
|
+
# `gh issue close --reason`'s documented values, verified with
|
|
41
|
+
# `gh issue close --help`: {completed|not planned|duplicate}.
|
|
42
|
+
CLOSE_NOT_PLANNED = "not planned"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class EpicChild(NamedTuple):
|
|
46
|
+
"""One verified Epic child: what it is and how it ended."""
|
|
47
|
+
|
|
48
|
+
kind: str # "issue" or "pr"
|
|
49
|
+
number: int
|
|
50
|
+
outcome: str # one of the CHILD_* constants
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def verify_epic_complete(repo: str, listed_epic: dict) -> list[EpicChild]:
|
|
54
|
+
"""Verify native sub-issues and blockers; otherwise fail closed.
|
|
55
|
+
|
|
56
|
+
Live API shape (measured 2026-09-09 against #305):
|
|
57
|
+
``GET /repos/{owner}/{repo}/issues/{number}/sub_issues`` returns a JSON
|
|
58
|
+
array (``[]`` for no children), paginates with the standard ``--paginate``
|
|
59
|
+
contract, and Issue items include ``repository.full_name`` and no
|
|
60
|
+
``pull_request`` key. The endpoint is paginated with ``per_page=100``;
|
|
61
|
+
a cross-repository item is identified by its ``repository.full_name`` and
|
|
62
|
+
is rejected. A PR-shaped item is identified by a non-null
|
|
63
|
+
``pull_request`` field and is checked through the PR endpoint.
|
|
64
|
+
"""
|
|
65
|
+
epic = epic_issue_with_blockers(repo, listed_epic)
|
|
66
|
+
number = epic.get("number")
|
|
67
|
+
if not isinstance(number, int) or isinstance(number, bool):
|
|
68
|
+
raise ValueError("Epic number is missing or invalid")
|
|
69
|
+
blockers = epic.get("blockedBy")
|
|
70
|
+
# Live API check: `gh issue view --json blockedBy` returns
|
|
71
|
+
# {"blockedBy":{"nodes":[],"totalCount":0}} for zero dependencies.
|
|
72
|
+
# Missing/malformed blockedBy is not equivalent to that empty set.
|
|
73
|
+
if not isinstance(blockers, dict) or not isinstance(blockers.get("nodes"), list):
|
|
74
|
+
raise ValueError("native blocker/dependency state is unavailable")
|
|
75
|
+
for node in blockers["nodes"]:
|
|
76
|
+
if (not isinstance(node, dict)
|
|
77
|
+
or not isinstance(node.get("number"), int)
|
|
78
|
+
or isinstance(node.get("number"), bool)
|
|
79
|
+
or ("state" in node and node["state"] not in {"OPEN", "CLOSED"})):
|
|
80
|
+
raise ValueError("native blocker/dependency state is malformed")
|
|
81
|
+
open_blockers = open_blocker_numbers(epic)
|
|
82
|
+
if open_blockers:
|
|
83
|
+
raise ValueError("open blockers: " + ", ".join(f"#{n}" for n in open_blockers))
|
|
84
|
+
raw = run_gh_read_command([
|
|
85
|
+
"gh", "api", f"repos/{repo}/issues/{number}/sub_issues?per_page=100",
|
|
86
|
+
"--paginate", "--slurp",
|
|
87
|
+
])
|
|
88
|
+
children = parse_paginated_issue_array(raw)
|
|
89
|
+
if not children:
|
|
90
|
+
raise ValueError("Epic child scope is missing or empty")
|
|
91
|
+
verified: list[EpicChild] = []
|
|
92
|
+
for child in children:
|
|
93
|
+
child_number = child.get("number")
|
|
94
|
+
if not isinstance(child_number, int) or isinstance(child_number, bool):
|
|
95
|
+
raise ValueError("Epic child scope contains an invalid number")
|
|
96
|
+
child_repo = child.get("repository")
|
|
97
|
+
if not isinstance(child_repo, dict) or not isinstance(child_repo.get("full_name"), str):
|
|
98
|
+
raise ValueError(f"child #{child_number} repository state is malformed")
|
|
99
|
+
if child_repo["full_name"].lower() != repo.lower():
|
|
100
|
+
raise ValueError(f"cross-repository child #{child_number}")
|
|
101
|
+
if child.get("state") not in {"open", "closed"}:
|
|
102
|
+
raise ValueError(f"child #{child_number} state is malformed")
|
|
103
|
+
kind = "pr" if child.get("pull_request") is not None else "issue"
|
|
104
|
+
verified.append(_epic_child(repo, kind, child_number))
|
|
105
|
+
return verified
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def _epic_child(repo: str, kind: str, number: int) -> EpicChild:
|
|
109
|
+
"""Verify one child against GitHub's live Issue/PR state."""
|
|
110
|
+
raw = run_gh_read_command(["gh", "api", f"repos/{repo}/issues/{number}"])
|
|
111
|
+
item = json.loads(raw)
|
|
112
|
+
if not isinstance(item, dict):
|
|
113
|
+
raise ValueError(f"child #{number} response is not an object")
|
|
114
|
+
is_pr = "pull_request" in item
|
|
115
|
+
if kind == "issue" and is_pr:
|
|
116
|
+
raise ValueError(f"child #{number} declared as Issue but is a PR")
|
|
117
|
+
if kind == "pr" and not is_pr:
|
|
118
|
+
raise ValueError(f"child #{number} declared as PR but is an Issue")
|
|
119
|
+
if is_pr:
|
|
120
|
+
pr = json.loads(run_gh_read_command(["gh", "api", f"repos/{repo}/pulls/{number}"]))
|
|
121
|
+
if not isinstance(pr, dict) or pr.get("merged") is not True:
|
|
122
|
+
raise ValueError(f"child PR #{number} is not merged")
|
|
123
|
+
return EpicChild("pr", number, CHILD_DELIVERED)
|
|
124
|
+
if item.get("state") != "closed":
|
|
125
|
+
raise ValueError(f"child Issue #{number} is not closed")
|
|
126
|
+
return EpicChild("issue", number, _closed_issue_outcome(item))
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def _closed_issue_outcome(item: dict) -> str:
|
|
130
|
+
"""How one closed child Issue ended.
|
|
131
|
+
|
|
132
|
+
`ai-merged` means Orbi delivered it; `ai-blocked` means Orbi stopped on
|
|
133
|
+
it and a person closed it anyway. Every other closed Issue was closed by
|
|
134
|
+
a person, and GitHub's own `state_reason` says whether they recorded it
|
|
135
|
+
as completed or not planned — a closed Issue without the field is
|
|
136
|
+
GitHub's default, completed.
|
|
137
|
+
"""
|
|
138
|
+
labels = label_name_set(item)
|
|
139
|
+
if delivery_labels.MERGED_LABEL in labels:
|
|
140
|
+
return CHILD_DELIVERED
|
|
141
|
+
if delivery_labels.BLOCKED_LABEL in labels:
|
|
142
|
+
return CHILD_BLOCKED
|
|
143
|
+
return (CHILD_NOT_PLANNED if item.get("state_reason") == "not_planned"
|
|
144
|
+
else CHILD_COMPLETED)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def epic_audit(children: list[EpicChild], version: str | None,
|
|
148
|
+
language_code: str) -> str:
|
|
149
|
+
"""The ONE Epic reconciliation sentence, in the bound language.
|
|
150
|
+
|
|
151
|
+
Today's "complete" sentence is kept byte for byte when every child was
|
|
152
|
+
delivered by Orbi — its child fragments are the same shared evidence the
|
|
153
|
+
pre-#2356 verification built ("PR #N merged", "Issue #N closed"), so
|
|
154
|
+
only the sentence around them moves. Every other Epic states that all
|
|
155
|
+
children are closed but not all of them were delivered, followed by one
|
|
156
|
+
fragment per child naming how it ended.
|
|
157
|
+
"""
|
|
158
|
+
prefix = "" if not version else language.text(
|
|
159
|
+
language_code, "epic.reconciliation_version", version=version,
|
|
160
|
+
)
|
|
161
|
+
if all(child.outcome == CHILD_DELIVERED for child in children):
|
|
162
|
+
return language.text(
|
|
163
|
+
language_code, "epic.reconciliation", prefix=prefix,
|
|
164
|
+
children=", ".join(_delivered_fragment(child) for child in children),
|
|
165
|
+
)
|
|
166
|
+
return language.text(
|
|
167
|
+
language_code, "epic.reconciliation_closed", prefix=prefix,
|
|
168
|
+
children=", ".join(
|
|
169
|
+
_child_wording(child, language_code) for child in children
|
|
170
|
+
),
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def _delivered_fragment(child: EpicChild) -> str:
|
|
175
|
+
"""The delivered-child fragment of the "complete" sentence."""
|
|
176
|
+
return (f"PR #{child.number} merged" if child.kind == "pr"
|
|
177
|
+
else f"Issue #{child.number} closed")
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
# One catalog key per (child kind, outcome): how a child is named in the
|
|
181
|
+
# sentence that does not claim completion (Issue #2356).
|
|
182
|
+
_CHILD_WORDING = {
|
|
183
|
+
("pr", CHILD_DELIVERED): "epic.child_delivered_pr",
|
|
184
|
+
("issue", CHILD_DELIVERED): "epic.child_delivered_issue",
|
|
185
|
+
("issue", CHILD_BLOCKED): "epic.child_blocked",
|
|
186
|
+
("issue", CHILD_COMPLETED): "epic.child_completed",
|
|
187
|
+
("issue", CHILD_NOT_PLANNED): "epic.child_not_planned",
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def _child_wording(child: EpicChild, language_code: str) -> str:
|
|
192
|
+
"""One child named with how it ended, in the bound language."""
|
|
193
|
+
return language.text(
|
|
194
|
+
language_code, _CHILD_WORDING[(child.kind, child.outcome)],
|
|
195
|
+
number=child.number,
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def epic_close_reason(children: list[EpicChild]) -> str | None:
|
|
200
|
+
"""The `gh issue close --reason` value this Epic must be closed with.
|
|
201
|
+
|
|
202
|
+
"not planned" only when Orbi delivered none of the children and none of
|
|
203
|
+
them was closed as completed — the scene a person reads as "Orbi
|
|
204
|
+
delivered nothing here". Every other case keeps today's completed close
|
|
205
|
+
(`None` leaves GitHub's default, completed).
|
|
206
|
+
"""
|
|
207
|
+
if any(child.outcome in {CHILD_DELIVERED, CHILD_COMPLETED}
|
|
208
|
+
for child in children):
|
|
209
|
+
return None
|
|
210
|
+
return CLOSE_NOT_PLANNED
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def epic_audit_posted(comments: list[dict], children: list[EpicChild],
|
|
214
|
+
version: str | None = None) -> bool:
|
|
215
|
+
"""True when a comment already carries the audit in EITHER language.
|
|
216
|
+
|
|
217
|
+
The audit sentence is its own duplicate check: both sweeps close the
|
|
218
|
+
Epic right after commenting, so a comment without a close means the
|
|
219
|
+
close failed and the retry may render in another language. Matching
|
|
220
|
+
every rendering keeps a posted English audit from being duplicated by a
|
|
221
|
+
Chinese one (Issue #1705), in both the complete and the #2356 sentence.
|
|
222
|
+
"""
|
|
223
|
+
renderings = [
|
|
224
|
+
epic_audit(children, version, language_code)
|
|
225
|
+
for language_code in language.LANGUAGES
|
|
226
|
+
]
|
|
227
|
+
return any(
|
|
228
|
+
rendering in str(comment.get("body", ""))
|
|
229
|
+
for comment in comments
|
|
230
|
+
for rendering in renderings
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def epic_closed_evidence(number: int, children: list[EpicChild]) -> str:
|
|
235
|
+
"""The ONE evidence line both sweeps record for a closed Epic."""
|
|
236
|
+
fragments = "; ".join(
|
|
237
|
+
f"#{child.number} {child.outcome}" for child in children
|
|
238
|
+
)
|
|
239
|
+
return f"Epic #{number} closed after verification ({fragments})"
|
|
@@ -27,7 +27,10 @@ import re
|
|
|
27
27
|
import subprocess
|
|
28
28
|
|
|
29
29
|
from orbi import gh_response, language, provider_balance, user_summary
|
|
30
|
+
# Issue #2351: the stop wording moved to its own module (this one is at its
|
|
31
|
+
# size-ratchet ceiling); it is re-exported here for its existing callers.
|
|
30
32
|
from orbi.comment_kind import parse_versioned_block
|
|
33
|
+
from orbi.failure_stop import stop_wording, terminal_action # noqa: F401
|
|
31
34
|
|
|
32
35
|
SCHEMA_VERSION = 1
|
|
33
36
|
|
|
@@ -480,28 +483,6 @@ def workflow_permission_action(
|
|
|
480
483
|
)
|
|
481
484
|
|
|
482
485
|
|
|
483
|
-
def terminal_action(record: Failure,
|
|
484
|
-
language_code: str, *,
|
|
485
|
-
base_branch: str | None = None) -> str:
|
|
486
|
-
"""The reader action for the implement-phase terminal handler.
|
|
487
|
-
|
|
488
|
-
An unrecognized failure says the cause could not be determined
|
|
489
|
-
instead of implying the Issue text is the problem (Issue #1651); a
|
|
490
|
-
missing base branch names the branch and both repairs — create it, or
|
|
491
|
-
pick an existing one where the repository was set up — plus how to
|
|
492
|
-
restart the Issue (Issue #1749, #1753); every other recognized
|
|
493
|
-
terminal failure keeps the existing generic action.
|
|
494
|
-
"""
|
|
495
|
-
if record.reason_code == "unclassified":
|
|
496
|
-
return language.text(language_code, "failure.terminal_unclassified")
|
|
497
|
-
if record.reason_code == "base_branch_missing":
|
|
498
|
-
return language.text(
|
|
499
|
-
language_code, "failure.terminal_base_branch_missing",
|
|
500
|
-
base_branch=base_branch or "-",
|
|
501
|
-
)
|
|
502
|
-
return language.text(language_code, "failure.terminal_generic")
|
|
503
|
-
|
|
504
|
-
|
|
505
486
|
def terminal_reason(detail: str, record: Failure, *,
|
|
506
487
|
base_branch: str | None, language_code: str) -> str:
|
|
507
488
|
"""The reader-facing reason of the implement-phase terminal handler.
|
|
@@ -632,9 +613,12 @@ def failure_comment_body(*, outcome: str, action: str, reason: str,
|
|
|
632
613
|
def message(key: str, **fields: object) -> str:
|
|
633
614
|
return language.text(language_code, key, **fields)
|
|
634
615
|
|
|
635
|
-
headline
|
|
636
|
-
|
|
637
|
-
|
|
616
|
+
# The blocked headline is the ONE wording function's verdict for this
|
|
617
|
+
# record (Issue #2351): the action the record carries decides it, so the
|
|
618
|
+
# headline never promises a decision the action does not ask for.
|
|
619
|
+
headline = (
|
|
620
|
+
message("failure.headline_fix_needed") if retrying
|
|
621
|
+
else stop_wording(failure_record, language_code)[0]
|
|
638
622
|
)
|
|
639
623
|
parts = [render(failure_record), headline]
|
|
640
624
|
# The task identity and the optional fixed project status link sit
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"""The bounded evidence of one failure comment (Issue #2202).
|
|
2
2
|
|
|
3
3
|
The failure report copies what survives a terminal worktree cleanup into
|
|
4
|
-
ONE comment: the tail of the failing command's streams,
|
|
5
|
-
summary of the Pi session log and the tail
|
|
6
|
-
owns that rendering — the segment caps, the
|
|
7
|
-
summary and the shrink-to-fit loop that keeps an
|
|
8
|
-
`FAILURE_COMMENT_MAX_CHARS` by shrinking ONLY the
|
|
9
|
-
structure (Issue #1711).
|
|
4
|
+
ONE comment: the tail of the failing command's streams, the session's own
|
|
5
|
+
final explanation, a structural summary of the Pi session log and the tail
|
|
6
|
+
of `.orbi/test.log`. This module owns that rendering — the segment caps, the
|
|
7
|
+
de-colouring, the session summary and the shrink-to-fit loop that keeps an
|
|
8
|
+
oversized comment inside `FAILURE_COMMENT_MAX_CHARS` by shrinking ONLY the
|
|
9
|
+
evidence, never its structure (Issue #1711).
|
|
10
10
|
|
|
11
11
|
A verbatim extraction out of `orbi.failure_report` (Article 3.5, Issue
|
|
12
12
|
#2202): that module sits at the 1,000-line cap the size ratchet freezes, so
|
|
@@ -71,8 +71,10 @@ def _session_summary(session_file: Path,
|
|
|
71
71
|
"""Structured summary of the last session records.
|
|
72
72
|
|
|
73
73
|
One line per parsed record — timestamp, type, role, tool name and
|
|
74
|
-
content-block kinds; the record text
|
|
75
|
-
|
|
74
|
+
content-block kinds; THIS summary never carries the record text (the
|
|
75
|
+
session's own final explanation is quoted in its own segment,
|
|
76
|
+
`session_explanation`, Issue #2351, and the full log path is named next
|
|
77
|
+
to the segment). A record whose
|
|
76
78
|
text blocks repeat the previous record's is skipped: pi logs the
|
|
77
79
|
final assistant text twice (once inside the full message, once
|
|
78
80
|
standalone), which used to duplicate whole paragraphs in the
|
|
@@ -136,6 +138,54 @@ def _session_summary(session_file: Path,
|
|
|
136
138
|
EVIDENCE_SEGMENT_CAP = 4000
|
|
137
139
|
_EVIDENCE_CAP_STEP = 500
|
|
138
140
|
|
|
141
|
+
# The session-log tail a read inspects (the same window the summary reads):
|
|
142
|
+
# the closing assistant text sits at the end of the file.
|
|
143
|
+
_SESSION_WINDOW_BYTES = 65536
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def session_explanation(session_file: Path | None) -> str | None:
|
|
147
|
+
"""The text of the session's last assistant message, or None.
|
|
148
|
+
|
|
149
|
+
Issue #2351: the sentence that explains why a run stopped is written
|
|
150
|
+
nowhere but the session's own final response, so the failure comment
|
|
151
|
+
quotes it (bounded, fenced and redacted like every other comment text)
|
|
152
|
+
instead of keeping every session record metadata-only. A partial
|
|
153
|
+
trailing line — a killed session mid-write — is skipped, and the final
|
|
154
|
+
record pi logs twice is read ONCE because only the newest assistant text
|
|
155
|
+
is read at all.
|
|
156
|
+
"""
|
|
157
|
+
if session_file is None:
|
|
158
|
+
return None
|
|
159
|
+
try:
|
|
160
|
+
with session_file.open("rb") as handle:
|
|
161
|
+
handle.seek(0, os.SEEK_END)
|
|
162
|
+
size = handle.tell()
|
|
163
|
+
window = min(size, _SESSION_WINDOW_BYTES)
|
|
164
|
+
handle.seek(size - window)
|
|
165
|
+
content = handle.read(window).decode("utf-8", errors="replace")
|
|
166
|
+
except (OSError, UnicodeError):
|
|
167
|
+
return None
|
|
168
|
+
for line in reversed(content.splitlines()):
|
|
169
|
+
try:
|
|
170
|
+
record = json.loads(line)
|
|
171
|
+
except ValueError:
|
|
172
|
+
continue
|
|
173
|
+
if not isinstance(record, dict):
|
|
174
|
+
continue
|
|
175
|
+
message = record.get("message")
|
|
176
|
+
if not isinstance(message, dict) or message.get("role") != "assistant":
|
|
177
|
+
continue
|
|
178
|
+
blocks = message.get("content")
|
|
179
|
+
if not isinstance(blocks, list):
|
|
180
|
+
continue
|
|
181
|
+
text = "".join(
|
|
182
|
+
block.get("text", "") for block in blocks
|
|
183
|
+
if isinstance(block, dict) and block.get("type") == "text"
|
|
184
|
+
).strip()
|
|
185
|
+
if text:
|
|
186
|
+
return text
|
|
187
|
+
return None
|
|
188
|
+
|
|
139
189
|
|
|
140
190
|
def _failure_evidence(worktree: Path | None, exc: BaseException, *,
|
|
141
191
|
language_code: str,
|
|
@@ -146,7 +196,9 @@ def _failure_evidence(worktree: Path | None, exc: BaseException, *,
|
|
|
146
196
|
test log are read before cleanup and only bounded, fenced segments are
|
|
147
197
|
copied into the failure comment: raw output stays literal on GitHub,
|
|
148
198
|
the session tail is a structural summary whose duplicates are removed,
|
|
149
|
-
and the full session log is named for the deep-dive. The
|
|
199
|
+
and the full session log is named for the deep-dive. The session's
|
|
200
|
+
final explanation is the ONE session text the comment quotes (Issue
|
|
201
|
+
#2351) — a stop's cause is written nowhere else. The
|
|
150
202
|
failure reason itself stays the readable head of the comment.
|
|
151
203
|
|
|
152
204
|
`cap` bounds each segment, so every fence closes (Issue #1711).
|
|
@@ -173,8 +225,19 @@ def _failure_evidence(worktree: Path | None, exc: BaseException, *,
|
|
|
173
225
|
test_path = worktree / ".orbi" / "test.log"
|
|
174
226
|
if test_path.is_file():
|
|
175
227
|
test_log = _tail_text(test_path)
|
|
228
|
+
# Issue #2351: the session's own closing words lead the evidence, in
|
|
229
|
+
# their own bounded segment; a session that left none says so plainly.
|
|
230
|
+
explanation = session_explanation(session_file)
|
|
231
|
+
explanation_segment = (
|
|
232
|
+
f"{language.text(language_code, 'failure.evidence.session_explanation')}\n"
|
|
233
|
+
f"{fenced(redact_local_paths(explanation), cap=cap)}"
|
|
234
|
+
if explanation is not None
|
|
235
|
+
else language.text(
|
|
236
|
+
language_code, "failure.evidence.no_session_explanation")
|
|
237
|
+
)
|
|
176
238
|
return (
|
|
177
239
|
f"\n\n{language.text(language_code, 'failure.evidence.heading')}\n"
|
|
240
|
+
f"{explanation_segment}\n"
|
|
178
241
|
f"exit_code={return_code if return_code is not None else '<unknown>'}\n"
|
|
179
242
|
f"\nstderr_tail:\n{fenced(redact_local_paths(stderr), cap=cap)}\n"
|
|
180
243
|
f"\nstdout_tail:\n{fenced(redact_local_paths(stdout), cap=cap)}\n"
|
|
@@ -39,6 +39,7 @@ from orbi.comment_rest_id import rest_comment_id
|
|
|
39
39
|
from orbi.comment_trust import latest_run_marker, trusted_comments
|
|
40
40
|
from orbi.delivery_labels import EVENT_FIX_NEEDED
|
|
41
41
|
from orbi import delivery_labels
|
|
42
|
+
from orbi import failure_stop
|
|
42
43
|
from orbi.failure import (
|
|
43
44
|
failure_comment_body, failure_detail, failure_summary,
|
|
44
45
|
redact_local_paths, terminal_action,
|
|
@@ -582,6 +583,21 @@ def _typed_failure_wording(
|
|
|
582
583
|
return False, False, None
|
|
583
584
|
|
|
584
585
|
|
|
586
|
+
def _stop_headline(record: failure.Failure, language_code: str,
|
|
587
|
+
outcome: str, red: object) -> str | None:
|
|
588
|
+
"""The stop headline the failure comment carries, or None.
|
|
589
|
+
|
|
590
|
+
Issue #2351: the terminal progress comment shows the SAME sentence as the
|
|
591
|
+
failure comment, through the ONE wording function of the record. A
|
|
592
|
+
recoverable (`fix_needed`) outcome keeps the progress comment's own
|
|
593
|
+
retry headline, and the base-branch-red scene renders its own body (a
|
|
594
|
+
ready line and its paused scene), so both keep their own text.
|
|
595
|
+
"""
|
|
596
|
+
if outcome != "blocked" or red is not None:
|
|
597
|
+
return None
|
|
598
|
+
return failure_stop.stop_wording(record, language_code)[0]
|
|
599
|
+
|
|
600
|
+
|
|
585
601
|
def report_delivery_failure(
|
|
586
602
|
exc: BaseException, *, issue: dict, source_repo: str,
|
|
587
603
|
run_id: str | None, pr_url: str | None, worktree: Path | None,
|
|
@@ -945,8 +961,8 @@ def report_delivery_failure(
|
|
|
945
961
|
),
|
|
946
962
|
priority=priority, detail=finish_failure,
|
|
947
963
|
next_step=next_step, outcome=finish_outcome,
|
|
948
|
-
source_repo=source_repo, action=action,
|
|
949
|
-
|
|
950
|
-
|
|
964
|
+
source_repo=source_repo, action=action, reason=reason,
|
|
965
|
+
diagnosis=diagnosis, language_code=language_code,
|
|
966
|
+
status_url=status_url, headline=_stop_headline(failure_record, language_code, outcome, red),
|
|
951
967
|
)))
|
|
952
968
|
return outcome
|