fix(jobs): say that a restart drops what was queued, because it does #879
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!879
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/hs68-queued-jobs-dropped"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#824 asked three questions about
RecordEffectandEffectApplied. Answering them found that the issue's stated live consequence is stale in both halves, and that a different, real problem sits underneath it.The premise, re-checked
No longer true, and it was already fixed when the issue was filed.
11d5fe2(2026-08-13) wired both functions into the content path.jobcontent.go:132reads throughEffectAppliedand:149writes throughRecordEffectafter every successfulEmitJobContent.unwiredcapabilities_test.godropped both rows in the same change. #824 was filed 2026-08-15.This cannot happen, because nothing resumes a job. Every path, checked:
queuedat restart - left inqueued.Startbuilds an empty channel,enqueuehas exactly one caller (Submit), andJobStorehas no query by state. Never picked up.runningorcancellingat restart -RecoverStrandedJobs, called fromAgent.recoverJobs, moves them tofailedorcancelledwithinterrupted by a restart. Settled, never re-run.Submitdedupes on the idempotency key, returns the existing job, and queues nothing.No job is executed twice, so the write half runs on every delivery and the read half has never returned true. The mechanism is correct, cheap, and dormant.
Answering the three questions
1. Is redo-on-resume harmful today? The question is moot rather than answered: there is no resume. And the honest version of the concern runs the other way - an accepted, durable, not-yet-started job is dropped silently on restart, with no notice to its requester. That is filed as #878.
2. The commit that introduced them.
1f8825f, 2026-08-12, the original jobs feature, alongsideAttemptsand the restart section of the doc. It shippedStartwith this comment:The body never did. That false comment is why this looked like an unwired mechanism rather than a missing one - it describes a resume path that would make
Effectsload-bearing, and reading the comment instead of the body gives you exactly #824's mental model.3. Does Temporal change the answer? #430 is open and jobs were explicitly out of scope for August 19, so the mechanism stays for now. It does bear on #878: if jobs move onto Temporal, event history is the durable record and both the requeue and the effects guard are replaced rather than built. That is the reason #878 asks for a decision before code.
What this PR changes
Startnow says what the function does.TestARestartDropsWhatWasQueuedpins the observed behaviour, so the claim cannot drift back in as prose.docs/sirens-echo-jobs.mdsays which mid-flight states recovery covers and which it does not, points at #878 for the gap, and corrects the effects paragraph:Effectsis written per delivered message, and nothing reads a non-empty result yet because no path runs a job twice.No behaviour change. Fixing the drop needs a store query by state across three implementations and a requeue-or-settle decision, which is #878's to make.
just gatepasses.closes #824