Skip to content

test(linear): cover numeric-leading issue identifiers - #10241

Merged
nwparker merged 3 commits into
stablyai:mainfrom
kenfdev:fix/linear-numeric-leading-identifiers
Oct 5, 2026
Merged

nwparker merged 3 commits into
stablyai:mainfrom
kenfdev:fix/linear-numeric-leading-identifiers

Conversation

@kenfdev

@kenfdev kenfdev commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Digit-leading Linear team keys such as 2ENG-123, 1PASS-42, and 3D-15 must normalize correctly in explicit issue inputs and the new-workspace source picker, while numeric-only values such as dates, phone numbers, and ranges remain ordinary text.

Main already implements the parser and picker behavior through #23423. This PR is rebased onto current main and retains that implementation, porting the original regression coverage into src/shared/linear/links.test.ts and adding tests for the current bounded workspace source parser and strict URL intent.

The tests cover lowercase normalization, whitespace, organization-scoped issue URLs, and rejection of numeric-only team keys in both bare inputs and URLs. No production code changes remain, so existing platform, SSH, folder-workspace, and URL validation behavior is preserved.

Full CI also exposed two stale localization tests already present on main. The supported-agent fallback test now uses an explicitly empty locale bundle instead of assuming Spanish is untranslated; discard-description tests now assert the current translated copy for each locale. These are test-only repairs.

Validation:

  • 46 relevant test files passed, 369 tests: shared Linear links, shared new-workspace modules, renderer new-workspace modules, main Linear services, CLI worktree creation, and Linear CLI handler.
  • pnpm typecheck passed.
  • Oxlint and formatting checks passed for all four changed files.
  • Full PR Checks passed on the final head, including static analysis, typechecking, five unit-test shards, relay integration, and aggregate verify: https://github.com/stablyai/orca/actions/runs/37277039594
  • Mobile Checks, Headless Node server, and PR test LoC passed on the final head.

Original patch by @kenfdev.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated Linear issue identifier validation to allow prefixes beginning with digits and added a shared validation helper. Workspace intent detection now uses the helper, and tests verify uppercase normalization for bare and organization-scoped inputs such as 2eng-123 while preserving the organization URL key.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the behavior and testing, but it conflicts with the provided change summary and objectives: it says no production code changes remain, while the summary lists changes to the i… Reconcile the description with the actual diff and objectives. Add the required template sections, including a linked issue, visual proof or N/A with a reason, and any applicable checklist details.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the regression coverage for numeric-leading Linear issue identifiers. It focuses on tests, while the stated objective also includes identifier parsing behavior, but it rema…
Full details: Description check

Explanation

The description explains the behavior and testing, but it conflicts with the provided change summary and objectives: it says no production code changes remain, while the summary lists changes to the identifier parser and workspace source detector. It also omits required template sections, including a linked issue and visual proof or an explicit N/A statement.

  • Fix all pre-merge checks with AI

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker force-pushed the fix/linear-numeric-leading-identifiers branch from 0950cbc to 825ec79 Compare July 26, 2026 10:08
@nwparker

Copy link
Copy Markdown
Contributor

Blocking: verified new false positives

I executed the actual exported parseLinearIssueInput from both origin/main and this branch over an expanded corpus. These are rejected on main and accepted here:

2FA-1 3D-15 5G-1 4K-120 7ZIP-1 3DES-1 8BIT-1 10GB-1 24H-7

The commonly-cited corpus (GH-123, UTF-8, x86-64, COVID-19) is unchanged — those already matched before, and CVE-2021-44228 / 2026-07-26 / 555-1234 reject in both. So the regression is narrower than "breaks everything", but it is real and it is new.

Two mitigating facts, verified by call-site tracing: this is not a free-text linkifier — it never scans terminal output, commit messages, or agent message bodies. It parses whole explicit values in orca linear issue, the --linear-issue flag, and new-workspace typed-source intent. And ReDoS does not reproduce: scaling is linear (5M chars ≈ 5ms).

What blocks this is the premise, not the blast radius. Linear's public Teams/Create-Issues docs and the GraphQL schema state no leading-digit rule, and Linear's own tooling disagrees with itself — github-webhook-proxy requires [A-Z]{1,7} while linear-release uses \w{1,7}. No real digit-leading workspace was demonstrated. Broadening validation and taking on those false positives needs evidence the capability exists.

To unblock: show one real Linear team with a digit-leading key (a screenshot of team settings, or an issue URL). With that, this ships.

@nwparker nwparker added the bug Something isn't working label Jul 27, 2026
@nwparker

nwparker commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

sorry this took awhile, but correct! Working on it

@nwparker
nwparker force-pushed the fix/linear-numeric-leading-identifiers branch from 825ec79 to fd5a1af Compare October 5, 2026 06:41
@nwparker nwparker changed the title fix(linear): accept numeric-leading issue identifiers test(linear): cover numeric-leading issue identifiers Oct 5, 2026
kenfdev and others added 3 commits October 5, 2026 00:16
…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.
Exercise a missing-label resource bundle explicitly instead of assuming Spanish is untranslated, and pin discard descriptions per locale so translation updates do not invalidate the index-preserving copy regression checks.
@nwparker
nwparker force-pushed the fix/linear-numeric-leading-identifiers branch from fd5a1af to 167d8a0 Compare October 5, 2026 07:18
@nwparker
nwparker merged commit e46fa0d into stablyai:main Oct 5, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants