You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: the relay receipt-bucket helper removes every day bucket and pins the branch path (UTC-midnight flake) #771
Follow-up from the #769 review (non-blocking, test-only).
removeReceiptBucket in packages/cli/test/relay-delivery-loss.test.ts works out the bucket from Date.now() when it runs, but the delivery that wrote the receipt used an earlier timestamp. A run that crosses UTC midnight between the two removes tomorrow's (nonexistent) bucket and leaves the written one. The next delivery then reuses it, so the fsync count the test pins shifts: a midnight flake. The guard also checks only the bucket's basename, not the rest of the path.
What the fix does:
The helper removes every YYYY-MM-DD directory under the branch's receipt directory, so the date at cleanup time no longer matters.
Before removing anything, it asserts that the branch directory ends in .relay-accepted/by-branch/remote.
A mutation that flattens the receipt path (receiptBucket returning an empty string) still fails the fsync-fault tests at that assertion.
Activity