Skip to content

adapters/linear: TestRateLimitDeadlineReturnsTypedRateLimited flakes under -race #109

Closed

Description

@ThomasK33

TestRateLimitDeadlineReturnsTypedRateLimited in adapters/linear failed once under -race during local validation of #108:

harden_capability_test.go:209: err = Post "http://127.0.0.1:38387/graphql": context deadline exceeded, want *linear.RateLimited (deadline-bounded, not slept off)

The run was GOFLAGS=-race mise run test with Go 1.27.1, while other module tests ran in parallel. The test passed 10 of 10 times with go test -race -count=10 -run TestRateLimitDeadlineReturnsTypedRateLimited ./adapters/linear/. #108 did not change the root module's go.mod or go.sum.

Likely cause (I did not verify this): the test gives PostThought a 50 ms context. On a loaded machine under -race, the first POST to the test server can take longer than 50 ms, before the 429 reply arrives. The client then returns a plain context deadline exceeded instead of *linear.RateLimited.

To reproduce, run the test under CPU load, for example with -race -count=200 -cpu=1 while another heavy test suite runs.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Activity

  1. added
    needs-triageMaintainer needs to evaluate this issue
    bugSomething isn't working
    ready-for-agentFully specified, ready for an AFK agent
    and removed
    needs-triageMaintainer needs to evaluate this issue
    on Oct 13, 2026
  2. ThomasK33 commented on Oct 13, 2026

    @ThomasK33
    MemberAuthor

    Triage: accepted as a test flake. The issue has a repro and a likely cause, so it is ready for an agent. Acceptance: the test passes reliably under -race -cpu=1 with CPU load, and it still asserts that a 429 inside the deadline returns *linear.RateLimited. Don't weaken the assertion.


    Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: medium

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

    bugSomething isn't workingready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions