Repository navigation
fix(linear): accept team keys that start with a digit - #23423
AmethystLiang merged 1 commit into
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — this run reviewed the complete PR (single commit, 2 files): the widened Linear identifier pattern and its tests.
- Digit-first team keys accepted —
LINEAR_IDENTIFIER_PATTERNnow requires an alphanumeric first character plus at least one letter anywhere in the team key, so4K-12parses both bare and from alinear.app/<org>/issue/4K-12URL. - Date-like input still rejected — the positive lookahead cannot cross the
-separator (it is outside[A-Za-z0-9_]), so2026-09,123-45, and letter-less keys remain rejected; the change only widens the accepted set. - Single-surface change — both
parseLinearIssueInputandparseLinearIssueUrlIntentshare the constant, and every downstream caller (issue-link input, smart-workspace intent, CLI, renderer, main-process issue context) inherits it; no parallel Linear identifier regex exists. - Tests — new positive cases for
4k-12, the URL form, andbuildLinearIssueLinkUpdates, plus a negative2026-09case; the new positive cases fail against the old pattern, so they are meaningful coverage. Verified19/19pass locally.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Linear identifier pattern now accepts team keys that start with a digit if they contain at least one letter. Tests cover bare identifiers, issue URLs, rejection of numeric-only team keys, and link-update behavior. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Digit-leading Linear team keys containing letters are now accepted while numeric-only keys and non-HTTP(S) URLs remain rejected. No merge-blocking risk is evident. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ction Main already provides numeric-leading team-key support via stablyai#23423. Retain its parser and workspace source flow, port the regression corpus to the renamed module, and cover normalized identifiers and strict URL intent in the workspace picker.
Expand numeric-leading Linear identifier coverage in the current parser and workspace source flow while rejecting numeric-only team keys in bare inputs and URLs. Main already implements the production behavior through #23423. Repair two stale localization test assumptions found by full CI. All changes are regression tests. Validation: 369 focused tests across 46 suites, local typechecking/lint/formatting, and full final-head CI passed. Co-authored-by: Ken Fukuyama <[email protected]>

ELI5
Some Linear teams use a short key that starts with a number (for example
4K, so issues look like4K-12). Orca treated those as invalid when linking a worktree, even though letter-first keys likeSTA-335worked.What Changed
LINEAR_IDENTIFIER_PATTERNrequired the team key to start with a letter, so bare4K-12andhttps://linear.app/.../issue/4K-12were rejected.4K-12parses and links. Purely numeric keys such as2026-09stay rejected.Why
Linear allows digit-first team keys; the old regex was stricter than Linear's own identifiers. The lookahead keeps a letter somewhere in the key so date-like bare text is not mistaken for an issue id.
Linked Issue
Fixes #23422
Visual Proof
N/A — parsing only; no UI change.
Testing
pnpm exec vitest run --config config/vitest.config.ts src/shared/linear/links.test.tspnpm exec oxfmt --check src/shared/linear/links.ts src/shared/linear/links.test.ts— clean.AI Disclosure
Review
Self-review notes:
2026-09retained.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Two files only:
src/shared/linear/links.tsandsrc/shared/linear/links.test.ts.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)