Skip to content

feat: add ErrorCode and RecommendedNextAction to pause point failure responses - #2048

Merged
hatayama merged 3 commits into
v3-betafrom
feat/pause-point-enable-error-codes
Jul 28, 2026
Merged

feat: add ErrorCode and RecommendedNextAction to pause point failure responses#2048
hatayama merged 3 commits into
v3-betafrom
feat/pause-point-enable-error-codes

Conversation

@hatayama

@hatayama hatayama commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add additive ErrorCode on PausePointResponse and populate RecommendedNextAction for every enable/clear validation failure (seven paths: six via CreateValidationFailure, one inline patch failure).
  • Introduce stable codes: INVALID_ARGUMENT, PAUSE_POINT_RELEASE_CODE_OPTIMIZATION, PAUSE_POINT_RESOLVE_FAILED, PAUSE_POINT_PATCH_FAILED.
  • Document code-based branching and the fact that Debug code optimization is lost on Editor restart (including uloop launch -r).

Closes #2045.

Error codes

ErrorCode When
INVALID_ARGUMENT Capture settings / Id·File·Line combination / non-positive timeout / clear without id
PAUSE_POINT_RELEASE_CODE_OPTIMIZATION Editor Code Optimization is Release
PAUSE_POINT_RESOLVE_FAILED file:line could not be mapped to a patch location
PAUSE_POINT_PATCH_FAILED Resolved method cannot be patched

Test plan

  • uloop compile — 0 errors
  • uloop run-tests --test-mode EditMode --filter-type regex --filter-value "PausePoint" — 261 passed (includes 6 new failure-code tests)
  • Manual Release rejection: enable by file:line under Release returns "ErrorCode": "PAUSE_POINT_RELEASE_CODE_OPTIMIZATION" and a non-empty RecommendedNextAction; Editor restored to Debug afterward
  • scripts/sync-tool-docs.shdefault-tools.json unchanged / matches skill tables

Review in cubic

hatayama and others added 2 commits July 29, 2026 00:25
…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>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 93801e43-697d-4e38-886a-bb12a8785466

📥 Commits

Reviewing files that changed from the base of the PR and between 069ec01 and f41b81a.

📒 Files selected for processing (1)
  • Assets/Tests/Editor/PausePointEnableFailureErrorCodeTests.cs
🚧 Files skipped from review as they are similar to previous changes (1)
  • Assets/Tests/Editor/PausePointEnableFailureErrorCodeTests.cs

📝 Walkthrough

Walkthrough

Pause-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.

Changes

Pause-point error metadata

Layer / File(s) Summary
Error response contract and failure handling
Packages/src/Editor/FirstPartyTools/PausePoint/PausePointTools.cs, Packages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointConstants.cs
PausePointResponse and pause-point failure paths now expose standardized error codes and recommended next actions.
Failure response validation
Assets/Tests/Editor/PausePointEnableFailureErrorCodeTests.cs
Editor tests cover invalid arguments, unresolved locations, recommended actions, fake controller setup, and the ErrorCode JSON wire name.
Error-code-driven pause-point guidance
.agents/skills/uloop-pause-point/SKILL.md, .claude/skills/uloop-pause-point/SKILL.md, Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
Documentation lists supported error codes and explains Debug optimization, editor restarts, recompilation, and failure handling.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding ErrorCode and RecommendedNextAction to pause-point failure responses.
Description check ✅ Passed The description is directly related to the code changes and documents the new error codes and retry guidance.
Linked Issues check ✅ Passed The PR appears to satisfy #2045 by adding machine-readable ErrorCode and RecommendedNextAction across failure paths and updating the docs.
Out of Scope Changes check ✅ Passed The changes stay within pause-point failure handling, tests, and documentation, with no clear unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/pause-point-enable-error-codes

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between c0e392c and 069ec01.

⛔ Files ignored due to path filters (1)
  • Assets/Tests/Editor/PausePointEnableFailureErrorCodeTests.cs.meta is 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.md
  • Assets/Tests/Editor/PausePointEnableFailureErrorCodeTests.cs
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/PausePoint/PausePointTools.cs
  • Packages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointConstants.cs

Comment thread .agents/skills/uloop-pause-point/SKILL.md
Bare JsonConvert.SerializeObject would not catch ContractResolver renames
on the JsonRpcResponseFactory path; use UnityCliLoopJsonResponseSerializerSettings.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hatayama
hatayama merged commit 5ab8f71 into v3-beta Jul 28, 2026
13 checks passed
@hatayama
hatayama deleted the feat/pause-point-enable-error-codes branch July 28, 2026 15:53
@github-actions github-actions Bot mentioned this pull request Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant