chore(analytics): remove dead WriteFeedCacheJSON pair#184
Conversation
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>
|
Warning Review limit reached
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
What
Removes
WriteFeedCacheJSONand its test-only siblingWriteFeedCacheJSONTofrominternal/analytics/state.go, plus the 3 orphanedTestWriteFeedCacheJSON_*tests and now-unused imports.Why
WriteFeedCacheJSONhad zero callers anywhere (verified via grep acrossinternal/,cmd/,pkg/, and the Pythontui/).WriteFeedCacheJSONToexisted only to test it — it is a thin wrapper overcore.AtomicWriteJSONand is called solely fromstate_test.go.The live production writer of
status-line-cache.jsonisinternal/bridge/bridge.go(WriteTUICache→FlattenForTUI→core.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.AtomicWriteJSONandbridge.goretain their own tests.Verification
go build ./...+go vet ./internal/analytics/cleanGOMEMLIMIT=4GiB go test -race -p 2 -timeout 120s ./internal/analytics/🤖 Generated with Claude Code