Skip to content

fix(linear): avoid whole-batch failure when unrelated team cache breaks - #39

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

fix(linear): avoid whole-batch failure when unrelated team cache breaks#39
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-88fb

Conversation

@cursor

@cursor cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown

Summary

  • fix linear.Tracker.BatchPush to load workflow state caches lazily per team instead of preloading every configured team
  • prevent an outage in an unrelated/misconfigured secondary Linear team from aborting pushes for healthy teams
  • keep create paths using primary-team cache while update paths resolve and cache only the team they actually route to

Bug impact

In multi-team setups, the previous eager cache bootstrap failed the entire batch when any configured team returned an error from TeamStates, even when no issue in the current push targeted that team. This caused complete push failures for healthy teams.

Validation

  • CGO_ENABLED=1 go test -tags gms_pure_go ./internal/linear -run 'TestBatchPush_DoesNotFailOnUnusedBrokenTeam|TestBatchPush_PerTeamStateCache'
  • CGO_ENABLED=1 go test -tags gms_pure_go ./internal/linear
  • make test (fails in this environment due existing unrelated setup issues: cmd/bd and internal/storage/dolt tests require external dependencies such as dolt binary / host behavior)
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