Skip to content

fix(linear): restore OAuth auth in idempotent create helper - #34

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

fix(linear): restore OAuth auth in idempotent create helper#34
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-d439

Conversation

@cursor

@cursor cursor Bot commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • fix createIssueSingleAttempt to build the Authorization header via authHeader() instead of reading APIKey directly
  • this restores OAuth client-credentials compatibility for CreateIssueIdempotent call paths
  • add regression coverage in TestCreateIssueIdempotentOAuthUsesBearerHeader

Critical bug and impact

In OAuth-configured environments (LINEAR_OAUTH_CLIENT_ID/LINEAR_OAUTH_CLIENT_SECRET), idempotent issue creation sent an empty/non-bearer auth header on the single-attempt mutation path. This caused deterministic 401 failures for affected create flows (notably duplicate-title single-create fallback during batch push), preventing issue creation and breaking sync/push behavior.

Validation

  • CGO_ENABLED=1 go test -tags gms_pure_go ./internal/linear -run '^TestCreateIssueIdempotentOAuthUsesBearerHeader$'
  • CGO_ENABLED=1 go test -tags gms_pure_go ./internal/linear -run '^TestCreateIssueIdempotent'
  • CGO_ENABLED=1 go test -tags gms_pure_go ./internal/linear/...

(Repo-wide make test has unrelated environment failures in this run, including missing dolt binary in unrelated packages.)

Open in Web View Automation 

Co-authored-by: Kev Glynn <kev-pryon@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