Repository navigation
fix(cursor): parse model variants in linear time - #7938
Merged
Merged
Conversation
Contributor
|
Caution Review failedThe pull request is closed. Finishing Touches
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 |
Contributor
|
✅ Deterministic PR hygiene checks passed. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
parseCursorVariantIdwithlastIndexOf("-thinking-")and one suffix validation, addressing CodeQL main alert [Roadmap] Centrally hosted multi-user OpenCodex with tenant isolation #95 (js/polynomial-redos).origin/devat9c33e4658b7b180ec8dd20f0e6a21daf3699f76e.Verification
bun install --frozen-lockfile— passed; 106 packages installed; lockfile unchanged.OCX_TEST_NO_QUEUE=1 bun test tests/providers/cursor/cursor-catalog.test.ts tests/providers/cursor/cursor-claude-id.test.ts— 70 pass, 2 fail. Both new adversarial tests rejected unbounded wildcard matching before executing it.OCX_TEST_NO_QUEUE=1 bun test tests/providers/cursor/cursor-catalog.test.ts -t 'adversarial model ids'— 0 pass, 1 fail atcatalog.ts:476. The linear implementation was then restored.OCX_TEST_NO_QUEUE=1 bun test tests/providers/cursor/cursor-catalog.test.ts tests/providers/cursor/cursor-claude-id.test.ts— 72 pass, 0 fail, 625 assertions. Tests run serially. Regressions parse 20,000 repeated delimiters and assert unchanged unknown-ID behavior; a temporary, finally-restored regex execution guard catches the old wildcard path deterministically without a wall-clock threshold. The equivalence table preserves the legacy distinction betweenthinking-extra-highandextra-high-thinking/extra-high-fast.bun run typecheck— passed; no type errors in 2,228 files.bun run privacy:scan— passed.git diff --check— passed. Changed source/test files remain below the 2,000-line ratchet threshold; no test-layout registration changes are needed.test:changed, structure/file-size/test-layout executable gates, standalone timing probes, CodeQL, runtime/provider integration, and cross-platform validation. The host is under constrained/CRITICAL load; the requested resource exception limits local execution to the touched tests, typecheck, and privacy scan. Broader coverage is left to normal PR CI and independent review. No manual CI dispatch or rerun was performed.Checklist