Skip to content

fix(roadmap): intake never closes as a duplicate an item a person planned or one older than its match, so a planned parent is not closed for its own split #1686

Closed

Description

@dan-petty

Friction

Evidence

Checked at release/v0.2.37 0d9741c.

  • For an existing issue, a duplicate verdict closes the issue with a comment: the _duplicate path in src/devops_cli/roadmap/intake.py (:1187-1200, reached from _decide at :1171-1173). The only guards are that the named original is on the shortlist, and the skips in the module docstring (:13-17): an unfinished item, and an issue whose timeline shows a person reopened it after a duplicate close.
  • No guard compares which issue is older, or whether a person planned the candidate (a milestone a person set, or a card or Priority a person set). The release-placement rule from fix(roadmap): an item a person places in a release stays there, and the roadmap jobs comment on a rule it breaks instead of moving it out #1349 (tests/test_roadmap_intake.py:546) already reads who placed the milestone.

Remedy

  • An existing issue a person planned is never closed as a duplicate. Planned means a milestone a person set, or a Priority a person set on its card or label. Intake reports "possible duplicate of #N, left for a person" with the model's reason, places nothing else for it, and writes nothing. Reuse the release rule's reading of who set the milestone.
  • A duplicate pair closes the newer issue, never the older: when the model names an original newer than the candidate, intake reports the pair and closes nothing.
  • These rules come from GitHub's own data (milestone events, issue numbers and creation times), never from matching text such as "Split from" in a body.
  • --plan names each such hold, so a person sees it before --confirm.

Acceptance criteria

Proposed design

Problem statement

The intake process closes planned parent items as duplicates of their own splits without considering whether a person planned the item or the age relationship between the candidate and its duplicate match. This causes unintended closure of planned work when using --confirm.

Acceptance criteria

  • Criterion 1: A candidate with a milestone a person set, whose proposal names a shortlist original, is held as 'possible duplicate' and no close or comment is written.
    Verification: Run offline tests over the in-memory store that verify a candidate with a person-set milestone matched to an original results in a 'possible duplicate' outcome without any closing action.
  • Criterion 2: A candidate older than the original it is matched to is held the same way, as a possible duplicate.
    Verification: Test that an older candidate matched to a newer original results in no closing action and is reported as a 'possible duplicate' for a person's review.
  • Criterion 3: An unplanned, newer candidate matched to an older original is still closed as today.
    Verification: Verify that when an unplanned, newer candidate is matched to an older original, the intake process still closes the newer candidate as a duplicate of the older one.
  • Criterion 4: Running devops roadmap intake --issue 1539 --plan reports perf(roadmap): a settled item costs no body read or model call until its text changes, with refine judging it from the listing it already read #1539 as a possible duplicate of perf(roadmap): intake's embeddings are cached in a password-protected valkey in the cluster, so a settled item costs no embedding request on the service's next round #1655 held for a person.
    Verification: Execute the command with the specified issue numbers and confirm that it reports the candidate as a 'possible duplicate' held for a person, not as 'close as a duplicate'.
  • Criterion 5: The intake module docstring states both guards against closing planned items or newer candidates.
    Verification: Check the module docstring in src/devops_cli/roadmap/intake.py to ensure it mentions that existing issues a person planned are never closed as duplicates and that duplicate pairs close the newer issue.

Key questions

  • What is the current logic for determining if an issue should be closed as a duplicate?: The current logic closes any existing issue with a duplicate verdict without considering whether the item was planned by a person or the relative ages of the candidate and original. The only checks are that the named original is on the shortlist and that it's not an unfinished item or one reopened after a duplicate close. [sources: src/devops_cli/roadmap/intake.py:1187-1200]
  • How does the intake process determine if a milestone was set by a person?: The intake process already has a rule from fix(roadmap): an item a person places in a release stays there, and the roadmap jobs comment on a rule it breaks instead of moving it out #1349 that reads who placed the milestone, and this information is used to decide whether an item should be protected from being closed as a duplicate. [sources: src/devops_cli/roadmap/intake.py:13-17]
  • Should the intake process close a newer issue when it matches an older original?: Yes, the intake should close the newer issue when it matches an older original, but only if no person planned the candidate. (proposed) [sources: src/devops_cli/roadmap/intake.py:1187-1200]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    on Oct 19, 2026
  2. dan-petty commented on Oct 19, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/bug. The candidate describes a defect in the intake command's behavior.
    • Priority: P1-High. The issue blocks backlog processing and affects planned work.
    • Value: High. Fixing this ensures correct handling of planned items and prevents loss of work.
    • Effort: Medium. Requires changes to intake logic and tests, but the core logic is already partially implemented.
  3. added this to the v0.2.37 milestone on Oct 19, 2026
  4. dan-petty commented on Oct 19, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at 0ae4ea4 (see proposed design in issue body).

  5. added
    status/in-progress
    on Oct 19, 2026
  6. dan-petty commented on Oct 20, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1708, merged into release/v0.2.37 as c5d04eb.

    Closes #1686

    6 file(s) changed.

    How it was verified

    Check runs at d83dd5e:

    • Prune PR DevContainer Images: pass
    • Audit Defect PR Hardening: skipping
    • zizmor: pass
    • devops-cli: pass
    • bandit: pass
    • CodeQL: pass
    • Rule Pack Tests: pass
    • Fail-to-Pass Self-Check: pass
    • Changed-Test Independence: pass
    • Tests & Coverage: pass
    • Analyze (python): pass
    • Fail-to-Pass Check: pass
    • Analyze (actions): pass
    • Static Analysis: pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1686-intake-protect-planned-parent.md:

    • A candidate with a person-placed milestone is held as possible duplicate: test_a_candidate_with_a_person_placed_milestone_is_held_as_possible_duplicate verifies that a candidate with a release placed by a person is not closed as a duplicate and no comment or board changes are written.
    • A candidate with a person Priority is held as possible duplicate: test_a_candidate_with_a_person_priority_is_held_as_possible_duplicate verifies that an issue with a priority/* label is preserved without closure.
    • An older candidate matched to a newer original is held: test_a_candidate_older_than_its_matched_original_is_held_as_possible_duplicate verifies that an older issue matched against a newer original is kept open.
    • An unplanned newer candidate is closed as duplicate: test_an_unplanned_newer_candidate_matched_to_an_older_original_is_closed_as_duplicate confirms that normal duplicate closure continues to operate on unplanned newer issues.
    • Intake plan report: test_intake_plan_reports_possible_duplicate_left_for_a_person checks that devops roadmap intake --plan reports held candidates as possible duplicate of #{original}, left for a person: {reason} with zero planned writes.
  7. removed
    status/in-progress
    on Oct 30, 2026
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

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions