Repository navigation
Description
Problem or Motivation
Refine has no result for an item that cannot be built as written. The model then returns a proposal that fits one pull request and holds no acceptance criterion. Refine reads that as a failed form check (class=form_check, failed_1=acceptance_criteria), tries 3 times and leaves the item in New with refine.next_step=failed.
Result lines of 7 days (Loki, roadmap job result:, read 2026-11-26): 43 refine attempts have the class form_check, and each one names only acceptance_criteria. That is 43 of 95 failed attempts of refine with infra=false, and the count went from 2 on 2026-11-24 to 22 on 2026-11-25. The 25 items are not random:
- The work moved to the homelab repository, and devops-cli no longer deploys it: dan-petty/homelab#371, dan-petty/homelab#341, dan-petty/homelab#376, dan-petty/homelab#377, feat(k8s): scan running third-party images with Trivy Operator #4998, dan-petty/homelab#347, dan-petty/homelab#358, dan-petty/homelab#379, feat(k8s): run the environment checks in homelab CI #5296, perf(k8s): mount the uv-seed cache in the runner Job #7072.
- Only a person can do the step: chore(security): send the private report of the NetworkPolicy bypass #6725 (send a private report), chore(service): subscribe repository hooks to pull_request and check events #6630 (subscribe repository hooks), docs(ci): report the uv malware-check lookup limit upstream #5899 (report a limit upstream).
- An agent returned the item, or another item blocks it: feat(roadmap): park jobs while the gateway is offline #5967 (returned 9 minutes before the attempt), feat(service): share the GitHub budget and holds in Valkey #4563, feat(roadmap): build the command gate facts from the manifests and a probe #5203.
- A person closed the item as not planned later: fix(roadmap): onboard counts a hook with every event as wrong #6431, fix(tests): freeze clock in stage snapshot test #7184.
So the empty list is a verdict of the model ("no criterion can be written for this item here"), and refine records it as a fault of the model. Each case costs up to 3 investigations, and the item gets no comment that tells a person why it stays in New. The record holds only "The reply of the model failed the form check: acceptance_criteria."
Proposed Solution
Disposition: change the code.
The reply of refine gets one more result for an item that cannot be built as written, with a reason and its evidence (a path, a command output or an issue number). For that result refine writes no proposal, posts one comment with the reason and the evidence, records the next step for a person, and does not try again until the body changes. The result line counts it as a result, not as a failure of class form_check.
Proof: a test with a scripted model: a reply with that result gives one comment, no retry and no form_check line. After the release, the 7-day count of form_check lines that name only acceptance_criteria goes down, and the items of the list above hold a reason.
Existing Tool Considered
None found. The change is in the output type of the refine agent and in the result handling of refine, which the project owns.
Related
- feat(roadmap): the triage unit judges the premise of a new item #5508 asks for a triage unit that judges the premise of a new item. This item covers the same decision inside refine, for an item that is already in the queue.
Alternatives check of 2026-11-26: none.
Tool: none found.
Reason: Searches found only general agent frameworks, chiefly pydantic-ai, the project's own framework, which supplies typed outputs but no result handling, comment or retry policy; the need lives in project-owned refine code.
Lacks:
- No result type for an item that cannot be built
- No comment with reason and evidence for a person
- No next-step record and no stop of the retries
- No separate result line instead of a form_check failure
Proposed design
Problem statement
Refine cannot report an item that cannot be built as written. It records an empty acceptance_criteria list as a form_check failure. It retries three times and leaves the item in New with no comment for a person. The fix honors an open person question first, then accepts a cannot-build result with a reason and evidence.
Acceptance criteria
Requirement: Person question precedes missing criterion
Refine SHALL record an open (a person decides) question as a person wait even when the proposal has an empty acceptance_criteria list.
Scenario: Open person question with no criterion
- WHEN A scripted model returns a proposal that fits one pull request. The proposal has an empty
acceptance_criterialist and a key question marked(a person decides). - THEN The refine round posts the question comment. It records no
form_checkfailure and no retry.
Requirement: Cannot-build result
Refine SHALL accept a reply that states the item cannot be built as written, with a reason and evidence, and SHALL write no proposal for that reply.
Scenario: Cannot-build reply
- WHEN A scripted model returns the cannot-build result with a reason and evidence instead of a proposal.
- THEN Refine posts one comment with the reason and evidence and records a person next step. It writes no proposal to the issue.
Requirement: No retry until the body changes
Refine SHALL not retry a cannot-build result until the issue body changes.
Scenario: Same body after cannot-build
- WHEN The refine job runs again on the same issue body after a cannot-build result.
- THEN It makes no model call and posts no second comment.
Requirement: Cannot-build result line
The result line of a cannot-build round MUST name the cannot-build result and MUST NOT name the class form_check.
Scenario: Result line of cannot-build round
- WHEN A refine round ends with the cannot-build result.
- THEN The result line holds no
class=form_checkand nofailed_1=acceptance_criteria.
Requirement: Failed form-check record
A failed acceptance_criteria form check SHALL record the stop reason and the criterion count in its result line.
Scenario: Failed form-check with no saved reply
- WHEN A refine round fails the form check on
acceptance_criteriaand the Service holds no model reply. - THEN The result line names the stop reason and the count of acceptance criteria.
Requirement: Pending a person after the merge
After the release, a person SHALL confirm the 7-day form_check count goes down and each listed item holds a reason.
Scenario: Post-release live proof
- WHEN A person reads the Loki
roadmap job result:lines for 7 days after the release. - THEN The count of
form_checklines that name onlyacceptance_criteriais lower. Each listed item holds a comment with a reason.
Existing Tool Considered
The alternatives check of 2026-11-26 in the issue body found no open, maintained tool for this need. It records that pydantic-ai supplies typed outputs only. The proposal adds the missing result handling, comment and retry policy in project-owned refine code.
Key questions
- Which path should refine use when a proposal has no acceptance criterion?: Honor an open `` question first. If no such question exists, accept a cannot-build result with a reason and evidence. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py, docs/ROADMAP_WORKFLOW.md:132, docs/roadmap/refine.md:128]
- Rejected: Cannot-build result only. It leaves the existing person-question path unreachable for a proposal with no criterion.
- Rejected: Person question only. It gives no result for an item that has no question and cannot be built.
- Chosen: Person question first, then cannot-build result. It fixes the ordering defect and covers an item with no question.
- How should refine represent the cannot-build result?: As a typed reply variant with a reason and evidence, separate from the proposal. (best practice) [sources: docs/roadmap/refine.md:128, docs/ROADMAP_WORKFLOW.md:238, src/devops_cli/roadmap/refine/refine.py]
- Chosen: Typed reply variant. The reply schema can carry a reason and evidence and needs no proposal.
- Rejected: Free-text sentinel in the proposal. It still fails the form check on the empty criterion list.
- Rejected: Label-only stop. It gives no reason or evidence to a person.
- Where does refine classify the failure?:
_job_failureinsrc/devops_cli/roadmap/refine/refine.pyclassifies the failure. The result line uses the class fromsrc/devops_cli/roadmap/failure.py. [sources: src/devops_cli/roadmap/refine/refine.py, src/devops_cli/roadmap/failure.py, docs/ROADMAP_WORKFLOW.md:238] - Does the failure record keep the model reply?: No. The record keeps the failed check names and the last error, not the reply. The builder reads the run records or traces for the failed replies. [sources: docs/ROADMAP_WORKFLOW.md:132, src/devops_cli/roadmap/refine/refine.py]
- What must the builder read before the code change?: Read the failed replies of at least 5 of the 25 items from the run records or traces. Count the replies that hold a person question. If the records hold no reply, first add the stop reason and criterion count to the result line. (best practice) [sources: docs/ROADMAP_WORKFLOW.md:132, docs/roadmap/refine.md:144, src/devops_cli/roadmap/refine/refine.py]
- Chosen: Read the failed replies first. The Service keeps no reply, so the count shows which path handles most cases.
- Rejected: Change the code without the count. The cause is a hypothesis and the count is missing.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 26, 2026
Both handle the acceptance_criteria form check in refine, but dan-petty/devops-cli#6327 names the failed check to help the model retry, while this item adds a new result type that stops retrying and posts a reason to a person.dan-petty commentedon Nov 26, 2026
Code facts for the design of this item, from
src/devops_cli/roadmap/refine/refine.pyatmainof 2026-11-26:refine_one_itemcalls_job_failurebeforenext_step_of._job_failurecounts an emptyacceptance_criterialist of a proposal that fits one pull request as a failed form check, also when the proposal holds a question that ends with(a person decides).next_step_ofdocuments another order: the open questions go to a person first, and a failed form check is last. The early return of_job_failuremakes that order unreachable for a proposal with no criterion.form_checkand tried again, 3 times, and the question never reaches the person.First step for the builder: read the failed replies of 5 or more of the 25 items from the run records or the traces, and count how many hold a question for a person. That count decides the form of the change:
_job_failure. This uses the person path that exists and adds no result type.Do not change the first request of refine for this: the job holds 94%, and a change that only acts on a reply with no criterion cannot lower that ratio.
dan-petty commentedon Nov 26, 2026
Correction to the body of this item: it states the cause as a fact ("the empty list is a verdict of the model"). That is a hypothesis.
What the data proves:
form_check, each withfailed_1=acceptance_criteriaonly, on 25 items.What it does not prove:
So the first task stays as the comment above says: read the failed replies from the run records or the traces, and count the causes, before any change to
_job_failureor to the reply type. If the records hold no reply, the first change is to keep the stop reason of the investigation and the count of criteria in the result line of a failed round.devops-cli-service commentedon Nov 26, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (7)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Released in v0.253.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.253.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 20:59 UTC