Skip to content

Merge dev to main: Linear router resolveProject fix#1338

Merged
zbigniewsobiecki merged 5 commits into
mainfrom
dev
May 11, 2026
Merged

Merge dev to main: Linear router resolveProject fix#1338
zbigniewsobiecki merged 5 commits into
mainfrom
dev

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

Test plan

  • dev CI green pre-merge
  • Watch main CI + Build and Deploy after merge
  • Post-deploy: user re-moves MNG-638 to Todo → expect implementation agent fires on ucho project (NOT cascade)

🤖 Generated with Claude Code

aaight and others added 5 commits May 11, 2026 11:59
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
… miss)

PR #1332 fixed `parseWebhook` to select the right cascade project by team
+ Linear-Project scope, but missed `resolveProject` at the same file
(line 227-230) which re-looks up by `event.projectIdentifier` (the
teamId) and uses the same `.find()` first-match pattern.

Live evidence from 2026-05-11 prod: webhook ddcee404 body had
`data.projectId: 7108c72e-...` (ucho scope); run d58cd8ab dispatched
with projectId=cascade, cloned mongrel-intelligence/cascade. Agent
correctly identified the workspace/work-item mismatch and filed a
friction report.

Fix: resolveProject uses event.projectId (cascade project id
parseWebhook already determined) when present, falling back to teamId
lookup only for legacy bare-event callers.

Audit of all .find() shadow sites — only Linear resolveProject needed
fixing. webhookVerification.ts Linear lookup is harmless because Linear
webhook secrets are team-scoped. findProjectByLinearTeamId is dead code.
JIRA / Trello / GitHub adapters have naturally unique-per-cascade-project
discriminators.

Tests: extended resolveProject describe block with multi-cascade-project-
per-team sub-describe covering: returns ucho regardless of array order,
returns cascade for cascade events, null fail-closed when projectId is
unconfigured, and legacy bare-event teamId-fallback compat. All 49
LinearRouterAdapter tests pass; full suite (9307 unit tests) clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…resolveProject-shadow

fix(router): use event.projectId in Linear resolveProject (closes #1332 miss)
@zbigniewsobiecki zbigniewsobiecki merged commit d0cd568 into main May 11, 2026
15 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 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.

2 participants