Skip to content

fix(linear): batch the issue-state filter as an and per issue - #361

Merged
baldurpan merged 1 commit into
mainfrom
358-linear-ignores-the-batched-issue-state-filter-so
Nov 23, 2026
Merged

baldurpan merged 1 commit into
mainfrom
358-linear-ignores-the-batched-issue-state-filter-so

Conversation

@baldurpan

Copy link
Copy Markdown
Contributor

Closes #358

What changed

An issue moved to another team still reads state unknown under its old identifier. Neither filter shape finds it, and that is the conservative answer recorded on #215.

Gates

  • Gate 1: every section of context/verify.md exited 0.
    • pnpm check passed with 51 warnings and no errors; the warnings were already there and are in files this change does not touch.
    • Typecheck (root and docs), build (CLI, docs, worker bundle-check) and pnpm docs:audit-dist passed.
    • pnpm test passed 3826 tests and pnpm docs:test passed 1655.
    • The test-marker grep came back clean.
  • Gate 2 used the reviewer subagent.
    • The first pass was FAIL. The one blocking item was the test comment, which still credited D6, the broken shape. It was fixed in one loop.
    • The second pass was PASS WITH NOTES, with nothing blocking.

Notes from the review, not acted on

  • The first sentence of the new comment in linear.ts describes what the code does.
  • The changeset says "every Linear issue". "Each linked Linear issue" would be more exact, given the moved-issue case above.
  • Plan linear-cleanup-signal #114's D6 still records the old shape; it is a closed feature's body.

Linear does not apply an `or` whose elements each carry two fields
(team key and number): it answers with issues from across the
workspace and no error, so `list --issues` and `cleanup` read most
Linear worktrees as state unknown. Each element is now an `and` of two
single-field filters, the shape #358 measured returning exactly the
issues asked for.

Closes #358

@baldurs-reviewer baldurs-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code-reviewer: looks good

The batch issue-state lookup now sends each or element as an and of a team-key filter and a number filter. Before, each element put both fields in one object, which Linear silently ignored. The tests now assert the new variables shape, and a patch changeset is added. The change is small and consistent, issueStatesFilter is the only producer of the filter, and I found nothing that needs changing; the fix itself rests on the live measurement recorded in #358, which unit tests cannot confirm.


Reviewed 3b83d9c for baldurpan · claude-opus-5-5 · 3 files · $0.22

@baldurpan
baldurpan merged commit 29bd470 into main Nov 23, 2026
2 checks passed
@baldurpan
baldurpan deleted the 358-linear-ignores-the-batched-issue-state-filter-so branch November 23, 2026 13:39
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.

Linear ignores the batched issue-state filter, so list --issues and cleanup read most issues as state unknown

1 participant