GeezerVison is showing github.com — fleet-queue (turso): no revive/requeue verb — dead-at-cap tasks can only be reset via direct SQL; enqueue dedupe ignores status · Issue #6838 · developing-today/code
fleet-queue (turso): no revive/requeue verb — dead-at-cap tasks can only be reset via direct SQL; enqueue dedupe ignores status #6838DescriptionGap: the Turso queue backend has no revive/requeue verb
Found during the dead-at-cap requeue pass (2026-11-07) executing the staged evaluation in #6463 against fleet-queue.
What exists: fleet queue verbs on the Turso backend (turso_queue.rs): enqueue, claim, lane, bind, heartbeat, checkpoint, park, block, cancel, fail, complete, list, health, signal, events-*. verb_fail only requeues a claimed task on transient failure while attempts remain.
What's missing: any supported way to revive a queued task whose attempts >= max_attempts (the silent-zombie state #6463 is about — 231 such rows fleet-wide at the 2026-11-07 census). Specifically:
- No
revive/requeue verb that resets attempts (and clears last_error) on a queued row with an audit event.
verb_enqueue's dedupe lookup (WHERE queue = ? AND dedupe_key = ?) has no status predicate — it returns the existing row even when that row is cancelled/done/failed. The PG backend's revive-on-enqueue semantics (only live rows dedupe-match) were not ported, so cancel + re-enqueue of the same packet silently returns the dead row instead of creating a fresh task.
Impact: the 2026-11-07 requeue pass had to reset attempts via direct SQL against fleet-queue (queued rows only, guard predicates status='queued' AND attempts>=max_attempts, one revived event row per task) because no verb path exists. Cancellations of superseded tasks did go through the cancel verb.
Ask: add a revive verb (task id + worker + reason → attempts=0, not_before=now or supplied, last_error=NULL, revived event) and make enqueue's dedupe match only non-terminal rows (reviving/resetting per the PG semantics), with tests naming the oracle (the PG migration-0023 behavior).
Acceptance criteria
- A supported broker verb (revive/requeue) resets attempts and clears last_error on a queued dead-at-cap task, with an audit event recorded
- Enqueue dedupe matches only live rows (queued/claimed/parked/blocked): re-enqueueing a packet whose previous row is cancelled/done/failed creates a fresh task instead of returning the terminal row
- The fleet monitor's dead-in-queue self-repair (Duty 1 addendum) can be re-pointed from direct SQL to the new verb
Activitydeveloping-today commented on Nov 7, 2026 dezren39 commented on Nov 7, 2026 Intake review
Related: issue #6463 (dead-at-cap zombie census — 231 rows fleet-wide at the 2026-11-07 census per this issue), issue #6803 (sibling Turso-port gap from the same #6741 cutover). Verified this run by the monitor: dedupe returned terminal done tasks 10172, 10085, and 9476 for fresh triage packets on issues #5766, #5604, and #5345, so those work orders could not be re-queued. Risks: revive semantics must not resurrect tasks whose issues closed — the verb should check or the caller must. Suggested approach: port the PG backend's revive-on-enqueue semantics and add the explicit verb the monitor's repair duty can call.
— Fleet monitor intake (repo-fleet-monitor, 2026-11-07 run): acceptance criteria appended to the issue body, labels normalized (kind/infrastructure, priority/high, effort/m, status/needs-triage, meta/enriched), marked meta/enriched. No merged PR or commit was found this run that explicitly resolves this issue, so it stays open. dezren39 commented on Nov 8, 2026 🤖 Agent note · done
Triage verdict: CONFIRMED at current state, fix path scoped and routed.
- Verb surface verified live this shift:
fleet queue offers validate, list, enqueue, claim, lane, bind, heartbeat, checkpoint, park, block, cancel, fail, complete, health, signal, fallback — there is no revive/requeue verb, exactly as issue fleet-queue (turso): no revive/requeue verb — dead-at-cap tasks can only be reset via direct SQL; enqueue dedupe ignores status #6838 states.
- The dedupe half is independently evidenced on the issue's intake review (comment 6704522971): enqueue returned terminal done task 10172, task 10085 and task 9476 for fresh triage packets.
- Fix path (scoped, in follow-up task 11462): add a revive verb in the Turso backend (attempts=0, last_error cleared, not_before set,
revived audit event) and restrict verb_enqueue's dedupe to live statuses (queued/claimed/parked/blocked), with tests naming the oracle — the PG backend's migration-0023 revive-on-enqueue semantics. After the verb exists, the fleet monitor's dead-in-queue self-repair can be re-pointed from direct SQL to the verb (acceptance item on issue fleet-queue (turso): no revive/requeue verb — dead-at-cap tasks can only be reset via direct SQL; enqueue dedupe ignores status #6838; not done by this triage).
- Blockers/ordering: none for the fix itself; it is adjacent to issue fleet-queue: port the pg_cron sweepers (expire standalone, parked revalidation, events prune) #6803 (sibling Turso-port gap from the Turso replacement for the queue core: dedicated muse-queue DB + fleet queue-broker Turso backend #6741 cutover) but independent. Note: my first enqueue of the follow-up landed in the shadow queue as task 11459 due to a missing --queue flag; it was cancelled immediately and the correct pilot task is task 11462.
dezren39 commented on Nov 8, 2026 Permanent fix landed — revive (Drew's order 2026-11-07 20:45 CST)
Design followed: this issue's own ask — restore the PG backend's revive-on-enqueue semantics (the Turso port dropped them; queue-turso-cutover.md deviation 6) plus the explicit revive verb, rather than any new scheme.
Shipped: PR #7082, merged 0935ea6696424452eae76579cb8c736f04f68589 (commit e01bcf8 for this defect).
- Enqueue dedupe now matches only LIVE rows (queued/claimed/parked/blocked). When a (queue, dedupe_key)'s only rows are terminal, enqueue creates a FRESH task linked to its newest terminal predecessor:
progress.revived_from on the new task, task_revived/revived_by events on both rows, revived_from in the envelope, CLI prints its revived line.
- New
/revive verb + fleet queue revive: a failed task, or a queued task dead at cap (attempts >= max_attempts — the Queue semantics: lease expiry strands tasks at attempt cap in 'queued' forever (142 silent zombies in code queue) #6463 zombie state), resets to attempts=0 with last_error cleared and a revived audit event. This is the supported path the fleet monitor's dead-in-queue self-repair (acceptance criterion 3) re-points to — the monitor config re-point itself is the remaining follow-up, tracked here.
Tests: cargo test -p fleet-queue --all-features on the laptop worktree: 95/95 lib + 2/2 integration, incl. new dedupe_partition and revive_eligible matrix tests.
Deploy: broker rebuilt from merged main and installed via the standing fastlane route (~/.local/bin/fleet, drop-in 30-turso-queue.conf unchanged); queue-broker restarted (new MainPID 557028 at first deploy; current build also carries #7086, MainPID 580548). No home-manager switch needed. The fleet CLI is the same binary, so lanes pick up the new verbs/resolution on their next invocation.
Live proofs (2026-11-07 ~21:16–21:25 CST):
Closing with this evidence; the two sibling defects (shadow-default trap, completion gating) are recorded on #7016.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|