From 39accf73e6a57e6bba1c483e17e8e7e19ba72558 Mon Sep 17 00:00:00 2001 From: Dai Ha Date: Mon, 5 Oct 2026 10:26:36 +0200 Subject: [PATCH] fleetd #759: fix the third copy of the role claim, and drop two references that rot ConnectionIdentity's Caller record carried the same wrong rule as the two places PR #760 fixed: it called the terminal a worker's, and read a null terminal as the primary. The brief for #760 named only two of the three spots. MemberPresence pointed at FleetMcp.markTrackedCallerPresent by name inside {@code}, which the compiler does not check, and inject has no dependency on mcp so a {@link} would add a cross-package reference. States the principle instead, which stays true whichever roles qualify. Drops a ticket key. --- .../java/dev/ltms/fleet/inject/MemberPresence.java | 10 +++++----- .../java/dev/ltms/fleet/mcp/ConnectionIdentity.java | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fleetd/src/main/java/dev/ltms/fleet/inject/MemberPresence.java b/fleetd/src/main/java/dev/ltms/fleet/inject/MemberPresence.java index 1cb3bed6..49299219 100644 --- a/fleetd/src/main/java/dev/ltms/fleet/inject/MemberPresence.java +++ b/fleetd/src/main/java/dev/ltms/fleet/inject/MemberPresence.java @@ -5,16 +5,16 @@ import java.util.Set; /** * Tracks which peers are available — their Claude has booted and connected its MCP - * client to the bridge (CB-113). For a spawned member this is the reliable readiness signal, + * client to the bridge. For a spawned member this is the reliable readiness signal, * unlike herdr's {@code agent_status}, which reports {@code idle} while its Claude is still * booting. Delivering into that boot window pastes into a not-yet-ready TUI (the text is lost) * and wedges that member's delivery state, so the {@link Injector} holds a spawned member's * first delivery until it is present here. * - *

Populated from the MCP transport, for the peers whose deliverability depends on a proven - * live MCP contact; {@code FleetMcp.markTrackedCallerPresent} decides which peers those are. A - * peer that never mounts the bridge MCP is never marked present — its sends stay queued until - * they time out, which is correct (it could not have replied anyway). + *

Populated from the MCP transport, for the peers whose deliverability rests on proving a live + * MCP contact rather than on a configured registry entry. A peer that never mounts the bridge MCP + * is never marked present — its sends stay queued until they time out, which is correct (it could + * not have replied anyway). */ public class MemberPresence { diff --git a/fleetd/src/main/java/dev/ltms/fleet/mcp/ConnectionIdentity.java b/fleetd/src/main/java/dev/ltms/fleet/mcp/ConnectionIdentity.java index d242f63c..022a0b4e 100644 --- a/fleetd/src/main/java/dev/ltms/fleet/mcp/ConnectionIdentity.java +++ b/fleetd/src/main/java/dev/ltms/fleet/mcp/ConnectionIdentity.java @@ -46,9 +46,10 @@ public final class ConnectionIdentity { } /** - * The caller resolved from the connection: its worker {@code terminal} (or {@code null} for the - * primary / an off-host client), its {@code pid} (or {@code -1} if not resolvable), and whether - * the pane scan behind {@code terminal} ran to completion ({@link #scanComplete}). + * The caller resolved from the connection: the {@code terminal} of the pane it connects from + * (or {@code null} when the connection maps to no pane), its {@code pid} (or {@code -1} if not + * resolvable), and whether the pane scan behind {@code terminal} ran to completion + * ({@link #scanComplete}). */ public record Caller(String terminal, long pid, boolean scanComplete) {