Skip to content

fix(linear): dedupe batch creates via idempotency pre-check - #24

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

fix(linear): dedupe batch creates via idempotency pre-check#24
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-afa2

Conversation

@cursor

@cursor cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Summary

  • prevent duplicate Linear issue creation in batch sync by pre-checking each issue's idempotency marker before calling issueBatchCreate
  • reuse already-created Linear issues discovered by marker search and only batch-create unresolved inputs
  • keep ambiguous-failure recovery scoped to the pending subset after pre-check filtering

Bug and impact

When a prior sync created a Linear issue but failed to persist local external_ref (or returned an ambiguous batch failure), the next sync retried issueBatchCreate without checking existing markers. That could create duplicate external issues for the same bead.

Validation

  • CGO_ENABLED=1 go test -tags gms_pure_go ./internal/linear
  • make test (still fails on pre-existing/environmental suites unrelated to this change: cmd/bd unreachable-host assertion and internal/storage/dolt missing dolt binary in PATH)
Open in Web View Automation 

Co-authored-by: Kevin Glynn <kevglynn@Gmail.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