Skip to content

fix: Server-side auto-kickoff label filter and Linear OAuth proxy path - #596

Merged
Ziinc merged 3 commits into
mainfrom
claude/linear-kickoff-label-filter
Sep 30, 2026
Merged

Ziinc merged 3 commits into
mainfrom
claude/linear-kickoff-label-filter

Conversation

@Ziinc

@Ziinc Ziinc commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Rebased onto main. This PR now carries two changes, one commit set each:

  1. fix: Find auto-kickoff issues with a server-side label filter
  2. test: Cover auto-kickoff issue selection against a mock server
  3. fix: Route OAuth-connected Linear calls through linear-proxy (#597)

Rebase conflicts

The conflicts were between #597 and #601, which is now in main. The resolution keeps #601's rule of one workspace per call and applies #597's client routing:

  • linear_open_or_create_workspace_from_issue fetches the issue through the resolved client (API key or proxy) and opens exactly one workspace.
  • kickoff_linear_issue_internal(repo_path, client, issue_id) has no sub-issue loop and no parent bookkeeping.

Label filter: problem

The poller fetched the first 100 workspace issues and filtered them by label locally:

  • Labeled issues outside that window were never kicked off.
  • KickoffLedger::due() drops ids missing from the list. A handled issue that left the window and came back was then kicked off again.
  • Completed and canceled labeled issues were kicked off too.

Label filter: change

  • linear_list_labeled_issue_ids_impl asks Linear for open labeled issues only: labels.some.name.eqIgnoreCase plus state.type nin [completed, canceled]. It fetches ids only, across all pages.
  • More than 5,000 matches is an error, not a silent truncation, so the ledger is never pruned against a partial list.

Testing after the rebase

  • cargo test --lib -- linear tracker: 48 pass. The 2 failures are the core::workspaces tests that need the jj binary, which isn't installed in the sandbox. They fail the same way on main.
  • clippy -D warnings and cargo fmt --check pass.
  • Unit suite passes (151 files, 809 tests), plus tsc, eslint, biome and ast-grep scan --warning.
  • deno check and deno fmt --check pass on linear-proxy.
  • Integration tests pass after build:napi: linear-kickoff-agent-prompt, issue-kickoff-flow, session-started-toast and tracker-kickoff-agent-prompt (11 tests).
  • Red→green evidence for the label filter tests is in this PR's earlier description; for the proxy tests it is in fix: Route OAuth-connected Linear calls through linear-proxy #597.
    🤖 Generated with Claude Code
    https://claude.ai/code/session_015cmSSvMnu4gc6NhMhKrt2v

Base automatically changed from claude/linear-issue-pagination to main September 29, 2026 13:31
claude and others added 3 commits September 29, 2026 19:16
The poller listed the first 100 issues in the workspace and filtered by
label locally. Labeled issues outside that window were never kicked off,
and because the ledger prunes ids missing from the list, a handled issue
that fell out of the window and came back was kicked off again. Completed
and canceled issues with the label were kicked off too, which bit anyone
configuring a label for the first time.

Query Linear for open issues carrying the label (case-insensitive), ids
only, following every page. If the list would exceed 5,000 issues the poll
fails instead of pruning the ledger against a partial list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015cmSSvMnu4gc6NhMhKrt2v
Drives linear_list_labeled_issue_ids_impl, the poller's candidate
lookup. It must find a labeled issue that an unfiltered first page
would miss, skip completed and canceled issues, and fail rather than
return a truncated list the ledger would prune against. All three fail
against the previous poller logic (first 100 issues, label filtered
locally).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015cmSSvMnu4gc6NhMhKrt2v
Co-authored-by: Claude <noreply@anthropic.com>
@Ziinc
Ziinc force-pushed the claude/linear-kickoff-label-filter branch from 0ef18df to 5f95ed2 Compare September 29, 2026 19:23
@Ziinc Ziinc changed the title fix: Find auto-kickoff issues with a server-side label filter fix: Server-side auto-kickoff label filter and Linear OAuth proxy path Sep 29, 2026
@Ziinc
Ziinc merged commit 6931c63 into main Sep 30, 2026
27 of 28 checks passed
@Ziinc
Ziinc deleted the claude/linear-kickoff-label-filter branch September 30, 2026 04:25

This branch was successfully deployed

1 active deployment
preview — 5f95ed28 Deployed Sep 29, 2026 by Ziinc via build #1539
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