Repository navigation
Description
Problem or Motivation
Refine takes no input from another job, except person replies and the alternatives check. Thus an answer of the question resolver (#4805) does not reach the proposal, and refine asks the same question again. It did so on #4517, #4563 and #4624.
Proposed Solution & Architectural Design
- Add the request key
resolved. It holds the resolve record and the latest resolve comment, in the pattern of_alternatives_request. resolve.answers_hashjoins the unchanged check of refine.- A
P_STEPanswer becomes the criterion "Pending a person after the merge". It does not hold the item from Ready (owner decision of 2026-11-11, feat(roadmap): track the issue stewards and persona selection #4780). - An
OWNERframe links the question, and refine does not ask the question again. - Refine writes an answer as "(owner decision)" only with a verified quote. An answer by analogy is "(proposed, by the rule of #N)".
Target Subsystem
SDLC, Git & PR Governance (src/devops_cli/roadmap/refine/).
Existing Tool Considered
A change of refine itself, in the form of the alternatives input (#2652). Cost to build: about 60,000 tokens and 2 hours.
Acceptance Criteria
- A replay test: an item with a resolve answer for each key question goes Ready with no person reply.
- A
P_STEPanswer is a criterion of the proposal. - Refine does not ask an answered question hash again.
- Refine writes the "Owner decisions" heading only from a verified quote.
Dependencies
Source: #4780
Owner decision 2026-11-13
Refine is due when a resolve answer is newer than refine.at, by its predicate in due_jobs. No due mark. Source: tracker #5482, Phase 6.
- Live proof: after the merge and the release, refine runs as the App on an item with a new resolve answer. A comment gives the result line.
Alternatives check of 2026-12-02: none.
Tool: none found.
Reason: Searches found no open, maintained tool that carries a question resolver's answers into a refine proposal, deduplicates answered question hashes, or gates owner decisions on verified quotes. The change wires this inside refine itself.
Lacks:
- No library passes resolver answers between roadmap jobs
- No library skips a question whose hash is answered
- No library marks an owner decision only from a verified quote
Proposed design
Problem statement
Refine reads only person replies and the alternatives check from another job. The answers of the question resolver (#4805) do not reach the proposal, so refine asks a question that the resolver already answered. It did so on #4517, #4563 and #4624.
This change carries the resolve record and its latest comment into the refine request. Refine selects an item again when its resolve answers change, does not ask an answered question, and writes the "(owner decision)" mark only from a verified quote. A P_STEP answer becomes the criterion "Pending a person after the merge", and refine becomes due on a newer resolve answer.
Acceptance criteria
Requirement: Resolve record in the refine request
Refine SHALL add a resolved key to its request dict that holds the resolve record and the latest resolve comment.
Scenario: Resolve record and comment in the request
- WHEN A test builds the refine request for an item that has a resolve record and a newer comment with the resolve marker.
- THEN The request holds a
resolvedkey with the record and the latest marked comment.
Requirement: Changed resolve answers select the item
Refine SHALL select an item again when the hash of its resolve answers differs from the hash that refine recorded at its last round, even when body_hash.is_unchanged returns true.
Scenario: New resolve answer selects the item
- WHEN A test changes
resolve.answerswhilebody_hash.is_unchangedreturns true for the item. - THEN The refine selection returns the item.
Requirement: Answered question is not asked
Refine SHALL treat each question hash in resolve.answers as answered and SHALL NOT ask that question again.
Scenario: Answered hash is not asked
- WHEN A test gives a key question whose hash
resolve.answersholds. - THEN The proposal holds no question for that hash.
Requirement: P_STEP answer becomes a criterion
Refine SHALL turn a P_STEP resolve answer into the acceptance criterion named "Pending a person after the merge".
Scenario: P_STEP criterion does not hold the item
- WHEN A test gives refine a resolve answer of class
P_STEP. - THEN The proposal holds the criterion "Pending a person after the merge" and the round sets the item Ready.
Requirement: OWNER frame linked to its question
Refine SHALL link an OWNER frame to its question and SHALL NOT ask that question again.
Scenario: OWNER frame closes the question
- WHEN A test gives a resolve record with an
OWNERframe for a key question. - THEN The request holds the frame's answer in
owner_answerand the proposal holds no person question for that question.
Requirement: Owner decision needs a verified quote
Refine SHALL write the "(owner decision)" mark and the "Owner decisions" heading only when the resolve answer carries an exact quote from a tracked document or from a comment of a person.
Scenario: Answer with no verified quote
- WHEN A test gives a resolve answer that carries no exact quote.
- THEN The proposal marks the answer "(proposed, by the rule of #N)" and writes neither the "(owner decision)" mark nor the "Owner decisions" heading.
Requirement: Verified quote writes an owner decision
Refine SHALL mark an answer as "(owner decision)" and cite the quote's source when the resolve answer carries an exact quote from a tracked document.
Scenario: Verified quote
- WHEN A test gives a resolve answer that carries an exact quote from a tracked document.
- THEN The proposal marks the answer "(owner decision)" and its sources name the path of the quoted document.
Requirement: Refine due on a newer resolve answer
Refine SHALL be due when a resolve answer is newer than refine.at, through the due predicate of its row, and SHALL write no due mark.
Scenario: Newer resolve answer makes refine due
- WHEN A test gives the due predicate of the refine row a stored
refine.atvalue and a resolve answer that is newer. - THEN The predicate reports refine due and the round writes no due mark.
Requirement: Ready from resolve answers alone
Refine SHALL reach Ready from resolve answers alone when each key question has an answer.
Scenario: Resolve answer for every key question
- WHEN A replay test in
tests/roadmap/refine/gives refine an item with a resolve answer for each key question and no person reply. - THEN The proposal holds no person question and the round sets the item Ready.
Requirement: Pending a person after the merge
The refine row MUST show that it reads a new resolve answer as the App after the release.
Scenario: Live proof of the refine row
- WHEN After the merge and the release, refine runs as the App on an item with a resolve answer newer than
refine.at. - THEN The run prints one result line that names the item and its next step, and a comment on the item gives that line.
Existing Tool Considered
The alternatives check recorded in the issue body (verdict none, dated 2026-11-27) found no open, maintained tool or library, and its block lists what such a tool lacks. The change builds this wiring in refine itself. Written cost: about 60,000 tokens and 2 hours to build, keep and fix the code until it matches the need, plus the keep cost of the refine tests that it extends.
Key questions
- Which request key carries the resolve record and its latest comment into the refine request?: Add the
resolvedrequest key. It holds the resolve record and the newest comment that carries the resolve marker. Refine builds it besidealternativesin the request dict, and the proposal prompt names it besidealternatives. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:726, src/devops_cli/ai/tasks/roadmap_refine_proposal.md]- Chosen: New
resolvedrequest key. It follows_alternatives_requestand keeps the resolve record apart from the alternatives check. - Rejected: Extend the
alternativesrequest key. It mixes two checks and breaks the existing alternatives gate. - Rejected: Read the resolver store inside refine. It adds a second read path and duplicates the request contract.
- Chosen: New
- How does refine use the hash of the resolve answers?: Refine compares
resolve.answers_hashwith the hash that it recorded at its last round. A difference selects the item again, even whenbody_hash.is_unchangedreturns true. The question hashes inresolve.answersare the answered set.body_hash.is_unchangedstays body-only, sotrust.is_approvedkeeps its contract. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py, src/devops_cli/roadmap/body_hash.py, src/devops_cli/roadmap/trust.py, src/devops_cli/roadmap/stores/store.py]- Chosen: Refine-only answers hash. It uses one hash source for the trigger and the skip, and it leaves the body-only
is_unchangedthattrust.is_approvedreads. - Rejected: Add the hash to
body_hash.is_unchanged. It would end the approval of a bot item when a resolve answer arrives, though the body has not changed. - Rejected: Match the question text. A change of the text breaks the match and refine asks the same question again.
- Rejected: Keep the current unchanged check. A new resolve answer does not make refine select the item.
- Chosen: Refine-only answers hash. It uses one hash source for the trigger and the skip, and it leaves the body-only
- What does a
P_STEPresolve answer become in the proposal?: It becomes the acceptance criterion "Pending a person after the merge". It does not hold the item from Ready. The owner decision of 2026-11-11 on feat(roadmap): track the issue stewards and persona selection #4780 sets this rule. (best practice) [sources: src/devops_cli/roadmap/resolve.py:101, 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: Acceptance criterion. The owner decision of 2026-11-11 on feat(roadmap): track the issue stewards and persona selection #4780 keeps a
P_STEPanswer from blocking Ready. - Rejected: Blocked item. It stops delivery for a step that a person does after the merge.
- Rejected: Deferred part. The answer is known and the work can proceed.
- Chosen: Acceptance criterion. The owner decision of 2026-11-11 on feat(roadmap): track the issue stewards and persona selection #4780 keeps a
- How does refine handle an
OWNERframe?: Refine links the frame that the resolve record names for the question hash. It carries the answer in the existingowner_answerrequest key and does not ask that question again. (best practice) [sources: src/devops_cli/roadmap/resolve.py:102, src/devops_cli/roadmap/refine/refine.py, tests/roadmap/refine/test_roadmap_refine_owner_answer.py]- Chosen: Link the frame and skip the question. It keeps the owner input and stops the duplicate question, with the existing frame reader.
- Rejected: Ask the question again. It repeats the defect that the issue fixes.
- Rejected: Drop the frame. It loses the owner input and the link to the question.
- When may refine write an answer as "(owner decision)"?: Only when the resolve answer carries an exact quote from a tracked document or from a comment of a person. An answer by analogy is "(proposed, by the rule of #N)". The resolver chain answers a question only with a verified source, or frames it for the owner. (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/ai/tasks/roadmap_refine_proposal.md]
- Chosen: Verified quote gate. It matches the resolver rule that an answer needs a verified source.
- Rejected: Trust every resolve answer. It writes an owner decision with no evidence.
- Rejected: Never write an owner decision. It drops a verified owner answer that the proposal needs.
- When is refine due for a new resolve answer?: Refine is due when a resolve answer is newer than
refine.at, through the due predicate of its row. Refine writes no due mark. The owner decision of 2026-11-13 in the issue body sets this rule, from tracker feat(roadmap): track the roadmap pipeline split into jobs #5482 Phase 6. (best practice) [sources: src/devops_cli/roadmap/fix_checks_row.py, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]- Chosen: The due predicate of the row. The owner decision of 2026-11-13 sets this rule and writes no due mark.
- Rejected: A due mark from the resolver. The owner decision rejects a due mark for this row.
- Rejected: A fixed interval only. It delays refine after a new resolve answer.
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 removes repeated questions on multiple items but does not block a release or fix a broken path.It stops refine from re-asking answered questions, saving person time on every affected item.The body estimates about 60,000 tokens and 2 hours of work.Both add a job input to refine, but #2652 reads the alternatives verdict while this candidate reads the question resolver answers.devops-cli-service commentedon Nov 14, 2026
Alternatives check: none
Reason: Searches for passing answers between jobs and for caching agent answers by question hash returned only unrelated documentation pages, not a maintained tool or library. The need is project-internal wiring: refine must read the resolver's answer record and hash, turn a P_STEP answer into a criterion, link an OWNER frame, and gate the "Owner decisions" heading on a verified quote — the issue itself names a change of refine as the only considered option, so no external tool covers it.
Tool: none found
Lacks:
_alternatives_requestresolve.answers_hashto refine's unchanged check so an answered question is not asked againP_STEPanswer into the criterion "Pending a person after the merge"OWNERframe to the questionSearches run:
Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 15, 2026
Refine cannot set this item to Ready at e5dfddb 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.
dan-petty commentedon Nov 19, 2026
New instances for this item: refine asks a person a question that the body already answers (#4624, #4586, #4573). Two causes in the code are not named here yet, and #4805 is in a dependency cycle.
Instances (checked 2026-11-19):
valkey-devopsACL passwords? (a person decides)", 4 times: comments 6801358364 (2026-11-11T16:30Z, at 818ac6f), 6803055609 (2026-11-11T17:45Z, at 5c71ad4), 6831904235 (2026-11-12T18:09Z, at 2c0fe36) and 6839192910 (2026-11-12T23:39Z, at 7a158c4).devops k8s push-secretsfor the ACL passwords ofvalkey-devops." The key question of refine (line 291) gives the same answer, but marks it "(a person decides)".3e032129…). Record:refine.next_stepperson.devops k8s push-secretsmakes the values". The answer of refine (line 193) is a person step after the merge, which is theP_STEPclass of #4805.refine.next_stepperson.P_STEP.Refine has left #4624 out since #5963 (2026-11-16), because #4624 is a tracker. So it asks there no more. #4586 and #4573 still wait on a person.
Causes that this item does not name yet (origin/main 0d90de5):
validate_proposal(src/devops_cli/roadmap/refine/refine.py:1404-1405) adds each key question of kindpersonto the open questions. It does not look at the answer. So an answer that quotes the body cannot close the question._OWNER_DECISIONS_HEADING_RE(refine.py:1132) is^#+\s*Owner decisions\b. The bodies use other forms: "### Decisions" (feat(roadmap): track the project brain #4624), "### Owner decision 2026-11-13" in the singular (feat(roadmap): run each alternatives check in its own pod #4573, feat(roadmap): run the reconcile sweep on a cluster schedule #4574, feat(roadmap): run intake and scoped intake in their own pods #4567), and an inline "Owner decision 2026-11-11:" (feat(service): serve a read-only roadmap API with OpenAPI #4586). None of them matches. So_marked(refine.py:1357-1368) never writes "(owner decision)" for these answers. The refine sections of feat(roadmap): track the project brain #4624, feat(service): serve a read-only roadmap API with OpenAPI #4586 and feat(roadmap): run each alternatives check in its own pod #4573 hold 0 "(owner decision)" marks, and 14, 8 and 10 "(best practice)" marks.Proposed additions to the acceptance of this item:
Owner decision <date>:line is not open.P_STEPanswer of feat(service): serve a read-only roadmap API with OpenAPI #4586 and feat(roadmap): run each alternatives check in its own pod #4573 becomes the criterion "Pending a person after the merge", and the item does not wait on a person. The new bug "fix(roadmap): refine holds an item on a merge question" reports the same post-merge step for questions about the merge itself, with no resolver.A gate of this item. This item waits on #4805 (
refine.blocked_by4805). #4805 is in a dependency cycle: #4805 → #4809 → #4808 → #4805.refine.blocked_by3077,4787,4809.refine.blocked_by4805,4806,3077,4787.The edge #4805 → #4809 comes from the scope comment of 2026-11-12T09:54Z on #4805: "The resolver stays the stewards CronWorkflow of #4809". That sentence says that #4809 runs the resolver, so #4809 waits on #4805, not the reverse. #4805, and so this item, cannot become Ready until a person removes #4809 from the dependencies of #4805.
devops-cli-service commentedon Nov 19, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
devops-cli-service commentedon Nov 20, 2026
Owner question: See Suspected block 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 21, 2026
Owner question: See the first point of Open questions 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 29, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
dan-petty commentedon Nov 29, 2026
Returning #4806 to New because its specified resolver inputs do not exist in the codebase yet; they belong to open #4808 (
feat(roadmap): the question resolver answers with verified sources).Evidence against the current tree:
resolve.answers_hash, question hashes, answers, or verified quotes.ResolveRecordKey(src/devops_cli/roadmap/stores/store.py:554-561) defines onlyINPUT_HASH(resolve.input_hash),ANSWERS(resolve.answers),OWNER_ASKED(resolve.owner_asked),COMMENTED_AT(resolve.commented_at), andFAILED_REASON(resolve.failed_reason)._serialized_classes(src/devops_cli/roadmap/resolve.py:619-634) serializes onlysource,class,text,wake_at, andowner_classintoresolve.answers—no question hashes, answer text, verified quotes, or cited source paths exist (run_resolveinsrc/devops_cli/roadmap/resolve.py:744-756only extracts and classifies questions intoFORM,WAIT,P_STEP,OWNER, andANSWERABLE).OWNERframe created byresolve._apply_item_resolve(src/devops_cli/roadmap/resolve.py:645-685) writes a<!-- devops roadmap resolve -->summary comment (_render_resolve_commentatsrc/devops_cli/roadmap/resolve.py:603-616) andresolve.owner_asked; it creates no<!-- owner-question:<hash> -->frame comment or frame hash forOWNERquestions.resolveor standalone refine row module.#4806citessrc/devops_cli/roadmap/fix_checks_row.pyfor the refine row'sduepredicate againstrefine.atand a resolve answer timestamp, whereasrefine_due_reasonlives insrc/devops_cli/roadmap/refine/refine.py:3549andJobRow/_Poll.is_duelive insrc/devops_cli/roadmap/run.py:1742.OWNERframes are specified on open feat(roadmap): the question resolver answers with verified sources #4808, which currently lists#4806underDependencies(refine.blocked_by:4805,4806).#4806needs#4808first (or#4808needs#4806removed as a blocker and#4808closed before#4806can read its answers).