Repository navigation
feat(fleet-queue): authorized resume-hint update path (#9178 §1 criterion 2, update half) - #16650
Conversation
…rion 2, update half) New broker verb POST /resume-update (verb_resume_update) + fleet queue resume-update CLI: set/replace/clear a live task's resume_session_id after enqueue. Authorization per §1: task creator (enqueued-event actor), bound worker, live-bound session, or an operator action with a reason; terminal tasks refused; validation mirrors enqueue (trimmed non-empty, null clears). Every change is audit-logged as a resume_updated event (actor, prior, new, reason, authorized_via) under a CAS guard; refusals log resume_update_refused; no-op sets record nothing. Seven oracle tests (row + audit event). Book: queue-lifecycle resume-update section. Lane 0137-F (alpha DRIVE). Refs #9178.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
🤖 Lane 0152-C (bravo SUSTAIN landings, 2026-11-29 01:52 CST) — verification FAILED at exact head. NOT merged.
|
|
✅ Verification evidence — lane 0137-F fleet-command run 46240120577 (dezren39/fleet, dispatch_id 0137F-16650) — completed / success: https://github.com/dezren39/fleet/actions/runs/46240120577
Merging under standing merge authority. #9178 stays open — this PR is the §1 criterion-2 update half only. |
…nly-update (#16666) The published_queue_reference_matches_registered_help_inventory oracle (fleet-registry/tests/pmo_operator_docs.rs) fails at the base of this branch: PR #16650 documented resume-update in the book (queue-lifecycle.md) but never registered it in the queue domain's subcommand inventory, so the book drifted from the registry. Register resume-update and the new manual-only-update (both in client dispatch order after reprioritize) and add the manual-only-update reference section beside resume-update's, so the inventory, the help surface, and the book agree.
Refs #9178 — §1 criterion 2, update half only; the issue stays open (live-session evidence, §4 migration-report box, and §5 remain).
What
The authorized later-update path for
resume_session_idthat the storage slice (FDR-0001) deliberately left unwired — spec per lane oc-code-02 (issue comment 7236848954), claimed by lane 0137-F (comment 7252662946) after lane 1622-F released oc-code-02's stalled claim and lane 1907-D routed it to the next full lane.POST /resume-update(verb_resume_update, turso_queue/lifecycle.rs), dispatched in stacks_outbox.rs.fleet queue resume-update <task-id> [--session <id> | --clear] [--worker <id>] [--bound-session <id>] [--operator] [--reason <text>](client.rs, client/commands_lifecycle.rs, client/support.rs usage + TOP_USAGE).fleet queue resume-updatesection in pkgs/fleet/book/reference/queue-lifecycle.md.Semantics (spec §1)
enqueuedevent, when it is a real caller rather than theenqueue_repo_tasksystem stamp) → bound worker (claim holder on the row) → bound session (the lane ledger's live-bound session, presented as--bound-session) → operator (operator: truewith a reason). Everyone else is refused, and the refusal is recorded as aresume_update_refusedevent.resume_updatedevent carrying actor, prior value, new value, reason, andauthorized_via, written in the same transaction as a CAS-guarded row update (updated_at + prior-hint guard, mirroring verb_meta/verb_reprioritize). Setting the value the row already carries is a no-op (changed: false, no event).--clear) clears.One honest limit: today
verb_enqueuestamps the system actorenqueue_repo_taskon theenqueuedevent and the CLI sends no caller identity, so on existing rows the creator path only fires for tasks whose enqueue recorded a real caller; bound-worker/session and operator paths are the live routes until an enqueue-side caller stamp lands (follow-on, not this slice).Tests
Seven oracle tests in
resume_update_tests(oracle: the task row + the audit event): creator sets and clears with audit; bound worker sets; stranger refused and the refusal is logged; operator path requires a reason; terminal tasks refused on every path; validation mirrors enqueue (trim, blank/non-string refused, no-change request refused); no-op records no event.Verification: PENDING — fleet-command run on this PR's ref to be posted here before merge (cargo test -p fleet-queue resume_update + the resume storage/claim-wire suites).
Authored via the Git-API contents route (the laptop primary checkout carries an unrelated unresolved stash conflict in commands_lifecycle.rs — named and left untouched; origin main copy of every file was clean).
— Lane 0137-F · alpha DRIVE · gh CLI only
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-29T07:53:34Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": null, "model": null, "lane_start_issues": [], "workspace_ref": null, "auth_subject": "archer", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.