Skip to content

[WRONG BRANCH] fix(cursor): detect localized native-shell claims - #346

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-korean-native-shell-claims-handling
Draft

[WRONG BRANCH] fix(cursor): detect localized native-shell claims#346
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-korean-native-shell-claims-handling

Conversation

@luvs01

@luvs01 luvs01 commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Correct a regression in the cursor routing commentary sniffer where Korean native-shell hints like 네이티브 셸 / 네이티브 쉘 were not recognized by the native-tool guard, causing otherwise-detected failure+redirect claims to bypass the hallucination quarantine.

Description

  • Extend the ROUTING_NATIVE_TOOL_NAME expression to also match the localized Korean forms 네이티브 셸 and 네이티브 쉘 in src/adapters/cursor/envelope-echo.ts, preserving the existing false-positive guard semantics.
  • Add a focused regression test in tests/cursor-envelope-echo-retry.test.ts that asserts the Korean sentence 네이티브 셸이 차단되어 exec_command로 전환합니다. is classified as a hallucination and triggers quarantine.

Testing

  • Ran git diff --check and it reported no problems.
  • Ran bun test tests/cursor-envelope-echo-retry.test.ts and the file-level suite passed (8 tests, 0 failures).
  • Ran bun run typecheck and bun run test and both completed successfully across the repository test run.

Codex Task

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 28, 2026
@github-actions github-actions Bot changed the title fix(cursor): detect localized native-shell claims [WRONG BRANCH] fix(cursor): detect localized native-shell claims Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

@github-actions
github-actions Bot marked this pull request as draft August 28, 2026 02:15
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant