Skip to content

Add a captured-variable name filter for pause-point hit responses#1883

Merged
hatayama merged 1 commit into
feature/pause-point-feedback-round3-integrationfrom
feat/captured-variable-name-filter
Jul 20, 2026
Merged

Add a captured-variable name filter for pause-point hit responses#1883
hatayama merged 1 commit into
feature/pause-point-feedback-round3-integrationfrom
feat/captured-variable-name-filter

Conversation

@hatayama

@hatayama hatayama commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Pause-point hit responses (await-pause-point, pause-point-status) can now be narrowed to specific variables by name, so investigating a wide class with dozens of captured locals/fields no longer means scrolling past everything you don't need.

User Impact

  • Before: --captured-variables names already dropped every Value to make a first pass lighter, but the response still listed every captured local, parameter, and instance field by name — on a field-heavy class this could still be dozens of entries to scan through before finding the ones you actually care about.
  • After: pass --captured-variable-names velocity,this (comma-separated, exact match, case-sensitive) to either command and only those entries come back, in both full and names mode. If none of the requested names exist in the capture, the response comes back with an empty CapturedVariables array plus a new CapturedVariableNameFilterNoMatch: true field, so it's clear the filter matched nothing rather than the pause point having captured nothing at all.

Changes

  • cli/project-runner/internal/projectrunner/pause_point_captured_variable_names_filter.go (new): parsePausePointCapturedVariableNames (comma-split, trims whitespace, drops empty entries) and filterPausePointCapturedVariablesByName, which filters both CapturedVariables and every CapturedVariableHistory frame and sets CapturedVariableNameFilterNoMatch when nothing matched.
  • pause_point_types.go: added CapturedVariableNameFilterNoMatch bool to the response struct — a CLI-side-only field, not part of the Unity/IPC contract.
  • pause_point_wait.go: registered the new --captured-variable-names flag on both commands' option parsing, and call the filter before applyPausePointCapturedVariablesMode so the two flags compose (filter narrows which variables appear, then the mode controls how much of each survivor is emitted).
  • native_command_help.go: added the PausePointCapturedVariableNamesFlagName constant and registered it in both commands' help/option tables.
  • Table-driven tests in the new filter file cover single-name, multi-name, no-match, composition with --captured-variables names, and an empty-filter no-op case.
  • Updated the pause-point skill doc (Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md, plus the regenerated .claude/.agents copies) with usage guidance for the new flag.

Verification

  • sh scripts/check-go-cli.sh: 0 lint issues, all packages pass.
  • go test ./internal/projectrunner/... -run 'TestFilterPausePointCapturedVariablesByName|TestParsePausePointCapturedVariableNames' -v: all 6 subtests pass.
  • Real pause point (not synthetic): enabled a file:line pause point at Assets/Editor/CustomCommandSamples/HelloWorld/HelloWorldTool.cs:22, triggered it via the hello-world sample tool, and confirmed against the live response that --captured-variable-names name,this returns exactly those two entries in original order, an unmatched name returns an empty array with CapturedVariableNameFilterNoMatch: true, and --captured-variable-names name --captured-variables names correctly composes (keeps only name, strips its Value).
  • This PR targets an integration branch, not main/v3-beta, so repository CI workflows do not fire here; the checks above are the local/manual equivalent.

Review in cubic

Wide classes can flood a pause-point hit response with dozens of locals,
parameters, and instance fields even after --captured-variables names
already drops values. Add a --captured-variable-names flag (comma
separated, exact match on Name, case-sensitive) to await-pause-point and
pause-point-status that keeps only the requested entries, applied before
--captured-variables so the two compose (filter narrows, then mode
controls value verbosity).

When none of the requested names match, CapturedVariables/history come
back empty and the new CLI-only CapturedVariableNameFilterNoMatch field
is set, so an agent doesn't mistake a filtered-empty result for "nothing
was captured at this hit." This field is added by the CLI response layer
only; the C#/IPC contract from Unity is unchanged.

Verified against a real pause point (HelloWorldTool.cs:22, hit via the
hello-world sample tool): single-name, multi-name, no-match, and
composition with --captured-variables names all behave as designed.
Also updated the pause-point skill doc (source + generated .claude/.agents
copies) with usage guidance for the new flag.
@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: 49 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: 6f382538-1e72-41da-9dca-ca24f63df9c2

📥 Commits

Reviewing files that changed from the base of the PR and between fbfcca1 and 16b4539.

📒 Files selected for processing (8)
  • .agents/skills/uloop-pause-point/SKILL.md
  • .claude/skills/uloop-pause-point/SKILL.md
  • Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md
  • cli/project-runner/internal/projectrunner/native_command_help.go
  • cli/project-runner/internal/projectrunner/pause_point_captured_variable_names_filter.go
  • cli/project-runner/internal/projectrunner/pause_point_captured_variable_names_filter_test.go
  • cli/project-runner/internal/projectrunner/pause_point_types.go
  • cli/project-runner/internal/projectrunner/pause_point_wait.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/captured-variable-name-filter

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 303bb40 into feature/pause-point-feedback-round3-integration Jul 20, 2026
2 checks passed
@hatayama
hatayama deleted the feat/captured-variable-name-filter branch July 20, 2026 16:53
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