Skip to content

test(title-sync): end-to-end guard for derived-name title clobbering (follow-up to #1545)#1574

Open
drmzperx wants to merge 1 commit into
asheshgoplani:mainfrom
drmzperx:test/1545-derived-title-reconcile-guard
Open

test(title-sync): end-to-end guard for derived-name title clobbering (follow-up to #1545)#1574
drmzperx wants to merge 1 commit into
asheshgoplani:mainfrom
drmzperx:test/1545-derived-title-reconcile-guard

Conversation

@drmzperx

@drmzperx drmzperx commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Test-only follow-up to #1545: adds an end-to-end regression guard asserting that a nameSource="derived" Claude name never overwrites the user's agent-deck session title.

Why

#1545's rule is unit-tested at both links — ClaudeSessionNameIn maps a derived name to "", and ReconcileTitleFromClaude no-ops on an empty name — but the composition was unpinned. A future refactor that resolves the name inside ReconcileTitleFromClaude without going through ClaudeSessionName (e.g. inlining the metadata read, or adding a second name source) could reintroduce the "sessions renamed to folder name" clobbering while every existing test stays green.

TestReconcileTitleFromClaude_NoopWhenDerived drives the real reconcile path against a seeded derived-name session file under an isolated $HOME and asserts both the return contract ("", false) and that Instance.Title survives.

No production code changes, no CHANGELOG entry (test-only).

go test ./internal/session/ -run ReconcileTitleFromClaude -count=1
ok  	github.com/asheshgoplani/agent-deck/internal/session	0.019s

…rs the session title

The nameSource="derived" rule from asheshgoplani#1545 is unit-tested at both links
(derived name resolves to "", and an empty name is a reconcile no-op),
but the composition itself was unpinned: a refactor that resolves the
name inside ReconcileTitleFromClaude without going through
ClaudeSessionName could reintroduce the folder-name clobbering with
every existing test still green. Drive the real reconcile path against
a seeded derived-name session file and assert the title survives.
@drmzperx drmzperx requested a review from asheshgoplani as a code owner July 6, 2026 15:03
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 42 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 Plus

Run ID: 75307650-046b-41e6-9164-f0965df24fea

📥 Commits

Reviewing files that changed from the base of the PR and between f70f19e and 7440cda.

📒 Files selected for processing (1)
  • internal/session/claude_title_reconcile_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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