Repository navigation
test(usage): keep saved-history fixtures independent of wall time - #9
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Saved usage expiration assertions apps/server/src/usage/UsageService.test.ts |
The test fixes the date, asserts that the initial summary contains one bucket, and checks that the bucket and source are missing after 93 days. It now provides TestClock.layer(). |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Other
Suggested reviewers: juliusmarminge
Merge Risk: 
Minimal · up to 94d8f
-
This test-only change stabilizes saved-usage retention coverage without altering production behavior or weakening assertions.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The description clearly explains the failure, the TestClock-based fix, preserved production behavior, added expiration verification, and test limitations. It does not use the template headings or provide an explicit approval link, but the required information is mostly present and the change is focused.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
|
@coderabbitai full review Please verify the fixed-clock retention regression and that production behavior/assertions are preserved. |
|
@codex review |
Action not completed
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
@coderabbitai full review Retrying after the stated included-review reset. Please review the current unchanged head; hosted CI and Codex review are clean. Do not enable paid usage or alter any review policy. |
Action performed
|
The existing saved-history test started failing on November 2: its transcript mtime is fixed at August 1, now more than 92 days old, while UsageService correctly expires cached entries after 92 days. This is independent of the cleanup repair in #8 and blocks its server test shard.
Use the suite's existing TestClock layer pattern to pin this test to August 2. Keep the original assertions, assert the initial fixture actually yields a bucket, and explicitly advance 93 days to verify expiration still removes saved history. Production retention behavior is unchanged; no timeout, retry, skip or weakened assertion is added.
Evidence: https://github.com/Microck/t3code/actions/runs/41497110733/job/125455766898
Local dependency installation is blocked by pnpm's store-operation lock attempting a read-only path, even with explicit writable store/state/cache directories. Hosted server tests must pass before merge. The change uses TestClock.layer/setTime/adjust already used in the same suite.
Implemented by Verity using OpenAI's coding harness.