GH-92: feat(linear): implement SyncCapable — cursor-followed delta, taxonomy StateGroup, field writes#94
Merged
Merged
Conversation
Adds SyncAdapter, a *Client-backed implementation of core.SyncCapable (SyncSource + SyncWriter) for board sync: ListUpdatedSince/ListAll follow the #85 cursor convention page-by-page and map to core.IssueSnapshot with StateGroup carrying Linear's workflow-state type (backlog/unstarted/ started/completed/canceled); GetIssue, UpdateFields (title/description/ labels/priority via issueUpdate), TransitionState (existing UpdateIssueState), AddComment (idempotent via a pilot-op:{idemKey} HTML marker scanned before reposting), and CreateIssue (team resolved from the projectID team-key param) round out the contract. Also adds the "url" field to Issue/issueListItem and their GraphQL selections, needed to populate IssueSnapshot.URL.
This was referenced Jul 13, 2026
Closed
Closed
alekspetrov
added a commit
that referenced
this pull request
Jul 13, 2026
…ated idem comment scan, on-or-after delta (post-merge review of #94) (#99) Post-merge review of #94 found four defects in sdk/integrations/linear/sync.go: TransitionState sent a state NAME straight through as a GraphQL stateId (round-trip broken); AddComment's idempotency scan only checked the first comments page, letting retries duplicate-post once a marker fell off page 1; ListUpdatedSince used gt+second-truncated timestamps, silently dropping issues updated exactly at the watermark; and UpdateFields silently ignored unknown keys and wrongly-typed values instead of rejecting the patch.
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.
Summary
Automated PR created by Pilot for task GH-92.
Closes #92
Changes
GitHub Issue GH-92: feat(linear): implement SyncCapable — cursor-followed delta, taxonomy StateGroup, field writes
Context
SaaS pre-work S0.9. Implements the #83
SyncCapablecontract for Linear, building on the cursor/delta work.Depends on: #85
Implementation
In
sdk/integrations/linear, implementcore.SyncCapable:ListUpdatedSince/ListAll: the fix(linear): follow GraphQL cursors past first:50 + add updatedAt delta filter #85 cursor-followed queries; map toIssueSnapshot(State = workflow state name; StateGroup = workflow statetype— backlog/unstarted/started/completed/canceled; SequenceID = the PROJ-42 identifier; Priority viacore.NormalizePriority).GetIssueby Linear issue id.UpdateFields: GraphQL issueUpdate for title/description/labels/priority.TransitionState: existingUpdateIssueState(target = workflow state id/name).AddCommentwith<!-- pilot-op:{idemKey} -->marker idempotency (scan before repost).CreateIssuefromIssueDraft(team derived from projectID param).Acceptance
Refs