Skip to content

queue bind: session id format is not validated - a ghost id binds and strands the task until stuck-bound supervision #8287

Closed

Description

@dezren39

Found during the #8217 live acceptance (2026-11-10): fleet queue bind 14741 --worker scratch-8217-worker --session-id not-a-session --launched-by scratch-8217-worker succeeded and the task read back bound (progress.session_id = not-a-session, verified from live queue state). The claim paths validate session ids (the transfer holder match, claimant is_valid_session_id on launch), but the bind verb accepts an arbitrary string. Impact: a fat-fingered or stale session id binds a ghost; the task sits claimed until the claimant stuck-bound supervision recovers it (zero-message session path) - recoverable, but a silent stall measured in supervision cycles. Fix options: validate the id in verb_bind against the same predicate the claimant uses (ses_ prefix + shape), refusing with a usage error; keep the transfer/claim paths as they are. Acceptance: bind with a malformed id refuses and leaves the task unbound; bind with a well-formed id works; regression test beside the existing bind tests.

Activity

  1. developing-today commented on Nov 10, 2026

    @developing-today
    Contributor
  2. added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/normalOrdinary priority (the default)
    effort/sSmall: expected under 2 hours of work
    status/triagedTriaged and routed (see agent note)
    on Nov 17, 2026
  3. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

    Triage evidence (fresh, 2026-11-17)

    • Issue queue bind: session id format is not validated - a ghost id binds and strands the task until stuck-bound supervision #8287 is OPEN with no held / user/owned / do-not-merge / do-not-auto-edit labels.
    • The defect is still present on current main: verb_bind in pkgs/fleet/crates/fleet-queue/src/turso_queue.rs (~line 5114) reads session_id straight from the request and binds it into the lane ledger with no format check, and no session-id validity predicate exists anywhere in that file — unlike the claim paths, which validate.
    • Nothing else has picked this up: the issue has no comments beyond a tracker link, and no live queue task covered it before this triage.
    • First concrete step for task 20115: reuse the claim paths' existing ses_ predicate in verb_bind (single definition — do not fork a second one), refuse malformed ids with a usage error leaving the task unbound, and add the regression test beside the existing bind tests. Acceptance: the issue's own (malformed refuses + unbound; well-formed binds; transfer/claim untouched).
  4. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Fix opened — PR #11217 (task 20115, lane code-d)

    verb_bind now validates the session id against the crate's one predicate (client::valid_session_id, promoted to pub(crate) — no second definition forked) and refuses a malformed id as a usage error (exit 2) before any state is touched, leaving the task unbound. The claim-flow bind step inherits the guard. Regression test bind_rejects_malformed_session_id_8287 covers not-a-session, empty, bare ses_, and an injection-shaped id, plus a well-formed id passing the gate.

    Tests: cargo test -p fleet-queue --features queue-broker --lib — 372 passed, 0 failed; cargo fmt applied. PR: #11217 (carries Fixes #8287 for the merging lane).

  5. added a commit that references this issue on Nov 17, 2026
  6. added 2 commits that reference this issue on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

effort/sSmall: expected under 2 hours of workepic/fleet-orchestrationReprioritization program epic (2026-11-12)priority/normalOrdinary priority (the default)status/triagedTriaged and routed (see agent note)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions