ReviewOS

also looking at this

stacks/drone

test: control purge history preparation clock

#55
Merged chris wants to merge codex/purge-history-setup-clock into main
37 files +1804 -168
9 days ago

The 137-review purge fixture could expire during setup and never reach its batching assertions. A failure-only probe reproduced the existing guard rejecting review 86 with 85 committed rows: retention parsed twice to 1792642424244, then the guard clock read 1792642424247. This proves expiry during setup for that reproduction. The scheduling component and operands of the older full-run failures remain unknown.

Prepare the isolated child with a controlled Date clock while retaining the original 60,000 ms lifetime. Force real expiry before the last setup review. At exact logical expiry, an extra valid review must receive 404 without adding review or audit rows. Restore the real clock in finally, retain the existing expiry wait, and require genuinely due purge acceptance. All 137 native appends, FK enforcement, audit totals, 100/37 batching assertions, and 165/180-second process guards remain.

Only the fixture and its parent assertion change. Production access, retention, auth, and database code is byte-identical. The installed Stacks testing root registers afterEach and has no emitted narrow clock module, so this standalone child uses its underlying bun:test clock API. Separate probes verify restoration and real timer advancement on Bun 1.4.2 and 1.4.3. No dependencies change.

Validation:

  • The original real-clock failure is reproduced at the public parent/child/Auth/SQLite seam. Temporary probes are restored and excluded.
  • The strengthened forced-expiry case passes on Bun 1.4.3 and minimum Bun 1.4.2, preserving the original guards.
  • Buddy Pickier, application types, and runtime/test types pass. Separate root Spec and Standards passes confirm the batching and production authority semantics. Independent final review was unavailable.
  • The original whole-suite result remains retained: 1,502 passed, 25 skipped, three failed. This corrects the reproduced #36 fixture precondition. Inspection timing (#52) and the seal exit (#53) remain separate investigations; no passing full-suite claim is made for that original run.
  • Exact-head CI 39722509606 passes all five jobs, including the full Linux suite and namespace qualification.

Builds on published #54. The remaining diff is only two test files. Refs #36. Controlled-time host evidence does not establish physical erasure or arbitrary-host timing.

Published by normal fast-forward as Chris without coauthor trailers after verifying both reviewed source pins against committed blobs. The original failed local suite and causal reproduction remain retained; no production retention change or physical erasure claim is made.

37 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.