Skip to content

fix(roadmap): refine holds an item on a merge question #6445

Done

Description

@dan-petty

Problem Description

Refine makes a merge remark of the body into a question for a person, and the item waits in New for an answer that decides nothing in the design.

Example: the body of #4889 says (line 17) "This PR changes all 49 pages, so it lands as one PR at a quiet time." Refine (comment of 2026-11-15T23:24Z) made it the key question "When does the pull request merge?" with the mark "(a person decides)" (body line 138). The record holds refine.next_step = person and owner_question.text = "When does the pull request merge? (a person decides)". It is the only open question of the item.

Only a person merges a pull request (AGENTS.md), and the pipeline never merges one. So the answer changes no criterion, no task and no file of the plan. The owner decision of 2026-11-11 on #4780 (Decisions, "Post-merge person step") says: "It does not hold an item from Ready. It becomes the criterion 'Pending a person after the merge'."

The cause:

  1. src/devops_cli/ai/tasks/roadmap_refine_reply.md:9 tells the model: "person only for a decision that the project leaves to a person: a merge, a review verdict, a milestone, a secret, a repository setting or a host." So the model gives a merge question the kind person.
  2. validate_proposal (src/devops_cli/roadmap/refine/refine.py:1371, lines 1404-1405) adds each person question to the open questions, with no test of what the question decides.
  3. check_ready (refine.py:1479) refuses Ready while an open question exists, and next_step_of (refine.py:1522-1523) returns PERSON. The item stays in New.

Open items that wait in refine today with a merge question as their only open question (job records read 2026-11-19):

Item Refine comment Open question
#4889 2026-11-15T23:24Z When does the pull request merge?
dan-petty/homelab#333 2026-11-10T00:58Z When does the pull request of this change merge?
#5332 2026-11-17T19:57Z When may the owner merge the draft pull request?
#5239 2026-11-19T03:27Z Who merges the pull request?
#4809 2026-11-19T10:32Z Who merges the pull request that changes the steward limit?
#5502 2026-11-18T05:01Z Who merges the pull request that accepts the record?
#5246 2026-11-17T12:07Z Who approves and merges the new record?
#5245 2026-11-17T11:52Z Who merges the ADR pull request?
#5243 2026-11-17T11:49Z Who merges this pull request, and in what order?
#5237 2026-11-17T11:24Z Who merges the merge-gate record pull request?
#4970 2026-11-16T07:24Z Who accepts and merges the ADR?
#4913 2026-11-16T05:15Z Who merges the onboarding pull request in each repository?

The rounds of 2026-11-19 (#5239, #4809) show that the defect continues after #6353.

Reproduction Steps

  1. Read the refine section and the job record of feat(docs): generated pages name their source and stay complete #4889: open question "When does the pull request merge? (a person decides)", refine.next_step person.
  2. Read src/devops_cli/ai/tasks/roadmap_refine_reply.md:9: "a merge" is in the list of person decisions.
  3. Run uv run devops roadmap inbox --kind refine. feat(docs): generated pages name their source and stay complete #4889 and the other 11 items of the table are in "New items that wait on a person in refine".

Expected vs Actual Behavior

Expected:

  • Refine asks a person only a question whose answer changes the plan before the build. A merge, the time of a merge, or who merges is no such question.
  • A step that a person does at or after the merge goes to the proposal as a "Pending a person" criterion (the decision of 2026-11-11 on feat(roadmap): track the issue stewards and persona selection #4780). The stage job already keeps such criteria in the pending-person group (src/devops_cli/roadmap/stage/stage_criteria.py:41).
  • An item whose only open question is a merge question goes to Ready (or to its next step that needs no person).

Actual: the model marks the merge question person, and the item waits in New. 12 items wait for this reason today.

Environment Diagnostics

  • DevOps CLI Version: 0.180.0 (origin/main 0d90de5)
  • Python Version: 3.14.10
  • Execution Environment: the refine job of the roadmap Service in the cluster; the records were read from the issue bodies.

Logs, Traces, or Terminal Output

# Job record of dan-petty/devops-cli#4889 (2026-11-19)
refine.next_step = person
refine.commented_at = 2026-11-15T23:24:46+00:00
owner_question.text = When does the pull request merge? (a person decides)
owner_question.answer = None

# src/devops_cli/ai/tasks/roadmap_refine_reply.md:9
- `kind` is `fact` ...; `decision` for a design choice; or `person` only for a decision that the
  project leaves to a person: a merge, a review verdict, a milestone, a secret, a repository
  setting or a host.

Pre-Submission Checklist

Acceptance Criteria

  • A test with a scripted model reply: a proposal whose only person question asks when or who merges the pull request gives no open question. The item goes to Ready, and the merge step is a "Pending a person" criterion or is left out.
  • A test: a person question about a secret, a repository setting or a host before the build still makes the item wait on a person.
  • The prompt roadmap_refine_reply.md does not name a merge as a person decision, and it states where a step after the merge goes.
  • The refine rules date (CONST_ROADMAP_REFINE_RULES_SINCE, src/devops_cli/config/constants.py:3449) moves, so refine looks again at the waits that the old rule set.
  • Live proof: after the merge and the release, refine gives feat(docs): generated pages name their source and stay complete #4889 and docs(adr): one decision-model record supersedes ADR 0019 and ADR 0020 #5239 a next step other than person. A comment gives the new records.

Dependencies

Alternatives check of 2026-11-19: none.
Tool: none found.
Reason: Searches found only generic documentation pages and no open, maintained tool that knows the project's question kinds, its P_STEP vocabulary or the Pending a person after the merge criterion; the change belongs in the project's own refine code.

Lacks:

  • No library states the project's person-question kinds
  • No tool maps a question to a Pending a person after the merge criterion
  • No predicate over merge wording in issue text
  • No library moves a refine rules date to force a recheck

Proposed design

Problem statement

Stop refine from holding an item on a merge question. Refine makes a merge remark a person question, and the item waits in New for an answer that changes no criterion, task or file of the plan. The fix removes a merge from the prompt's person list, converts a merge question to the Pending a person after the merge criterion, and keeps a secret, setting or host question open.

Acceptance criteria

Requirement: A merge question leaves no open question

Refine SHALL NOT keep an item in New on a person question whose text names a merge of the change.

Scenario: A merge question leaves no open question

  • WHEN the test tests/roadmap/refine/test_roadmap_refine_person_wait.py uses a scripted model reply that holds the one person question Who merges the pull request? and no other open question
  • THEN validate_proposal returns no open question, check_ready returns true, and next_step_of returns no PERSON

Requirement: The merge step is a pending-person criterion

Refine MUST write a person question that names a merge of the change as the criterion Pending a person after the merge, and not as an open question.

Scenario: The converted question becomes a criterion

  • WHEN the test tests/roadmap/refine/test_roadmap_refine_person_wait.py uses a scripted model reply that holds the one person question When does the pull request merge?
  • THEN the proposal holds one criterion with the name Pending a person after the merge and no open question

Requirement: A pre-build person question still waits

Refine MUST keep a person question open when its answer changes the plan before the build, such as a secret, a repository setting or a host.

Scenario: Pre-build person questions keep the wait

  • WHEN the test tests/roadmap/refine/test_roadmap_refine_person_wait.py uses a scripted model reply that holds the person questions Which secret holds the deploy key?, Which repository setting enables the merge?, and Which host runs the deploy?
  • THEN each question stays open, check_ready returns false, and next_step_of returns PERSON

Requirement: The prompt names no merge as a person decision

The refine reply prompt MUST NOT name a merge as a person decision, and MUST name the criterion Pending a person after the merge as the place of a step after the merge.

Scenario: The prompt text

  • WHEN a test in tests/roadmap/refine/test_roadmap_refine_questions.py reads src/devops_cli/ai/tasks/roadmap_refine_reply.md
  • THEN the sentence of the person kind holds no merge word, and the prompt holds the text Pending a person after the merge

Requirement: The refine rules date moves

CONST_ROADMAP_REFINE_RULES_SINCE MUST be later than 2026-11-19, so refine looks again at each wait that the old rules set.

Scenario: The constant is later than the last bad round

  • WHEN a test in tests/roadmap/refine/test_roadmap_refine_person_wait.py reads CONST_ROADMAP_REFINE_RULES_SINCE from src/devops_cli/config/constants.py
  • THEN its value is later than datetime(2026, 11, 19, tzinfo=UTC)

Requirement: Pending a person after the merge

After the release that holds the fix, a person MUST run the refine inbox check and confirm that the waiting items no longer wait on a merge question.

Scenario: The inbox shows no merge wait

Existing Tool Considered

The alternatives check of 2026-11-19 in the issue body records verdict none and Tool: none found; the block lists the lacks. No open, maintained tool or library covers the need. The plan builds a predicate of about 60 lines in src/devops_cli/roadmap/refine/refine.py and its tests. Cost to build, keep and fix that code: about 40k tokens to build, about 15k tokens a year to keep, and about half a day of elapsed time.

Key questions

  • How does refine tell a merge question from a question that changes the plan?: A person question is a post-merge step when its text asks who or when merges, or who approves or accepts and merges, and it names the pull request, record, ADR, change or draft. validate_proposal then writes the criterion Pending a person after the merge and adds no open question. Any other person question stays open. The predicate must not match a question about a secret, a repository setting or a host. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:1371, src/devops_cli/roadmap/refine/refine.py:1404, src/devops_cli/ai/tasks/roadmap_refine_reply.md:9, src/devops_cli/roadmap/stage/stage_criteria.py:41, tests/roadmap/refine/test_roadmap_refine_person_wait.py]
    • Chosen: A narrow predicate on the question text. It is deterministic, testable offline, and needs no model compliance.
    • Rejected: An extra after_merge field in the model reply. The defect is a model classification; a model can forget the field again.
    • Rejected: Drop every person question. A question about a secret, a repository setting or a host must still wait.
  • Where does a step that a person does at or after the merge go?: To the proposal as the criterion Pending a person after the merge. The stage job keeps such criteria in the pending-person group. It is no open question. (best practice) [sources: src/devops_cli/roadmap/stage/stage_criteria.py:41, docs/ROADMAP_WORKFLOW.md]
    • Chosen: Write the Pending a person after the merge criterion. The owner decision of 2026-11-11 on feat(roadmap): track the issue stewards and persona selection #4780 says so, and the stage job already keeps the group pending-person.
    • Rejected: Leave the merge step out. The plan then loses a step that a person must do.
    • Rejected: Keep it as an open question. That is the defect: the item then waits in New.
  • Does CONST_ROADMAP_REFINE_RULES_SINCE move with this fix?: Yes. The rule that sets the next step changes, so the constant moves to a time later than 2026-11-19. Refine then looks again at the 12 items that the old rule set. (best practice) [sources: src/devops_cli/config/constants.py:3455, src/devops_cli/roadmap/refine/refine.py:1522, docs/ROADMAP_WORKFLOW.md]
    • Chosen: Move the constant later than 2026-11-19. The old rule set 12 waits; a later date makes refine look at them again.
    • Rejected: Keep the constant. The waiting items keep the old result and stay in New.
  • Which open, maintained tool or library covers the test of a question as a post-merge step?: None. The alternatives check of 2026-11-19 in the issue body records verdict none and Tool: none found. The plan builds a small predicate in src/devops_cli/roadmap/refine/refine.py and its tests. Cost: about 40k tokens to build, about 15k tokens a year to keep, and about half a day of elapsed time. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:1404, src/devops_cli/ai/tasks/roadmap_refine_reply.md:9, src/devops_cli/roadmap/stage/stage_criteria.py:41]
    • Chosen: A predicate in refine.py. It is deterministic, testable offline, and adds no dependency.
    • Rejected: A general text-classification library. It costs more to keep and is less predictable than a small pattern.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 19, 2026
  2. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 19, 2026
  4. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  5. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    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 (4)

    Searches run:

    • python text classification rule-based predicate library for classifying issue questions, results: 5
    • open source library classify question text as post-merge step roadmap, results: 5
    • open source tool detect question type intent classification library spacy textblob, results: 5
    • github issue triage automation open source questions requiring human decision, results: 5

    Sources:

  6. added
    status/ready
    and removed
    status/new
    on Nov 19, 2026
  7. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  8. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor

    Scope addition (AGENTS.md rule 11): refine also holds an item on a question about a live proof after the merge and the release.

    Two items wait in refine with such a question:

    Item Open question
    #4573 Who confirms the live proof after the merge and the release?
    #4565 Who proves the live keys after the merge and the release?

    The answer to these questions does not change the plan before the build. Table 12 of docs/guidelines/production-readiness.md gives the evidence and the go-live checks to an agent. The owner decision "Post-merge person step" of 2026-11-11 in tracker 4780 also applies: a step after the merge does not hold an item from Ready.

    Request: make this fix also cover a question about who runs or confirms a check after the merge and the release.

    • Refine writes such a check as an acceptance criterion after the merge, not as an open question.
    • Add a test with a scripted model reply: a proposal whose only person question asks who does a live proof after the release gives no open question.

    On 2026-11-21, the owner answered the two questions in a comment on each item: an agent runs the live proof. So #4573 and #4565 do not wait for this fix. #4573 and #4565 are sources, not dependencies of this item.

  9. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 25, 2026
  10. removed
    status/in-review
    owner/agent
    on Nov 25, 2026
  11. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-25 17:09 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions