Repository navigation
Description
Problem or Motivation
After #4798 merges with the fixable check of its scope comment, the refine judge classes its findings with rules only. Owner requirement 4 asks for the decision model on the closed choice 'can one repair round fix this?' at every refusal site.
Proposed Solution & Architectural Design
Point refine.judge_fixable (#4847): Jev (Noul: yes/no with a probability) 'fixable' on the counts of the #4798 classes; the #4798 rule is the fallback and, before the fit, a yes of the rule stands. Record the path and the result.
Target Subsystem
SDLC, Git & PR Governance (roadmap refine judge).
Existing Tool Considered
The #4847 chain and Jev through decide_with_jev. Cost to build: about 0.3M tokens, 2 hours.
Acceptance Criteria
- A test with a fake model: model yes and rule no -> agent round; model error -> rule.
- Each decision writes the decision line and the counter.
Dependencies
#4847; #4798 with the fixable check of its scope comment, merged first.
Source: #4843
Alternatives check of 2026-12-01: in-use.
The repository already uses this tool.
Tool: pydantic/pydantic-ai (https://github.com/pydantic/pydantic-ai), MIT, last activity 2026-12-01, maintained.
Reason: Hold: #4798 and #4847 are unmerged. Searches found no tool for the fixable rule, the decision line or the counter; pydantic-ai, already in use, covers only the typed Noul request that #5897 defers.
Covers:
- Typed Noul model request through the existing decide_with_jev chain
- Structured yes/no answer with a probability
- Model errors return to the caller for the rule fallback
Lacks:
- The deterministic fix(roadmap): refine sends a judge refusal to an agent round #4798 fixable rule on the open findings
- The fitted cuts file and band_of cut for refine.judge_fixable
- The decision line, counter and point registration owned by feat(roadmap): register the refine judge fixable decision point #5897
Proposed design
Problem statement
Add the deterministic #4798 fixable rule to the refine judge; hold the decision-point registration and its model request in #5897. The refine judge now refuses a proposal after the maximum tries with no fixable check. The rule must run before the refusal and give one repair round when the open findings are fixable. The decision point and its Noul model need #4847 and a fitted cuts file.
Acceptance criteria
Requirement: Fixable rule gives one repair round
The refine judge SHALL run the #4798 fixable check on the open findings before it records a refusal at CONST_ROADMAP_REFINE_MAX_TRIES.
Scenario: A fixable finding gets one repair round
- WHEN A test calls the refine judge with open findings that the fix(roadmap): refine sends a judge refusal to an agent round #4798 rule marks fixable and a refusal at
CONST_ROADMAP_REFINE_MAX_TRIES. - THEN The judge sets
refine.next_steptoretryand records one repair round.
Requirement: Rule no fails the item
The refine judge SHALL record refine.next_step failed when the #4798 fixable check answers no.
Scenario: A not-fixable finding fails the item
- WHEN A test calls the refine judge with open findings that the fix(roadmap): refine sends a judge refusal to an agent round #4798 rule marks not fixable and a refusal at
CONST_ROADMAP_REFINE_MAX_TRIES. - THEN The judge sets
refine.next_steptofailedand starts no repair round.
Requirement: The rule decision is recorded
The refine judge SHALL write one decision line that names refine.judge_fixable, the rule resolver and the result for each rule decision.
Scenario: The line records the rule result
- WHEN A test runs a rule decision and reads the captured log.
- THEN One line names
refine.judge_fixable,ruleand the resultfixableornot_fixable.
Existing Tool Considered
pydantic/pydantic-ai is in use (verdict in-use). The alternatives check in the issue body gives what it covers and lacks. The deferred model request uses it through decide_with_jev for the typed Noul request. The rule chain, fitted cuts, decision line and counter remain project code. Written cost: about 0.3M tokens and 2 hours.
Key questions
- Where does the fixable rule run?: The rule runs in
src/devops_cli/roadmap/refine/refine_judge.pyandsrc/devops_cli/roadmap/refine/refine.py, before the refusal atCONST_ROADMAP_REFINE_MAX_TRIES. [sources: src/devops_cli/roadmap/refine/refine_judge.py, src/devops_cli/roadmap/refine/refine.py, src/devops_cli/config/constants.py:3751] - What does a fixable rule answer do?: A fixable answer gives one repair round and sets
refine.next_steptoretry. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py, src/devops_cli/roadmap/refine/refine_judge.py]- Chosen: Use retry for a fixable finding. The issue asks for one repair round before the item fails.
- Rejected: Use failed for every refusal. This option gives no repair round and ignores the fixable rule.
- What does a not-fixable rule answer do?: A not-fixable answer sets
refine.next_steptofailedand starts no repair round. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py, src/devops_cli/roadmap/refine/refine_judge.py]- Chosen: Use failed for a not-fixable finding. A repair round cannot fix the open findings, so the item fails.
- Rejected: Use retry for every refusal. This option spends a round on findings that the rule marks not fixable.
- Which model does the deferred decision point ask?: The point uses the model that
ai.decision_modelnames. With the setting empty, the point sends no model request and the rule answer stands. (best practice) [sources: docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md, src/devops_cli/roadmap/decision_point.py]- Chosen: Use
ai.decision_model. ADR 0020 makes this setting the single model choice for a decision point. - Rejected: Hardcode a model name. A hardcoded name bypasses the setting and its validation.
- Chosen: Use
- Does the decision model override a no of the fix(roadmap): refine sends a judge refusal to an agent round #4798 rule?: No. ADR 0020 puts the rule before the model. The model runs only after a fitted cuts file and with the point mode
shadoworon. (best practice) [sources: docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md, src/devops_cli/roadmap/decision_point.py, src/devops_cli/roadmap/decision_step.py:138]- Chosen: Rule first, model after a fit. ADR 0020 stops the chain at the first resolver and adds a model only when measured.
- Rejected: Model first, rule as fallback. This option contradicts the resolver chain in ADR 0020.
- How does the point map the Noul probability to a yes or no?: The cuts file of
refine.judge_fixablegives the band throughThresholdsandband_of. The judge uses no fixed 0.5 threshold. (best practice) [sources: docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md, src/devops_cli/roadmap/decision_step.py:138, src/devops_cli/roadmap/decision_step.py:163, src/devops_cli/roadmap/decision_point.py]- Chosen: Use the cuts file. ADR 0020 section 3 makes the cut data in the repository with the model and its fit.
- Rejected: Use a fixed 0.5 threshold. A constant is a guess, and ADR 0020 section 3 says a test refuses it.
- How does the decision point record the result?: The point writes one decision line and adds one to
devops_cli_decision_point_totalwhen its mode isshadoworon. The rule-only part writes the line; feat(roadmap): register the refine judge fixable decision point #5897 adds the point counter. (best practice) [sources: docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md]- Chosen: Line now, counter in feat(roadmap): register the refine judge fixable decision point #5897. A point in mode
offwrites no decision record, and feat(roadmap): register the refine judge fixable decision point #5897 registers the point. - Rejected: Counter now without the registry. This option invents a counter for a point that is not registered.
- Chosen: Line now, counter in feat(roadmap): register the refine judge fixable decision point #5897. A point in mode
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 11, 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 refines an existing judge path and has a rule fallback, so it is not blocking but improves accuracy.It adds a model-based fixable signal that can reduce false refusals, but the rule already covers the case.The body states about 0.3M tokens and 2 hours of work.Both work on the refine judge fixable step; #4798 delivers the rule and agent-round routing, this candidate adds a model call that precedes the rule as a pre-check.devops-cli-service commentedon Nov 14, 2026
Alternatives check: none
Reason: The searches returned only generic LLM gateways and model-server images, which route or serve model calls but implement no refine-judge decision point, no rule-before-model fallback, and no decision line or counter. The need is a project-internal change to the #4847
decide_with_jevchain and the #4798 fixable classes, so no external open, maintained tool covers it.Tool: none found
Lacks:
refine.judge_fixable/decide_with_jevdecision-point chainSearches run:
Sources:
Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.
dan-petty commentedon Nov 15, 2026
Cannot be built as written: depends on unmerged issue #4847, and #4847 refined design explicitly deferred the fix-check chain from scope. Returned per AGENTS.md Rule 2.
devops-cli-service commentedon Nov 15, 2026
Status set to Ready at ca62d6a (see proposed design in issue body).
Moved to new items: #5897.
devops-cli-service commentedon Nov 24, 2026
The result in the alternatives block of the issue body changed. Before this check:
none, no tool. A person decides what the new result means for the item.Searches (6)
Tools considered:
Searches run:
Sources:
dan-petty commentedon Nov 28, 2026
Returned per AGENTS.md Rule 2: #4867 specifies running 'the #4798 fixable check on the open findings before it refuses a proposal at the cap' (Dependencies: '#4847; #4798 with the fixable check of its scope comment, merged first'). Verified against origin/main (6e7cd2b): #4798 (openspec/changes/archive/2026-11-12-4798-refine-judge-refusal-agent-round/proposal.md, commit e4fc6a9 / #4874) only implemented routing JUDGE_REFUSED to NextStep.RETRY up to CONST_ROADMAP_REFINE_MAX_TRIES (3) and never built the deterministic fixable check described in #4798's scope comment (git ls-files missing_path refutation, input-gap rerun, or placeholder not_fixable check) in src/devops_cli/roadmap/refine/refine.py or refine_judge.py. #4847 (model-after-rule chain) is also unmerged and #5897 (refine.judge_fixable registration) remains New. Re-open or update once the prerequisite deterministic fixable check is implemented in its own issue.
devops-cli-service commentedon Nov 28, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.