fleetd #799: observer SEND header carries the space/tab label #800

Open
agent wants to merge 1 commits from worker/799-a76336-9 into main
Member

Closes #799.

attributeIfObserver prefixed an observer's SEND with its terminal id and nothing else. This adds the herdr space and tab display label alongside the id, e.g.

[fleet_send from observer term_x (space "ltms", tab "lead")]

Design

  • PaneLocator gets a new locate(terminal) method that resolves a terminal to its pane's tab/workspace id from pane.list (the same call terminalForPid already scans -- no new herdr RPC). That id is then joined against the existing tabLabelsByTabId/workspaceLabelsByWorkspaceId suppliers already wired into fleet_list.
  • The terminal id always stays first in the header and is never replaced by a label (constraint 1).
  • Labels are rendered as a trailing (space "...", tab "...") annotation, quoted and explicitly named, so the header does not read as something to reply to (constraint 2) -- the id is the only addressable token.
  • When neither label is known, or a herdr error interrupts the lookup, the header degrades to the bare id with no parenthetical, never null or empty brackets (constraint 3).
  • FleetApp's REST entry path now passes its own PaneLocator(herdr, memberHerdr) to the same shared method, so both surfaces attribute identically.
  • plugin/hooks/register.js is unchanged, as instructed -- it just prepends its own line to whatever the daemon produced.

Tests

  • Updated FleetMcpObserverSendDeliveryTest and FleetMcpObserverSendToLeadDeliveryTest for the new exact string (FakeHerdr's term_shell sits in workspace "w2"/"ltms", tab "w2:t8" has no seeded label).
  • New FleetMcpAttributeIfObserverTest covers: a non-observer passes through unchanged; both labels present; a shared label across two different panes still yields two distinct headers by id; an unresolvable pane degrades to the bare id with no null/empty parens; a herdr error mid-lookup degrades the same way; only one label known.

Build: mvn clean install in fleetd/ -- BUILD SUCCESS. Surefire totals counted from target/surefire-reports/*.xml: Tests run 2214, Failures 0, Errors 0, Skipped 0.

Closes #799. `attributeIfObserver` prefixed an observer's SEND with its terminal id and nothing else. This adds the herdr space and tab display label alongside the id, e.g. `[fleet_send from observer term_x (space "ltms", tab "lead")]` **Design** - `PaneLocator` gets a new `locate(terminal)` method that resolves a terminal to its pane's tab/workspace id from `pane.list` (the same call `terminalForPid` already scans -- no new herdr RPC). That id is then joined against the existing `tabLabelsByTabId`/`workspaceLabelsByWorkspaceId` suppliers already wired into `fleet_list`. - The terminal id always stays first in the header and is never replaced by a label (constraint 1). - Labels are rendered as a trailing `(space "...", tab "...")` annotation, quoted and explicitly named, so the header does not read as something to reply to (constraint 2) -- the id is the only addressable token. - When neither label is known, or a herdr error interrupts the lookup, the header degrades to the bare id with no parenthetical, never `null` or empty brackets (constraint 3). - `FleetApp`'s REST entry path now passes its own `PaneLocator(herdr, memberHerdr)` to the same shared method, so both surfaces attribute identically. - `plugin/hooks/register.js` is unchanged, as instructed -- it just prepends its own line to whatever the daemon produced. **Tests** - Updated `FleetMcpObserverSendDeliveryTest` and `FleetMcpObserverSendToLeadDeliveryTest` for the new exact string (FakeHerdr's `term_shell` sits in workspace "w2"/"ltms", tab "w2:t8" has no seeded label). - New `FleetMcpAttributeIfObserverTest` covers: a non-observer passes through unchanged; both labels present; a shared label across two different panes still yields two distinct headers by id; an unresolvable pane degrades to the bare id with no `null`/empty parens; a herdr error mid-lookup degrades the same way; only one label known. **Build**: `mvn clean install` in `fleetd/` -- BUILD SUCCESS. Surefire totals counted from `target/surefire-reports/*.xml`: Tests run 2214, Failures 0, Errors 0, Skipped 0.
agent added 4 commits 2026-10-06 19:23:58 +02:00
Adds invariant 6 to the canonical block. Nothing in it said a received
message must be answered, so a sender could not tell a handled message
from one that never arrived.

Measured today: the anki pane (observer) sent to vms, which reads
deliverable:false because it has not contacted the daemon since the 08:05
restart. The send was accepted, held 83s, and failed with the body 'nst' --
three characters scraped off the vms screen. The sender read that as an
inconclusive result and asked the lead what happened. fleetd #757 covers
the accept-time refusal; this rule covers the half the protocol owns.

Operator's words: 'when a message sent, at least the receiver should
confirm unless explicit told to not reply'.

wiki/7-Use-Cases.md template synced byte-identical (wiki 3ad606f).
Invariant 6 as first written told every receiver to confirm, with no
mention of who may override it. A peer cannot impose a rule on another
operator's session.

Measured: the trinotes pane (observer, work config dir) answered the
communication test and then said its operator's standing rule is not to
answer fleet messages, that a peer cannot change that rule, and that it
would ask its operator before following mine. That is the correct reading
and the rule now says so.

Also records the symmetric error: a sender must not read silence as
agreement or as a dead session.

wiki/7-Use-Cases.md synced byte-identical.
Five reviewer turns were lost in one session. Each wrote a long, correct
analysis to its own pane and ended the turn with no fleet_reply, so the
bridge scraped the pane and the lead received a clipped fragment.

The briefs are half the cause: each carried a five-item checklist of things
to hunt alongside a ~90-word capped output format, which reads as two
contradictory output contracts. The skill now says the checklist is where to
look, not the shape of the answer, and that the reply goes out as soon as
the answer is known.

Measured: tickets task-7da785-29 and -30 resolved at 18:28 via the
turn-completion fallback, 1233 and 1403 chars scraped.
fleetd #799: observer SEND header carries the space/tab label, not just the id
CI / shell-tests (pull_request) Failing after 10s
CI / contract (pull_request) Successful in 55s
CI / build (pull_request) Failing after 1m58s
2dddacdd38
attributeIfObserver now joins the caller's terminal to its herdr pane via
PaneLocator.locate (new, reusing pane.list) and appends whichever of the
tab/workspace labels herdr reports, e.g.
"[fleet_send from observer term_x (space "ltms", tab "lead")]". The id stays
first and is never replaced; missing labels, or a herdr error while looking
them up, degrade to the bare id with no parenthetical. FleetApp's REST entry
path takes the same PaneLocator so both surfaces attribute identically.
Some checks are pending
CI / shell-tests (pull_request) Failing after 10s
CI / contract (pull_request) Successful in 55s
CI / build (pull_request) Failing after 1m58s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin worker/799-a76336-9:worker/799-a76336-9
git checkout worker/799-a76336-9
Sign in to join this conversation.