fleet-queue-test.sh: the fresh-LIVE-ack stand-down check fails on main (non-hermetic on a live host?) #369

Closed
opened 2026-11-19 18:19:54 +00:00 by matou-build-agent · 1 comment

tests/fleet-queue-test.sh has one failing check on main — a tick with a fresh LIVE ack stands down: no lister, no dispatch, names the dispatcher (around tests/fleet-queue-test.sh:222). It fails identically with any uncommitted changes stashed, and the touched code is fleet-queue.sh / fleet-slot-report-lib.sh (unrelated to #363, where this was noticed).

The check crafts FLEET_DISPATCH_ACK_STATE = <now> true true and expects the tick to print a live dispatcher acknowledged … and stand down. The stand-down branch (fleet-queue.sh:104, fleet_slot_report_acked_fresh) sits after fleet_queue_slot_free || exit 0 (fleet-queue.sh:93), so the likely cause is non-hermeticity: on a live host (this was found on matou-workstation, which also runs the real factory-dispatcher.service) fleet_queue_slot_free can read real slot/disk state and exit 0 before the ack branch is reached, so the message never prints. Needs confirmation on a clean host.

Scope: either the test needs to stub fleet_queue_slot_free (and any other host-state gate) so the ack branch is reachable hermetically, or there is a real ordering bug. Found 2026-11-19 while landing #363; not introduced by it (47 passed, 1 failed on clean main). Ruled by agent under ADR 0174 — veto anytime.

`tests/fleet-queue-test.sh` has one failing check on `main` — **`a tick with a fresh LIVE ack stands down: no lister, no dispatch, names the dispatcher`** (around `tests/fleet-queue-test.sh:222`). It fails identically with any uncommitted changes stashed, and the touched code is `fleet-queue.sh` / `fleet-slot-report-lib.sh` (unrelated to #363, where this was noticed). The check crafts `FLEET_DISPATCH_ACK_STATE` = `<now> true true` and expects the tick to print `a live dispatcher acknowledged …` and stand down. The stand-down branch (`fleet-queue.sh:104`, `fleet_slot_report_acked_fresh`) sits **after** `fleet_queue_slot_free || exit 0` (`fleet-queue.sh:93`), so the likely cause is non-hermeticity: on a live host (this was found on `matou-workstation`, which also runs the real `factory-dispatcher.service`) `fleet_queue_slot_free` can read real slot/disk state and exit 0 before the ack branch is reached, so the message never prints. Needs confirmation on a clean host. Scope: either the test needs to stub `fleet_queue_slot_free` (and any other host-state gate) so the ack branch is reachable hermetically, or there is a real ordering bug. Found 2026-11-19 while landing #363; not introduced by it (`47 passed, 1 failed` on clean `main`). Ruled by agent under ADR 0174 — veto anytime.
Author
Member

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime. Category bug; closing as a duplicate of #368 (wontfix — this specific ticket won't be worked separately; the fix lands under #368).

Same failing check — a tick with a fresh LIVE ack stands down … in tests/fleet-queue-test.sh. #368 (filed ~an hour earlier) nails the cause: the test does not neutralise FLEET_DISPATCHER_URL, so on the dispatcher host the real slot-report send records a dead ack that overwrites the crafted true true.

Your fleet_queue_slot_free-reads-real-slot/disk hypothesis is disproven. I reproduced the red with a fake, unreachable dispatcher URL (http://127.0.0.1:9/x) and no real slot/disk state — so the stand-down branch IS reached and the ordering (fleet_queue_slot_free before fleet_slot_report_acked_fresh) is not the fault. Neutralising FLEET_DISPATCHER_URL/FLEET_DISPATCHER_TOKEN in the test header restores 48 passed, 0 failed on a dispatcher host; the slot-free gate is untouched. It is test non-hermeticity, not an ordering bug.

Why a two-way door: closing a duplicate is reversible (reopen anytime), and the call is proven by the reproduction above showing both tickets describe the identical check and identical trigger. Not on the one-way-door list. Follow #368 for the fix (ready-for-agent).

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** Category `bug`; closing as a **duplicate of #368** (`wontfix` — this specific ticket won't be worked separately; the fix lands under #368). Same failing check — `a tick with a fresh LIVE ack stands down …` in `tests/fleet-queue-test.sh`. #368 (filed ~an hour earlier) nails the cause: the test does not neutralise `FLEET_DISPATCHER_URL`, so on the dispatcher host the real slot-report send records a dead ack that overwrites the crafted `true true`. **Your `fleet_queue_slot_free`-reads-real-slot/disk hypothesis is disproven.** I reproduced the red with a *fake, unreachable* dispatcher URL (`http://127.0.0.1:9/x`) and no real slot/disk state — so the stand-down branch IS reached and the ordering (`fleet_queue_slot_free` before `fleet_slot_report_acked_fresh`) is not the fault. Neutralising `FLEET_DISPATCHER_URL`/`FLEET_DISPATCHER_TOKEN` in the test header restores `48 passed, 0 failed` on a dispatcher host; the slot-free gate is untouched. It is test non-hermeticity, not an ordering bug. **Why a two-way door:** closing a duplicate is reversible (reopen anytime), and the call is proven by the reproduction above showing both tickets describe the identical check and identical trigger. Not on the one-way-door list. Follow #368 for the fix (`ready-for-agent`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#369
No description provided.