Repository navigation
fix: pause points now flag likely JIT-inlined methods and show capture timing - #1878
Merged
hatayama merged 4 commits intoJul 20, 2026
Conversation
Mono can inline very small target methods into their callers, making a source pause point never fire even though the target line runs. Extend pausePointTimeoutHint's HitCount=0 branch with a hint pointing users at this cause so they can move the pause point into the calling method.
Small method bodies (or ones marked AggressiveInlining) can be inlined by Mono's JIT into their callers, silently defeating a source pause point even though the target line executes. Detect this at patch time via IL body size (heuristic threshold) and the AggressiveInlining implementation flag, and surface a warning through BuildPatchWarning so the risk is visible before a confusing HitCount=0 timeout. Existing physical-callback-warning tests are loosened from exact-match to Contains/Does-Not-Contain since their fixture methods are also small enough to independently trigger the new inlining warning. New tests cover the below-threshold, above-threshold, and AggressiveInlining cases plus the joined dual-warning ordering.
Users have observed captured values that look like they belong to the line after ResolvedLine, since a source pause point's capture happens before the resolved line executes (like an IDE breakpoint). Add a SnapshotTiming field to PausePointResponse, set for file:line markers only, making this timing explicit in the response instead of leaving it documented only in the skill. Additive-only response field, so no protocol version bump is needed.
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughPause point responses now expose source snapshot timing for resolved locations. Source patching adds warnings for methods likely to be JIT-inlined, with tests for IL size, explicit inlining, combined warnings, fixtures, and CLI timeout guidance. ChangesPause point timing and inlining diagnostics
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Nothing outside BuildPatchWarning (same class) references this helper and no test calls it directly, so internal was unnecessarily broad.
hatayama
merged commit Jul 20, 2026
dff3890
into
feature/pause-point-feedback-round3-integration
2 checks passed
This was referenced Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AggressiveInlining) that Mono's JIT may inline it away, instead of only leaving you to guess after a confusingHitCount=0timeout.await-pause-pointtimeout hint text.enable-pause-pointresponses for file:line markers now carry an explicitSnapshotTimingnote stating that captured variables reflect state before the resolved line executes (pre-line, like an IDE breakpoint), so this is discoverable from the response itself rather than only from docs.User Impact
enable-pause-pointproactively warns when a target method looks inlining-prone, and theawait-pause-pointtimeout hint mentions it too, so the diagnosis is much faster.enable-pause-pointresponse includes aSnapshotTimingfield stating this directly.Changes
SourcePausePointPatcher.BuildPatchWarninggains a new check (IsLikelyJitInlined): true if the method has[MethodImpl(MethodImplOptions.AggressiveInlining)], or if its IL body size is at or under a new heuristic threshold constant (SourcePausePointConstants.SmallMethodInliningRiskThresholdBytes, 32 bytes). New warning message constantSmallMethodInliningRiskWarning.pausePointTimeoutHint(Go,pause_point_errors.go) appends a sentence pointing at JIT inlining in theHitCount==0 && Enabledbranch.PausePointResponsegains an additiveSnapshotTimingfield (new constantPreLineSnapshotTimingNote), populated only when a pause point is enabled via file:line (EnableBySourceLocation); id-only markers leave it empty since they have no resolved source line. This is a wire-compatible additive change, so no IPCprotocolVersionbump is needed.OnCollisionEnter2D/Update/OnTriggerEnter2Dfixtures) are loosened from exact-match toContains/Does.Not.Contain, since those fixture bodies are also small enough to independently trigger the new inlining warning. New tests cover below-threshold, above-threshold, andAggressiveInlining-regardless-of-size cases, plus the two-warning joined-string ordering.Verification
dist/darwin-arm64/uloop compile: 0 errors, 0 warnings (checked after each commit).dist/darwin-arm64/uloop run-tests(EditMode, filterSourcePausePointPatcherTests): 25/25 passed.dist/darwin-arm64/uloop run-tests(EditMode, filterPausePointTests): 68/68 passed.scripts/check-go-cli.sh: all packagesok, 0 lint issues.uloop enable-pause-pointagainst the running Unity Editor and confirmed both theSnapshotTimingfield and the inlining warning appear correctly in the JSON response, then cleared it.feature/pause-point-feedback-round3-integration, notmain/v3-beta. Repo CI workflows filterpull_request.branchesto[main, v3-beta], so no repository CI runs on this PR — that's expected, not a gap. The checks above are local-equivalent verification; full repo CI will run on the final integration →v3-betaPR.