Skip to content

feat(github): board-GraphQL partial-data tolerance (TASK-319)#3610

Merged
alekspetrov merged 1 commit into
mainfrom
pilot/GH-3609
Jun 16, 2026
Merged

feat(github): board-GraphQL partial-data tolerance (TASK-319)#3610
alekspetrov merged 1 commit into
mainfrom
pilot/GH-3609

Conversation

@alekspetrov

Copy link
Copy Markdown
Collaborator

Summary

  • Adds ExecuteGraphQLTolerant to client.go — an opt-in variant that classifies NOT_FOUND/FORBIDDEN as tolerable per-node errors, unmarshals Data alongside a typed *PartialGraphQLError, and treats every other error type (incl. RATE_LIMITED, empty Type) as fatal.
  • ExecuteGraphQL is unchanged (delegates to a shared executeGraphQLCore with tolerant=false).
  • Switches FindIssuesFromProject in project_source.go to ExecuteGraphQLTolerant: logs dropped-node count on partial pages, retains good nodes, and continues pagination — only fatal errors abort.

Test plan

  • TestExecuteGraphQLTolerant: partial (FORBIDDEN/NOT_FOUND) → *PartialGraphQLError + data populated; fatal (RATE_LIMITED, empty Type) → fatal error; mixed tolerable+fatal → fatal; no errors → nil
  • TestExecuteGraphQL_StrictUnchanged: FORBIDDEN/NOT_FOUND still fatal in strict mode
  • TestFindIssuesFromProject_PartialPage: good nodes retained, pagination continues across second page
  • TestFindIssuesFromProject_PartialNotFound: NOT_FOUND variant
  • TestFindIssuesFromProject_FatalErrorAborts: RATE_LIMITED aborts and propagates error
  • make lint clean, make test-short green

…SK-319)

- Add PartialGraphQLError typed error and isTolerable() classifier (NOT_FOUND, FORBIDDEN)
- Add ExecuteGraphQLTolerant: unmarshals Data alongside tolerable errors; any non-tolerable
  or mixed tolerable+fatal response is fatal; no change to ExecuteGraphQL callers
- Refactor ExecuteGraphQL to share a private executeGraphQLCore (tolerant=false)
- Switch FindIssuesFromProject to ExecuteGraphQLTolerant: logs dropped-node count on
  partial pages, retains good nodes, continues pagination; fatal errors still abort
- Tests: partial/fatal/mixed/strict-unchanged in client_test.go; partial board page +
  pagination continuation + fatal-aborts in project_source_test.go
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/adapters/github/client.go 90.90% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@alekspetrov alekspetrov merged commit da0b304 into main Jun 16, 2026
3 checks passed
@alekspetrov alekspetrov deleted the pilot/GH-3609 branch June 16, 2026 11:53
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.

2 participants