[WRONG BRANCH] fix(cursor): detect localized native-shell claims - #346
[WRONG BRANCH] fix(cursor): detect localized native-shell claims#346luvs01 wants to merge 1 commit into
Conversation
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46cbeff2a6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| | { kind: "hallucination" }; | ||
|
|
||
| const ROUTING_NATIVE_TOOL_NAME = /\b(shell|read|grep|list|bash)\b/giu; | ||
| const ROUTING_NATIVE_TOOL_NAME = /(\b(?:shell|read|grep|list|bash)\b|네이티브\s*(?:셸|쉘))/giu; |
There was a problem hiding this comment.
Canonicalize localized shell aliases before counting
When Korean output mentions both accepted spellings or spacing variants—such as 네이티브 셸(네이티브 쉘)은 차단됩니다.—the matches are inserted as different strings, so nativeTools.size >= 2 classifies the prose as a hallucination even though it names only one tool and contains no redirect claim. This causes the Cursor adapter to quarantine and retry otherwise legitimate output; map every localized native-shell match to one canonical shell key before adding it to the set.
AGENTS.md reference: src/AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
Motivation
네이티브 셸/네이티브 쉘were not recognized by the native-tool guard, causing otherwise-detected failure+redirect claims to bypass the hallucination quarantine.Description
ROUTING_NATIVE_TOOL_NAMEexpression to also match the localized Korean forms네이티브 셸and네이티브 쉘insrc/adapters/cursor/envelope-echo.ts, preserving the existing false-positive guard semantics.tests/cursor-envelope-echo-retry.test.tsthat asserts the Korean sentence네이티브 셸이 차단되어 exec_command로 전환합니다.is classified as a hallucination and triggers quarantine.Testing
git diff --checkand it reported no problems.bun test tests/cursor-envelope-echo-retry.test.tsand the file-level suite passed (8 tests, 0 failures).bun run typecheckandbun run testand both completed successfully across the repository test run.Codex Task