Floor: a run with no fleet pick shows its slot as "ticket —" for the whole run — the in-sandbox claim never reaches the host #350

Open
opened 2026-11-18 06:24:37 +00:00 by ben · 4 comments
Owner

What happened

On the Floor (2026-11-18), two busy agent slots showed ticket — with no ticket card: elitebook-03 and matou-workstation, both legs of Matou/policy-generators run 271.

  • Both slot holders said ref:"run". The run started with no fleet pick (#301), so each leg fell back to the repo's own order with a ready set of [34,43].
  • The ticket was claimed inside the sandbox by claim-next-task.sh. The tracker showed #34 and #43 both agent-working, one per leg.
  • The host side never learned which leg took which ticket. swarm.db's attempt row lands only at run end, and the /tmp/matou-host-attempts-<run> sink stayed empty until close-report.sh ran.
  • fleet-tui/snapshot.py deliberately does not guess between several ready tickets (_ready_set_pick), so the slot carried no issue number and showed no card for the whole run.

Fix

  1. When claim-next-task.sh wins a ticket, it appends the number to the writable sink main.mts already mounts at /run/host-attempts, as claimed.log (SANDCASTLE_CLAIM_SINK seam). Best-effort: it never changes the claim or the JSON stdout.
  2. run-swarm.sh records that sink directory in the slot holder, under a new attempts_dir field written by host_capacity_holder_write.
  3. fleet-tui/probe.py reads <attempts_dir>/claimed.log beside the holder. snapshot.py resolves a ticket holder's issue in this order: swarm.db attempt, numeric ref (fleet pick), exactly one claimed number, then the single-ticket ready set.

Consumers pick this up at their next pin bump. The hosted floor needs a redeploy for the probe and snapshot changes.

## What happened On the Floor (2026-11-18), two busy agent slots showed `ticket —` with no ticket card: elitebook-03 and matou-workstation, both legs of `Matou/policy-generators` run 271. - Both slot holders said `ref:"run"`. The run started with no fleet pick (#301), so each leg fell back to the repo's own order with a ready set of `[34,43]`. - The ticket was claimed **inside the sandbox** by `claim-next-task.sh`. The tracker showed #34 and #43 both `agent-working`, one per leg. - The host side never learned which leg took which ticket. swarm.db's attempt row lands only at run end, and the `/tmp/matou-host-attempts-<run>` sink stayed empty until `close-report.sh` ran. - `fleet-tui/snapshot.py` deliberately does not guess between several ready tickets (`_ready_set_pick`), so the slot carried no issue number and showed no card for the whole run. ## Fix 1. When `claim-next-task.sh` wins a ticket, it appends the number to the writable sink `main.mts` already mounts at `/run/host-attempts`, as `claimed.log` (`SANDCASTLE_CLAIM_SINK` seam). Best-effort: it never changes the claim or the JSON stdout. 2. `run-swarm.sh` records that sink directory in the slot holder, under a new `attempts_dir` field written by `host_capacity_holder_write`. 3. `fleet-tui/probe.py` reads `<attempts_dir>/claimed.log` beside the holder. `snapshot.py` resolves a ticket holder's issue in this order: swarm.db attempt, numeric ref (fleet pick), exactly one claimed number, then the single-ticket ready set. Consumers pick this up at their next pin bump. The hosted floor needs a redeploy for the probe and snapshot changes.
Author
Owner

Claimed by an interactive session (Ben asked to fix it now) — working on branch claim-signal.

Claimed by an interactive session (Ben asked to fix it now) — working on branch `claim-signal`.

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime

Triage ruling

  • Category: bug. A run with no fleet pick shows its slot as ticket — for the whole run — the in-sandbox claim-next-task.sh win never reaches the host side, so fleet-tui/snapshot.py has no issue number to resolve (it deliberately won't guess between several ready tickets via _ready_set_pick). Broken observability on the Floor.
  • State: ready-for-session (not ready-for-agent).

Why this is a two-way door

The fix is a wiring change across ordinary harness source — claim-next-task.sh (new SANDCASTLE_CLAIM_SINK best-effort append), run-swarm.sh / host-capacity-lib.sh (host_capacity_holder_write gains an attempts_dir field), and fleet-tui/probe.py + snapshot.py (read <attempts_dir>/claimed.log, add it to the holder's resolution order). Every step is revertible by a later commit and provable offline by the fleet-tui tests (fleet-tui/conftest.py + the snapshot/probe suites) plus the host-attempts seam that already exists (SWARM_HOST_ATTEMPTS_DIR, run-swarm.sh:382). It is on none of the one-way-door list (no credentials, no security-posture widening, no trust accept, no data destruction, no non-routine spend).

Why session, not swarm agent

Two reasons keep this off ready-for-agent:

  1. It is already claimed by an interactive session — @ben's comment above, working on branch claim-signal. Labelling ready-for-agent would invite a swarm worker to collide with that in-flight branch.
  2. The body notes the hosted floor needs a redeploy for the probe/snapshot changes to take effect — a live-host operation outside a swarm worker's reach, which is exactly what ready-for-session records (host credentials / live doors, per docs/agents/triage-labels.md).

The code change itself is swarm-safe (no protected .sandcastle/ / .forgejo/ path, no prompt skeleton), so should the session hand it back, a later re-triage to ready-for-agent for the code portion is a one-label two-way door.

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime** ## Triage ruling - **Category: `bug`.** A run with no fleet pick shows its slot as `ticket —` for the whole run — the in-sandbox `claim-next-task.sh` win never reaches the host side, so `fleet-tui/snapshot.py` has no issue number to resolve (it deliberately won't guess between several ready tickets via `_ready_set_pick`). Broken observability on the Floor. - **State: `ready-for-session`** (not `ready-for-agent`). ## Why this is a two-way door The fix is a wiring change across ordinary harness source — `claim-next-task.sh` (new `SANDCASTLE_CLAIM_SINK` best-effort append), `run-swarm.sh` / `host-capacity-lib.sh` (`host_capacity_holder_write` gains an `attempts_dir` field), and `fleet-tui/probe.py` + `snapshot.py` (read `<attempts_dir>/claimed.log`, add it to the holder's resolution order). Every step is revertible by a later commit and provable offline by the fleet-tui tests (`fleet-tui/conftest.py` + the snapshot/probe suites) plus the host-attempts seam that already exists (`SWARM_HOST_ATTEMPTS_DIR`, run-swarm.sh:382). It is on none of the one-way-door list (no credentials, no security-posture widening, no trust accept, no data destruction, no non-routine spend). ## Why session, not swarm agent Two reasons keep this off `ready-for-agent`: 1. It is **already claimed by an interactive session** — @ben's comment above, working on branch `claim-signal`. Labelling `ready-for-agent` would invite a swarm worker to collide with that in-flight branch. 2. The body notes the **hosted floor needs a redeploy** for the probe/snapshot changes to take effect — a live-host operation outside a swarm worker's reach, which is exactly what `ready-for-session` records (host credentials / live doors, per `docs/agents/triage-labels.md`). The code change itself is swarm-safe (no protected `.sandcastle/` / `.forgejo/` path, no prompt skeleton), so should the session hand it back, a later re-triage to `ready-for-agent` for the code portion is a one-label two-way door.
Author
Owner

Landed on main as b4713f3: claim sink, attempts_dir on the holder, and the probe and snapshot read path. The full offline suite and the fleet-tui pytest suite (187) pass. Sandbox and runner uids match on elitebook-03 (1500) and matou-workstation (1000), so the sandbox can write the sink.

Still owed before close:

  1. The hosted floor's collector picks up the probe and snapshot change only after its checkout refreshes and factory-floor.service restarts. A restart signs viewers out.
  2. Consumers pick up the claim and holder halves at their next FACTORY_REF bump. policy-generators pins 9f0a19f.
  3. Live proof: a no-pick run's slot names its ticket mid-run.
Landed on `main` as b4713f3: claim sink, `attempts_dir` on the holder, and the probe and snapshot read path. The full offline suite and the fleet-tui pytest suite (187) pass. Sandbox and runner uids match on elitebook-03 (1500) and matou-workstation (1000), so the sandbox can write the sink. Still owed before close: 1. The hosted floor's collector picks up the probe and snapshot change only after its checkout refreshes and `factory-floor.service` restarts. A restart signs viewers out. 2. Consumers pick up the claim and holder halves at their next `FACTORY_REF` bump. policy-generators pins `9f0a19f`. 3. Live proof: a no-pick run's slot names its ticket mid-run.

Ruled by agent under ADR 0174 — veto anytime — standing session-runner on elitebook-distributed-server-03.

Found already landed — the two-way code part of #350 is done on main

This standing session was dispatched because #350 was still ready-for-session, but the fix is already on main as b4713f3 (@ben's interactive session, 2026-11-18). I independently re-implemented the same three-part fix (same SANDCASTLE_CLAIM_SINK seam, same attempts_dir as host_capacity_holder_write arg 10, same snapshot.py resolution order: swarm.db attempt → numeric ref → one claimed number → ready-set), then hit b4713f3 at git pull --rebase, saw it is byte-equivalent in intent, and discarded my duplicate commit — nothing to push, origin/main already carries the fix.

I re-verified the landed fix is green on the current main from this checkout:

  • tests/host-capacity-lib-test.sh (28 groups), tests/claim-next-task-test.sh (49), tests/run-swarm-drive-yield-test.sh (5), tests/run-swarm-stages-test.sh (14), tests/docs-budget-test.sh (4) — all pass.
  • fleet-tui/tests/test_probe.py + test_snapshot.py — 54 checks pass (stdlib runner; this host has no pytest venv).

Why human — the three items owed "before close" are all outward-facing / pull-only / live

The revertible, provable code is landed. The remaining residue from @ben's own checklist cannot be completed or proven from an unattended standing session (ADR 0174 rule 2), so this session stops and hands them over:

  1. Hosted-floor redeploy. I confirmed factory-floor.service (PID 2180484) has run since 2026-11-04, so it predates b4713f3 and still holds the old snapshot.py in memory (modules load at start; probe.py is re-read per poll, so the probe half is already live). The floor's checkout IS ~/session-runner/dev-factory and is already at main (c787db2 ⊇ b4713f3); b4713f3 touched no fleet-tui/floor/web/ files, so no npm run build is needed — only a service restart loads the new resolution path. But that restart signs every live viewer out (sessions are in memory — deploy/README.md) — an outward-facing, member-facing disruption that is a deliberate operator-timed call, not something this session takes unattended without a durable go. Left for @ben: XDG_RUNTIME_DIR=/run/user/1500 systemctl --user restart factory-floor.service on this host.
  2. Consumer FACTORY_REF bumps. The claim-sink + holder halves reach each consumer only at its next pin bump — pull-only human work (ADR 0001; never pushed from here). policy-generators pins 9f0a19f.
  3. Live proof. "A no-pick run's slot names its ticket mid-run" needs item 1 done plus a live no-pick swarm run to occur and be observed — not producible from a standing session.

Relabeled ready-for-human (off ready-for-session, cleared agent-working) so the session lane stops re-dispatching a ticket whose code is already landed and whose residue is human.

**Ruled by agent under ADR 0174 — veto anytime** — standing session-runner on `elitebook-distributed-server-03`. ## Found already landed — the two-way code part of #350 is done on `main` This standing session was dispatched because #350 was still `ready-for-session`, but the fix is **already on `main` as `b4713f3`** (@ben's interactive session, 2026-11-18). I independently re-implemented the same three-part fix (same `SANDCASTLE_CLAIM_SINK` seam, same `attempts_dir` as `host_capacity_holder_write` arg 10, same `snapshot.py` resolution order: swarm.db attempt → numeric ref → one claimed number → ready-set), then hit `b4713f3` at `git pull --rebase`, saw it is byte-equivalent in intent, and **discarded my duplicate commit** — nothing to push, `origin/main` already carries the fix. I re-verified the landed fix is green on the current `main` from this checkout: - `tests/host-capacity-lib-test.sh` (28 groups), `tests/claim-next-task-test.sh` (49), `tests/run-swarm-drive-yield-test.sh` (5), `tests/run-swarm-stages-test.sh` (14), `tests/docs-budget-test.sh` (4) — all pass. - `fleet-tui/tests/test_probe.py` + `test_snapshot.py` — 54 checks pass (stdlib runner; this host has no pytest venv). ## Why human — the three items owed "before close" are all outward-facing / pull-only / live The revertible, provable code is landed. The remaining residue from @ben's own checklist cannot be completed or proven from an unattended standing session (ADR 0174 rule 2), so this session stops and hands them over: 1. **Hosted-floor redeploy.** I confirmed `factory-floor.service` (PID 2180484) has run since **2026-11-04**, so it predates `b4713f3` and still holds the old `snapshot.py` in memory (modules load at start; `probe.py` is re-read per poll, so the probe half is already live). The floor's checkout IS `~/session-runner/dev-factory` and is already at `main` (`c787db2` ⊇ `b4713f3`); `b4713f3` touched no `fleet-tui/floor/web/` files, so **no `npm run build` is needed — only a service restart loads the new resolution path.** But that restart **signs every live viewer out** (sessions are in memory — deploy/README.md) — an outward-facing, member-facing disruption that is a deliberate operator-timed call, not something this session takes unattended without a durable go. Left for @ben: `XDG_RUNTIME_DIR=/run/user/1500 systemctl --user restart factory-floor.service` on this host. 2. **Consumer `FACTORY_REF` bumps.** The claim-sink + holder halves reach each consumer only at its next pin bump — pull-only human work (ADR 0001; never pushed from here). `policy-generators` pins `9f0a19f`. 3. **Live proof.** "A no-pick run's slot names its ticket mid-run" needs item 1 done plus a live no-pick swarm run to occur and be observed — not producible from a standing session. Relabeled `ready-for-human` (off `ready-for-session`, cleared `agent-working`) so the session lane stops re-dispatching a ticket whose code is already landed and whose residue is human.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#350
No description provided.