Skip to content

fix: explain pause-point truncation flags filtered by captured-variable names - #2290

Merged
hatayama merged 2 commits into
v3-betafrom
fix/pause-point-truncated-flag-name-filter
Aug 20, 2026
Merged

hatayama merged 2 commits into
v3-betafrom
fix/pause-point-truncated-flag-name-filter

Conversation

@hatayama

@hatayama hatayama commented Aug 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Pause-point hit responses now explain when CapturedVariablesTruncated stays true after --captured-variable-names drops every clipped variable.
  • Listed captured values in that case are complete; the truncation flag is left unchanged so the clip is not hidden.

User Impact

  • Before: --captured-variable-names could return CapturedVariablesTruncated: true with TruncatedVariableCount: 0 and TruncatedVariableNames: [] even though every remaining variable was complete, so agents could not tell whether the values they asked for were clipped.
  • After: the CLI adds CapturedVariablesTruncatedNote in that case: the truncation flag refers to a variable excluded by the name filter, and every listed variable is complete.

Changes

  • After the captured-variable name filter, detect CapturedVariablesTruncated == true, TruncatedVariableCount == 0, and no remaining truncated variables, then set CapturedVariablesTruncatedNote (omitempty).
  • Do not rewrite CapturedVariablesTruncated.
  • Document that Unity-side truncation also covers preview element-count and depth caps, and that the name filter can leave the top-level flag pointing at an excluded variable.
  • Shared pause_point_status_response_contract.json is unchanged (omitempty keeps the CLI-only note off Unity payloads).

Verification

  • scripts/check-go-cli.sh passed (format, vet, lint, tests, rebuild), including:
    • TestFilterPausePointCapturedVariablesByNameSetsTruncatedNote (note set / omitted / no filter / count-cap)
    • TestUnityPausePointStatusContractTruncationInvariant
    • TestPausePointStatusResponseMatchesSharedContract
  • git diff -- tests/contracts/pause_point_status_response_contract.json is empty

Review in cubic

…le names

When --captured-variable-names drops a clipped variable, CapturedVariablesTruncated stayed true with Count 0 and no truncated survivors. Keep the flag and add a CLI note so agents can tell every listed value is complete.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 54e8580f-3ae4-46d0-9ca0-c6a8f5e3d240

📥 Commits

Reviewing files that changed from the base of the PR and between 61bfe96 and fa01b3d.

📒 Files selected for processing (1)
  • cli/project-runner/internal/projectrunner/pause_point_captured_variable_names_filter_test.go

📝 Walkthrough

Walkthrough

The pause-point response now includes an optional CapturedVariablesTruncatedNote. Name filtering preserves capture-time truncation and adds the note when it excludes all truncated variables. Tests and skill documentation describe the updated semantics.

Changes

Pause-point capture truncation

Layer / File(s) Summary
Truncation response contract
cli/project-runner/internal/projectrunner/pause_point_types.go, cli/project-runner/internal/projectrunner/pause_point_status_response_contract_test.go
The response adds an optional CapturedVariablesTruncatedNote. Contract tests verify that Unity-originated truncation responses omit this CLI-only note.
Filtered truncation reporting and documentation
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, .agents/skills/uloop-pause-point/*, .claude/skills/uloop-pause-point/*, Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/*
Name filtering checks current and historical variables, preserves CapturedVariablesTruncated, and adds a note when all truncated variables are excluded. Tests cover filtering, history variables, and JSON serialization. Documentation includes preview-depth clipping and the filtering note semantics.

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 to pause-point truncation flags after captured-variable name filtering.
Description check ✅ Passed The description accurately explains the new truncation note, preserved flag behavior, documentation updates, and verification results.
Docstring Coverage ✅ Passed Docstring coverage is 84.62% which is sufficient. The required threshold is 80.00%.
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.
✨ 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 fix/pause-point-truncated-flag-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.

Add negative cases for a false truncation flag and a history-only truncated survivor, and assert the note against a production-independent literal so a wording change fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hatayama
hatayama merged commit f15ac70 into v3-beta Aug 20, 2026
9 of 11 checks passed
@hatayama
hatayama deleted the fix/pause-point-truncated-flag-name-filter branch August 20, 2026 11:36
@github-actions github-actions Bot mentioned this pull request Aug 20, 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