Skip to content

fix: Expired pause points now explain how to recover#1335

Merged
hatayama merged 1 commit into
v3-betafrom
feature/improve-pause-point-state
Jun 14, 2026
Merged

fix: Expired pause points now explain how to recover#1335
hatayama merged 1 commit into
v3-betafrom
feature/improve-pause-point-state

Conversation

@hatayama

@hatayama hatayama commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Expired pause points now report explicit expiry, timing, remaining-time, and generation details.
  • Recovery guidance is shell-neutral, so agents can re-arm markers without relying on stale logs or shell-specific command snippets.

User Impact

  • Agents no longer need to infer whether a marker expired from elapsed time or old matching logs.
  • Mixed CLI/package sessions preserve sensible expiry and remaining-time values when older packages omit the new fields.
  • Wait errors now report the marker timeout instead of the wait timeout, which makes recovery instructions match the enabled marker.

Changes

  • Added lifecycle fields to pause point tool and status responses.
  • Added generation tracking for re-enabled markers.
  • Normalized older status responses in the native CLI for expired and enabled markers.
  • Updated pause point skill guidance and focused tests.

Verification

  • ./cli/dist/windows-amd64/uloop.exe compile --project-path <PROJECT_ROOT>
  • ./cli/dist/windows-amd64/uloop.exe run-tests --project-path <PROJECT_ROOT> --test-mode EditMode --filter-type regex --filter-value .*PausePointTests.*
  • go test ./internal/cli -run TestPausePoint|TestRunPausePointStatusReturnsCurrentStatus|TestRunPausePointStatusDerivesExpiredFromStatus|TestRunPausePointStatusDerivesRemainingTimeFromOlderResponse|TestRunWaitForPausePointClearsEnabledMarkerAfterTimeout
  • scripts/check-go-cli.sh
  • codex review --commit HEAD

Review in cubic

Add explicit expiry, timing, generation, and recovery fields to pause point responses so agents can distinguish stale markers from fresh hits and re-arm expired markers without recomputing state from partial details.
@coderabbitai

coderabbitai Bot commented Jun 14, 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

Run ID: fb86eb5c-d1bd-4b9d-9535-b497a1c1ff1a

📥 Commits

Reviewing files that changed from the base of the PR and between 0d6fdeb and 17f882a.

📒 Files selected for processing (8)
  • Assets/Tests/Editor/PausePointTests.cs
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
  • Packages/src/Editor/FirstPartyTools/PausePoint/PausePointTools.cs
  • Packages/src/Editor/Infrastructure/Api/PausePointStatusBridgeCommand.cs
  • Packages/src/Runtime/PausePoints/UloopPausePointRegistry.cs
  • cli/internal/cli/pause_point_errors.go
  • cli/internal/cli/pause_point_wait.go
  • cli/internal/cli/pause_point_wait_test.go

📝 Walkthrough

Walkthrough

Adds Generation, Expired, EnabledAtUtc, RemainingMilliseconds, and RecommendedNextAction fields to the pause-point system. The Unity runtime computes these from UloopPausePointEntry.ToSnapshot; C# response DTOs and the Go CLI status/error pipeline propagate them; the Go layer adds normalization for older Unity responses that omit the boolean Expired or RemainingMilliseconds fields.

Changes

Pause-point generation, expiry, and recovery metadata

Layer / File(s) Summary
UloopPausePointSnapshot & UloopPausePointEntry data model
Packages/src/Runtime/PausePoints/UloopPausePointRegistry.cs
Adds _nextGeneration counter to UloopPausePointRegistry; expands UloopPausePointSnapshot constructor and public properties with Expired, EnabledAtUtc, RemainingMilliseconds, Generation, RecommendedNextAction; updates UloopPausePointEntry to accept/store generation; reworks ToSnapshot to compute expiry, remaining time, ISO-8601 UTC timestamp, and shell-neutral recovery action.
C# response DTOs
Packages/src/Editor/FirstPartyTools/PausePoint/PausePointTools.cs, Packages/src/Editor/Infrastructure/Api/PausePointStatusBridgeCommand.cs
PausePointResponse and PausePointStatusResponse gain the same six new properties; their FromSnapshot factory methods are updated to populate them from UloopPausePointSnapshot.
Go CLI: status response struct and normalization
cli/internal/cli/pause_point_wait.go
pausePointStatusResponse gains Expired, EnabledAtUtc, RemainingMilliseconds, Generation, RecommendedNextAction; new normalizePausePointStatusResponse derives Expired from Status and computes RemainingMilliseconds from elapsed/timeout when absent; runPausePointStatusCommand applies normalization before marshalling.
Go CLI: error detail enrichment
cli/internal/cli/pause_point_errors.go
pausePointWaitError normalizes the probed response; cliError.Details gains expired and hitCount; new pausePointMarkerTimeoutSeconds prefers marker-reported timeout; pausePointRemainingMilliseconds short-circuits to 0 for expired/hit/cleared states and prefers response.RemainingMilliseconds.
Tests and documentation
Assets/Tests/Editor/PausePointTests.cs, cli/internal/cli/pause_point_wait_test.go, Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
C# tests cover expired-state fields, shell-neutral recovery action, timing/generation, and re-enable generation increment, plus tool/bridge DTO integration. Go tests cover expired error recovery fields, marker timeout, status-derived Expired, and remaining-time derivation from older responses. SKILL.md documents Generation/EnabledAtUtc usage and expanded error.details fields.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • hatayama/unity-cli-loop#1283: Introduced the initial pause-point registry and CLI wait-for-pause-point/pause-point-status plumbing that this PR extends with generation, expiry, and recovery-action metadata.
  • hatayama/unity-cli-loop#1309: Reworked the same pause-point wait/status/error-handling commands (hints, MatchingLogs) that this PR further extends with normalized Expired, RemainingMilliseconds, and RecommendedNextAction fields.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.86% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: Expired pause points now explain how to recover' clearly summarizes the main change: adding recovery guidance and expiry details to expired pause point responses.
Description check ✅ Passed The description comprehensively explains the changes, user impact, and implementation details related to pause point expiry handling and recovery guidance.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 feature/improve-pause-point-state

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 and usage tips.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 8 files

Re-trigger cubic

@hatayama
hatayama merged commit 2b7ae47 into v3-beta Jun 14, 2026
9 checks passed
@hatayama
hatayama deleted the feature/improve-pause-point-state branch June 14, 2026 08:38
@github-actions github-actions Bot mentioned this pull request Jun 14, 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