Skip to content

fleet-queue: manual-only-update verb + CLI — set/clear manual_only on a live task (#16666) - #16694

Merged
developing-today-fleet[bot] merged 2 commits into
mainfrom
felix/lane-16666-manual-only
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 2 commits into
mainfrom
felix/lane-16666-manual-only

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #16666. Refs #9178 (§4 criterion 1).

What

manual_only could be set at enqueue (PR #14860) and is honored by both automatic pick paths, but no production path could set or clear it on a live task — the only UPDATE tasks SET manual_only in the tree was inside a test. The #9178 §4 migration audit (2026-11-29) found 6 parked-for-manual candidates (tasks 15864, 17413, 24232, 25939, 23911, 26340) whose disposition is "convert to manual_only" and none of them could be converted; two are past their not_before and keep churning through automatic lanes.

This adds the update half, mirroring the resume-update path (PR #16650) shape-for-shape:

  • Broker verb /manual-only-update (verb_manual_only_update, turso_queue/lifecycle.rs):
    • Authorization identical to §1: task creator (from the enqueued event), currently bound worker, live-bound session (presented as session_id), or an operator action (operator: true) carrying a reason — checked in that order so the audit names the path.
    • Every change audit-logged as a manual_only_updated history event with actor, prior value, new value, reason, and authorized_via; refusals logged as manual_only_update_refused.
    • Terminal tasks (anything outside queued/claimed/parked/blocked) refused on every path.
    • manual_only must be a JSON boolean (clear: true accepted as sugar for false); same-value requests are a no-op (changed: false, no event); the write uses the same optimistic-concurrency batch (updated_at + prior-value guard, changes() = 1 event insert) as verb_resume_update.
  • CLI fleet queue manual-only-update <task-id> --set|--clear [--worker <id>] [--bound-session <id>] [--operator] [--reason <text>], with usage text alongside resume-update.
  • Dispatch wired in stacks_outbox::dispatch next to /resume-update.
  • Registry + book: both manual-only-update and resume-update are now registered in the queue domain's subcommand inventory (fleet-registry), and manual-only-update has a reference section in the book beside resume-update's. This also repairs pre-existing drift the canonical suite caught at this branch's base: PR feat(fleet-queue): authorized resume-hint update path (#9178 §1 criterion 2, update half) #16650 documented resume-update in the book but never registered it, so published_queue_reference_matches_registered_help_inventory was failing before this change (missing []; unregistered ["resume-update"]).

Tests

Oracle tests in the resume-update style (manual_only_update_tests, 7 tests): creator sets and clears with audit; bound worker sets; stranger refused and the refusal is logged; operator path requires a reason (the §4 conversion path); terminal tasks refused; boolean validation + clear sugar; no-op records no event.

Verification (remote, canonical venue): fleet-rust-tests workflow run 46248219773 on this branch — success: 66 suites ok, 2,400 tests passed, 0 failed, including all 7 new manual_only_update_tests and the registry/book inventory oracle. (The earlier run 46247687925 on the first commit shows the 7 new tests passing and the single pre-existing registry-drift failure this PR then fixed.)

After merge

The 6 §4 conversion candidates can be converted with e.g.:

fleet queue manual-only-update 23911 --set --operator --reason "waits on a named session (#9178 §4 audit)"

Left unmerged for review.

{
  "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-29T09:41:38Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch/worktrees/lane-16666-manual-only",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch/worktrees/lane-16666-manual-only",
      "repo": "developing-today/code",
      "branch": "felix/lane-16666-manual-only",
      "sha": "8a53996bd3f9ad4a0bc1212a6a0bc722ceca77f4"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Felix added 2 commits November 29, 2026 08:35
#9178 §4 criterion 1, update half: manual_only could be set at
enqueue (PR #14860) and is honored by both automatic pick paths,
but no production path could set or clear it on a live task — the
§4 migration's parked-for-manual conversions (tasks 15864, 17413,
24232, 25939, 23911, 26340) were blocked on exactly this.

Mirror the resume-update path (PR #16650):
- broker verb /manual-only-update (verb_manual_only_update):
  creator / bound worker / bound session / reasoned operator
  authorization, manual_only_updated audit event (actor, prior,
  new, reason, authorized_via), manual_only_update_refused on
  refusal, terminal tasks refused, optimistic-concurrency batch
  identical in shape to verb_resume_update.
- CLI: fleet queue manual-only-update <task-id> --set|--clear
  [--bound-session <id>] [--operator] [--reason <text>].
- Oracle tests in the resume-update style: creator set/clear,
  bound worker, stranger refusal logged, operator-requires-reason
  (the §4 conversion path), terminal refusal, boolean validation
  + clear sugar, no-op records no event.
…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.
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a6d23d8b-888a-423c-a7e3-d24919d3e4e9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Lane 0352-E claim (bravo SUSTAIN, 2026-11-29) — landing PR #16694.

Verified firsthand: full diff read (7 files, +458/-0 — broker verb /manual-only-update mirroring resume-update, CLI, dispatch, registry + book; CAS-guarded write, audit events incl. refusals, terminal refusal, 7 oracle tests). Exact-head evidence re-read via gh api: fleet-rust-tests run 46248219773 = completed/success on head 8a53996 (branch felix/lane-16666-manual-only), 2,400 tests passed per PR body including all 7 new tests. No live claim on this PR (only CodeRabbit). Merging under standing authority on fresh CLEAN/MERGEABLE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fleet queue: no production path can set manual_only on a live task — #9178 §4 migration conversions blocked

0 participants