Skip to content

fix(github): refuse an issue read that answers for another issue #7331

Done

Description

@dan-petty

Problem Description

A read of an issue by its number can answer with another issue. GitHub redirects the read of an issue that was transferred to another repository, and the answer then holds the number and the repository of the issue at its new place. GitHubRoadmapStore (src/devops_cli/roadmap/stores/github_store.py: issue, _require_issue, _revalidate_issue, _read_or_none) takes that answer as the issue that it asked for. The listing snapshot also keeps the record of a transferred issue as an open item until the next full read, at most 24 hours later.

Reproduction Steps

  1. With the fake GitHub runner, answer the read of repos/acme/widgets/issues/7 with a payload whose number is 12 and whose repository_url names acme/other.
  2. Call store.issue(7) and store.item(7).

Expected vs Actual Behavior

  • Expected: the store compares the number and the repository of the answer with the request. When one differs, the issue is no issue of this repository: the read gives None, a write to it is refused before any request, and the listing drops its record.
  • Actual: the store returns a record with the number of the answer.

Proposed Fix

One check in the place that reads an issue payload: the number equals the requested number and the repository_url names the repository of the store. A payload that fails the check is no issue of this repository. The listing and the brain issue cache drop the record of such a number. Tests give a redirected answer for each read path and for each write path that reads back.

Acceptance Criteria

  • Test first: issue, item, issue_body and each write that reads back give no record, and send no write, for an answer with another number or another repository. The tests fail on the base.
  • A test: a listing round drops the record of a number whose read answers for another issue, and no row selects it again.
  • A test: an answer for the requested number and repository reads as today.

Environment Diagnostics

devops-cli 0.223.0.

Dependencies

None.

Activity

  1. added
    type/bug
    on Nov 26, 2026
  2. dan-petty commented on Nov 26, 2026

    @dan-petty
    OwnerAuthor
    • Priority: The store returns a wrong issue and can allow a write to the wrong issue, which is a data-integrity risk.
    • Related: fix(roadmap): remove cached issues when a repository becomes private #7298, which asks for a different change. Both items make the store drop a record that no longer belongs, but #7298 handles a repo becoming private while this handles a transferred issue.
  3. added
    scope/github
    source/agent
    status/new
    value/medium
    effort/medium
    priority/p1-high
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 26, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 26, 2026
  5. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-26 21:04 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/p1-highscope/githubsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions