Skip to content

chore(analytics): remove dead WriteFeedCacheJSON pair#184

Merged
vishnujayvel merged 1 commit into
mainfrom
chore/remove-dead-writefeedcachejson
Jun 17, 2026
Merged

chore(analytics): remove dead WriteFeedCacheJSON pair#184
vishnujayvel merged 1 commit into
mainfrom
chore/remove-dead-writefeedcachejson

Conversation

@vishnujayvel

Copy link
Copy Markdown
Owner

What

Removes WriteFeedCacheJSON and its test-only sibling WriteFeedCacheJSONTo from internal/analytics/state.go, plus the 3 orphaned TestWriteFeedCacheJSON_* tests and now-unused imports.

Why

WriteFeedCacheJSON had zero callers anywhere (verified via grep across internal/, cmd/, pkg/, and the Python tui/). WriteFeedCacheJSONTo existed only to test it — it is a thin wrapper over core.AtomicWriteJSON and is called solely from state_test.go.

The live production writer of status-line-cache.json is internal/bridge/bridge.go (WriteTUICacheFlattenForTUIcore.AtomicWriteJSON), which has its own coverage. The analytics pair was fully superseded — most likely a leftover from before the bridge took over the TUI cache write.

Extracted from the stale architecture PR #73 (CONFLICTING) as a small, isolated cleanup.

Coverage

No loss: the deleted tests pinned a format produced by a dead function. core.AtomicWriteJSON and bridge.go retain their own tests.

Verification

  • go build ./... + go vet ./internal/analytics/ clean
  • Guarded gate green: GOMEMLIMIT=4GiB go test -race -p 2 -timeout 120s ./internal/analytics/

🤖 Generated with Claude Code

WriteFeedCacheJSON had zero callers; its WriteFeedCacheJSONTo sibling
existed only to test it (a thin wrapper over core.AtomicWriteJSON). The
live status-line-cache.json writer is internal/bridge (WriteTUICache →
FlattenForTUI), which is independently tested, so the analytics pair was
fully superseded dead code. Remove both functions, the 3 orphaned tests,
and the now-unused filepath/json imports.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@vishnujayvel, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 22 minutes and 14 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

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 credits.

🚦 How do rate limits work?

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

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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 432da4cd-ced7-4650-86df-05253553189e

📥 Commits

Reviewing files that changed from the base of the PR and between c65b0e0 and ec326d5.

📒 Files selected for processing (2)
  • internal/analytics/state.go
  • internal/analytics/state_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/remove-dead-writefeedcachejson

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 and usage tips.

@vishnujayvel
vishnujayvel merged commit 841eed1 into main Jun 17, 2026
5 checks passed
@vishnujayvel
vishnujayvel deleted the chore/remove-dead-writefeedcachejson branch June 17, 2026 12:29
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