fix(linear): pass projectId for credential resolution to worker#1118
Merged
zbigniewsobiecki merged 1 commit intodevfrom Apr 15, 2026
Merged
fix(linear): pass projectId for credential resolution to worker#1118zbigniewsobiecki merged 1 commit intodevfrom
zbigniewsobiecki merged 1 commit intodevfrom
Conversation
Linear jobs were not handled by extractProjectIdFromJob, so the router returned null and skipped credential resolution. Workers spawned with no credentials, then fell back to the DB and died with "Credential is encrypted but CREDENTIAL_MASTER_KEY is not set" because workers intentionally don't receive the master key. Linear jobs already carry projectId on their payload (set by LinearRouterAdapter.buildJob), so the fix is a single branch in the projectId extractor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Apr 15, 2026
zbigniewsobiecki
added a commit
that referenced
this pull request
Apr 18, 2026
Task 4: src/integrations/entrypoint.ts centralises every PM/SCM/alerting registration barrel. Router, worker, CLI bootstrap, and dashboard all side-effect-import this single file — no per-surface list of imports that can drift when a new provider is added. Previously dashboard.ts didn't register any PM providers at all, which is also fixed here. Task 5: tests/unit/integrations/entrypoint-usage.test.ts grep-asserts the invariant that every process entry file imports src/integrations/entrypoint.js. Missing this import was the root cause of #1097, #1118, #1131, #1134 — the test references those bug numbers in its failure message. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
5 tasks
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
Linear webhook → trigger → job dispatch → worker spawn was completing, then immediately dying with
Credential is encrypted but CREDENTIAL_MASTER_KEY is not set. Cannot decrypt.in the worker.Root cause
src/router/worker-env.ts:22extractProjectIdFromJobhad branches fortrello,jira,github,manual-run,retry-run,debug-analysis— but no case forlinear. Linear jobs returnednull, so the router skipped credential resolution and spawned the worker with no project credentials. The worker then fell back to reading credentials from the DB directly and died because workers intentionally don't get the master key (perworker-env.ts:121: "CREDENTIAL_MASTER_KEY is intentionally NOT passed to workers").Linear jobs already carry
projectIdon the job payload (set byLinearRouterAdapter.buildJobatsrc/router/adapters/linear.ts:229).Fix
One-line: add
linearto the trello/jira branch in the projectId extractor.Reproduction
Move a Linear issue to a configured agent-triggering state (e.g. Planning) on a project with encrypted credentials. Worker logs:
Test plan
tests/unit/router/container-manager.test.ts > extractProjectIdFromJob > returns projectId for linear jobs🤖 Generated with Claude Code