Repository navigation
Description
What happened
The job marks a pull request ready when the checks pass. No reviewer looks at the diff against the issue, the plan and the project rules. The draft evaluator (#2867) is planned, but the review tools the project already has are not used by the job.
What should happen
- After the last group, the job runs
devops reviewon the diff and a plan-conformance check (every task ticked, every criterion delivered). Findings of a high severity go back as a repair round. Remaining findings are posted in the PR comment. - This is the seam that feat(roadmap): Add a draft PR evaluator for issue and rules #2867 uses for its model verdict.
Acceptance criteria
- A diff with a seeded high-severity finding is repaired or blocks the ready mark in a replay test.
- The PR comment lists the review findings with their disposition.
- The review call budget per item is stated and enforced.
- The ready mark waits for both the checks and the review.
Related: tracker for this set (filed with it), #2908 (issue workflow), #2867 (draft PR evaluator), #3005 (task kind), #3010 to #3015 (plan gates), #2919 (stuck-item metrics), #2953 (Ollama parser).
Alternatives check of 2026-11-04: partly.
Tool: The-PR-Agent/pr-agent (https://github.com/The-PR-Agent/pr-agent), MIT, last activity 2026-11-04, maintained.
Proposed design
Problem statement
The implement job marks a pull request ready when the CI checks pass. No review of the diff happens before that mark. The project has devops review and a tick check, but the job calls neither on the diff. The runner pod holds no review tools and no sandbox, so the build waits on #3041 and #2695. The plan then gates the ready mark through draft_readiness.extra_checks with --no-group-analysis.
Acceptance criteria
Requirement: Review before the ready mark
The implement job SHALL run devops review on the pull request diff after the last task group and before gh pr ready.
Scenario: Review runs on the diff
- WHEN The last task group of the change is done and the CI checks pass
- THEN The job runs
devops reviewon the diff before it callsgh pr ready
Requirement: No diff text to a model
The implement job MUST run the review with --no-group-analysis, so no diff text goes to a model group.
Scenario: The review command line
- WHEN The job builds the
devops reviewcommand - THEN The command holds
--no-group-analysisand the review sends no code region to a model
Requirement: A review that cannot run stops the item
The implement job SHALL stop the item when the review tools do not run, and SHALL NOT treat that review as clean.
Scenario: No sandbox on the host
- WHEN The review exits with the error that the review tools did not run
- THEN The job stops the item with a reason that names the missing tool and marks the item Blocked
Requirement: Review stops have their own failure class
The implement job MUST record a stop of the review with a failure class that a retry cannot clear.
Scenario: Missing tool gives the review class
- WHEN The review stops because a tool is missing or the budget is spent
- THEN The stop comment names the review failure class and the item waits for
implement: retryor a new runner image
Requirement: A high-severity finding is repaired or blocks
The implement job SHALL repair a high-severity finding in one repair round or SHALL NOT mark the pull request ready.
Scenario: Seeded high-severity finding
- WHEN A replay test seeds a high-severity finding in the diff of the last task group
- THEN The job repairs the finding in one repair round, or it does not mark the pull request ready
Requirement: Findings in the pull request comment
The implement job SHALL post each review finding and its disposition in the pull request comment.
Scenario: Findings with dispositions
- WHEN The review completes with one or more findings
- THEN The pull request comment lists each finding with its disposition: repaired, suppressed or blocking
Requirement: Review call budget
The implement job MUST enforce a budget of two devops review runs for each item.
Scenario: A third review run is needed
- WHEN The job needs a third
devops reviewrun for the item - THEN The job stops the review and marks the item Blocked with the reason that the budget was exceeded
Requirement: Plan-conformance check
The implement job SHALL report each acceptance criterion of the change that no ticked task in tasks.md covers, and SHALL NOT mark the pull request ready while one is open.
Scenario: A criterion with no ticked task
- WHEN The change
tasks.mdhas no ticked task for one acceptance criterion - THEN The job reports the criterion and does not mark the pull request ready
Requirement: Ready mark waits for the checks and the review
The implement job SHALL call gh pr ready only when the CI checks pass and the review holds no unresolved high-severity finding.
Scenario: Checks pass but a finding is open
- WHEN The CI checks pass and the review holds an unresolved high-severity finding
- THEN The job does not mark the pull request ready
Existing Tool Considered
The-PR-Agent/pr-agent (https://github.com/The-PR-Agent/pr-agent), MIT, last activity 2026-11-04, maintained. The check gave the verdict partly. The tool reviews the diff and posts a pull request comment. It lacks findings from tools, advisories, version facts or a rule pack, which ADR 0005 requires. It lacks the project rule pack and severity policy table. It lacks the plan-conformance check, the repair round and the two-run budget. It does not gate gh pr ready. The project builds this wiring itself. The written cost is about 150,000 tokens to build, about 30,000 tokens per quarter to keep and fix, and about four working days.
Key questions
- Why can the implement job not run
devops reviewtoday?: The runner image installs only git, ca-certificates, curl and jq.NOT_IN_RUNNERmarks bwrap, semgrep, gitleaks, osv-scanner, kube-linter and trivy as absent in that pod. SECURITY.md rule 7 makes the review fail closed with no sandbox, so the job gets an error and never a finding. [sources: src/devops_cli/roadmap/runner_tools.py, k8s/devops/cronjob-runner.yaml, SECURITY.md] - What must be delivered before this item can be built?: The runner image must carry the review tools (feat(roadmap): the implement agent can use the project's development tools #3041). The pod must run a sandbox that bubblewrap can start in for user 1000 (feat(roadmap): run the implement agent shell in a real sandbox #2695). The build then targets
draft_readiness.extra_checksand the failure taxonomy. [sources: src/devops_cli/roadmap/runner_tools.py, k8s/devops/cronjob-runner.yaml] - Which seam does the review gate use?: The review result goes into
draft_readiness.extra_checks. The implement job anddevops pr readyalready ask it after completeness and the checks. (best practice) [sources: CONTEXT.md]- Chosen:
draft_readiness.extra_checks. CONTEXT.md gives draft readiness an extra check after completeness and the checks, and both callers ask it. - Rejected:
ready_to_mark. The plan of docs(openspec): plan #2916 One function decides draft readiness #3170 deletesready_to_markand moves the ready decision todraft_readiness. - Rejected: A new gate beside
gh pr ready. It duplicates draft readiness, anddevops pr readywould not see the review.
- Chosen:
- Which model group does the review use, and does diff text leave the cluster?: No model group. The job passes
--no-group-analysis, so no code region goes to a model and the status lane stays model-free. (best practice) [sources: CONTEXT.md, docs/adr/0005-review-findings-come-from-tools-not-models.md, SECURITY.md]- Chosen:
--no-group-analysis. The status lane calls no model, and ADR 0005 lets a model change no finding, so the model stage adds no finding. - Rejected: The
analysismodel group. It sends the code region of each finding off the cluster and bills it, and SECURITY.md rule 13 needs that stated. - Rejected: A hosted review service. It sends the diff off the cluster and reads neither the rule pack nor the severity policy table.
- Chosen:
- How does the job class a stop from the review?: The review stops get their own failure class. A retry cannot clear them. The item stays Blocked until a person comments
implement: retryor a new runner image rolls out. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/failure.py]- Chosen: A new failure class for the review stops. The class must match a cause that a retry cannot clear, and the taxonomy has one action for each class.
- Rejected: Reuse
ci_infrawith actionretry. A retry cannot clear a missing tool or a spent budget, so the item would retry without end.
- What does the plan-conformance check verify?: It reuses the existing tick check for the task ticks. It adds criterion coverage: it reports each acceptance criterion that no ticked task in
tasks.mdcovers. (best practice) [sources: CONTEXT.md, docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md]- Chosen: Reuse the tick check and add criterion coverage. The tick check exists already, and CONTEXT.md makes
tasks.mdthe checklist of the change. - Rejected: Build a second tick check.
_unticked_failurealready stops on an unticked task, so a second check duplicates it. - Rejected:
openspec validatealone. It checks structure and ticks, and it reports no criterion that the change misses.
- Chosen: Reuse the tick check and add criterion coverage. The tick check exists already, and CONTEXT.md makes
- What happens when a high-severity finding is found?: The finding goes back as one repair round. A finding that stays open after that round blocks the ready mark. (best practice) [sources: CONTEXT.md, docs/adr/0005-review-findings-come-from-tools-not-models.md]
- Chosen: One repair round, then block. CONTEXT.md gives the implement job at most one fix step, and ADR 0005 accepts a patch only when the tools and the mapped tests pass.
- Rejected: Block at once. The job gets no chance to fix a fixable finding.
- Rejected: Post the finding only. It contradicts the criterion that a high-severity finding is repaired or blocks.
- What is the review call budget for each item?: Two
devops reviewruns for each item: the first run and the re-run after the repair round. The status lane calls no model, so the budget bounds tool runs. (best practice) [sources: CONTEXT.md]- Chosen: Two runs, the repair re-run included. It matches the at-most-one-fix-step rule, and a count of runs is simple to enforce.
- Rejected: One run. The repair round could not confirm its fix, so a repaired finding would block the ready mark.
- Rejected: A time-based budget. The runner pod gives no wall-clock guarantee, so a count of runs is easier to hold.
- Which findings block the ready mark?: A high-severity finding that stays open. Severity comes from the rule metadata and the policy table. Only a tool run, a suppression or a person's verdict changes the state of a finding. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md, CONTEXT.md]
- Chosen: An open high-severity finding blocks. ADR 0005 takes severity from the rule metadata and the policy table, so the block is a check and not a model.
- Rejected: Every open finding blocks. A low-severity finding would stop a ready mark that the checks pass.
- What is the seam that feat(roadmap): Add a draft PR evaluator for issue and rules #2867 uses for its model verdict?: The review session holds the findings and their states, and feat(roadmap): Add a draft PR evaluator for issue and rules #2867 reads them. The model output stays apart from the findings and changes no finding. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md]
- Chosen: Findings stay in the review session and feat(roadmap): Add a draft PR evaluator for issue and rules #2867 reads them. ADR 0005 stores model output apart from findings, so the verdict reads the findings and adds no state.
- Rejected: This item builds the model verdict. That is the work of feat(roadmap): Add a draft PR evaluator for issue and rules #2867, and it would put a model verd
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 1, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.It gates PR readiness on review but is a planned enhancement, not a defect fix.It adds a quality gate that catches missed criteria and rule breaks before a PR is marked ready.It integrates an existing tool into the job, adds a repair round, posts findings, and enforces a call budget.Both concern marking a draft PR ready, but the candidate delivers the devops review invocation and finding posts, while #2867 delivers the model verdict that uses this review as its seam.devops-cli-service commentedon Nov 1, 2026
Status set to Ready at aad0115 (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
Staged: branch
feat/3049-the-implement-job-reviews-its-own, draft pull request #3183. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
The plan run made 10 model request(s), and used 262885 input tokens and 3841 output tokens. The tool calls, in order:
list_files({"directory":"src/devops"})search_code({"text":"gh pr ready"})list_files({"directory":""})search_code({"text":"ready_to_mark"})list_files({"directory":"src"})list_files({"directory":"src/devops_cli/roadmap"})read_file({"path":"src/devops_cli/roadmap/implement_run.py"})file_symbols({"path":"src/devops_cli/roadmap/implement_run.py"})file_symbols({"path":"src/devops_cli/roadmap/implement_pull.py"})read_file({"path":"src/devops_cli/roadmap/implement_run.py","start_line":440,"end_line":720})read_file({"path":"src/devops_cli/roadmap/implement_run.py","start_line":505,"end_line":900})read_file({"end_line":900,"path":"src/devops_cli/roadmap/implement_run.py","start_line":574})read_file({"end_line":880,"path":"src/devops_cli/roadmap/implement_run.py","start_line":642})dan-petty commentedon Nov 2, 2026
returned per agent request
3 remaining items
devops-cli-service commentedon Nov 2, 2026
Status set to Ready at 3f3103a (see proposed design in issue body).
dan-petty commentedon Nov 2, 2026
returned per agent request
devops-cli-service commentedon Nov 4, 2026
Alternatives check: partly
Tool: The-PR-Agent/pr-agent (https://github.com/The-PR-Agent/pr-agent)
Covers:
pr-agent --pr_url ... review) that a job can call.Lacks:
tasks.mdis ticked or that every acceptance criterion is delivered.gh pr ready; wiring the review and the plan check into the implement job's ready mark stays project work.Searches run:
Sources:
Checked on 2026-11-04. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 6, 2026
Plan pull request #3183 closed with no merge. The job waits for an edit of the text of this item, or for a commit that changes a file that the reason names.
The reason, from the last comment of dan-petty on the pull request:
devops-cli-service commentedon Nov 6, 2026
Refine cannot set this item to Ready at 34010d6 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
The next refine round also looks at the item again when a commit on the default branch changes one of these files:
src/devops_cli/roadmap/runner_tools.py,k8s/devops/cronjob-runner.yaml.[-]feat(roadmap): the implement job reviews its own diff with `devops review` before it marks the pull request ready[/-][+]feat(roadmap): Run `devops review` on the diff before marking PR ready[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 98 characters, and the limit is 60. The type and the scope stay.
feat(roadmap): the implement job reviews its own diff withdevops reviewbefore it marks the pull request readyfeat(roadmap): Rundevops reviewon the diff before marking PR readydevops-cli-service commentedon Nov 9, 2026
Status set to Ready at 28356ed (see proposed design in issue body).
dan-petty commentedon Nov 13, 2026
The owner approved the roadmap pipeline split on 2026-11-13 (tracker #5482). Decision D7 replaces the scope of this item:
devops reviewon each ready delivery PR head, checks plan conformance, posts a COMMENT review and never approves.I close this item as not planned, because #5521 replaces it.