fleetd #743: expose pane discovery (tab labels) over REST and MCP #753

Closed
agent wants to merge 0 commits from worker/743-pane-discovery-ad5b75-5 into main
Member

Carries each herdr tab's display label into GET /agents (merged in from the same herdr daemon(s) the agent roster is drawn from), and adds a panes array to fleet_list's result: sessionId (the fleet_send target), label, agentType, status, role, deliverable, and cwd when known.

Authorization: panes is gated like leads/collaborators (primary, architect, collaborator) rather than riding bare READ, because READ's grant rests on "the roster carries no secrets" and a tab label plus a member's cwd are not that -- exactly the roles that may SEND to a named peer get the row.

Deliverable: reuses Fleetd#deliverableTo (widened to public) verbatim, never a second re-derived guess.

Tests: FleetMcpTest gains 3 new tests (label present, label missing/null -- row not dropped, deliverable true/false); FleetMcpAuthzTest gains 1 new test for panesVisibleTo across primary/architect/collaborator/worker/observer/anonymous.

Build: mvn clean install green from fleetd/ -- Tests run: 2122, Failures: 0, Errors: 0, Skipped: 0.

Caveat: proven against a unit test with a fake herdr only, not against the live host -- the live daemon still runs the pre-change jar (confirmed: its /agents response today carries no "label" field), and redeploying it is a lead action, not a worker's.

Known limitation: an architect slot that is configured but not currently occupied by a live member resolves its pane role as "observer" rather than "architect" in this first cut.

Scope note: auth/Authz.java and the SEND handler in mcp/FleetMcp.java were left untouched, per the ticket's concurrent-edit boundary.

Carries each herdr tab's display label into GET /agents (merged in from the same herdr daemon(s) the agent roster is drawn from), and adds a `panes` array to fleet_list's result: sessionId (the fleet_send target), label, agentType, status, role, deliverable, and cwd when known. **Authorization**: panes is gated like leads/collaborators (primary, architect, collaborator) rather than riding bare READ, because READ's grant rests on "the roster carries no secrets" and a tab label plus a member's cwd are not that -- exactly the roles that may SEND to a named peer get the row. **Deliverable**: reuses Fleetd#deliverableTo (widened to public) verbatim, never a second re-derived guess. **Tests**: FleetMcpTest gains 3 new tests (label present, label missing/null -- row not dropped, deliverable true/false); FleetMcpAuthzTest gains 1 new test for panesVisibleTo across primary/architect/collaborator/worker/observer/anonymous. **Build**: `mvn clean install` green from `fleetd/` -- Tests run: 2122, Failures: 0, Errors: 0, Skipped: 0. **Caveat**: proven against a unit test with a fake herdr only, not against the live host -- the live daemon still runs the pre-change jar (confirmed: its /agents response today carries no "label" field), and redeploying it is a lead action, not a worker's. **Known limitation**: an architect slot that is configured but not currently occupied by a live member resolves its pane role as "observer" rather than "architect" in this first cut. **Scope note**: auth/Authz.java and the SEND handler in mcp/FleetMcp.java were left untouched, per the ticket's concurrent-edit boundary.
agent added 1 commit 2026-10-05 08:59:30 +02:00
fleetd #743: expose herdr pane discovery (tab labels) over REST and MCP
CI / shell-tests (pull_request) Failing after 7s
CI / contract (pull_request) Successful in 1m0s
CI / build (pull_request) Failing after 2m15s
459a523e2c
GET /agents now carries each agent's tab label, merged in from the same
herdr daemon(s) the roster is drawn from. fleet_list gains a panes array
with the same label, the sessionId fleet_send takes as a target, the
role the daemon resolves that pane as, and the deliverable gate the
injector itself enforces (Fleetd#deliverableTo, now public). Gated like
leads/collaborators (primary, architect, collaborator), not bare READ,
since a tab label and a member's cwd are not roster facts every READ
caller may see.
agent added 1 commit 2026-10-05 09:19:23 +02:00
fleetd #743: make the pane-label scan best-effort, trim justification comments
CI / shell-tests (pull_request) Failing after 10s
CI / contract (pull_request) Successful in 51s
CI / build (pull_request) Failing after 1m56s
b1d2cb48ac
A workspace.list/tab.list failure in the label scan no longer costs the
caller the agent roster (GET /agents) or the leads/members/capacity/
coordinator rows (fleet_list) that never needed it. Both call sites now
fall back to an empty label map on HerdrException, so a pane row still
renders with label:null instead of the whole response failing.

Also cuts four comments down to the current contract, per the project's
comment rule: dropped the reviewer-facing justification from Fleetd's
deliverableTo javadoc, panesVisibleTo's javadoc, the fleet_list handler's
inline comment, and the panesVisible assembly-gate comment, and removed
the two fragments describing what a test must do.
agent added 1 commit 2026-10-05 09:34:21 +02:00
fleetd #743: pin GET /agents' tab-label merge with a positive test
CI / shell-tests (pull_request) Failing after 9s
CI / contract (pull_request) Successful in 49s
CI / build (pull_request) Failing after 2m5s
e42eab5b4c
Owner

Merged locally into main as c449860, pushed (be835aa..02eff4c). Closing this PR because the commits are on main, not because it was rejected.

All three commits verified by the lead, not taken on the worker's word:

  • Combined tree with #754: MVN_EXIT=0, xml=178 tests=2137 failures=0 errors=0. The test arithmetic closes exactly — bare main 2118, +6 from this PR, +12 from #754, total 2137 — which rules out a silent test loss in the merge.
  • The merged main tree hash is byte-identical to the tree I ran that build on, so the gate ran on the bytes that shipped.
  • I reproduced both of the worker's revert-dance kills myself (comment above), each with a positive control in the same run.
  • The third commit's new pin, agentsReportsTheAgentsTabLabel, kills my M3 mutation: 43 tests run in FleetAppTest, 1 failure, expected: <trinotes> but was: <null>. Before it, M3 survived all 2124 tests.

One cleanup left behind, not a defect and not blocking: FleetApp.permitsFor's four-argument overload now has zero production callers — allow uses the five-argument form — and exactly one caller anywhere, FleetAppAuthTest:671. A production overload kept alive by a single test is the mild form of the "don't reshape production for a test" rule. Noted on #743 for whoever next touches that class.

Merged locally into `main` as `c449860`, pushed (`be835aa..02eff4c`). Closing this PR because the commits are on `main`, not because it was rejected. All three commits verified by the lead, not taken on the worker's word: - Combined tree with #754: `MVN_EXIT=0`, `xml=178 tests=2137 failures=0 errors=0`. The test arithmetic closes exactly — bare `main` 2118, +6 from this PR, +12 from #754, total 2137 — which rules out a silent test loss in the merge. - The merged `main` tree hash is byte-identical to the tree I ran that build on, so the gate ran on the bytes that shipped. - I reproduced both of the worker's revert-dance kills myself (comment above), each with a positive control in the same run. - The third commit's new pin, `agentsReportsTheAgentsTabLabel`, kills my M3 mutation: 43 tests run in `FleetAppTest`, 1 failure, `expected: <trinotes> but was: <null>`. Before it, M3 survived all 2124 tests. One cleanup left behind, not a defect and not blocking: `FleetApp.permitsFor`'s four-argument overload now has zero production callers — `allow` uses the five-argument form — and exactly one caller anywhere, `FleetAppAuthTest:671`. A production overload kept alive by a single test is the mild form of the "don't reshape production for a test" rule. Noted on #743 for whoever next touches that class.
ltms closed this pull request 2026-10-05 09:43:41 +02:00
Some checks are pending
CI / shell-tests (pull_request) Failing after 9s
CI / contract (pull_request) Successful in 49s
CI / build (pull_request) Failing after 2m5s

Pull request closed

Sign in to join this conversation.