feat: add ErrorCode and RecommendedNextAction to pause point failure responses - #2048
Conversation
…responses Enable and clear validation failures previously returned only Success=false and an English Message, so callers had to substring-match prose and RecommendedNextAction stayed empty. Populate machine-readable ErrorCode and RecommendedNextAction on all seven failure paths so agents can branch on codes (especially PAUSE_POINT_RELEASE_CODE_OPTIMIZATION after launch -r). Refs #2045. Co-authored-by: Cursor <cursoragent@cursor.com>
… editor restart Teach agents to branch on ErrorCode instead of Message prose, and warn that Debug code optimization reverts on every Editor restart including launch -r. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughPause-point tools now return machine-readable error codes and recommended actions for validation and source-location failures. Editor tests verify failure responses and JSON serialization, while pause-point skill documentation describes the updated error-handling workflow. ChangesPause-point error metadata
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/skills/uloop-pause-point/SKILL.md:
- Around line 200-203: Update the canonical Go skill definition for
uloop-pause-point with the error-code guidance, then regenerate both generated
copies: .agents/skills/uloop-pause-point/SKILL.md lines 200-203 and
.claude/skills/uloop-pause-point/SKILL.md lines 200-203. Do not edit either
project-root copy directly; ensure regeneration produces the same updated
content in both files.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b8383a4d-7f09-4d81-91a5-c946df855c18
⛔ Files ignored due to path filters (1)
Assets/Tests/Editor/PausePointEnableFailureErrorCodeTests.cs.metais excluded by none and included by none
📒 Files selected for processing (6)
.agents/skills/uloop-pause-point/SKILL.md.claude/skills/uloop-pause-point/SKILL.mdAssets/Tests/Editor/PausePointEnableFailureErrorCodeTests.csPackages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.mdPackages/src/Editor/FirstPartyTools/PausePoint/PausePointTools.csPackages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointConstants.cs
Bare JsonConvert.SerializeObject would not catch ContractResolver renames on the JsonRpcResponseFactory path; use UnityCliLoopJsonResponseSerializerSettings. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
ErrorCodeonPausePointResponseand populateRecommendedNextActionfor every enable/clear validation failure (seven paths: six viaCreateValidationFailure, one inline patch failure).INVALID_ARGUMENT,PAUSE_POINT_RELEASE_CODE_OPTIMIZATION,PAUSE_POINT_RESOLVE_FAILED,PAUSE_POINT_PATCH_FAILED.uloop launch -r).Closes #2045.
Error codes
INVALID_ARGUMENTPAUSE_POINT_RELEASE_CODE_OPTIMIZATIONPAUSE_POINT_RESOLVE_FAILEDPAUSE_POINT_PATCH_FAILEDTest plan
uloop compile— 0 errorsuloop run-tests --test-mode EditMode --filter-type regex --filter-value "PausePoint"— 261 passed (includes 6 new failure-code tests)"ErrorCode": "PAUSE_POINT_RELEASE_CODE_OPTIMIZATION"and a non-emptyRecommendedNextAction; Editor restored to Debug afterwardscripts/sync-tool-docs.sh—default-tools.jsonunchanged / matches skill tables