feat: add PR-only queue cleanup mode with per-PR dispatch gates (Closes #390) #393

Merged
sysadmin merged 2 commits from feat/issue-390-pr-queue-cleanup-mode into master 2026-07-07 09:07:52 -05:00
Owner

Summary

Closes #390.

Adds a dedicated pr-queue-cleanup reviewer workflow mode that dispatches exactly one canonical review per PR with fail-closed boundaries: no issue claiming, no author-side mutations, no multi-PR batching, and merge only when explicitly authorized per PR.

Changes

  • pr_queue_cleanup.py — run-state resolver, forbidden-task gate, final-report verifier
  • skills/llm-project-workflow/workflows/pr-queue-cleanup.md + schema + template
  • task_capability_map.py / role_session_router.pypr_queue_cleanup reviewer-only routing
  • review_proofs.py — wire cleanup report verifier into build_final_report
  • capability_stop_terminal.py — terminal stop for denied cleanup capability
  • docs/llm-workflow-runbooks.md — when to use cleanup mode vs full review
  • Tests: tests/test_pr_queue_cleanup.py + routing/resolver/workflow contract updates

Validation

Working directory: branches/issue-390-pr-queue-cleanup-mode

venv/bin/python -m pytest tests/test_pr_queue_cleanup.py tests/test_llm_workflow_split.py -k 'pr_queue_cleanup or cleanup' tests/test_resolve_task_capability.py -k 'pr_queue_cleanup' tests/test_role_session_router.py -k 'pr_queue_cleanup' -q

Result: 17 passed (targeted)

Worktree

  • Path: branches/issue-390-pr-queue-cleanup-mode
  • Branch: feat/issue-390-pr-queue-cleanup-mode
  • Commit: 91c6793
## Summary Closes #390. Adds a dedicated **pr-queue-cleanup** reviewer workflow mode that dispatches exactly one canonical review per PR with fail-closed boundaries: no issue claiming, no author-side mutations, no multi-PR batching, and merge only when explicitly authorized per PR. ## Changes - `pr_queue_cleanup.py` — run-state resolver, forbidden-task gate, final-report verifier - `skills/llm-project-workflow/workflows/pr-queue-cleanup.md` + schema + template - `task_capability_map.py` / `role_session_router.py` — `pr_queue_cleanup` reviewer-only routing - `review_proofs.py` — wire cleanup report verifier into `build_final_report` - `capability_stop_terminal.py` — terminal stop for denied cleanup capability - `docs/llm-workflow-runbooks.md` — when to use cleanup mode vs full review - Tests: `tests/test_pr_queue_cleanup.py` + routing/resolver/workflow contract updates ## Validation Working directory: `branches/issue-390-pr-queue-cleanup-mode` ``` venv/bin/python -m pytest tests/test_pr_queue_cleanup.py tests/test_llm_workflow_split.py -k 'pr_queue_cleanup or cleanup' tests/test_resolve_task_capability.py -k 'pr_queue_cleanup' tests/test_role_session_router.py -k 'pr_queue_cleanup' -q ``` Result: **17 passed** (targeted) ## Worktree - Path: `branches/issue-390-pr-queue-cleanup-mode` - Branch: `feat/issue-390-pr-queue-cleanup-mode` - Commit: `91c6793`
jcwalker3 added 1 commit 2026-07-07 09:03:24 -05:00
Adds canonical pr-queue-cleanup workflow, report verifier, reviewer-only task
routing, and runbook guidance so operators can drain open PRs one canonical
review at a time with fail-closed boundaries on batching and unauthorized merges.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
jcwalker3 added 1 commit 2026-07-07 09:06:55 -05:00
Superset of the initial test slice: adds capability-map and router
routing cases (reviewer-role enforcement, author wrong_role_stop), the
full terminal-chain matrix (comment/skip stop, gates-failed stop, merge
completed/blocker stop, unknown-decision fail-closed), and report
verifier cases for two terminal mutations, missing next-suggested-PR,
branch mutations, and missing workflow citation.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
sysadmin approved these changes 2026-07-07 09:07:38 -05:00
sysadmin left a comment
Owner

All tests pass successfully after merging master (1464 passed, 1 failed [pre-existing]). Reviewed the implementation of pr_queue_cleanup.py and the test coverage in tests/test_pr_queue_cleanup.py. It correctly introduces a PR-only queue cleanup mode that enforces per-PR review/merge dispatch gates, prevents author-side mutations, and restricts post-review mutations to same-PR merge. Verified that the remaining failure is pre-existing on master.

All tests pass successfully after merging master (1464 passed, 1 failed [pre-existing]). Reviewed the implementation of `pr_queue_cleanup.py` and the test coverage in `tests/test_pr_queue_cleanup.py`. It correctly introduces a PR-only queue cleanup mode that enforces per-PR review/merge dispatch gates, prevents author-side mutations, and restricts post-review mutations to same-PR merge. Verified that the remaining failure is pre-existing on master.
sysadmin merged commit 103364aa8d into master 2026-07-07 09:07:52 -05:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#393