Skip to content

Promote dev to main: forward project credentials to sentry-bound workers#1260

Merged
zbigniewsobiecki merged 1 commit intomainfrom
dev
May 6, 2026
Merged

Promote dev to main: forward project credentials to sentry-bound workers#1260
zbigniewsobiecki merged 1 commit intomainfrom
dev

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Promotes #1259 to main.

Summary

extractProjectIdFromJob had no sentry branch, so sentry jobs hit the return null fall-through and worker spawn skipped credential loading entirely. First sentry-bound agent run in prod (cascade project, 2026-05-06) crashed on boot. One-line fix + regression test.

Test plan

🤖 Generated with Claude Code

`extractProjectIdFromJob` had no `sentry` branch, so sentry jobs hit the
`return null` fall-through and `buildWorkerEnvWithProjectId` skipped
credential loading entirely (the `if (projectId)` gate). Worker spawned
without `CASCADE_CREDENTIAL_KEYS`, the in-worker resolver auto-selector
fell back to `DbCredentialResolver`, hit an encrypted row, and crashed
with "CREDENTIAL_MASTER_KEY is not set" — workers intentionally don't
have the master key.

This was the first sentry-bound agent run in prod (cascade project,
2026-05-06 12:48 UTC). The router pipeline succeeded end-to-end; only
the worker boot failed.

Add the `sentry` branch (sentry jobs carry `projectId` directly per
`SentryJob.projectId`) and pin the regression in the worker-env unit
test.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit 1c57bbe into main May 6, 2026
14 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/router/worker-env.ts 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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