Fix cron cwd for super_admin and harden IM channel job isolation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-10 10:00:59 +08:00
parent b35bfde557
commit b1bb0067a0
16 changed files with 714 additions and 49 deletions

View file

@ -108,9 +108,18 @@ export function claimOccurrence(state, jobId, now, trigger, policies) {
if (decision.action === 'skip') {
run.status = 'skipped'
run.reason = decision.reason
run.summary = decision.reason === 'overlap'
? 'Skipped because a run is already queued or running'
: 'Skipped missed occurrence after host downtime (no backlog)'
const oneshot = job.schedule?.kind === 'at'
if (decision.reason === 'overlap') {
run.summary = 'Skipped because a run is already queued or running'
} else if (decision.reason === 'misfire' && oneshot) {
run.summary = 'Skipped: one-shot time missed (host downtime or delayed tick; no backlog). nextRunAt cleared.'
run.error = 'misfire:one-shot'
} else if (decision.reason === 'misfire') {
run.summary = 'Skipped missed occurrence after host downtime (no backlog)'
run.error = 'misfire'
} else {
run.summary = `Skipped (${decision.reason || 'policy'})`
}
const alreadySkipped = runs.some((row) => (
row
&& row.status === 'skipped'