Skip to content

fix: Capture auto-property backing fields as instance fields in pause-point snapshots#1890

Merged
hatayama merged 2 commits into
feature/pause-point-round4-integrationfrom
fix/pause-point-auto-property-backing-field
Jul 20, 2026
Merged

fix: Capture auto-property backing fields as instance fields in pause-point snapshots#1890
hatayama merged 2 commits into
feature/pause-point-round4-integrationfrom
fix/pause-point-auto-property-backing-field

Conversation

@hatayama

@hatayama hatayama commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Auto-implemented properties (e.g. public float VerticalVelocity { get; private set; }) now appear in CapturedVariables for a pause-point hit, under their property name.

User Impact

  • Previously, pause-point snapshots silently skipped any auto-property's compiler-generated backing field, so verifying its value required a temporary rewrite to an explicit field just to make it visible.
  • Now the backing field is un-mangled back to the property name and captured as a normal InstanceField entry, with no source changes needed.

Changes

  • Extracted the existing <Name>k__BackingField regex (previously private to the collection preview serializer) into a shared constant so both the preview serializer and the variable collector use the same pattern.
  • The variable collector now un-mangles a matching backing field to its property name and includes it, instead of skipping every <-prefixed field.
  • Added a regression test covering an auto-property fixture, and updated two existing formatter tests that had asserted the old skip behavior.
  • Documented the new capture behavior in the pause-point skill's captured-variables.md and regenerated the .claude/.agents skill copies.

Verification

  • dist/darwin-arm64/uloop compile --project-path <repo root>: 0 errors, 0 warnings
  • dist/darwin-arm64/uloop run-tests --filter-type regex --filter-value ".*PausePoint.*" --test-mode EditMode: 207/207 passed

Review in cubic

hatayama added 2 commits July 21, 2026 04:04
…t snapshots

Auto-implemented properties compile to a "<Name>k__BackingField" field,
which the variable collector skipped along with genuinely-internal
"<"-prefixed fields (hoisted locals, state machine plumbing). This made
common patterns like `public float VerticalVelocity { get; private set; }`
invisible to pause-point captures, forcing a temporary rewrite to an
explicit field just to verify a value.

Extract the existing backing-field regex (previously private to the
collection preview serializer) into a shared constant, and use it in the
variable collector to un-mangle the field name and include it as an
InstanceField entry. Hoisted-local demangling behavior is unchanged.

Update the two existing formatter tests that asserted the old skip
behavior to reflect the new capture behavior.
Callers previously had no way to know auto-properties are captured
without reading the source. Add one line to captured-variables.md
noting they appear as instance fields under the property name, and
regenerate the .claude/.agents skill copies.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@hatayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cceaae14-8c4a-487c-b7b0-2401396ead66

📥 Commits

Reviewing files that changed from the base of the PR and between 7108467 and f438920.

📒 Files selected for processing (8)
  • .agents/skills/uloop-pause-point/references/captured-variables.md
  • .claude/skills/uloop-pause-point/references/captured-variables.md
  • Assets/Tests/Editor/SourcePausePointCapture/SourcePausePointCaptureTests.cs
  • Assets/Tests/Editor/SourcePausePointCapture/SourcePausePointVariableFormatterTests.cs
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/references/captured-variables.md
  • Packages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointCollectionPreviewSerializer.cs
  • Packages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointConstants.cs
  • Packages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointVariableCollector.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pause-point-auto-property-backing-field

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.

@hatayama
hatayama merged commit a32092e into feature/pause-point-round4-integration Jul 20, 2026
1 of 2 checks passed
@hatayama
hatayama deleted the fix/pause-point-auto-property-backing-field branch July 20, 2026 19:08
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