Skip to content

fix(linear): use OAuth auth header for idempotent creates - #36

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-5bdb
Draft

fix(linear): use OAuth auth header for idempotent creates#36
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-5bdb

Conversation

@cursor

@cursor cursor Bot commented Jul 16, 2026

Copy link
Copy Markdown

Summary

  • fix createIssueSingleAttempt to use authHeader() instead of APIKey directly
  • this restores OAuth client-credentials support in the idempotent create path
  • add regression coverage in internal/linear/idempotency_test.go to assert bearer-token auth is used

Bug

CreateIssueIdempotent calls createIssueSingleAttempt, which was setting Authorization to c.APIKey. In OAuth mode, APIKey is empty, so idempotent issue creation could fail with unauthorized responses.

Validation

  • CGO_ENABLED=1 go test -tags gms_pure_go ./internal/linear -run 'TestCreateIssue(Idempotent_OAuthUsesBearerToken|EmbedsMarker|Dedups|IdempotentRecoverAfterAmbiguousFailure)'
  • make test (fails in this environment due unrelated pre-existing failures: TestTestServerConnection/unreachable_host and internal/storage/dolt tests needing dolt in PATH)
Open in Web View Automation 

Co-authored-by: Medhaug <Medhaug@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant