Repository navigation
docs: amend ADR 065 for Engine, schedules, and sessions.gc first - #3335
adlerhurst wants to merge 6 commits into
Conversation
Align the proposed jobs ADR with locked Project decisions: jobs + job_schedules, SetPeriodic, Take name allowlist, sched prefix, short lease with Heartbeat, serverless Cron drain as runner, and sessions.gc as the first product handler. Register sched in ADR 047. Co-authored-by: Silvan <adlerhurst@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
Resolve ADR index + 047 Amended-by lines: keep Engine/schedules 065 wording and main's 048/076/066 amendments. Co-authored-by: s2s4gq4jby <s2s4gq4jby@privaterelay.appleid.com>
A blank line after the 065/066 conflict resolution stopped check-adrs from reading rows 067–094. Co-authored-by: s2s4gq4jby <s2s4gq4jby@privaterelay.appleid.com>
fforootd
left a comment
There was a problem hiding this comment.
Review of the whole background-jobs stack (#3335 → #3343), with inline comments on the PRs they belong to. The design holds up and CI is green, but the stack is 35 commits behind main, and some of what landed there since 2026-12-02 breaks it without a git conflict, so a merge would look clean.
Must fix before merge
- #3336: drop it (reasons on that PR).
- #3340: migration numbers collide with
mainin all three dialects. - #3342:
sessions.gcleavesrefresh_grantsrows behind;main'sSessionService.Deletedeletes them now. - #3343: drop the
apps/api/turbo.jsonhunk; #3576 fixed the same race onmain.
Production safety
- #3342: no dialect indexes
sessions.expires_at, so the reaper scans and sorts the all-tenant sessions table on every run. - #3342: at most 100 sessions per run, and one run per period for the whole cluster.
- #3340:
run_at = NOW() + periodplus the every-minute Vercel cron means the sweep runs about every other minute on the cloud. The ADR's "Periodic reschedule" line here needs the same change. - #3342: a failed
SetPeriodicat boot stops the server.
Also
- The Spanner lane has not run on any branch of this stack, so the Spanner jobs SQL and Spanner
DeleteSessionshave never executed. Please dispatchspanner.ymlon the tip once before merging. - Follow-up, not blocking: schedule state (
last_error, nextrun_at) is visible only in the database and metrics, so neither an agent nor a self-hosted operator can tell thatsessions.gckeeps failing. Worth surfacing through the CLI later.
Generated by Claude Code
Co-authored-by: Silvan <adlerhurst@users.noreply.github.com>
Co-authored-by: Silvan <adlerhurst@users.noreply.github.com>
|
Addressed the stack review (Silvan-approved plan). Summary for @fforootd: Must-fix
Production safety
Deferred (as planned)
Ready for a second look when CI finishes on the restacked tips. |
Co-authored-by: Silvan <adlerhurst@users.noreply.github.com>
TL;DR
1 of 6 (bases on
main; Gherkin #3336 closed). Amends ADR 065 for the shipped shape:jobs+job_schedules, sharedjobs.Engine, Take allowlist, short lease + Heartbeat, first handlersessions.gc, Cron drain as runner. Notes cloud ~1m cron vsrun_at = now()+periodcadence.Reviewer map
docs/adrs/065-background-jobs.mddocs/adrs/README.md,docs/adrs/047-…Amended-byReview follow-ups in this pass
main.Stack
this → #3338 → #3340 → #3341 → #3342 → #3343.