Skip to content

fix(mcp): bound the gh resources longer than a GitHub read #4678

Closed
1 of 1 issue completed
Closed

Description

@dan-petty

Problem or Motivation

#4626 (PR #4636) bounds each GitHub session read at 60 s: DEFAULT_GH_SESSION_READ_TIMEOUT_SECONDS in src/devops_cli/config/defaults.py. Some MCP calls that hold a GitHub session read have a shorter bound. Thus the owner rule of 2026-11-11 (each inner timeout is shorter than the call around it) still fails on a real path.

  • The resource resource://gh/issues/status (src/devops_cli/ai/mcp/server.py:194-200) runs devops gh issues status with timeout=DEFAULT_MCP_TOOL_FAST_TIMEOUT_SECONDS (30 s).
  • That command calls get_issues_summary (src/devops_cli/github/issues.py:456). It opens GitHubRoadmapStore through get_roadmap_store (src/devops_cli/roadmap/stores/store.py:1116). items() reads _every_issue() and _listing, which reads through get_github_session() (src/devops_cli/roadmap/stores/github_store.py:1200-1202).
  • When the 30 s bound ends, the in-process dispatch returns 124 Command timed out (src/devops_cli/ai/mcp/dispatcher.py:385-387). A silent GitHub read waits 60 s, so the MCP call stops first and the GitHubUnreadError of the session read is lost.
  • The resources gh pages status, gh project status and gh views audit (server.py:185-191, 203-209, 212-218) have the same 30 s bound.
  • DEFAULT_MCP_TOOL_SHORT_TIMEOUT_SECONDS is 60 s. This is the default bound of _run_mcp_cmd and of the dispatcher. It is equal to the read bound, not longer.

Two merged documents state the opposite:

  • openspec/changes/archive/2026-11-11-4626-bound-the-github-session-read-at/design.md:15 rejects the MCP tool call from the chain because "an MCP tool call does not hold a GitHub session read, and 30 s is shorter than 60 s".
  • docs/adr/0006-github-session-requests-go-through-gidgethub.md:5 says "The read bound is shorter than each of these calls (fix(github): bound the GitHub session read at 60 seconds #4626)".

The chain test tests/github/test_github_session_timeouts.py (_CHAIN) has no MCP bound, so it does not find this.

Proposed Solution & Architectural Design

  • Give each MCP resource that reads GitHub a bound that is longer than the session read bound: DEFAULT_MCP_TOOL_TIMEOUT_SECONDS (300 s) for the 4 gh resources. A listing reads more than one page, so the outer bound must also hold more than one read.
  • Add the MCP bound of these resources to the chain test as an outer bound of DEFAULT_GH_SESSION_READ_TIMEOUT_SECONDS.
  • Correct the "Rejected alternatives" entry of the archived design of fix(github): bound the GitHub session read at 60 seconds #4626 and the ADR 0006 sentence "The read bound is shorter than each of these calls".

Alternative: make the session read bound shorter than 30 s (for example 20 s, which is still 2 times the 10 s limit of GitHub REST). This changes every GitHub read, so the first option is smaller.

Target Subsystem

MCP server (src/devops_cli/ai/mcp/server.py), GitHub session (src/devops_cli/config/defaults.py), ADR 0006.

Existing Tool Considered

The timeout argument of the FastMCP dispatcher that exists. No new tool. Cost: about 20,000 tokens and 30 minutes to build.

Acceptance Criteria

  • A test finds that the MCP bound of each gh resource is longer than DEFAULT_GH_SESSION_READ_TIMEOUT_SECONDS.
  • The chain test holds the MCP bound as an outer bound of the session read bound, and fails when the MCP bound is not longer.
  • ADR 0006 and the archived design of fix(github): bound the GitHub session read at 60 seconds #4626 do not say that the read bound is shorter than each call around it when it is not.

Dependencies

Follow-up of #4626 (PR #4636, merged). Part of the project brain plan #4624.

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

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

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/mcp. The (mcp) scope of the title gives the scope.
    • Priority: P2-Medium. A real MCP path silently drops a GitHubUnreadError, but the impact is limited to four resource endpoints.
    • Value: Medium. Fixes a silent failure path in MCP resources that users rely on for status queries.
    • Effort: Low. Change one constant, add one test assertion, and correct two documents; the body estimates 30 minutes.
    • Related: fix(github): bound the GitHub session read at 60 seconds #4626, which asks for a different change. Both work on the GitHub session read timeout chain; #4626 delivers the 60 s inner bound, the candidate delivers a longer outer bound for MCP resources.
  3. added
    priority/p2-medium
    owner/agent
    on Nov 11, 2026
  4. added
    status/in-progress
    and removed
    status/new
    on Nov 11, 2026
  5. removed
    status/in-progress
    owner/agent
    on Nov 11, 2026
  6. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor
  7. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 22:57 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/lowpriority/p2-mediumscope/mcpsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions