You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
queue bind: session id format is not validated - a ghost id binds and strands the task until stuck-bound supervision #8287
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.
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).
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).
Activity
developing-today commentedon Nov 10, 2026
CODE-2468
dezren39 commentedon Nov 17, 2026
🤖 Agent note · triaged
Triage evidence (fresh, 2026-11-17)
verb_bindinpkgs/fleet/crates/fleet-queue/src/turso_queue.rs(~line 5114) readssession_idstraight 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.ses_predicate inverb_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).dezren39 commentedon Nov 17, 2026
Fix opened — PR #11217 (task 20115, lane code-d)
verb_bindnow validates the session id against the crate's one predicate (client::valid_session_id, promoted topub(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 testbind_rejects_malformed_session_id_8287coversnot-a-session, empty, bareses_, 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 fmtapplied. PR: #11217 (carriesFixes #8287for the merging lane).Merge pull request #11217 from developing-today/queue/20115-8287-bind…
port main's client.rs changes (#7598, #8287, test attributes) into th…
port main's turso_queue.rs changes (#7598, #8287, test attributes, so…