Skip to content

fix(linear): comment history query declares its variables with the types Linear expects - #105

Open
as-cto wants to merge 1 commit into
getpaseo:mainfrom
as-cto:pr/linear-history-issue-id
Open

fix(linear): comment history query declares its variables with the types Linear expects#105
as-cto wants to merge 1 commit into
getpaseo:mainfrom
as-cto:pr/linear-history-issue-id

Conversation

@as-cto

@as-cto as-cto commented Sep 2, 2026

Copy link
Copy Markdown

PaseoIssueCommentHistory declares $issueId: String! and $before: DateTime!, but uses them where Linear's schema expects ID (IDComparator.eq) and DateTimeOrDuration (DateComparator.lt). Linear rejects the document at validation time:

Variable "$issueId" of type "String!" used in position expecting type "ID"

So every comment-thread hydration fails (linear.issue.history.hydrate failed on each comment run) and the agent answers without the previous turns of the thread. Observed on a self-hosted hub against a real workspace; replaying the same query with ID! and DateTimeOrDuration! succeeds. PaseoComment keeps String!, since CommentCreateInput.issueId is a String.

The DateTimeOrDuration half is already in #88 (reported there earlier); this PR makes the query valid on main on its own and merges cleanly ahead of or after #88. Test asserts both variable types and the filter position.

Validation: vitest run src/providers/linear/client.test.ts (8 passed), oxfmt --check, oxlint on the two files.

…pes Linear expects

`PaseoIssueCommentHistory` declared `$issueId: String!` and `$before: DateTime!`, but uses
them in `issue: { id: { eq: $issueId } }` (an `IDComparator`, which expects `ID`) and
`createdAt: { lt: $before }` (a `DateComparator`, which expects `DateTimeOrDuration`). Linear
rejects the document at validation time (`Variable "$issueId" of type "String!" used in
position expecting type "ID"`), so every comment-thread hydration failed and agents answered
without the previous turns of the thread. Observed on a self-hosted hub; replaying the query
with `ID!` and `DateTimeOrDuration!` succeeds. The `PaseoComment` mutation keeps `String!`:
`CommentCreateInput.issueId` is a `String`.

The `DateTimeOrDuration` half is already carried by getpaseo#88; this commit makes the query valid on
main on its own.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.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