Repository navigation
Description
Problem
In the 6 hours to 2026-11-18 20:30 UTC, refine graded 37 of 52 runs as a success (71%, below the 80% target). 15 runs failed with class none. Three items reached failed after 3 tries each: #6106, #6090 and #6043 (#5954 did the same earlier on 0.176.1).
The record of each item holds only this:
refine.failed_check: acceptance_criteria
refine.failure: The reply of the model failed the form check.
- The record does not say which criterion or which part (
name,requirement,scenario,when,then) was empty, or whether the list was empty. A person cannot see what to fix. - The next round does not give the failure to the model.
_judge_findingsinsrc/devops_cli/roadmap/refine/refine.pygives only the findings of a review that refused the proposal. So each try sends the same request and fails the same way, and the item stops atfailed. - The job result has
class=none, so the grade shows no cause. CONST_ROADMAP_REFINE_FAILURE_MAX_CHARSandCONST_ROADMAP_REFINE_JUDGE_FINDINGS_MAX_CHARScut the failure and the findings that the next round reads. The owner rule of 2026-11-17 forbids hard character caps that drop failure reasons of earlier tries.
Expected behavior
- A form-check failure names each failed check and the criterion and part that failed, in the record and in the job result log line.
- The next round gives the model the full failure of the earlier try, as it does for review findings, with no character cap.
- A form-check failure has a failure class that is not
none. - A test shows a reply with an empty
thenin one criterion: the record names that criterion and part, and the next request holds that text.
Related
- fix(roadmap): Write each job fact in one place on an issue or pull request #6193 (no duplicate content), fix(roadmap): Refine posts a short comment only when its result changes #6196 (refine).
Alternatives check of 2026-11-18: in-use.
The repository already uses this tool.
Tool: pydantic/pydantic-ai (https://github.com/pydantic/pydantic-ai), MIT, last activity 2026-11-18, maintained.
Reason: Searches found no tool for the refine form check itself; pydantic-ai validates structured output, names the failing field, and re-prompts the model with the error text, so it covers the naming and the feedback-to-the-next-round parts, but the record, failure class and log line stay project code.
Covers:
- Validation errors name the failing field path and reason
- Output validators raise ModelRetry to send the error to the next model round
- Typed output models require each criterion part to be present
Lacks:
- No failure class for the job result, so class stays none
- Writes nothing to the item record or the job result log line
- No acceptance-criteria schema naming name/requirement/scenario/when/then
Proposed design
Problem statement
A form-check failure records only the check name and a generic message. The record, the job result and the next round lose the criterion and the part. The model retries the same request and the item stops at failed. The change names the failed criterion and part, keeps the whole failure for the next round, and gives the failure its own class.
Acceptance criteria
Requirement: Form-check failure detail
A form-check failure SHALL name each failed check and, for each failed acceptance criterion, the index of the criterion and the part that failed.
Scenario: Empty then in the first criterion
- WHEN A test runs the form check on a proposal whose first acceptance criterion has an empty
then. - THEN The failure text names
acceptance_criteria[0].then.
Requirement: Failure record detail
The job record MUST hold the detail of each failed form check in refine.failed_check and refine.failure.
Scenario: Apply writes a form-check failure
- WHEN A test applies a refined item with a form-check
JobFailure. - THEN The record's
refine.failureholdsacceptance_criteria[0].then.
Requirement: Job result log detail
The job result log line SHALL hold the text of the form-check failure and a class that is not none.
Scenario: Log line of a form-check failure
- WHEN A test calls
log_job_resultfor a refine round with a form-checkJobFailure. - THEN The JSON line holds
classform_checkand a reason withacceptance_criteria[0].then.
Requirement: Form-check failure class
A form-check failure MUST record a failure class that is not none.
Scenario: Class of a form-check failure
- WHEN A test applies a refined item with a form-check
JobFailure. - THEN The record's
refine.failure_classisform_check.
Requirement: Next-round failure feedback
The next refine request SHALL carry the whole text of the earlier form-check failure, with no character cap.
Scenario: Long failure text
- WHEN A test calls
_judge_findingswith a job record whose form-checkerroris longer than 2000 characters. - THEN The findings that the next request carries hold the whole
errortext.
Requirement: No failure character caps
The refine code MUST NOT cut failure text or review findings with a fixed character cap.
Scenario: No cap reference remains
- WHEN A test searches
src/devops_cli/roadmap/refine/refine.pyandsrc/devops_cli/config/constants.py. - THEN It finds no
CONST_ROADMAP_REFINE_FAILURE_MAX_CHARSorCONST_ROADMAP_REFINE_JUDGE_FINDINGS_MAX_CHARS.
Existing Tool Considered
pydantic/pydantic-ai (https://github.com/pydantic/pydantic-ai), MIT, last activity 2026-11-18, maintained; verdict in-use (alternatives check in the issue body). The repository already uses the tool. The proposal uses its ValidationError field path and its ModelRetry text for a rejected structured reply. The refine round writes that text to the record, the failure class and the job result line in project code, and carries the whole text to the next request. The check in the issue body lists what the tool covers and lacks.
Key questions
- Which mechanism names the criterion and the part that a form check failed?: Use the
ValidationErrorlocation from pydantic-ai for a schema rejection, and the projectform_checksdetail for an empty field that the schema allows. Both produce a path such asacceptance_criteria[0].then. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py]- Chosen: pydantic-ai ValidationError and project form check. The repository already uses pydantic-ai. It names the field path, and the project form check covers an empty field.
- Rejected: Custom string scan of the proposal. It repeats the schema and misses nested fields.
- Rejected: A second JSON Schema validator. It adds a schema that the model does not read and gives no field path to the next round.
- How does the next round receive the earlier form-check failure?: Extend
_judge_findingsto add theJobFailure.errortext to the findings. Remove the two character caps so the text stays whole. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:2870, src/devops_cli/config/constants.py:3440, src/devops_cli/config/constants.py:3444]- Chosen: Extend
_judge_findings. This function already builds the findings that the next request carries, so one path feeds the model. - Rejected: A new request key. It changes the prompt and the schema for one string.
- Rejected: A comment on the item. The record is the source, and a comment adds noise and waits on a read.
- Chosen: Extend
- Which failure class does a form-check failure record?: Add
FailureClass.FORM_CHECKwith valueform_checkand use it for aJobFailurewhose checks are form checks. The job result class is then notnone. (best practice) [sources: src/devops_cli/roadmap/failure.py, src/devops_cli/roadmap/refine/refine.py]- Chosen: Add
FailureClass.FORM_CHECK. The class names the cause and the job result shows it. - Rejected: Use
FailureClass.NONE. The issue shows thatnonehides the cause. - Rejected: Reuse an existing model class. A form check is no model or network failure, so an existing class names the wrong cause.
- Chosen: Add
- What happens to
CONST_ROADMAP_REFINE_FAILURE_MAX_CHARSandCONST_ROADMAP_REFINE_JUDGE_FINDINGS_MAX_CHARS?: Remove both constants and their cuts. The owner rule of 2026-11-17 prohibits hard character caps that drop failure reasons of earlier tries. (best practice) [sources: src/devops_cli/config/constants.py:3440, src/devops_cli/config/constants.py:3444]- Chosen: Remove both caps. The owner rule prohibits a cap that drops a failure reason, and the next round needs the whole text.
- Rejected: Raise the caps. A larger cap still drops a long failure and still breaks the owner rule.
- Rejected: Cap only the log line. The log line is the evidence that a person reads, so a cap hides the same detail.
- Where does the job result log line get the failure text?: The refine round passes
JobFailure.errorandFailureClass.FORM_CHECKtolog_job_result. The line holds both. (best practice) [sources: src/devops_cli/roadmap/job_result.py, src/devops_cli/roadmap/refine/refine.py]- Chosen: Pass the failure to
log_job_result. The job result line is the one place that the grade reads, and it already writes the class. - Rejected: Write the detail in a comment. The grade reads the job result line, not the comments.
- Rejected: Log the detail with
logger. The grade does not read the application log.
- Chosen: Pass the failure to
- Which test proves that an empty
thenreaches the record and the next request?: A unit test intests/roadmap/refine/test_roadmap_refine_job_failure.pybuilds a proposal with an emptythenin the first criterion. It asserts the record text namesacceptance_criteria[0].thenand the next request holds that text. [sources: tests/roadmap/refine/test_roadmap_refine_job_failure.py, src/devops_cli/roadmap/refine/refine.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 18, 2026
Refine fails 29% of runs and the model cannot self-correct because it receives no failure detail, causing repeated failures.Both address insufficient refine failure information, but #2562 fixes warning text for model-call errors while the candidate names form-check failures and feeds them to the next retry round.devops-cli-service commentedon Nov 18, 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 (10)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 18, 2026
Status set to Ready at f771237 (see proposed design in issue body).
26 remaining items
docs(openspec): plan #6327 Name the failed refine form check to the m…
fix(roadmap): Name the failed criterion and part in the form-check fa…
fix(roadmap): Remove the two refine character caps (#6327)
fix(roadmap): Give the whole earlier failure to the next request (#6327)
fix(roadmap): Write the form-check class and its parts on the result …
fix(roadmap): Describe the failure detail and the class in the docume…
docs(openspec): archive the change (#6327)
fix(roadmap): Make check strength pass (#6327)
docs(roadmap): List form_check in the class table and the default act…
dan-petty commentedon Nov 20, 2026
A deviation from the refined design waits for the owner. The refined requirement "Form-check failure class" says that the record's
refine.failure_classisform_check. Pull request #6507 writes the classform_checkon the result line only, and not in the job record.The reason: the record already holds
refine.failed_class, the class of a failed model call, andretry_afterreads it to set the wait of the next round. A form check there would set a wait that no model call caused, and a second keyrefine.failure_classwould hold two classes of one round under two near-equal names. The grade reads the class from the result line, and the record keeps the failed parts inrefine.failed_checkandrefine.failure.To accept: no action. To refuse: name the record key that must hold the class, and the pull request gets a follow-up.
fix(roadmap): drop the two refine caps that the main merge kept (#6327)
devops-cli-service commentedon Nov 20, 2026
Released in v0.183.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.183.1
devops-cli-service commentedon Nov 20, 2026
Live since 2026-11-20 17:44 UTC