linear: cursor pagination + set entry from createdAt#1196
Merged
ryneeverett merged 2 commits intoGothenburgBitFactory:developfrom Apr 8, 2026
Merged
linear: cursor pagination + set entry from createdAt#1196ryneeverett merged 2 commits intoGothenburgBitFactory:developfrom
ryneeverett merged 2 commits intoGothenburgBitFactory:developfrom
Conversation
The Linear GraphQL service issued a single query without ``first:`` or cursor pagination, so Linear's Relay-style ``issues`` connection returned only its default page size (50 issues) and any remaining matches were silently dropped. Workspaces with more than 50 matching issues had the overflow missing from taskwarrior on every pull. Add ``first: 250`` (Linear's documented maximum) and follow ``pageInfo.endCursor`` until ``hasNextPage`` is false. ``get_issues`` becomes a generator that streams pages, so memory stays flat regardless of total issue count. ``issues()`` already iterated lazily, so no caller updates are needed. Add a test that registers two paginated mock responses and asserts both pages' issues are returned and that the second request carries the cursor returned by the first.
Without this, freshly imported Linear issues have ``entry`` set to the local pull time, so ``entry.age`` and the urgency age coefficient see every imported issue as brand-new regardless of its real upstream age. Mirrors the pattern already used by several other services.
ryneeverett
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two related fixes for the Linear service.
1. Pagination
The Linear GraphQL service issues a single query without
first:or cursor pagination, so Linear's Relay-styleissuesconnection returns only its default page size (50 issues) and any remaining matches are silently dropped. Workspaces with more than 50 matching issues miss the overflow on every pull.The fix requests
first: 250(Linear's documented maximum) and followspageInfo.endCursoruntilhasNextPageis false.get_issuesbecomes a generator that streams pages, so memory stays flat regardless of total issue count. Theissues()caller already iterated lazily, so no caller updates are needed.A new test (
test_issues_paginates) registers two paginated mock responses and asserts both pages' issues are returned and that the second request carries the cursor returned by the first.2. Set
entryfrom LinearcreatedAtWithout this, freshly imported Linear issues have
entryset to the local pull time, soentry.ageand the urgency age coefficient see every imported issue as brand-new regardless of its real upstream age. Mirrors the pattern already used by several other services.The existing
test_to_taskwarriorandtest_issuesdict-equality assertions are updated to expect the new key.