Repository navigation
D4: quiet, paced re-screen of the queue - #2373
neuromechanist merged 10 commits into
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2373Version: 🤖 Updated on each push. |
|
Merge gate (lead): head 93df0bc. Every remote check passes on this head. Review: round 1 panel (code+tests; errors+comments+types), 6 important findings and 7 suggestions fixed (the batch settle redesign); round 2 delta review clean, its 2 suggestions fixed in b178f48. After the review, CI found two wiring tests (the route and export pins, the OIDC route walk and the sweep declaration), both fixed in 20dc859 and 93df0bc and green here. The earlier repull CLI timeouts are a known flake (#2377). |
…e' into feature/issue-2182-quiet-rescreen # Conflicts: # test/admin-route-inventory.unit.test.ts
|
Merge gate (lead): head 72e08df, which merges the decide branch (D1) in; the only conflict was the route total (now 274). Every remote check passes on this head. Review history as in the earlier gate comment. |
f554e79
into
feature/issue-2182-epic-pq-decide
Part of #2364. Part of #2182.
Card D4: a quiet, paced re-screen of the publication queue.
nemar admin repo publish screen-batch [--ids <file> | --status <requested|blocked> | --all-active] [--per-minute <n>] [--apply]re-screens many requests in one batch. It is a dry run unless--applyis given, and the CLI paces the dispatches itself (default 4 a minute, at most 10, because each screen is a GitHub Actions run). Ctrl-C stops dispatching, closes the batch on the screens already started, and those still report.Each screen stores the same result a single
screenstores, and the gate and the review start are unchanged. The batch sends no per-request administrator mail and no depositor mail on a block; one digest goes to the administrators when it ends. The digest is due when every request has settled or two hours after the last dispatch (the existing watchdog), is claimed with a lease so exactly one is sent, and names the screen states before and after, the finding kinds, the requests whose state changed, the requests the batch blocked (depositor not mailed) and the requests that did not report. A report that arrives after the digest is mailed as an ordinary one, so no mail is dropped without the digest naming it. A blocked request is screened and stays blocked.Changes: migration 0150 (
screen_batches, nullableidentifier_screen_batch_id); the screen route takes an optional{ batch_id }; two new admin routes to create and close a batch; the store, callback and watchdog paths mark a batch screen's mail as covered by the digest in the same statement that stores it; the digest template and its copy table inemail.ts; ADR 0086 amendment. Migration number: 0150 was the next free one on the base; if #2372 or a later card lands a migration first, this one is renumbered after merging the base.Tested:
backend/test/screen-batch-flow.test.ts(20 tests through the real admin and webhook routes over real SQLite, mail counted at the Resend boundary),test/screen-batch.unit.test.ts, andtest/screen-batch-cli.test.ts(the real CLI against the real routes on loopback, including the measured pace and Ctrl-C). Every rule was reverted or widened one line at a time and a test failed each time. The fullbun testwas not run (about 80 minutes).wrangler d1 migrations apply --localstops at the existing migration 0021 ("contains several transactions"), unrelated to this change; migration 0150 itself was applied to a local workerd D1 and accepted.