Repository navigation
fix(server): report incomplete transcript usage scans - #15661
maria-rcks wants to merge 6 commits into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a localized usage-scanning bug fix that reports incomplete transcript reads through an already supported partial status while preserving cached totals and normal scan behavior. It includes focused coverage for unreadable-file recovery and introduces no schema, deployment, security, billing, default, or static-analysis changes. You can add or adjust custom eligibility rules. Learn more. |
|
Warning Review limit reachedOnly developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing. Next included review available in 16 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (3)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughTranscript discovery now reports root and path failures. Usage scans retain readable or cached records and report partial or failed status. Tests cover permission failures and recovery. ChangesUsage scan health
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Transcript scan failures are reported without discarding available usage. No actionable merge-blocking issue remains after normal checks.
|
# Conflicts: # apps/server/src/usage/UsageService.ts # apps/server/src/usage/usageTranscriptReader.test.ts
Dismissing prior approval to re-evaluate 643fdcd
Dismissing prior approval to re-evaluate 6fd2a9d
Transcript listing, stat, and read failures silently dropped usage while the source still reported
ok.listTranscriptFilesnow counts directories and files it could not read (files that vanish mid-walk are still treated as normal rotation). The usage service adds unreadable transcripts to that count and marks the sourcepartialwith a message. Cached usage for those files is still counted, and the next healthy scan returns took.Refs #5798. Adapts the scan-health idea from #5812 and #7221.
Verification (Blacksmith, non-root):
apps/server/src/usage/106 tests passed, including a new case that makes one transcript unreadable, expectspartialwith the readable usage, then restores it and expectsok. Server typecheck and scoped lint passed (one pre-existing unusedlayerTestwarning). Windows/macOS behavior is unverified.Written by claude-opus-5-5 via Claude Code in T3 Code