orbi-cli 0.7.44__tar.gz → 0.7.45__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.44/src/orbi_cli.egg-info → orbi_cli-0.7.45}/PKG-INFO +1 -1
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/pyproject.toml +1 -1
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/__init__.py +1 -1
- orbi_cli-0.7.45/src/orbi/body_steering.py +71 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/journal.py +1 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/pi_session.py +11 -18
- {orbi_cli-0.7.44 → orbi_cli-0.7.45/src/orbi_cli.egg-info}/PKG-INFO +1 -1
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi_cli.egg-info/SOURCES.txt +2 -0
- orbi_cli-0.7.45/tests/test_body_steering.py +57 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_steering_review.py +165 -10
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/LICENSE +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/README.md +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/docs/licenses/sustainable-use-license.md +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/setup.cfg +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/acceptance_section.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/amend_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/base_ci_fix.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/base_ci_red.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/blocked_comment.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/branch_reclaim.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/check_permission.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/checks.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/claim.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/clarify.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/clarify_proposal.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/clarify_stop.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/cli.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/cli_commands.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/cli_doctor.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/cli_parser.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/cli_source.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/cli_status.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/cli_ticket_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/comment_kind.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/comment_rest_id.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/comment_trust.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/config.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/config_hint.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/delivery_comment.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/delivery_labels.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/delivery_scene.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/draft.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/draft_cli.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/draft_document.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/draft_marker.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/engine_source.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/example_config.toml +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/extensions/clarify_verdict.ts +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/extensions/draft_tools.ts +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/failure.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/failure_evidence.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/failure_report.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/gh_response.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/git_identity.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/git_transport.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/github.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/github_feedback.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/gitops.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/human_review.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/implementation_delivery.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/language.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/language_failure.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/language_terms.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/language_terms_criteria.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/language_terms_fix.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/launchd_deploy.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/merge_exec.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/merge_gate.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/merge_handoff.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/milestone.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/milestone_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/milestone_errors.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/notify.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/ops_delivery.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/pi_activity.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/pi_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/pi_exec.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/pi_idle.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/pi_process.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/pi_recovery.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/pi_stream_log.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/pilot_setup.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/pilot_slots.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/pr_verification.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/progress.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/progress_display.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/progress_outcome.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/progress_summary.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/release.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/release_closeout.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/release_comments.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/release_declaration.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/release_git.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/release_notes.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/release_run.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/repo_config.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/requeue.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/resume_scan.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/resume_verification.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/review_merge.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/review_rounds.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/review_verdict.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/run_fields.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/run_state.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/runner.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/runner_health.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/runner_marker.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/runner_source.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/scene.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/scheduler.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/scheduler_units.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/session_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/setup_checks.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/setup_config.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/source_pool.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/split_apply.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/split_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/status_observe.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/suggest.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/systemd_deploy.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/ticket_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/ticket_command_registry.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/ticket_criteria.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/user_summary.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi/worktree_retention.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi_cli.egg-info/dependency_links.txt +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi_cli.egg-info/entry_points.txt +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/src/orbi_cli.egg-info/top_level.txt +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_agents_md.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_amend_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_apply_label_patch.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_base_branch_failure.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_base_ci_red.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_blocked_comment.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_adapters.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_delivery.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_pi.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_preflight.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_release.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_runner_claim_resume.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_runner_failure_report.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_runner_main.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_runner_milestone.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_runner_outcome.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_runner_prompt.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_runner_reconcile.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_runner_session.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_bootstrap_runner_tickets.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_branch_reclaim.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_check_permission.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_ci_failure_issue_workflow.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_ci_failure_triage.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_ci_macos_workflow.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_ci_workflow.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_clarify.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_claude_plugin.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_cli_golden.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_cli_install.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_cli_milestone.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_cli_packaging.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_cli_source.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_cli_ticket_commands.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_command_receipt_contract.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_comment_identity.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_comment_readers_contract.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_comment_rest_id.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_comment_trust.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_concurrency_e2e.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_constitution.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_coverage_gate.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_deliver_pr_fakes.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_delivery_branch_delete.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_delivery_labels.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_delivery_scene.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_docker_docs.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_docker_entrypoint.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_docker_image_workflow.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_docs_i18n.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_docs_issue_shapes.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_docs_labels.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_docs_mermaid.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_docs_releases.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_docs_single_source.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_docs_site.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_draft.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_engine_source.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_failure.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_failure_report.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_fix_needed_loop.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_gh_read_retry.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_gh_response.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_git_base_smoke.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_git_merge_smoke.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_git_network_retry.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_git_transport.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_github.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_github_fakes.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_gitops.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_gitops_fakes.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_human_review.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_import_graph.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_install_sh.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_issue_1367.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_issue_461.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_issue_template_config.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_journal.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_journal_events.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_launchd_deploy.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_license.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_merge_exec_extraction.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_message_language.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_milestone_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_notify.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_ops_e2e.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_orbi.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_orbi_dashboard.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_orbi_exporter.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_patch_ratchet.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pi_activity.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pi_child_reap.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pi_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pi_exec.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pi_extensions.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pi_provider_templates.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pi_recovery.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pi_session.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pilot_setup.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pilot_slots.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pr_issue_link_workflow.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_pr_verification.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_prerequisite_check.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_progress.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_progress_wiring.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_prompt_contract.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_public_contracts.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_public_helpers.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_publish_workflow.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_release_docs_workflow.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_release_extraction.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_release_ticket_templates.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_repo_config.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_resume_continue_e2e.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_resume_e2e.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_resume_pr.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_review_merge.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_review_verdict.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_run_artifacts.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_run_fields.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_run_id_e2e.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_run_id_fixture.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_runner_config.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_runner_health.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_runner_source_freshness.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_scene.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_scheduler.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_seam.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_setup_output_golden.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_size_ratchet.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_split_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_src_layout.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_status_observe.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_suggest.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_suite_hygiene.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_systemd_deploy.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_systemd_timer.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_ticket_command.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_ticket_command_registration.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_user_acceptance_contract.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_user_summary.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/tests/test_versioned_comment_block.py +0 -0
- {orbi_cli-0.7.44 → orbi_cli-0.7.45}/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.45
|
|
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.45"
|
|
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"
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""Trust decisions for Issue body edits during a running delivery."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import json
|
|
5
|
+
import logging
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
|
|
8
|
+
from orbi.comment_trust import comment_is_trusted
|
|
9
|
+
from orbi.github import run_gh_read_command
|
|
10
|
+
from orbi.journal import event, issue_context
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
_ISSUE_BODY_EDITOR_QUERY = """
|
|
14
|
+
query($owner: String!, $name: String!, $number: Int!) {
|
|
15
|
+
repository(owner: $owner, name: $name) {
|
|
16
|
+
issue(number: $number) {
|
|
17
|
+
body
|
|
18
|
+
editor { login }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass(frozen=True)
|
|
26
|
+
class BodyEdit:
|
|
27
|
+
body: str
|
|
28
|
+
editor: str | None
|
|
29
|
+
trusted: bool
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def issue_body_editor(number: int, *, repo: str, timeout: int) -> tuple[str, str | None]:
|
|
33
|
+
"""Read the body and its editor together so the trust check applies to that text."""
|
|
34
|
+
owner, _, name = repo.partition("/")
|
|
35
|
+
raw = run_gh_read_command([
|
|
36
|
+
"gh", "api", "graphql", "-f", f"query={_ISSUE_BODY_EDITOR_QUERY}",
|
|
37
|
+
"-f", f"owner={owner}", "-f", f"name={name}", "-F", f"number={number}",
|
|
38
|
+
], timeout=timeout)
|
|
39
|
+
try:
|
|
40
|
+
payload = json.loads(raw)
|
|
41
|
+
issue = payload["data"]["repository"]["issue"]
|
|
42
|
+
body, editor = issue["body"], issue["editor"]
|
|
43
|
+
except (json.JSONDecodeError, KeyError, TypeError) as exc:
|
|
44
|
+
raise ValueError("malformed issue body editor response") from exc
|
|
45
|
+
if payload.get("errors") or not isinstance(body, str) or (
|
|
46
|
+
editor is not None and not isinstance(editor, dict)
|
|
47
|
+
):
|
|
48
|
+
raise ValueError("malformed issue body editor response")
|
|
49
|
+
login = editor.get("login") if editor is not None else None
|
|
50
|
+
return body, login if isinstance(login, str) and login else None
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def poll_body_edit(
|
|
54
|
+
snapshot: dict, recorded_body: object, *, number: int, repo: str,
|
|
55
|
+
) -> BodyEdit | None:
|
|
56
|
+
polled_body = snapshot.get("body")
|
|
57
|
+
if not isinstance(polled_body, str) or polled_body == recorded_body:
|
|
58
|
+
return None
|
|
59
|
+
body, editor = issue_body_editor(number, repo=repo, timeout=30)
|
|
60
|
+
if body == recorded_body:
|
|
61
|
+
return None
|
|
62
|
+
trusted = comment_is_trusted({"author": {"login": editor}}, repo=repo)
|
|
63
|
+
return BodyEdit(body, editor, trusted)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def ignore_untrusted_body_edit(edit: BodyEdit, issue: dict, repo: str) -> str:
|
|
67
|
+
event(
|
|
68
|
+
"steering_body_untrusted", level=logging.WARNING,
|
|
69
|
+
issue=issue_context(repo, int(issue["number"])), editor=edit.editor or "-",
|
|
70
|
+
)
|
|
71
|
+
return edit.body
|
|
@@ -229,6 +229,7 @@ JOURNAL_EVENTS: dict[str, str] = {
|
|
|
229
229
|
"model_wait_swallowed": "/slots probe confirmed a swallowed model request; Pi session killed",
|
|
230
230
|
"delivery_steered": "an active delivery was restarted with a trusted Issue correction",
|
|
231
231
|
"steering_limit_reached": "active delivery steering reached its configured round limit",
|
|
232
|
+
"steering_body_untrusted": "an Issue body edit was ignored because its editor was untrusted or unknown",
|
|
232
233
|
"steering_poll_failed": "steering polling failed (pure bypass)",
|
|
233
234
|
"steering_limit_notice_failed": "the post-limit correction notice could not be published (pure bypass)",
|
|
234
235
|
# Provider rate limiting and quota stops.
|
|
@@ -23,6 +23,7 @@ from pathlib import Path
|
|
|
23
23
|
|
|
24
24
|
from orbi import config as config_domain
|
|
25
25
|
from orbi import language, user_summary
|
|
26
|
+
from orbi.body_steering import ignore_untrusted_body_edit, poll_body_edit
|
|
26
27
|
from orbi.delivery_scene import RunContext
|
|
27
28
|
from orbi.comment_trust import (
|
|
28
29
|
comment_is_trusted,
|
|
@@ -548,10 +549,7 @@ def run_pi(issue: dict, ctx: RunContext, config: config_domain.RunnerConfig, *,
|
|
|
548
549
|
steering_started = time.time()
|
|
549
550
|
steering_limit_logged = False
|
|
550
551
|
steering_limit_notice_logged = False
|
|
551
|
-
#
|
|
552
|
-
# prompt above embeds. The steering poll compares the live body
|
|
553
|
-
# against it — a maintainer rewrite of the Issue body steers like a
|
|
554
|
-
# new comment.
|
|
552
|
+
# Begin with the body already in the prompt (Issue #1094).
|
|
555
553
|
steering_body = issue.get("body", "")
|
|
556
554
|
# `resume_context` is also the public parameter name of this function;
|
|
557
555
|
# keep an unshadowed reference for the restart callback below.
|
|
@@ -569,9 +567,7 @@ def run_pi(issue: dict, ctx: RunContext, config: config_domain.RunnerConfig, *,
|
|
|
569
567
|
), round=steering_rounds,
|
|
570
568
|
)
|
|
571
569
|
try:
|
|
572
|
-
#
|
|
573
|
-
# view` that lists the comments also returns the body, so a
|
|
574
|
-
# body rewrite needs no second call and no new poll.
|
|
570
|
+
# Read the editor only when the snapshot shows a body edit.
|
|
575
571
|
snapshot = issue_view(
|
|
576
572
|
int(issue["number"]), "comments,body",
|
|
577
573
|
repo=source_repo, timeout=30,
|
|
@@ -586,12 +582,10 @@ def run_pi(issue: dict, ctx: RunContext, config: config_domain.RunnerConfig, *,
|
|
|
586
582
|
reason=type(exc).__name__,
|
|
587
583
|
)
|
|
588
584
|
return None
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
current_body = snapshot.get("body")
|
|
592
|
-
body_changed = (
|
|
593
|
-
isinstance(current_body, str) and current_body != steering_body
|
|
585
|
+
edit = poll_body_edit(
|
|
586
|
+
snapshot, steering_body, number=int(issue["number"]), repo=source_repo,
|
|
594
587
|
)
|
|
588
|
+
body_changed = edit is not None and edit.trusted
|
|
595
589
|
fresh: list[dict] = []
|
|
596
590
|
# This poll's trust decisions, committed to `steering_seen` only
|
|
597
591
|
# once the poll completes (Issue #1996): a permission read that
|
|
@@ -626,9 +620,10 @@ def run_pi(issue: dict, ctx: RunContext, config: config_domain.RunnerConfig, *,
|
|
|
626
620
|
item = dict(comment)
|
|
627
621
|
item["issue"] = issue["number"]
|
|
628
622
|
fresh.append(item)
|
|
629
|
-
#
|
|
630
|
-
# committed together — a poll that raised above marked nothing.
|
|
623
|
+
# Commit decisions only after every trust read in this poll succeeds.
|
|
631
624
|
steering_seen.update(decided)
|
|
625
|
+
if edit is not None and not edit.trusted:
|
|
626
|
+
steering_body = ignore_untrusted_body_edit(edit, issue, source_repo)
|
|
632
627
|
if limit_reached:
|
|
633
628
|
if (fresh or body_changed) and not steering_limit_notice_logged:
|
|
634
629
|
steering_limit_notice_logged = True
|
|
@@ -665,13 +660,11 @@ def run_pi(issue: dict, ctx: RunContext, config: config_domain.RunnerConfig, *,
|
|
|
665
660
|
author = comment.get("author")
|
|
666
661
|
authors.append(author.get("login") if isinstance(author, dict) else "unknown")
|
|
667
662
|
if body_changed:
|
|
668
|
-
|
|
669
|
-
# never triggers a second restart (Issue #1094).
|
|
670
|
-
steering_body = current_body
|
|
663
|
+
steering_body = edit.body
|
|
671
664
|
resume = build_resume_context(
|
|
672
665
|
worktree, fresh,
|
|
673
666
|
body_revision=(
|
|
674
|
-
{"issue": issue["number"], "body":
|
|
667
|
+
{"issue": issue["number"], "body": edit.body}
|
|
675
668
|
if body_changed else None
|
|
676
669
|
),
|
|
677
670
|
) or ""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: orbi-cli
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.45
|
|
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
|
|
@@ -8,6 +8,7 @@ src/orbi/amend_command.py
|
|
|
8
8
|
src/orbi/base_ci_fix.py
|
|
9
9
|
src/orbi/base_ci_red.py
|
|
10
10
|
src/orbi/blocked_comment.py
|
|
11
|
+
src/orbi/body_steering.py
|
|
11
12
|
src/orbi/branch_reclaim.py
|
|
12
13
|
src/orbi/check_permission.py
|
|
13
14
|
src/orbi/checks.py
|
|
@@ -127,6 +128,7 @@ tests/test_apply_label_patch.py
|
|
|
127
128
|
tests/test_base_branch_failure.py
|
|
128
129
|
tests/test_base_ci_red.py
|
|
129
130
|
tests/test_blocked_comment.py
|
|
131
|
+
tests/test_body_steering.py
|
|
130
132
|
tests/test_bootstrap_adapters.py
|
|
131
133
|
tests/test_bootstrap_delivery.py
|
|
132
134
|
tests/test_bootstrap_pi.py
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from unittest.mock import Mock
|
|
3
|
+
|
|
4
|
+
import pytest
|
|
5
|
+
|
|
6
|
+
from orbi.body_steering import issue_body_editor
|
|
7
|
+
from seam import seam
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@pytest.fixture
|
|
11
|
+
def graphql_read(monkeypatch):
|
|
12
|
+
read = Mock()
|
|
13
|
+
monkeypatch.setattr(seam, "run_gh_read_command", read)
|
|
14
|
+
return read
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@pytest.mark.parametrize(("body", "editor", "login"), [
|
|
18
|
+
("edited body", {"login": "alice"}, "alice"),
|
|
19
|
+
("", None, None),
|
|
20
|
+
("edited body", {"login": ""}, None),
|
|
21
|
+
("edited body", {"login": 42}, None),
|
|
22
|
+
("edited body", {}, None),
|
|
23
|
+
])
|
|
24
|
+
def test_issue_body_editor_reads_one_graphql_response(graphql_read, body, editor, login):
|
|
25
|
+
graphql_read.return_value = json.dumps({"data": {"repository": {"issue": {
|
|
26
|
+
"body": body, "editor": editor,
|
|
27
|
+
}}}})
|
|
28
|
+
|
|
29
|
+
assert issue_body_editor(1114, repo="owner/project", timeout=12) == (body, login)
|
|
30
|
+
graphql_read.assert_called_once()
|
|
31
|
+
(command,), kwargs = graphql_read.call_args
|
|
32
|
+
executable, subcommand, endpoint, flag, query, *variables = command
|
|
33
|
+
assert (executable, subcommand, endpoint, flag) == ("gh", "api", "graphql", "-f")
|
|
34
|
+
assert variables == ["-f", "owner=owner", "-f", "name=project", "-F", "number=1114"]
|
|
35
|
+
assert query.startswith("query=")
|
|
36
|
+
query = "".join(query.split())
|
|
37
|
+
assert 'repository(owner:$owner,name:$name){issue(number:$number){bodyeditor{login}}}' in query
|
|
38
|
+
assert kwargs == {"timeout": 12}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@pytest.mark.parametrize("raw", [
|
|
42
|
+
"not JSON",
|
|
43
|
+
"null",
|
|
44
|
+
'{"data":{"repository":null}}',
|
|
45
|
+
'{"data":{"repository":{"issue":null}}}',
|
|
46
|
+
'{"data":{"repository":{"issue":{"editor":null}}}}',
|
|
47
|
+
'{"data":{"repository":{"issue":{"body":null,"editor":null}}}}',
|
|
48
|
+
'{"data":{"repository":{"issue":{"body":"edited body"}}}}',
|
|
49
|
+
'{"data":{"repository":{"issue":{"body":"edited body","editor":"alice"}}}}',
|
|
50
|
+
'{"data":{"repository":{"issue":{"body":"edited body","editor":null}}},'
|
|
51
|
+
'"errors":[{"message":"editor lookup failed"}]}',
|
|
52
|
+
])
|
|
53
|
+
def test_issue_body_editor_rejects_malformed_response(graphql_read, raw):
|
|
54
|
+
graphql_read.return_value = raw
|
|
55
|
+
|
|
56
|
+
with pytest.raises(ValueError, match="issue body editor"):
|
|
57
|
+
issue_body_editor(1114, repo="owner/project", timeout=12)
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import json
|
|
2
|
+
import logging
|
|
2
3
|
import time
|
|
3
4
|
from pathlib import Path
|
|
5
|
+
from unittest.mock import Mock
|
|
6
|
+
|
|
4
7
|
import pytest
|
|
8
|
+
|
|
5
9
|
import orbi.runner as runner
|
|
6
10
|
import orbi.pi_session as pi_session
|
|
11
|
+
from orbi import config as config_domain
|
|
7
12
|
from orbi.delivery_scene import RunContext
|
|
8
13
|
from orbi.pi_process import PiWatchOptions
|
|
9
14
|
from seam import seam
|
|
@@ -14,15 +19,14 @@ def _repository_permissions(monkeypatch):
|
|
|
14
19
|
"""Issue #1806: the steering authors here can write to the
|
|
15
20
|
repository (`alice`/`bob`); `bad` cannot. The read is answered
|
|
16
21
|
here so the steering scan never reaches real GitHub."""
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
lambda login, *, repo: (
|
|
20
|
-
"none" if login == "bad" else "admin"
|
|
21
|
-
),
|
|
22
|
+
permission = Mock(
|
|
23
|
+
side_effect=lambda login, *, repo: "none" if login == "bad" else "admin",
|
|
22
24
|
)
|
|
25
|
+
monkeypatch.setattr(seam, "repository_permission", permission)
|
|
23
26
|
monkeypatch.setattr(
|
|
24
27
|
seam, "authenticated_github_login", lambda: "orbi-bot[bot]",
|
|
25
28
|
)
|
|
29
|
+
return permission
|
|
26
30
|
|
|
27
31
|
|
|
28
32
|
|
|
@@ -44,6 +48,43 @@ def _snapshot(comments, body="body"):
|
|
|
44
48
|
return snapshot
|
|
45
49
|
|
|
46
50
|
|
|
51
|
+
@pytest.fixture
|
|
52
|
+
def body_reads(monkeypatch):
|
|
53
|
+
read = Mock()
|
|
54
|
+
monkeypatch.setattr(seam, "run_gh_read_command", read)
|
|
55
|
+
return read
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _editor_response(body, login):
|
|
59
|
+
return json.dumps({"data": {"repository": {"issue": {
|
|
60
|
+
"body": body, "editor": None if login is None else {"login": login},
|
|
61
|
+
}}}})
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@pytest.fixture
|
|
65
|
+
def body_steering_check(monkeypatch, tmp_path):
|
|
66
|
+
def start(*snapshots):
|
|
67
|
+
polls = iter(snapshots)
|
|
68
|
+
monkeypatch.setitem(pi_session.__dict__, "issue_view", lambda *a, **k: next(polls))
|
|
69
|
+
monkeypatch.setitem(pi_session.__dict__, "changed_files", lambda *a, **k: [])
|
|
70
|
+
monkeypatch.setitem(pi_session.__dict__, "activity_snapshot", lambda *a, **k: None)
|
|
71
|
+
captured = {}
|
|
72
|
+
monkeypatch.setitem(pi_session.__dict__, "stream_pi",
|
|
73
|
+
lambda command, **kw: captured.update(kw) or "done")
|
|
74
|
+
issue = {"number": 2, "title": "title", "body": "original body"}
|
|
75
|
+
ctx = RunContext("abc12345", 2, "branch", tmp_path, "owner/repo")
|
|
76
|
+
assert pi_session.run_pi(issue, ctx, _config(tmp_path)) == "done"
|
|
77
|
+
return captured["watch"].steering_check
|
|
78
|
+
|
|
79
|
+
return start
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _new_steering_comment():
|
|
83
|
+
future = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime(time.time() + 10))
|
|
84
|
+
return {"id": "new", "createdAt": future, "author": {"login": "alice"},
|
|
85
|
+
"body": "correct this"}
|
|
86
|
+
|
|
87
|
+
|
|
47
88
|
def test_run_pi_steering_callback_filters_and_deduplicates(monkeypatch, tmp_path):
|
|
48
89
|
future = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime(time.time() + 10))
|
|
49
90
|
comments = [
|
|
@@ -220,7 +261,7 @@ def test_steering_validation_and_limit(monkeypatch, tmp_path):
|
|
|
220
261
|
assert config_domain._positive_seconds({}, "x", 2.0) == 2.0
|
|
221
262
|
config = _config(tmp_path, steering_max_rounds=0)
|
|
222
263
|
monkeypatch.setitem(pi_session.__dict__, "issue_view",
|
|
223
|
-
lambda *a, **k: _snapshot([]))
|
|
264
|
+
lambda *a, **k: _snapshot([], body="b"))
|
|
224
265
|
captured = {}
|
|
225
266
|
monkeypatch.setitem(pi_session.__dict__, "stream_pi", lambda command, **kw: captured.update(kw) or "done")
|
|
226
267
|
issue = {"number": 3, "title": "t", "body": "b"}
|
|
@@ -229,13 +270,14 @@ def test_steering_validation_and_limit(monkeypatch, tmp_path):
|
|
|
229
270
|
assert captured["watch"].steering_check() is None
|
|
230
271
|
|
|
231
272
|
|
|
232
|
-
def test_run_pi_steering_body_edit_restarts(monkeypatch, tmp_path):
|
|
273
|
+
def test_run_pi_steering_body_edit_restarts(monkeypatch, tmp_path, body_reads):
|
|
233
274
|
"""A body edit between claim and poll steers exactly like a new
|
|
234
275
|
comment (Issue #1094): the request carries the 「正文已更新」 header and
|
|
235
276
|
the edited text, and the SAME edited body on the next poll is inert —
|
|
236
277
|
the recorded body became the edited one."""
|
|
237
278
|
monkeypatch.setitem(pi_session.__dict__, "issue_view",
|
|
238
279
|
lambda *a, **k: _snapshot([], body="edited body"))
|
|
280
|
+
body_reads.return_value = _editor_response("edited body", "alice")
|
|
239
281
|
monkeypatch.setitem(pi_session.__dict__, "changed_files", lambda *a, **k: [])
|
|
240
282
|
monkeypatch.setitem(pi_session.__dict__, "activity_snapshot", lambda *a, **k: None)
|
|
241
283
|
captured = {}
|
|
@@ -249,6 +291,111 @@ def test_run_pi_steering_body_edit_restarts(monkeypatch, tmp_path):
|
|
|
249
291
|
assert "正文已更新" in request.context
|
|
250
292
|
assert "edited body" in request.context
|
|
251
293
|
assert captured["watch"].steering_check() is None
|
|
294
|
+
assert body_reads.call_count == 1
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def test_run_pi_steering_untrusted_body_reported_once_then_trusted_edit_steers(
|
|
298
|
+
body_steering_check, body_reads, caplog,
|
|
299
|
+
):
|
|
300
|
+
untrusted = _snapshot([], "untrusted direction")
|
|
301
|
+
trusted = _snapshot([], "maintainer direction")
|
|
302
|
+
check = body_steering_check(untrusted, untrusted, trusted)
|
|
303
|
+
body_reads.side_effect = [
|
|
304
|
+
_editor_response("untrusted direction", "bad"),
|
|
305
|
+
_editor_response("maintainer direction", "alice"),
|
|
306
|
+
]
|
|
307
|
+
|
|
308
|
+
assert check() is None
|
|
309
|
+
assert check() is None
|
|
310
|
+
request = check()
|
|
311
|
+
assert request is not None and request.body_revision is True
|
|
312
|
+
assert "maintainer direction" in request.context
|
|
313
|
+
assert "untrusted direction" not in request.context
|
|
314
|
+
assert body_reads.call_count == 2
|
|
315
|
+
warnings = [
|
|
316
|
+
(record.levelno, record.getMessage())
|
|
317
|
+
for record in caplog.records
|
|
318
|
+
if "steering_body_untrusted" in record.getMessage()
|
|
319
|
+
]
|
|
320
|
+
assert warnings == [
|
|
321
|
+
(logging.WARNING, "steering_body_untrusted issue=owner/repo#2 editor=bad"),
|
|
322
|
+
]
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
def test_run_pi_steering_body_without_editor_is_ignored(
|
|
326
|
+
body_steering_check, body_reads, caplog,
|
|
327
|
+
):
|
|
328
|
+
check = body_steering_check(_snapshot([], "unattributed direction"))
|
|
329
|
+
body_reads.return_value = _editor_response("unattributed direction", None)
|
|
330
|
+
|
|
331
|
+
assert check() is None
|
|
332
|
+
assert "steering_body_untrusted issue=owner/repo#2 editor=-" in caplog.messages
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
def test_run_pi_steering_untrusted_body_and_trusted_comment_steers_comment_only(
|
|
336
|
+
body_steering_check, body_reads,
|
|
337
|
+
):
|
|
338
|
+
snapshot = _snapshot([_new_steering_comment()], "untrusted direction")
|
|
339
|
+
check = body_steering_check(snapshot, snapshot)
|
|
340
|
+
body_reads.return_value = _editor_response("untrusted direction", "bad")
|
|
341
|
+
|
|
342
|
+
request = check()
|
|
343
|
+
assert request is not None
|
|
344
|
+
assert request.comment_ids == ("new",)
|
|
345
|
+
assert request.body_revision is False
|
|
346
|
+
assert "alice: correct this" in request.context
|
|
347
|
+
assert "untrusted direction" not in request.context
|
|
348
|
+
assert check() is None
|
|
349
|
+
assert body_reads.call_count == 1
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
@pytest.mark.parametrize("failure", ["editor read", "editor permission", "comment permission"])
|
|
353
|
+
def test_run_pi_steering_body_read_failure_consumes_nothing(
|
|
354
|
+
failure, body_steering_check, body_reads, _repository_permissions,
|
|
355
|
+
):
|
|
356
|
+
snapshot = _snapshot([_new_steering_comment()], "polled direction")
|
|
357
|
+
check = body_steering_check(
|
|
358
|
+
snapshot, snapshot, _snapshot(snapshot["comments"], "maintainer direction"),
|
|
359
|
+
)
|
|
360
|
+
response = _editor_response("maintainer direction", "bob")
|
|
361
|
+
error = RuntimeError("gh: HTTP 502")
|
|
362
|
+
body_reads.return_value = response
|
|
363
|
+
if failure == "editor read":
|
|
364
|
+
body_reads.side_effect = [error, response]
|
|
365
|
+
else:
|
|
366
|
+
failed_login = "bob" if failure == "editor permission" else "alice"
|
|
367
|
+
|
|
368
|
+
def permission(login, *, repo):
|
|
369
|
+
if login == failed_login:
|
|
370
|
+
_repository_permissions.side_effect = None
|
|
371
|
+
raise error
|
|
372
|
+
return "admin"
|
|
373
|
+
|
|
374
|
+
_repository_permissions.side_effect = permission
|
|
375
|
+
_repository_permissions.return_value = "admin"
|
|
376
|
+
|
|
377
|
+
with pytest.raises(RuntimeError, match="HTTP 502"):
|
|
378
|
+
check()
|
|
379
|
+
request = check()
|
|
380
|
+
assert request is not None and request.body_revision is True
|
|
381
|
+
assert request.comment_ids == ("new",)
|
|
382
|
+
assert "maintainer direction" in request.context
|
|
383
|
+
assert check() is None
|
|
384
|
+
assert body_reads.call_count == 2
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
@pytest.mark.parametrize("body", ["verified direction", "original body"])
|
|
388
|
+
def test_run_pi_steering_uses_body_returned_with_editor(body, body_steering_check, body_reads):
|
|
389
|
+
check = body_steering_check(_snapshot([], "unchecked direction"))
|
|
390
|
+
body_reads.return_value = _editor_response(body, "alice")
|
|
391
|
+
|
|
392
|
+
request = check()
|
|
393
|
+
if body == "original body":
|
|
394
|
+
assert request is None
|
|
395
|
+
else:
|
|
396
|
+
assert request is not None and request.body_revision is True
|
|
397
|
+
assert body in request.context
|
|
398
|
+
assert "unchecked direction" not in request.context
|
|
252
399
|
|
|
253
400
|
|
|
254
401
|
def test_run_pi_steering_unchanged_body_stays_silent(monkeypatch, tmp_path):
|
|
@@ -265,7 +412,7 @@ def test_run_pi_steering_unchanged_body_stays_silent(monkeypatch, tmp_path):
|
|
|
265
412
|
assert captured["watch"].steering_check() is None
|
|
266
413
|
|
|
267
414
|
|
|
268
|
-
def test_run_pi_steering_body_edit_and_comment_is_one_request(monkeypatch, tmp_path):
|
|
415
|
+
def test_run_pi_steering_body_edit_and_comment_is_one_request(monkeypatch, tmp_path, body_reads):
|
|
269
416
|
"""A body edit and a trusted new comment in the same poll produce ONE
|
|
270
417
|
request carrying both — one restart, never two (Issue #1094)."""
|
|
271
418
|
future = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime(time.time() + 10))
|
|
@@ -274,6 +421,7 @@ def test_run_pi_steering_body_edit_and_comment_is_one_request(monkeypatch, tmp_p
|
|
|
274
421
|
]
|
|
275
422
|
monkeypatch.setitem(pi_session.__dict__, "issue_view",
|
|
276
423
|
lambda *a, **k: _snapshot(comments, body="edited body"))
|
|
424
|
+
body_reads.return_value = _editor_response("edited body", "alice")
|
|
277
425
|
monkeypatch.setitem(pi_session.__dict__, "comment_is_trusted", lambda c, *, repo: c["id"] == "new")
|
|
278
426
|
monkeypatch.setitem(pi_session.__dict__, "changed_files", lambda *a, **k: [])
|
|
279
427
|
monkeypatch.setitem(pi_session.__dict__, "activity_snapshot", lambda *a, **k: None)
|
|
@@ -291,7 +439,7 @@ def test_run_pi_steering_body_edit_and_comment_is_one_request(monkeypatch, tmp_p
|
|
|
291
439
|
assert captured["watch"].steering_check() is None
|
|
292
440
|
|
|
293
441
|
|
|
294
|
-
def test_run_pi_steering_body_edit_respects_round_limit(monkeypatch, tmp_path):
|
|
442
|
+
def test_run_pi_steering_body_edit_respects_round_limit(monkeypatch, tmp_path, body_reads):
|
|
295
443
|
"""At `steering_max_rounds` a body edit is ignored with the existing
|
|
296
444
|
`steering_limit_reached` event — no restart (Issue #1094)."""
|
|
297
445
|
polls = iter([
|
|
@@ -300,6 +448,12 @@ def test_run_pi_steering_body_edit_respects_round_limit(monkeypatch, tmp_path):
|
|
|
300
448
|
_snapshot([], body="second edit"),
|
|
301
449
|
])
|
|
302
450
|
monkeypatch.setitem(pi_session.__dict__, "issue_view", lambda *a, **k: next(polls))
|
|
451
|
+
body_reads.side_effect = [
|
|
452
|
+
_editor_response("first edit", "alice"),
|
|
453
|
+
_editor_response("second edit", "alice"),
|
|
454
|
+
]
|
|
455
|
+
notice = Mock()
|
|
456
|
+
monkeypatch.setitem(pi_session.__dict__, "comment_issue", notice)
|
|
303
457
|
events = []
|
|
304
458
|
monkeypatch.setitem(pi_session.__dict__, "event", lambda kind, **kw: events.append(kind))
|
|
305
459
|
monkeypatch.setitem(pi_session.__dict__, "changed_files", lambda *a, **k: [])
|
|
@@ -314,6 +468,7 @@ def test_run_pi_steering_body_edit_respects_round_limit(monkeypatch, tmp_path):
|
|
|
314
468
|
assert first is not None and first.body_revision is True
|
|
315
469
|
assert check() is None
|
|
316
470
|
assert "steering_limit_reached" in events
|
|
471
|
+
notice.assert_called_once()
|
|
317
472
|
|
|
318
473
|
|
|
319
474
|
def test_run_pi_steering_limit_notifies_once_for_late_comment(monkeypatch, tmp_path):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|