Repository navigation
Description
What happened
The owner decision of 2026-10-31 says a draft pull request is marked ready for review when work on the change is complete and all checks pass. The issue "the Service marks a stage pull request ready when its checks pass" builds that first, check-only behavior.
Passing checks do not say that the draft does what its source issue asks. PR #2801 of the implement job passed every check and deleted seven existing tests. A green plan can also miss an acceptance criterion of its issue, or break a project rule that no check reads (the closing keyword rule, the ASD-STE100 style, one issue for one pull request, no private data).
What should happen
A draft pull request evaluator replaces the check-only rule for the pull requests that the Service makes (stage and implement jobs). It marks a draft ready when the draft is aligned with all three of:
- The source issue. The acceptance criteria of the issue are met, or for a plan, each one has a task that verifies it. The pull request closes no other issue, and a plan uses
Plans #N. - Best practices. The findings of the existing review tools (
devops review pr, the static checks ofdevops ci, the review guards in.devops/review.md) are clean at the level that the project sets. The tools originate findings and the model only correlates them (owner direction of 2026-10-03). No finding of the model alone blocks a pull request. - Project guidance. The rules of AGENTS.md that a diff can break: tests kept, tests first, change folder and archive, no private data, no edited
config.yaml, no edit of release files, prose in ASD-STE100.
Rules for the evaluator:
- It runs only after all checks have passed. Failed or running checks keep the draft a draft.
- It evaluates once for each head commit and keeps the verdict in the record of the item, so a push is evaluated again and a restart repeats nothing.
- A pass marks the pull request ready. A fail leaves it a draft and posts one comment that names each unmet point with the file or line.
- It never merges, never approves and never records a review verdict. Only a person does (AGENTS.md).
- It runs on the model lane, one model call at a time, and counts its requests against the budget. The choice of the model route and the cost per pull request go in the proposal.
- A person can mark any draft ready by hand, and the evaluator never turns a ready pull request back to draft.
Evidence
- fix(config): config files and their copies keep the mode of the file,... #2801: green checks, seven tests deleted (fixed by fix(roadmap): an implement step may not remove a test that existed before it #2804 for the step, but the pull request still passed every check).
- docs(openspec): plan #2147 move three volumes off control-plane #2857, docs(openspec): plan #2735 refuse LESS in subprocess env guard #2858, docs(openspec): plan #2739 refuse GH_TELEMETRY_ENDPOINT_URL #2859: complete plans that waited as drafts.
- The owner decision of 2026-10-31 on draft pull requests.
Acceptance criteria
- A replay of PR fix(config): config files and their copies keep the mode of the file,... #2801 at its head commit gives a fail that names the deleted tests.
- A replay of docs(openspec): plan #2147 move three volumes off control-plane #2857, docs(openspec): plan #2735 refuse LESS in subprocess env guard #2858 and docs(openspec): plan #2739 refuse GH_TELEMETRY_ENDPOINT_URL #2859 gives a pass.
- A pull request with a failed or running check is not evaluated.
- The same head commit is evaluated once; a new commit is evaluated again.
- A fail posts one comment and leaves the draft; a pass marks it ready.
- The check-only behavior of the earlier issue is removed by this change, not kept beside it.
- The evaluator makes no merge, approval or review verdict, and a test shows it.
-
uv run devops cipasses.
Alternatives check of 2026-11-04: partly.
Tool: danger/danger (https://github.com/danger/danger), MIT, last activity 2026-10-09, maintained.
Proposed design
Problem statement
The check-only rule marks a stage or implement draft pull request ready when every check passes. A green pull request can still delete tests or miss an acceptance criterion of its issue: PR #2801 deleted seven tests and passed every check, and the project's completeness set labels plan #2857 as incomplete although it waited as a draft. This change adds a draft evaluator on the model lane. The evaluator marks a draft ready only when the draft meets its issue criteria, the tool findings are clean, and the AGENTS.md rules hold. It replaces the check-only ready rule for the stage and implement jobs and keeps the checks as the gate.
Acceptance criteria
Requirement: Replay of PR 2801 fails
The evaluator SHALL use the existing tests_kept check to find a deleted or weakened test, and the fail comment SHALL name each deleted test.
Scenario: Replay the PR 2801 fixture
- WHEN The evaluator runs on the stored fixture of the head commit of PR fix(config): config files and their copies keep the mode of the file,... #2801
- THEN The verdict is fail and the comment names each deleted test
Requirement: Good plans pass
The evaluator SHALL return a pass verdict for the stored head-commit fixtures of plan pull requests #2858 and #2859.
Scenario: Replay the good plan fixtures
- WHEN The evaluator runs on the stored fixture of docs(openspec): plan #2735 refuse LESS in subprocess env guard #2858 or docs(openspec): plan #2739 refuse GH_TELEMETRY_ENDPOINT_URL #2859
- THEN The verdict is pass for each fixture
Requirement: Incomplete plan fails
The evaluator SHALL return a fail verdict for the stored fixture of plan pull request #2857 and SHALL name the acceptance criterion that the plan does not deliver.
Scenario: Replay the incomplete plan fixture
- WHEN The evaluator runs on the stored fixture of docs(openspec): plan #2147 move three volumes off control-plane #2857
- THEN The verdict is fail and the comment names the acceptance criterion that the plan does not deliver
Requirement: Gate on checks
The evaluator MUST NOT run when a required check is failed or still running.
Scenario: A required check has not passed
- WHEN A required check is failed or still running
- THEN The evaluator makes no model call and the pull request stays a draft
Requirement: One evaluation for each head commit
The evaluator SHALL evaluate a head commit at most once and SHALL evaluate a new head commit.
Scenario: A second trigger for the same head commit
- WHEN The evaluator is triggered for a head commit that has a stored verdict
- THEN It returns the stored verdict and makes no new model call
Requirement: Fail action
On a fail, the evaluator SHALL post one comment that names each unmet point with its file or line, and SHALL leave the pull request a draft.
Scenario: A fail verdict
- WHEN The evaluator returns a fail verdict
- THEN One comment names each unmet point with its file or line and the pull request stays a draft
Requirement: Pass action
On a pass, the evaluator SHALL mark the pull request ready for review.
Scenario: A pass verdict
- WHEN The evaluator returns a pass verdict
- THEN The pull request is marked ready
Requirement: Ready needs the verdict
Draft readiness for a stage or implement pull request SHALL require a pass verdict and SHALL NOT mark the draft ready on passing checks alone.
Scenario: All checks pass and no verdict exists
- WHEN Every required check passes and the head commit has no pass verdict
- THEN The pull request stays a draft
Requirement: Plan form and closing keyword
The evaluator SHALL fail a pull request whose body closes an issue other than its source issue, and SHALL fail a plan whose body does not use Plans #N.
Scenario: A plan body with a closing keyword
- WHEN A plan pull request body holds
Closes #Nor names another issue after a closing keyword - THEN The verdict is fail and the comment names the body line
Requirement: Review findings are unmet points
The evaluator SHALL treat a finding of devops review pr at the level that the project sets as an unmet point of the verdict.
Scenario: A review finding at the project's level
- WHEN
devops review prreports a finding at the level that the project sets - THEN The verdict is fail and the comment names the finding with its file or line
Requirement: Danger rules cover the other project rules
The AGENTS.md rules that no existing project check decides SHALL run as Danger rules, and a Danger finding SHALL be an unmet point of the verdict.
Scenario: A diff edits config.yaml
- WHEN The pull request diff edits
config.yaml - THEN Danger reports the edit and the evaluator returns a fail that names the file
Requirement: Private data before the model call
The evaluator SHALL run the private-data rule before the model call and SHALL NOT send a diff with a private-data finding to the model.
Scenario: A diff holds a private address
- WHEN The private-data rule finds a private address in the diff
- THEN The evaluator returns a fail, names the private data with its file or line, and makes no model call
Requirement: No merge, approval or review verdict
The evaluator MUST NOT merge, approve or record a review verdict.
Scenario: A pass records no merge or approval
- WHEN The evaluator returns a pass verdict
- THEN No merge, approval or review verdict is recorded
Requirement: Person override
The evaluator MUST NOT turn a ready pull request back to a draft.
Scenario: A person marks a failed draft ready
- WHEN A person marks a draft ready after a fail verdict
- THEN The pull request stays ready
Requirement: Model lane budget
The evaluator SHALL make one model call at a time on the model lane and SHALL record each call in the spend ledger against the model-spend limit of its row.
Scenario: One evaluation counts one call
- WHEN The evaluator evaluates a head commit
- THEN It makes one model call and records its tokens in the spend ledger
Requirement: CI passes
The command uv run devops ci SHALL pass after this change.
Scenario: CI gate
- WHEN The command
uv run devops ciruns on the merged code - THEN All checks pass
Existing Tool Considered
danger/danger (https://github.com/danger/danger) is MIT and maintained, with last activity on 2026-10-09. It runs on the pull request diff and expresses deterministic rules in a Dangerfile. It covers the AGENTS.md rules that no existing project check decides: private data, an edited config.yaml, an edited release file and tests-first ordering. It posts one comment that names each unmet point with file and line, originates findings from rules, and never merges or approves. It lacks the correlation with the issue's acceptance criteria, the closing keyword and the Plans #N form; it has no model call, so the semantic alignment and the ASD-STE100 prose check are not covered; and it has no ready mark, per-head-commit verdict or budget accounting. The project builds those parts, and it reuses its tested tests_kept, plan-check and check-readiness rules for the deleted-test, plan-form and archive rules. Written cost: about 15,000 tokens to build the evaluator core, prompt, model-lane row and Dangerfile; about 3,000 tokens a quarter to keep the prompt and rule list current; about 5,000 tokens to fix edge cases over six months; 4 to 6 working days.
Key questions
- Which model route does the evaluator use?:
deepseek-v4.1-flash-1017, the hosted group that the Service config names for every chat slot, through the analysis task (get_llm_client(task="analysis")), the route that refine and the alternatives check use. The evaluator makes one call for each head commit. (best practice) [sources: SECURITY.md:40, src/devops_cli/roadmap/refine/refine.py:2896, k8s/llm/gateway/config.yaml:188]- Chosen: The analysis task on the model lane (deepseek-v4.1-flash-1017). The Service config names deepseek for the analysis task; refine and the alternatives check already call it, and the evaluator is a model-lane job of the same kind.
- Rejected: The local devops-background group. The Service config names deepseek for every chat slot; devops-background serves one request at a time and is the review fallback, not the model lane's route.
- Rejected: A new ai.tasks.evaluator slot. The analysis slot already names the route and a person can change it with ai.tasks.analysis.model; a new slot adds a setting and a config change that the issue does not need.
- What is the cost for each pull request?: One model call for each head commit. The route charges 7.84e-08 USD for each input token and 2.352e-07 USD for each output token (0.0784 and 0.2352 USD per million). A call of 20,000 input tokens and 1,000 output tokens costs about 0.0018 USD; the spend ledger prices the actual call from its own usage. A pull request with several pushes costs one call for each head commit. [sources: k8s/llm/gateway/config.yaml:198, k8s/llm/gateway/config.yaml:199, docs/CLI_REFERENCE.md:5783, SECURITY.md:40]
- Where does the evaluator store the verdict?: In the hidden job-record block
<!-- devops-roadmap-record {...} -->at the end of the item's issue body, under a key such asstage.evalorimplement.evalthat holds the head commit and the verdict. The record key follows thestage.jevprecedent, which holds<sha>:heldand is not asked again for that head. [sources: docs/adr/0016-labels-hold-the-roadmap-items-fields.md:12, docs/ROADMAP_WORKFLOW.md:137] - Where does the evaluator plug into the ready decision?: As an entry of
draft_readiness.extra_checks, after completeness and the passing checks. The stage row, the implement job anddevops pr readyalready ask the function. (best practice) [sources: src/devops_cli/roadmap/implement/implement_pull.py:195, CONTEXT.md:133]- Chosen: The extra check of draft_readiness. The function already runs completeness, the checks gate and each extra check in that order; its three callers get the verdict with no second path.
- Rejected: A second ready path beside draft_readiness. The issue says the check-only rule is removed, not kept beside the evaluator; two paths give two answers.
- Which sources does the best-practices dimension read?: The findings of
devops review prand the static checks ofdevops ci. It reads no.devops/review.md, because refactor(review): the review guards of .devops/review.md get a reader, or the guards and the unread constant are deleted #1916 retired that file and the review-conventions spec says a pull request checkout takes none. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md:7, openspec/specs/review-conventions/spec.md:15]- Chosen: The
devops review prfindings and thedevops cichecks. ADR 0005 gives a finding only to a tool or a checked fact, and these are the project's tool sources. - Rejected: The review guards in
.devops/review.md. refactor(review): the review guards of .devops/review.md get a reader, or the guards and the unread constant are deleted #1916 retired the file, and the review-conventions spec says a pull request checkout takes none.
- Chosen: The
- Which deterministic project rules run in Danger?: Danger runs the AGENTS.md rules that no existing project check decides: private data, an edited
config.yaml, an edited release file and tests-first ordering. The evaluator reusestests_keptfor a deleted or weakened test,plan-checkfor the plan form, andcheck-readinessfor the change folder and archive. A Danger finding is an unmet point of the verdict. (best practice) [sources: AGENTS.md:11, openspec/specs/roadmap-eval-implement/spec.md:39]- Chosen: Danger for the rules that no existing check decides. AGENTS.md rule 3 puts an open tool before code the project builds. Danger covers these rules, and the project keeps its tested
tests_kept,plan-checkandcheck-readinessfor the rules they already decide. - Rejected: All the diff rules in devops-cli. The project would build and keep a rule engine that Danger gives, and duplicate the existing checks.
- Rejected: All the diff rules in Danger. Danger would duplicate the tested
tests_kept,plan-checkandcheck-readinesschecks.
- Chosen: Danger for the rules that no existing check decides. AGENTS.md rule 3 puts an open tool before code the project builds. Danger covers these rules, and the project keeps its tested
- What does the model do, and what may it block?: The model correlates the tool findings, the issue criteria and the diff into one verdict and writes the comment. It records no finding and blocks no merge. A fail withholds the ready mark, and a person can mark the draft ready by hand. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md:27, AGENTS.md:24]
- Chosen: The model correlates and withholds ready; a person overrides. ADR 0005 stores the model's output apart from findings and gives the merge and the review verdict to a person.
- Rejected: The model originates findings that block the merge. ADR 0005 gives findings to tools and checked facts, and AGENTS.md gives the merge to a person.
- In which order do the deterministic rules and the model call run?: The deterministic rules run first, and the private-data rule runs before the model call. A diff with a private-data finding makes no model call, because the model route is hosted and SECURITY.md says a secret or personal data never goes to a provider. (best practice) [sources: SECURITY.md:40, AGENTS.md:18]
- Chosen: Deterministic rules first, then the model call. The private-data rule must see the diff before the hosted model does; a finding stops the call and the evaluator fails with the finding.
- Rejected: The model call first, then the rules. It would send a secret or personal data to the hosted provider, against SECURITY.md rule 13.
- Can a person override a fail?: Yes. A person can mark any draft ready by hand, and
devops pr ready --forceskips the readiness check. The evaluator never turns a ready pull request back to a draft. [sources: AGENTS.md:24, docs/MCP_TOOLS.md:102] - Which issue builds the check-only ready rule that this change removes?: The checks rule of
draft_readiness, which feat(roadmap): one function decides when any draft pull request is ready #2916 added on 2026-11-03 and which is merged. Before it, the stage row'sready_to_markreturned the check result, from feat(roadmap): the Service marks a stage pull request ready when its checks pass #2865. Both are closed or archived, so this change needs no open dependency. The check-only behavior to remove is the rule that passing checks alone mark a stage or implement draft ready; the checks gate stays for a failed or running check. [sources: openspec/changes/archive/2026-11-03-2916-one-function-decides-when-any-draft/proposal.md:46, src/devops_cli/roadmap/implement/implement_pull.py:180, openspec/changes/archive/2026-10-31-2865-service-marks-stage-pr-ready/proposal.md:13] - Is docs(openspec): plan #2147 move three volumes off control-plane #2857 a complete plan that the evaluator must pass?: No. The project's completeness set labels
plan-2147-dropped(pull docs(openspec): plan #2147 move three volumes off control-plane #2857) as incomplete: the plan leaves acceptance criterion 1 of issue fix(k8s): the volumes of grafana, the prometheus server and loki move off the control-plane node, and their placement exemptions go #2147 as an operational step with no task and no check. The good stage cases are docs(openspec): plan #2735 refuse LESS in subprocess env guard #2858 and docs(openspec): plan #2739 refuse GH_TELEMETRY_ENDPOINT_URL #2859. The evaluator must fail docs(openspec): plan #2147 move three volumes off control-plane #2857 and name the missing criterion, and pass docs(openspec): plan #2735 refuse LESS in subprocess env guard #2858 and docs(openspec): plan #2739 refuse GH_TELEMETRY_ENDPOINT_URL #2859. [sources: tests/fixtures/roadmap_eval/completeness/plan-2147-dropped/case.json:4, tests/fixtures/roadmap_eval/stage/good-2735-the-subprocess-environment-guard-accepts-less/case.json:8, tests/fixtures/roadmap_eval/stage/good-2739-the-subprocess-environment-guard-accepts-gh/case.json:8] - Where is the fix(config): config files and their copies keep the mode of the file,... #2801 head-commit fixture?: The stage fixture of issue fix(config): config files and their copies keep the mode of the file, never 0644 #2745 records PR fix(config): config files and their copies keep the mode of the file,... #2801 and its head commit
f421cf93a5c9727262c312ced7134206a6e2e98b, but the repository stores no diff for it. The change adds a stored fixture of that head commit, the issue text and the deleted tests, so the replay runs offline. The stage and completeness fixtures show the shape: acase.json, the issue text and adraft.diff. [sources: tests/fixtures/roadmap_eval/stage/2745-config-files-and-their-copies-keep/issue.txt:100, tests/fixtures/roadmap_eval/completeness/plan-2147-dropped/case.json:8] - Does the evaluator call the Jev completeness check of feat(roadmap): a Jev completeness check for draft pull requests #4308?: No. The evaluator does not call the Jev check, and the setting
roadmap.stage.jev_completenessstays false. The check is a partial version of the source-issue dimension: its measured recall of incomplete drafts was 43% and its false holds were 28%, above the 10% limit. This change leaves it off and outside the ready decision. (best practice) [sources: openspec/changes/archive/2026-11-10-4308-a-jev-completeness-check-for-draft/proposal.md:41, docs/ENV_VARS.md:136]- Chosen: Leave the Jev check off and outside the ready decision. It is a partial check of the same dimension with measured false holds above the bar, and the issue removes the check-only rule, not the Jev check.
- Rejected: Enable it beside the evaluator. Two evaluators of one dimension give two answers, and its measured false holds miss the project's bar.
- Rejected: Remove it in this change. The issue removes the check-only rule, not the Jev check; a removal adds scope that the issue does not ask for.
- How does the evaluator count its model requests against the budget?: The evaluator makes one model call for each head commit, and the call's tokens go to the spend ledger under the model-spend limit of its row. The model lane runs one round at a time, so the evaluator makes one call at a time. (best practice) [sources: ARCHITECTURE.md:222, openspec/specs/roadmap-implement-job/record/spec.md:76, CONTEXT.md:182]
- Chosen: One call for each head commit, counted in the spend ledger. The issue asks one model call at a time and a count against the budget; the spend ledger prices each call and the row's limit bounds the run.
- Rejected: A call for each trigger. It would spend a call on a repeated trigger for the same head commit, against the idempotency rule.
- Rejected: No budget accounting. ARCHITECTURE.md gives each automated task a model-spend limit.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Oct 31, 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 prevents a known failure mode (PR #2801 deleted seven tests yet passed all checks) but is a quality gate, not a security or blocking defect.It closes a gap where green checks alone let a harmful change be marked ready, protecting the project from regression.It must integrate three evaluation dimensions, handle per-commit idempotency, post structured failure comments, and remove the prior check-only rule.Both mark a draft pull request ready, but #2865 adds a check-only rule while the candidate replaces it with an evaluator that also verifies issue acceptance criteria, tool findings, and AGENTS.md rules.devops-cli-service commentedon Oct 31, 2026
Refine cannot set this item to Ready at 03d3dc5 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
feat(roadmap): the Service marks green stage drafts ready (#2882)
docs(openspec): plan #2916 One function decides draft readiness (#3170)
feat(roadmap): one function decides when any draft pull request is re…
devops-cli-service commentedon Nov 4, 2026
Alternatives check: partly
Tool: danger/danger (https://github.com/danger/danger)
Covers:
Lacks:
Plans #Nform.devops/review.mdguards ordevops review pr/devops cifinding correlation - every rule must be hand-writtenSearches 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.
[-]feat(roadmap): a draft pull request evaluator marks a draft ready when it matches its issue and the project rules[/-][+]feat(roadmap): Add a draft PR evaluator for issue and rules[/+]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): a draft pull request evaluator marks a draft ready when it matches its issue and the project rulesfeat(roadmap): Add a draft PR evaluator for issue and rulesfeat(roadmap): a Jev completeness check for draft pull requests (#4320)
devops-cli-service commentedon Nov 12, 2026
Status set to Ready at 2bd87bc (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 draft evaluator of this item:
I close this item as not planned, because #5521 and #5505 replace it.