Skip to content

fix(cursor): show Fable policy review instructions and approval link - #4509

Closed
HeiTuz wants to merge 1 commit into
lidge-jun:devfrom
HeiTuz:fix/cursor-policy-error-details
Closed

fix(cursor): show Fable policy review instructions and approval link#4509
HeiTuz wants to merge 1 commit into
lidge-jun:devfrom
HeiTuz:fix/cursor-policy-error-details

Conversation

@HeiTuz

@HeiTuz HeiTuz commented Sep 13, 2026

Copy link
Copy Markdown

Summary

When Cursor blocks Fable pending its data-retention policy acknowledgement, Codex currently shows only failed_precondition: Error. Recognize the captured aiserver.v1.ErrorDetails binary policy gate and show the explanation plus the official review URL: https://cursor.com/dashboard/restricted_models/claude-fable-5. Users sign in with the same Cursor account, review the policy themselves, and then retry.

The decoder is deliberately limited to the observed MODEL_BLOCKED enum and exact Fable policy title/detail. It reads the protobuf value, never the optional debug representation. Encoded size, field count, entry count and string lengths are bounded. Output is code-owned text and one fixed official URL; upstream buttons, arbitrary links, analytics and consent commands are ignored. Other or malformed details retain existing behaviour. The rejection remains non-retryable HTTP 400 / invalid_request_error; the patch neither accepts the policy nor changes account settings.

Fixes #4508. This addresses the verified Fable gate; general structured-error presentation remains outside this patch. If Cursor changes that signature, the safe generic fallback applies.

Verification

  • Focused Cursor transport/error tests: 63 passed, 0 failed. Coverage includes binary-only recognition, non-retryable classification, ignored debug/buttons/action content, malformed/oversized values, duplicate fields, field/entry limits and unknown gates.
  • bun run typecheck, bun run privacy:scan, bun run structure:check: passed.
  • cd docs-site && bun run build: passed, 441 pages.
  • Replayed the actual captured upstream error with every debug field removed. The patched parser and adapter error formatter produced the policy explanation and official review URL, retaining status 400.
  • A later live call to the already-running, unmodified 2.52.0 proxy completed with exactly CURSOR_PROBE_OK. This confirms current model access, not deployment of this PR or proof of what changed the account's policy state. No policy consent was accepted by the diagnostic code.

Full-suite limitation (draft)

bun run test was run. The parallel lane had 24,558 passes and two failures in remote-workspace-command-runner.test.ts: the npm-installed Bun executable has two hardlinks while that fixture requires a private executable. Retesting that file using a separate single-link copy of the same Bun binary passed 13/13.

The serial lanes had one additional failure: Codex autostart shim > Unix install rejects delayed detached redispatch after the launcher closes its lease fd. The exact test also fails in a separate unmodified dev worktree at 94063d0 with the same assertion (expected false, received true). It is outside the changed Cursor path. No unrelated runtime or test change is included to hide that baseline failure. The PR stays draft rather than claiming the complete local suite is green.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Review readiness checklist

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

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.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • review readiness checklist open (0/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 0/4).

Review readiness checklist

  • ⬜ All CI tests are green on my local testing.
  • ⬜ I pushed my PR to the latest dev commit.
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

This PR stays in draft until every box above is ticked.

@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 70 / 80

이 PR은 Cursor가 Claude Fable 5 data-retention 정책 동의를 요구할 때 Codex에 failed_precondition: Error만 보이던 문제를 고칩니다(#4508). 지금 devsrc/adapters/cursor/live-transport.ts parseConnectEndStreamError는 Connect JSON error의 code/message만 이어 붙입니다. 구조화 상세가 있어도 사용자는 어디로 가서 무엇을 눌러야 하는지 모릅니다.

PR은 src/adapters/cursor/policy-error.ts를 새로 두고, 관찰된 aiserver.v1.ErrorDetails 바이너리만 읽습니다. MODEL_BLOCKED(58)과 정확한 title/detail 문자열일 때만 코드가 소유한 설명과 고정 URL https://cursor.com/dashboard/restricted_models/claude-fable-5를 돌립니다. debug 표현, 버튼, 임의 링크, analytics, consent action은 무시합니다. 크기·필드 수·엔트리 수·문자열 길이 상한이 있고, 다른/깨진 상세는 기존 generic 동작으로 남습니다. HTTP 400 / non-retryable도 유지합니다. 프록시가 정책을 대신 수락하지 않습니다.

보안 태도가 좋습니다. upstream 텍스트를 그대로 보여 주면 키워드 분류나 비밀 누출 위험이 있는데, 코드 소유 문구 + 공식 URL만 쓰는 선택은 이 저장소 스타일에 맞습니다. 테스트가 binary-only, debug 무시, malformed/oversized, 필드 한도, 다른 Connect code까지 넓습니다. 다만 PR이 아직 draft이고, 로컬 full suite에 이 경로와 무관한 baseline 실패가 있어 ready를 미뤘다고 본문에 적혀 있습니다.

types/config 분할과 무관합니다. structure 문서에 같은 문장이 여러 파일로 반복 추가된 점은 조금 시끄럽지만, structure:check를 통과했다면 형식상 문제는 아닙니다.

경로/심볼 - src/adapters/cursor/policy-error.ts 정확한 title/detail 리터럴 - Cursor가 문구를 바꾸면 즉시 generic으로 떨어진다. 본문이 의도한 fail-safe다. 일반 structured-error UX는 범위 밖이라고 명시돼 있어 좋다.
라인 - live-transport.ts parseConnectEndStreamError - explanation이 있을 때만 message를 바꾼다. classify/retry 경로가 새 문구에도 400/non-retryable을 유지하는지는 테스트가 증명한다.
경로/심볼 - structure/* 다수 파일 동일 문장 - 과도한 전파인지, registry 규칙상 필요한지 메인테이너 취향 문제. 기능과 무관하면 나중에 줄여도 된다.
경로/심볼 - draft 상태 - readiness checklist가 아직 비어 있다. merge 전에 draft를 해제하고 tip CI를 보는 절차가 필요하다.

메인테이너의 판단이 필요한 지점

  • Fable 전용 exact-match를 당장 넣을지, 다음 게이트를 위한 확장 포인트를 남길지(지금은 exact가 맞음)
  • draft를 언제 ready로 올릴지(무관 baseline 실패를 이유로 얼마나 붙잡을지)
  • 공식 URL이 Cursor 문서와 계속 일치하는지 릴 전 재확인

너의 추천
내용은 merge 가치가 높다. draft 해제 + tip CI 확인 후 넣자. #4508과 함께 닫으면 된다. structure 문장 중복은 막아도 되고 나중에 정리해도 된다.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun

Copy link
Copy Markdown
Owner

Superseded by c66709f, which carries this work onto dev.

Your change is in that commit with a Co-authored-by trailer naming you in a branch commit, so it survives the squash and reaches the contributor graph.

Why it was carried rather than merged directly: this branch had gone into conflict against dev, and the same lane also needed to fix the native-exec refusal naming in the same files. The carried version keeps your approach — surface the data-policy review instruction and the dashboard approval link instead of a bare failed_precondition — and moves the projection into a dedicated src/adapters/cursor/policy-error.ts so the bounded read-only handling is testable on its own.

Issue #4508 is closed against that merge. Thank you for the fix.

@lidge-jun lidge-jun closed this Sep 14, 2026
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.

2 participants