Repository navigation
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughCursor routes now translate supported Responses ChangesCursor structured output
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant createCursorRequest
participant protobufRequest as protobuf-request
participant cursorStructuredOutputInstructions
createCursorRequest->>protobufRequest: request with textFormat
protobufRequest->>cursorStructuredOutputInstructions: textFormat
cursorStructuredOutputInstructions-->>protobufRequest: final-output instructions
protobufRequest->>protobufRequest: add instructions to system prompts and active action
Merge Risk: ⚪ Minimal · up to Cursor’s format guidance is a best-effort prompt fallback, not strict output validation; the documentation makes that limitation clear. No merge-blocking code issue was established. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 4 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. Hygiene✅ Deterministic PR hygiene checks passed. |
|
Review checkpoint at 0982e57: read the complete eight-file patch and independently ran bun test tests/providers/cursor/cursor-request-builder.test.ts tests/providers/cursor/cursor-request-compat.test.ts — 64 passed, 0 failed, 201 assertions, exit 0, Bun 1.4.0. The real encoded action/schema continuation, ordinary-text behavior and checkpoint lineage regressions passed under isolated temporary homes, CPUQuota=75%, MemoryHigh=1280M, MemoryMax=1536M, zero swap and TasksMax=64. No provider/account traffic or captured-user-request replay was used. The prompt-only limitation is accurately documented; this does not certify general JSON reliability or native constrained decoding. I authorized the existing read-only hosted CI for this exact head after full diff/workflow/install-surface inspection. This is not PR approval: required current-head CI and typecheck must actually complete successfully. GitHub comparison currently reports 10 behind dev, so any further dev movement may require a refreshed base before readiness/approval. |
…jun#6417) Carry JSON output guidance into system roots and active continuation actions. Include the output format in checkpoint lineage to invalidate changed schemas. Keep the documented prompt-only fallback; omit unrelated explanatory comments. Carries lidge-jun#6417 by @arikon. Co-authored-by: arikon <75247+arikon@users.noreply.github.com>
|
@Ingwannu Will you merge? |
|
Superseded by the integration in #6487, with reviewed follow-up fixes in #6490 and Windows validation repairs in #6494/#6495, all merged into Cursor structured-output prompt guidance and checkpoint invalidation were carried. Unrelated helper commentary was omitted; this is guidance, not a new constrained-decoding guarantee. Original carry commit: Closing this PR as superseded, not claiming that its original head was merged. Thank you for the contribution. |
Summary
Cursor-routed auto-review requests can end with
guardian assessment was not valid JSON: the shared Responses parser retainstext.format, but the Cursor adapter previously dropped it and Composer returned prose-only assessments.Preserve
json_object/json_schemathrough the Cursor request, render the final-answer contract into system roots, and repeat it in active user-message actions, including tool-result continuations. Bind the format (including its absence) to the checkpoint instruction digest so schema changes cannot reuse stale instructions. Ordinary text requests and intermediate tool calls retain their existing behavior.This is a prompt fallback, not native constrained decoding or output-schema enforcement. It does not convert prose into an approval decision. Tests exercise the encoded Cursor wire action, array schemas, tool-result continuation, and checkpoint invalidation, including a format/system-text digest collision.
Verification
bun test tests/providers/cursor— passed on the final rebased source.bun run typecheck— passed on the final rebased source.bun run structure:check,bun run privacy:scan, andgit diff --check— passed on the final rebased source.cd docs-site && ASTRO_TELEMETRY_DISABLED=1 bun run build— passed on the final rebased source.composer-2.5-fast, the same captured Guardian request, and six fresh sessions: baseline 0/3 accepted by a semantic port of Codex's tolerant assessment parser; patched 3/3 accepted (allow). Both arms were 0/3 whole-answer JSON: the patched model still prefixed the JSON with prose. This small sample establishes the reproduction, not general reliability; the Rust parser binary was not executed.deny. Tools were disabled and no reviewed action was executed. Credentials and captured transcripts are not included in this PR.bun scripts/test.ts --changed=HEADon the original experiment base selected 506 files: 9,946 pass, 1,554 fail, 5 skip, 3 errors. A representative unrelated failing file,tests/responses/chat-refusal.test.ts, reproduced 45 pass / 8 fail on both unpatched and patched code in the same environment. The entire broad failure set has not been classified; this PR remains draft pending CI and broader validation.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
json_objectandjson_schemaformats in final responses, including after tool results. Ordinary text requests and intermediate tool calls remain unchanged.Documentation