Skip to content

test(server): take upstream's clock pin for the saved-usage window test - #882

Merged
Jacksondr5 merged 2 commits into
j5/mainfrom
j5code/upstream-usage-test-clock-pin
Nov 1, 2026
Merged

Jacksondr5 merged 2 commits into
j5/mainfrom
j5code/upstream-usage-test-clock-pin

Conversation

@Jacksondr5

Copy link
Copy Markdown
Owner

Problem

From 2026-11-01, UsageService.test.ts › "reports saved usage of a removed directory only for windows it reaches" fails on j5/main and on every PR. The test runs on the wall clock with a transcript dated 2026-08-01. The usage service prunes saved usage older than 92 days, so from today the first read returns nothing.

What changed

  • apps/server/src/usage/UsageService.test.ts: upstream's fix, cherry-picked unchanged. It's 1280ccd0d2, "test(server): pin clock in saved-usage window test" (test(server): pin clock in saved-usage window test pingdotgg/t3code#28603). The test sets TestClock to 2026-08-15, near the write, and provides TestClock.layer(). The hunk is identical to upstream's.
  • FORK.md: a "Temporary in-place patches" entry and a ledger row. Exit condition: drop the entry at the next upstream advance, which brings the same commit; the file then equals upstream's.

It touches nothing else. The Captain approved taking upstream's own test-only fix unchanged, the same pattern as #877.

Live testing

None: this is a test-only change. vp test run src/usage/UsageService.test.ts passes (40 tests) at the head.

Upstream impact

Edits upstream's test file only, with upstream's own change; recorded in FORK.md as a temporary patch.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior: the fixed test passes
  • UI changes: none
  • Live testing: none needed
  • Upstream-owned files: recorded in FORK.md (temporary patch entry and ledger row)
  • Upstream product: no change
  • Surfaces: server tests only
  • Docs: FORK.md only

Built by Claude Opus 5.5 in J5 Code (Claude Code harness).

🤖 Generated with Claude Code

t3dotgg and others added 2 commits November 1, 2026 14:59
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 1, 2026 8:02pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 24 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 3 included reviews currently available. Your 43 included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between c2b7939 and 3b9910b.

Files selected for processing: 2
  • FORK.md
  • apps/server/src/usage/UsageService.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Nov 1, 2026
@github-actions github-actions Bot added the size:XS 0-9 effective changed lines (test files excluded in mixed PRs). label Nov 1, 2026

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combined panel review (reviewer-opus + reviewer-sol) at 3b9910b

Verdict: no findings, and the panel approves this test-only PR.

  • The PR range from the merge base touches exactly FORK.md and apps/server/src/usage/UsageService.test.ts.
  • The test hunk is upstream's, unchanged. Its added and removed lines are byte-identical to 1280ccd0d2 (pingdotgg#28603), which touches only that file. It sets TestClock to 2026-08-15, near the transcript's write, and provides TestClock.layer(). That ends the wall-clock dependency that broke the test once the 2026-08-01 transcript fell outside the 92-day window. We're approving the identical hunk only, not claiming the whole file equals upstream's: other parts differ because of the pin.
  • FORK.md adds one "Temporary in-place patches" bullet, with the exit "take upstream's at the next advance", and one ledger row.
  • Reviewer-run: UsageService.test.ts passes (40).

Reviewed by Claude Opus 5.5 (reviewer-opus) and Sol 6.1 (reviewer-sol) in J5 Code.

@Jacksondr5
Jacksondr5 merged commit edc4350 into j5/main Nov 1, 2026
30 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/upstream-usage-test-clock-pin branch November 1, 2026 20:14

This branch was successfully deployed

1 active deployment
Preview — 3b9910b8 Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants