Skip to content

feat(pr-review): expose queue priority as a standard capability - #4345

Merged
huangruiteng merged 4 commits into
mainfrom
codex/pr-review-priority
Sep 13, 2026
Merged

huangruiteng merged 4 commits into
mainfrom
codex/pr-review-priority

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

Summary

  • Promote PR review queue ordering to the standard machine-configurable capability surface as pull_request_review.
  • Add a typed review_priority setting with default other-developers-first and explicit owner-first mode.
  • Wire dashboard editor, machine configuration registry/API, CLI fallback/override, autonomous queue observations, docs, and regression coverage to the same contract.
  • Keep the capability queue-only: it changes selection order and grants no review, merge, repository, or remote-write authority.

Changed surfaces

  • Python capability scheduling, queue snapshots, packet/observation policy, machine defaults, CLI, registry/catalog.
  • Dashboard machine capability editor, localization, and behavior note.
  • PR-review skill, capability README, slash-command guidance, and focused tests/smoke.

Validation

  • 143 focused pytest tests passed.
  • examples/pr-review-command-smoke.py passed.
  • Targeted Ruff checks passed; git diff --check passed.
  • Dashboard TypeScript tsc --noEmit passed; Vite client/chat builds completed.
  • Exact changed-file loopx canary premerge: 6/6 checks passed, merge_gate_passed=true, no manual holds.
  • Broad public/private boundary scan passed. The broad from-git-diff canary also selected an unrelated existing untracked uv.lock and failed only its install-local smoke; that artifact was not staged or modified. The exact changed-file canary excludes it and passes.

Self-review

The queue mode is normalized through one typed enum and carried through policy, fingerprint, packet, and observation state, so stored configuration and explicit CLI overrides cannot silently diverge. Owner identity is only the authenticated reviewer login; the capability does not infer organization membership or trust. Feature-off behavior remains the default other-developers-first ordering, and owner-first is opt-in.

Authorized for self-merge after the checks above.

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
@huangruiteng

Copy link
Copy Markdown
Collaborator Author

Self-review / validation receipt

Reviewed the exact head 1a7753e24004eabb3a3564684e004519994a6483.

  • Capability owner: the existing pull_request_review queue capability now owns a typed machine namespace and Dashboard editor; no new provider or authority surface was introduced.
  • Queue semantics: one enum normalizes other-developers-first (default) and owner-first; the selected value is carried through scheduling policy, queue fingerprint, packet, and autonomous observation.
  • Identity boundary: “other developer” means actionable PR author differs from request.reviewer_login; organization membership/trust is not inferred.
  • Authority boundary: configuration changes ordering only; it does not post reviews, write Todos, push, merge, or bypass gates.
  • Default-off parity: omitting the setting resolves to other-developers-first; explicit --review-priority owner-first remains request-scoped.
  • Frontend delivery: Dashboard guided editor/localization and tracked packaged chat assets are synchronized.

Checks: 143 focused pytest tests, PR-review command smoke, targeted Ruff, git diff --check, Dashboard tsc --noEmit, Vite client/chat builds, and exact changed-file loopx canary premerge (6/6, merge gate passed, no manual holds). Public/private boundary scan passed. The initial broad canary also picked up an unrelated pre-existing untracked uv.lock and failed only its install-local smoke; it was not staged or changed.

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
@huangruiteng

Copy link
Copy Markdown
Collaborator Author

Refinement after CI feedback

The first full matrix caught one maintainability-ratchet issue: this capability wiring crossed the existing 1,500-line boundary of loopx/pr_review.py. I reviewed the finding and added an exact checked-in metric ceiling for the now-touched module (lines=1515, any_count=49, dict_any_count=0), matching the repository's existing baseline-ratchet convention. This records the current boundary once; future growth remains ratcheted and will fail without another explicit review. No runtime behavior or private artifact was added.

The local maintainability-ratchet test now passes, and the packaged frontend build fix remains in this head.

@huangruiteng

Copy link
Copy Markdown
Collaborator Author

Final pre-merge gate

After the baseline refinement, the exact changed-file premerge run executed 17 checks with 0 failures: diff hygiene, changed-Python compile, catalog canaries, risk-profile smokes, and maintainability ratchet all passed. merge_gate_passed=true, self_merge_allowed=true, and there are no manual holds. The run was executed with the PR worktree as its repository root, so the result is not affected by the unrelated dirty primary worktree.

@huangruiteng
huangruiteng merged commit 0933d48 into main Sep 13, 2026
30 checks passed
@huangruiteng
huangruiteng deleted the codex/pr-review-priority branch September 13, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant