Skip to content

fix(jobs): the monthly queue has no autoRun entry, so its jobs never run - #880

Merged
sydevs-bot merged 12 commits into
mainfrom
claude/fix-878-monthly-autorun
Oct 9, 2026
Merged

sydevs-bot merged 12 commits into
mainfrom
claude/fix-878-monthly-autorun

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • SyncLectureMetadata now runs on its monthly schedule — the monthly queue had no autoRun entry, so nothing ever consulted it.
  • CleanupOrphanedMedia runs monthly too, unattended, which is what the review asked for. What makes that safe is Phase A's new age threshold: it permanently deletes only trash older than 45 days, where before it deleted everything in the media trash with no age check at all.
  • Phase B now scans every upload from 24 hours to 3 months old. Its month % 3 bands cancelled out against the clock, so uploads from 8 months in 12 were never scanned at all.
  • A new dryRun input counts and logs both phases without writing, so a window or a threshold can be reviewed against real data before a scheduled run acts on it.
  • A unit guard fails on the next schedule naming a queue with no autoRun entry and no stated exemption, and on the next tick that shares a minute with another.

Changes

  • src/jobs/queues.ts — new. The autoRun array, plus UNSCHEDULED_QUEUES, the dead-schedule guard's exemption registry (empty today).
  • src/payload.config.ts — jobs.autoRun now reads that array.
  • src/jobs/CleanupOrphanedMedia/CleanupOrphanedMedia.ts — TRASH_RETENTION_DAYS and trashDeletionCutoff, orphanScanWindow in place of the month % 3 bands, the dryRun input and output, and the monthly queue.
  • tests/unit/job-schedules.spec.ts — new. The dead-schedule guard, the minute-collision guard, and the cleanup job's queue, dry run, and — across two years of runs — its retention and scan coverage.
  • tests/int/cleanup-orphaned-media.int.spec.ts — the retention cases, Phase A fixtures aged past the cutoff, and one scan-window case in place of the three per-band ones.
  • src/collections/Files/Files.ts — the editor-facing copy, which now has an automatic cleanup to describe.
  • src/jobs/SyncLectureMetadata/SyncLectureMetadata.ts, docs/architecture.md — the manual trigger is the admin Jobs UI, not jobs:run.

Preview

  • Files — the corrected collection description
  • Jobs — queued rows, once an hourly monthly tick has run

Test results

  • Lean gate: ✓ lint, typecheck (src + tests), 2287 unit tests
  • Targeted spec: 25 passed — cleanup-orphaned-media.int
  • Build: N/A — CI builds on the preview

Manual verification

Nothing here can be tested on production before merge. dryRun and the retention cutoff exist only on this branch, so a cleanup queued on production today runs main's Phase A, which permanently deletes the whole media trash. Do not queue cleanupOrphanedMedia on production until this merges.

Merging is safe on its own. Payload computes a schedule's first waitUntil as the cron's next occurrence after lastScheduledRun, which is unset for a queue that has never ticked — so there is no catch-up for missed months, and the first cleanup is 2026-11-01 00:00 UTC (checkQueueableTimeConstraints, payload 3.90.2).

Before merge:

  1. On the pr-880 preview, confirm the monthly rows for cleanupOrphanedMedia and syncLectureMetadata have waitUntil at the next 1st of the month. This is the same first-tick path production will take.

After merge, before 2026-11-01:

  1. Within an hour of the deploy, confirm the same two rows on production. If either has a waitUntil in the past, the next :07 tick runs it — delete it.
  2. Queue a dry run: create a payload-jobs doc (admin-only) with taskSlug: "cleanupOrphanedMedia", queue: "monthly" and input: { "dryRun": true }. The next :07 tick runs it. ⚠ dryRun must be the boolean true: the handler checks === true, so the string "true" runs for real.
  3. Read the result in the Railway logs, not the job row — deleteJobOnComplete deletes the row on success. Orphaned media cleanup completed has the counts, and each Would permanently delete … / Would move orphaned … to trash line names a file. Review the names, not just the counts.
  4. The Nov 1 run deletes everything trashed before 2026-09-17 00:07 UTC, which is more than any October dry run lists, because the cutoff moves with the run date. The media trash sorted by deleted date shows the whole set. Restore anything that should survive, or delete the queued cleanup row, before Nov 1.
  5. Watch the first syncLectureMetadata run. It touches every full lecture at up to 10 concurrent Nirmala Vidya fetches with retries, and has never run before, so the backlog is the whole collection.

Notes for reviewer

Three judgement calls, and two pre-existing defects I did not fix.

Hourly, not daily, for a monthly schedule. Payload's tick is both halves of the cycle — it enqueues with waitUntil at the next occurrence, and a later tick runs the row — so the tick interval is the worst-case lateness. A daily tick gives tighter determinism for ~30 ticks a month instead of ~744; I chose hourly so a tick lost to a deploy costs an hour rather than a day. That is also why nightly ticks hourly and always has: SendSessionReminders is itself an hourly schedule on it.

45 days is the retention, and it is a constant, not an input. It has to outlast the longest month, not match the cadence. Runs fall 28 to 31 days apart, and at 30 a run after any 31-day month deleted the previous run's trash one run later — 7 runs in 12. At 45, what one run trashes survives the next run with two weeks to spare, and goes at the one after. Exposing it would make the one number that stands between an editor and an irreversible delete settable per run.

Phase B scans a span, not a band. It used to pick one of three one-month bands (0-1, 1-2 or 2-3 months old) by month % 3. The band and the clock both advance a month per run, so all three runs of a quarter scanned the same calendar month (December, March, June, September). Each run now scans uploads from 24 hours to 3 months old. I chose that over "the previous month only": it keeps the three checks per upload the bands were meant to give, and a missed run loses nothing. The cost is that the first run scans three months of uploads rather than one.

Pre-existing, worth a ticket (1): scanCollectionForLexicalReferences extracts every upload and relationship id out of Lexical content generically, with no regard to which collection the id belongs to, and those ids go into the files referenced set and the images one alike. So an image referenced in a gallery block spares the file with the same numeric id, as Phase B reads it. That is a silent under-collection, not an over-collection, so nothing is deleted wrongly — orphans are just skipped forever. It surfaced here because the two new cases shifted this spec's file ids by two and one landed on a referenced image id; they are appended rather than filed under Phase A for that reason, with the ⚠ saying why.

Pre-existing, worth a ticket (2): defaultAfterSchedule rewrites the entire payload-jobs-stats global from the snapshot its own handleSchedules call read, so two queues ticking on the same minute lose one queue's lastScheduledRun to the other's write. nightly, screening and invitations already overlap at :00, and invitations and screening again every 15 minutes. The new monthly entry is staggered clear of all three at 7 * * * *, and KNOWN_COLLISIONS in the spec pins the existing three as a shrink-only backlog.

I did not file either issue — this repo asks before creating one.

Detail

What this review round changed. The reviewer reversed the ticket: #878's Approach step 2 had CleanupOrphanedMedia move to a queue nothing ticks, and the decision is that it should run monthly like everything else on that queue. Its own thread asked for the production testing that would make that safe.

Both halves landed. The age threshold is what the earlier UNSCHEDULED_QUEUES reason named as the blocker, so adopting the direction meant implementing the blocker rather than just deleting the guard around it. The dryRun input is the other half of that reason — "a dry run reviewed against production" — turned into something a human can run in one click, since a routine cannot reach production and should not try.

MANUAL_QUEUE is gone with the queue it named. UNSCHEDULED_QUEUES stays, empty: it is the exemption the dead-schedule guard reads, so the next queue deliberately left undriven is one entry there rather than an edit to the spec.

The spec's assertion changed shape with it. keeps CleanupOrphanedMedia off every queue that ticks asserted the old decision. It is now three assertions: the job is on monthly and monthly is driven; the cutoff is at least 30 days back (since tightened — see below); and both dryRun fields exist. The queue alone is no longer the safety property, so pinning it alone would have been pinning the weaker half.

Watched failing. spares trash newer than the retention cutoff was watched red with less_than: trashCutoff removed from Phase A's query — the exact defect, at the site that caused it — then restored. The two int Phase A cases that previously trashed their fixture at new Date() now age it 60 days; left as they were, they passed for the wrong reason, since a just-trashed item is precisely what the threshold spares.

What the earlier review passes changed. The first version of the guard read only tasks from src/jobs/index.ts, which excludes the two tasks a plugin appends to jobs.tasks: resetUsageTask (usagePlugin) and sendInvitationsTask (loginPlugin). Both are fine today, but that is the seam this ticket is about. It now reads all three sources, and a sweep of every schedule: [ site under src/ fails until a new one is added to that list.

The stagger also did not stagger at first: :30 is a multiple of both 5 and 15, so the new entry fired alongside invitations (*/5) and screening (*/15) hourly. And the guard that should have caught it compared cron minute fields as strings, so 0, 30 and */15 read as three distinct values while */15 fires at :00 and :30 alike. minutesOf now expands each field to the minutes it fires on, and ALL_CRONS folds in INVITATIONS_CRON.

Review round 3 (cf883df6). It fixed two defects in the date arithmetic: the 30-day retention and the month % 3 scan bands, both above. Neither shows in a single run, so no existing case could catch them. The unit spec now pins both across two years of runs, and both cases were watched failing against the old arithmetic: 13 early deletions and 425 unscanned days. The three per-band int cases became one span case. It creates six files in the old order, so no file id changes outcome, and deletes them afterwards. Otherwise those files, trashed at a mocked 2025 date, read as expired trash to the throughput case's Phase A and use up its operation budget.

Fixture note. The unit spec writes no fixture. Its one constructed value is sendInvitationsTask({} as LoginCollectionConfig): the factory reads nothing off its argument to build schedule. Everything else is the real exported task config, the real JOB_AUTO_RUN, or the real INVITATIONS_CRON. The one source-text read, autoRun: JOB_AUTO_RUN in src/payload.config.ts, is there because importing the config would build it; it is what stops the whole spec asserting over an array production does not use.

No security findings over this round's diff. The widened surface is one boolean input that can only suppress writes, and a where clause that can only narrow a delete.

Closes #878

🤖 Generated with Claude Code

https://claude.ai/code/session_01WYbpCRvkk72EkQqLEqsyoe

sydevs-bot and others added 4 commits October 2, 2026 14:30
…fire

A task `schedule` only enqueues, and only while an `autoRun` cron for its own
queue ticks: Payload calls `handleSchedules({ queue })` from that cron and
nowhere else. `jobs.autoRun` named `nightly` and `screening` only, with
`loginPlugin` appending `invitations`, so the two schedules on `monthly` were
never consulted — no error, no log line, no job row. Neither had run in any
environment since they were added, which is why #715 fixed a crash on "the only
path that runs in production" while that path never ran.

`SyncLectureMetadata` now has its queue driven. The tick is hourly rather than
monthly because it is both halves of the cycle: it enqueues the due schedule
with `waitUntil` at the next occurrence, and a later tick runs that row, so the
tick interval is the worst-case lateness.

`CleanupOrphanedMedia` moves to `manual`, which nothing ticks, instead. Its
Phase A permanently deletes everything already in the media trash with no age
check at all — an editor's own hand-trashed items included — and a first run
after ten dead months would also trash up to 500 newly detected orphans. It
needs an age threshold on `deletedAt` and a reviewed dry run before it may run
unattended. The Files description claimed the opposite, so it goes too.

The pairing now lives in `src/jobs/queues.ts`, where a queue either has an entry
or carries the reason it has none.

Refs #878

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PyYVG8KQF1UnngE5RB26Vd
The defect #878 found leaves no trace: a schedule on a queue with no `autoRun`
entry is never consulted, so there is nothing to notice. The spec pairs the two
sides instead — every queue a task schedules onto either has an entry or sits in
`UNSCHEDULED_QUEUES` with the reason nothing may start it.

Four more assertions close the ways the first one could pass vacuously. An
`allQueues` entry would satisfy any queue at all and silently override `queue`,
so no entry may carry one. A queue may not be both driven and excused, since the
reason would then read as protection while the job runs anyway. And the array
the spec reads is only worth anything while the config hands that same array to
Payload, which is checked as source text because importing `payload.config.ts`
would build the whole config.

Every assertion was watched failing against the real defect: the `monthly` entry
removed, `CleanupOrphanedMedia` back on `monthly`, the config passing a slice
instead, an `allQueues` entry added, `nightly` excused, and the plugin's append
dropped.

Refs #878

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PyYVG8KQF1UnngE5RB26Vd
… tick

Three findings from the review pass on this branch.

The guard read `tasks` from `src/jobs/index.ts` only, so it missed the two tasks
a plugin appends to `jobs.tasks` — `resetUsageTask` and `sendInvitationsTask`.
Both are fine today, but that is exactly the seam #878 came through: a plugin
task scheduling onto a dead queue would have passed. It now reads all three
sources, and a sweep of every `schedule: [` site under `src/` fails until a new
one is added to that list, so the hand-written part cannot go quietly stale.

The `monthly` tick moves to :30. Every tick rewrites the whole
`payload-jobs-stats` global from the snapshot it read, so queues ticking on the
same minute lose one `lastScheduledRun` to the other's write. Minute 0 already
carries three tickers; this one no longer joins them.

`jobs:run --queue manual` was documented as the way to run CleanupOrphanedMedia
and does nothing: without `--handle-schedules` it only drains rows that already
exist, and nothing enqueues onto `manual`. A command that prints nothing and
exits 0 is the #878 failure mode over again, so the docs now say to queue it from
the admin Jobs UI.

Also drops a spec that re-proved `loginPlugin`'s autoRun append from source text
while `login-plugin.spec.ts` already proves it from the executed plugin, and
moves the Phase A reason to one home with pointers to it.

Refs #878

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PyYVG8KQF1UnngE5RB26Vd
`jobs:run --queue monthly` claims the row the autoRun tick enqueued, and that
row's `waitUntil` is the schedule's next occurrence, so it runs only in the
window the tick would have run it anyway. The admin Jobs UI is the trigger for
an immediate run.

Refs #878

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PyYVG8KQF1UnngE5RB26Vd
@railway-app

railway-app Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-880 environment in sahajcloud

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Oct 9, 2026 at 6:43 pm UTC
1 service not affected by this PR
  • mailpit

@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 2, 2026
@sydevs-bot

sydevs-bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running
CI fix 2

recent dispatches
  • 23:37Z fix-ci · attempt 1 · session · done
  • 23:37Z fix-ci · attempt 1 · session
  • 23:23Z fix-ci · attempt 1 · session · done
  • 23:23Z fix-ci · attempt 1 · session
  • 16:39Z address-review · attempt 1 · session · done

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 Adversarial review

Right size for #878, and the new module earns its place: MANUAL_QUEUE from jobs/index.ts would cycle through CleanupOrphanedMedia. The guard is the weak part — the stagger does not stagger, and the assertion that should prove it cannot fail.

Findings

  • should-fix — queues.ts:56: :30 collides with invitations (*/5) and screening (*/15) hourly.
  • should-fix — job-schedules.spec.ts:93: compares cron strings, so no real collision fails it.
  • should-fix — Files.ts:26: (#878) reaches an editor's screen.
  • should-fix — SyncLectureMetadata.ts:30 (no thread): its docblock still names jobs:run --queue monthly as the manual trigger.
  • consider — CleanupOrphanedMedia.ts:106: deleting the schedule answers your open question.

Checked. payload/dist/index.js:237+ — handleSchedules({ queue }) runs only from that queue's cron. defaultAfterSchedule.js — the stale-snapshot rewrite is real. Every schedule: under src/ plus both plugin tasks: only these two name monthly. Arming it exposes nothing else.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread src/jobs/queues.ts Resolved
Comment thread tests/unit/job-schedules.spec.ts Resolved
Comment thread src/collections/Files/Files.ts Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 2, 2026
claude added 4 commits October 2, 2026 15:14
`:30` is not a free minute. `screening` is `*/15` and `invitations` is `*/5`,
so both fire at :30 as well — the new entry joined a three-way overlap instead
of avoiding one, and every tick rewrites the whole `payload-jobs-stats` global
from the snapshot it read. `:07` is a multiple of neither step.

Refs #878

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fv2eRVvfiBNaaP5VKaZmuH
The collision guard compared minute fields as strings, so `0`, `30` and `*/15`
read as three distinct values while `*/15` fires at :00 and :30 alike — no real
collision could fail it. It also read only `JOB_AUTO_RUN`, leaving the plugin's
`*/5` invisible. It now expands each field to its minutes and folds in
`INVITATIONS_CRON`. The three overlaps that predate #878 are pinned as a
shrink-only backlog rather than excused by the comparison.

Refs #878

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fv2eRVvfiBNaaP5VKaZmuH
The collection description lands on a non-technical editor's screen, where
`(#878)` reads as noise. What it pointed at — why nothing deletes orphans
unattended — is in `UNSCHEDULED_QUEUES`, for a reader who can follow it.

Refs #878

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fv2eRVvfiBNaaP5VKaZmuH
The docblock still named `jobs:run --queue monthly` as the manual trigger,
the one place the sweep in c64753d missed. Same defect as the two it fixed:
the command drains a row already past its `waitUntil` and otherwise exits 0.

Refs #878

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fv2eRVvfiBNaaP5VKaZmuH
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-880 October 2, 2026 15:19 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Addressed the adversarial review. Pushed 65a11d8.

Adopted

  • The stagger did not stagger — :30 is a multiple of both 5 and 15, so it fired beside invitations and screening hourly. Now 7 * * * * (ea0701f).
  • The guard could not fail — it compared cron minute fields as text. It now expands each to the minutes it fires on and folds in INVITATIONS_CRON (62fb9a7).
  • (#878) in editor copy — removed, types regenerated (24dd6b2).
  • The thread-less finding: SyncLectureMetadata's docblock still named jobs:run --queue monthly (65a11d8).

Asked

Lean gate green. Both touched integration specs pass.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 2, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review October 2, 2026 15:31
@sydevs-bot
sydevs-bot requested a review from Ardnived October 2, 2026 15:31
@sydevs-bot
sydevs-bot enabled auto-merge October 2, 2026 15:31
Comment thread src/jobs/queues.ts Resolved
Comment thread src/jobs/queues.ts Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed awaiting labels Oct 2, 2026
Phase A deleted every trashed item with no age check, which is the whole
reason the job sat on a queue nothing ticks. It now deletes only trash
older than TRASH_RETENTION_DAYS, so an item an editor hand-trashed
survives at least one full cleanup cycle, and `dryRun` counts both phases
without writing — the way a window or a threshold gets reviewed against
real data before a scheduled run acts on it.

With that in place the job goes back on `monthly`, per review. The queue
nothing ticks is gone; `UNSCHEDULED_QUEUES` stays as the dead-schedule
guard's exemption, empty.

The two new cases are appended rather than filed under Phase A: every
fixture here creates a `files` row, and the Lexical reference scan
collects upload ids without regard to collection, so inserting a case
mid-file shifts later file ids onto image ids and spares them as
"referenced". That aliasing is a defect in the job, reported separately.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WYbpCRvkk72EkQqLEqsyoe
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-880 October 3, 2026 04:08 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Railway's preview build failed. I cannot read its log — no Railway credential or MCP tool reaches that dashboard — so this one needs an attended look. Nothing pushed.

The code at eef2f19 is sound. What I ran:

  • Full Tier 3 gate green: lint, typecheck (src + tests), pnpm test, and pnpm build — the same Next build Railway runs.
  • Actions Lint, Test & Smoke passed at 23:33Z.

Evidence it is not this branch:

Two environment-side suspects I could not test: this is the first preview carrying #894, and three builds ran at once behind the 23:19Z merge to main.

Next step: open the [build log](https://railway.com/project/bdff2c72-5af2-4da3-9e2c-913f5e9d1b0f/service/1edee955-6c1f-4d8e-9cef-41737f981187?id=41decdb1-acf0-4c8f-af40-a224b5228480&environmentId=e6b4fe29-3f2f-4c12-aa6b-8a26951138cf) and redeploy.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 7, 2026
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Railway is healthy again, so this needs a redeploy, not a debug.

New since my last comment: #892 built green on Railway at 23:41Z, 18 minutes after this PR's 23:23Z failure. The failure recurred nowhere else.

I re-verified the code independently at eef2f19: pnpm install clean, pnpm build exit 0 — the same Next build Railway runs. Actions Lint, Test & Smoke is green on this sha, and main merges in without conflict.

Nothing pushed. There is nothing on this branch to fix, and no Railway credential reaches that dashboard from a routine.

Next step: redeploy the failed build. This was CI fix 2 of 3, so the next red event spends the last one on the same finding.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot added awaiting and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 7, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit 5930ff7 Oct 9, 2026
23 checks passed
@sydevs-bot
sydevs-bot deleted the claude/fix-878-monthly-autorun branch October 9, 2026 22:57
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Oct 9, 2026
sydevs-bot pushed a commit that referenced this pull request Oct 9, 2026
main (#880) moved `jobs.autoRun` out of `payload.config.ts` into
`JOB_AUTO_RUN` in `src/jobs/queues.ts`, while this branch added a
`transcription` entry to the inline array. Both sides are kept: the
config takes main's `autoRun: JOB_AUTO_RUN` — which `job-schedules.spec.ts`
asserts as source text — and the transcription safety net moves into
`JOB_AUTO_RUN`.

Its cron changes from `*/15` to `3-59/15`. #880 added the rule that two
queues ticking on the same minute lose one `lastScheduledRun` to the
other's write, and `*/15` collided with `screening`, `invitations` and
`nightly`. :03 and every 15th minute after clears all three and `monthly`'s
:07, keeping the 15-minute worst-case lateness the entry was written for.

`src/payload-types.ts` and `importMap.js` regenerated: both already
matched the textual merge.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01K3UtS1SCwASAkNJri3QE7w
Ardnived pushed a commit that referenced this pull request Nov 5, 2026
main (#880) moved `jobs.autoRun` out of `payload.config.ts` into
`JOB_AUTO_RUN` in `src/jobs/queues.ts`, while this branch added a
`transcription` entry to the inline array. Both sides are kept: the
config takes main's `autoRun: JOB_AUTO_RUN` — which `job-schedules.spec.ts`
asserts as source text — and the transcription safety net moves into
`JOB_AUTO_RUN`.

Its cron changes from `*/15` to `3-59/15`. #880 added the rule that two
queues ticking on the same minute lose one `lastScheduledRun` to the
other's write, and `*/15` collided with `screening`, `invitations` and
`nightly`. :03 and every 15th minute after clears all three and `monthly`'s
:07, keeping the 15-minute worst-case lateness the entry was written for.

`src/payload-types.ts` and `importMap.js` regenerated: both already
matched the textual merge.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01K3UtS1SCwASAkNJri3QE7w

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-880 — eef2f19e Deployed Oct 7, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

fix(jobs): the monthly queue has no autoRun entry, so its jobs never run

3 participants