Skip to content

fix(config): add projectId to LinearConfigSchema (Zod was stripping it)#1142

Merged
zbigniewsobiecki merged 1 commit intodevfrom
fix/linear-projectid-zod-schema
Apr 18, 2026
Merged

fix(config): add projectId to LinearConfigSchema (Zod was stripping it)#1142
zbigniewsobiecki merged 1 commit intodevfrom
fix/linear-projectid-zod-schema

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

PR #1138 added projectId to the configMapper so it would survive the DB → ProjectConfig translation. But Zod's LinearConfigSchema in src/config/schema.ts didn't declare projectId — and z.object() defaults to strip mode, silently removing unknown keys during .parse().

Verified live in the dev router container:

project.linear.teamId:    310c41fe-... ← preserved
project.linear.projectId: UNDEFINED    ← stripped by Zod
CASCADE_LINEAR_PROJECT_ID: NOT SET     ← never injected

Result: new Linear issues created by splitting/planning agents had no project assignment, despite the configMapper fix being deployed.

Fix

One-line addition: projectId: z.string().optional() in LinearConfigSchema.

Test plan

  • New test: preserves linear.projectId through validation
  • New test: treats linear.projectId as optional
  • Full suite: 7893 tests pass
  • Typecheck + lint clean
  • Deploy to dev, trigger splitting run, verify new Linear issues have project assigned

🤖 Generated with Claude Code

…ng it

PR #1138 added projectId to the configMapper, but Zod's
LinearConfigSchema didn't declare projectId — and z.object() defaults
to "strip" mode, silently removing unknown keys during .parse(). So
projectId survived the mapper but got dropped by validateConfig(),
never reaching augmentProjectSecrets() or the LinearPMProvider.

Result: new Linear issues created by splitting / planning agents had
no project assignment despite the configMapper fix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit 37540c5 into dev Apr 18, 2026
8 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/linear-projectid-zod-schema branch April 18, 2026 09:18
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 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.

1 participant