fleetd #513: fix TIMED_OUT_QUEUED javadoc — cancelled, not queued #564

Merged
ltms merged 2 commits from worker/513-timed-out-queued-javadoc-da3628-3 into main 2026-09-12 11:48:54 +02:00
Member

Fixes #513.

Two javadoc blocks in MessageService.java (the queuedDeliveries field, and hasQueuedDelivery) said a timed-out message is still sitting in the injector's per-target queue. CB-640 made send() cancel it via Injector.cancel() 12 lines later, so the message is gone and will never arrive. Rewrote both blocks to say the message was cancelled, is not queued, and will not arrive later.

Also fixed a third occurrence of the same stale claim, split across a line wrap in hasOrphanedDelegation's javadoc, and added a clarifying line to the TIMED_OUT_QUEUED enum constant's own comment (it also said 'still queued for the worker').

Per the ticket's follow-up comment (newer than the original filing):

  • No rename of TIMED_OUT_QUEUED / queuedDeliveries — it reaches FleetApp.java:645 (REST status string "queued") and FleetMcp.java:806/807 (fleet_send timeout message), both out of scope for this ticket.
  • No behavior change — comment-only diff.

Build: mvn -f fleetd/pom.xml clean install — exit 0, BUILD SUCCESS, aggregate Tests run: 1744, Failures: 0, Errors: 0, Skipped: 0.

Acceptance checks run:

  • grep -rn 'still sitting in the injector' fleetd/src/main/java -> 0 matches (control: grep -rn TIMED_OUT_QUEUED fleetd/src/main/java/dev/ltms/fleet/msg/MessageService.java -> 5 matches).
Fixes #513. Two javadoc blocks in MessageService.java (the queuedDeliveries field, and hasQueuedDelivery) said a timed-out message is still sitting in the injector's per-target queue. CB-640 made send() cancel it via Injector.cancel() 12 lines later, so the message is gone and will never arrive. Rewrote both blocks to say the message was cancelled, is not queued, and will not arrive later. Also fixed a third occurrence of the same stale claim, split across a line wrap in hasOrphanedDelegation's javadoc, and added a clarifying line to the TIMED_OUT_QUEUED enum constant's own comment (it also said 'still queued for the worker'). Per the ticket's follow-up comment (newer than the original filing): - No rename of TIMED_OUT_QUEUED / queuedDeliveries — it reaches FleetApp.java:645 (REST status string "queued") and FleetMcp.java:806/807 (fleet_send timeout message), both out of scope for this ticket. - No behavior change — comment-only diff. Build: mvn -f fleetd/pom.xml clean install — exit 0, BUILD SUCCESS, aggregate Tests run: 1744, Failures: 0, Errors: 0, Skipped: 0. Acceptance checks run: - grep -rn 'still sitting in the injector' fleetd/src/main/java -> 0 matches (control: grep -rn TIMED_OUT_QUEUED fleetd/src/main/java/dev/ltms/fleet/msg/MessageService.java -> 5 matches).
agent added 1 commit 2026-09-12 11:33:02 +02:00
fleetd #513: fix TIMED_OUT_QUEUED javadoc — cancelled, not queued
CI / shell-tests (pull_request) Successful in 4s
CI / contract (pull_request) Successful in 52s
CI / build (pull_request) Successful in 2m22s
ed28b51f12
Two javadoc blocks (queuedDeliveries field, hasQueuedDelivery) said a
timed-out message is still sitting in the injector's per-target queue.
CB-640 made send() cancel it via Injector.cancel() instead, so the
message is gone and will never arrive. Rewrote both to describe
cancellation. Also fixed a third instance of the same stale claim in
hasOrphanedDelegation's javadoc, and added a line to the
TIMED_OUT_QUEUED enum constant's own comment clarifying the name is
kept but no longer means the message stays queued.

Per the ticket's follow-up comment: no rename (TIMED_OUT_QUEUED reaches
FleetApp.java REST mapping and FleetMcp.java — out of scope here) and
no behavior change; comments only.
agent added 1 commit 2026-09-12 11:45:44 +02:00
fleetd #513: rework — TIMED_OUT_QUEUED has four routes, not one
CI / shell-tests (pull_request) Successful in 5s
CI / contract (pull_request) Successful in 49s
CI / build (pull_request) Successful in 2m16s
cb64bc8157
Comment 16984 on the ticket showed my first pass (ed28b51) replaced one
wrong invariant with a narrower one: it described injector.cancel()
cancelling a queued entry as THE mechanism, when three of its four
routes (Injector.java: the send-to-terminal call throwing, the
readiness grace expiring, or the target being torn down) never cancel
anything — cancel() just reports a state a different code path already
set. It also claimed the target never saw a word of the message, which
is not established when the herdr agent.prompt call throws after
already pasting.

Rewrote all four comments (the TIMED_OUT_QUEUED enum constant,
queuedDeliveries, hasQueuedDelivery, hasOrphanedDelegation) plus the
pre-existing inline comment that seeded the original bad wording, to
state only what holds on every route: the message will not arrive
later and is not sitting in a queue. The CANCELLED case is called out
as the only one where the target is known to have seen nothing; the
NOT_DELIVERED case (including the herdr-send-threw route) is flagged
as leaving that open.

Comment-only; no behavior change.
Author
Member

Reworked per ticket comment #16984 (route table for TIMED_OUT_QUEUED). New commit cb64bc8 rewrites all four comments plus the pre-existing inline comment that seeded the original wording, to say only what holds on every route (message will not arrive later, is not in any queue) and to stop claiming cancel() cancelled the entry or that the target saw nothing, except where that is actually the CANCELLED case. Build re-verified: mvn clean install exit 0, 1744 tests / 0 failures / 0 errors / 0 skipped (summed from fleetd/target/surefire-reports/*.txt, 130 files).

Reworked per ticket comment #16984 (route table for TIMED_OUT_QUEUED). New commit cb64bc8 rewrites all four comments plus the pre-existing inline comment that seeded the original wording, to say only what holds on every route (message will not arrive later, is not in any queue) and to stop claiming `cancel()` cancelled the entry or that the target saw nothing, except where that is actually the CANCELLED case. Build re-verified: mvn clean install exit 0, 1744 tests / 0 failures / 0 errors / 0 skipped (summed from fleetd/target/surefire-reports/*.txt, 130 files).
ltms merged commit f4f5f3106e into main 2026-09-12 11:48:54 +02:00
ltms deleted branch worker/513-timed-out-queued-javadoc-da3628-3 2026-09-12 11:48:54 +02:00
Sign in to join this conversation.