Skip to content

test(platform): pin the clock in the former-owner usage test - #354

Merged
Brooooooklyn merged 1 commit into
mainfrom
test/pin-operator-usage-clock
Oct 1, 2026
Merged

Brooooooklyn merged 1 commit into
mainfrom
test/pin-operator-usage-clock

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Member

Summary

operator-tenants.test.ts › "attributes operator user usage only to ownership intervals in the billing window" put the former owner's interval at 5 → 2 days before now and expected it inside the current billing period. The period starts on the 1st (UTC), so the test failed on the 1st and 2nd of every month.

The test now fakes only Date and pins it mid-month (2026-07-15T12:00:00Z).

Why a separate PR

schema-compat runs the tests of the runtime currently deployed to prod against the upgraded schema (rollback check). While prod runs a copy of this test without the fix, every PR's schema-compat job fails on days 1–2 of the month. Once this lands in a prod deploy, that false failure stops.

Note: this PR's own schema-compat job runs the same old prod copy, so it can fail until 2026-10-03 00:00 UTC.

Test plan

  • Run locally on 2026-10-01: with the fix 31/31 pass; with the main copy the test fails with the same assertion as CI.

🤖 Generated with Claude Code

The test placed the former owner's interval five to two days before now
and expected it inside the current billing period, so it failed during
the first two days of every UTC month. It now runs at a fixed mid-month
time.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://test-pin-operator-usage-clock-void-cloud.voidzero-docs.workers.dev (commit 0b72225)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b3c08252-void-cloud.voidzero-docs.workers.dev 0b72225 2026-10-01T04:45:30.652Z Visit the dashboard ↗

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T04:48:04.008277Z 0b72225 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Brooooooklyn
Brooooooklyn merged commit e468f67 into main Oct 1, 2026
18 of 19 checks passed
@Brooooooklyn
Brooooooklyn deleted the test/pin-operator-usage-clock branch October 1, 2026 04:50
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