Skip to content

Bridge S9 (#14375): PM console composer — pattern sends, match report, broaden, claim offers - #14510

Merged
developing-today-fleet[bot] merged 6 commits into
mainfrom
felix/14375-console-composer
Nov 24, 2026
Merged

developing-today-fleet[bot] merged 6 commits into
mainfrom
felix/14375-console-composer

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Bridge slice S9 of the message-bridge buildout (design doc/2026-11-24_design_message-bridge-buildout.md §4.9; index on #13907). Deps S1/S5/S7/S8 all merged.

What was built

Composer (Messages surface, pm-stack/console/public/app.js) — heads the Messages screen:

  • Recipient field over the full relay grammar: names, agent:<glob> (e.g. agent:f*), group:<name>, all, comma-separated; kind toggle (message / instruction); optional limit.
  • On send, the bridge's own match report shows in place — matched, delivered, recipients named, remaining — via the exported matchReportSaid helper. The console never recounts a send.
  • Broaden button while remaining > 0: one message.broaden action carrying only the batch; the returned report is folded into the running one (mergeMatchReport) until delivered = matched and the button disappears.
  • Offer instead with a slots count posts the same text as an S5 claim offer; the Offers section on the same screen lists every offer with state, claimed slots, each claim's agent and time, and a button that filters the pipeline to the offer's batch so claims and claimants' replies read together. The owner sees full provenance throughout; nothing is stripped console-side (agent-side anonymity stays the worker's job, as designed).

Send paths

  • Machine path: fleet bridge CLI gains send --limit / send --broaden <batch> and new offer / offers verbs (owner token); Ops.send returns the parsed match report (an answer without one is a 502, said plainly), plus Ops.broaden / Ops.offer / Ops.offers and a platformRead offers section. Targets are validated against the bridge's own segment grammar (globs included).
  • Edge-direct path (S7): bridgeCall translates the limited/broadened send, offer and offers over the service binding as service:pm-stack. message.broaden / message.offer join message.send as the edge's own kinds only while it holds the bridge credential; without it they are held for a machine exactly as before. Both are HOLDABLE (broaden's subject is its batch) in edge-proto.ts and public/outbox.js, kept in step.
  • Worker: GET /fleet/<credential>/offers — a read-scope credential naming no agent now reads the owner's offer list (the offer-list projection, claims included), which the edge's offers read requires. The agent's own eligible-offers view at the same address is unchanged, and a credential without read still gets a plain 404.

Book: pm-stack/book/reference/console-views.md gains the #more/messages view; pkgs/fleet/docs/verbs.md lists the new verbs. No new dependencies.

Verification (remote only, fleet-command on developing-today/fleet)

  • Worker: run 45448781356, head 794d1d7, nix build .#messageBridge checkPhase — 114 pass / 0 fail, incl. new "read scope: the offers list through the PM credential shows offers with their claims (Bridge build-out S9 — PM console composer: pattern+limit, match report, broaden, offers #14375)". (The executor has no node binary — the first attempt exited 127 — so the suite ran through the package's own nix checkPhase, the S4 route.)
  • Console: run 45447017405, head ac19e45 (console tree unchanged since) — 656 pass / 0 fail, 26 files (baseline 653). New by name: "the composer: a pattern send's report, its broaden, and an offer, against fixture bridge answers", "a match report is said with its recipients, and a broaden folds into it", "the composer's verbs cross the same binding: a limited send, a broaden, an offer, the offers list". Two pre-existing fixtures that predated the match report (HTTP write-route recorder, edge bridge stub) now answer with the report the bridge returns.
  • fleet-bridge: run 45444442439 — 21 passed / 0 failed (baseline 18), incl. a_pattern_send_with_a_limit_carries_both_and_returns_the_match_report, broaden_carries_the_batch_and_no_text, offer_posts_its_slots_and_ttl_and_offers_lists.

Scope note

The composer sends on the fleet surface, per this issue's own scope text and all five acceptance criteria. Notes identities/classes are served by the Messages view (S8); a notes send path would need a pm-stack notes identity and token plumbing no slice has designed — flagged here rather than built silently.

Refs #14375

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T17:34:29Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch/workspace/issue-14375/wt",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch/workspace/issue-14375/wt",
      "repo": "developing-today/code",
      "branch": "felix/14375-console-composer",
      "sha": "794d1d79fed619bc5cda9f1ee680a00188ab668f"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

felix added 3 commits November 24, 2026 17:03
…, broaden, claim offers

The Messages surface gains the composer (design §4.9): the full
addressing grammar as a form (names, agent:<glob>, group:, all),
a message/instruction kind toggle and an optional limit. A send
shows the bridge's own match report in place (matched, delivered,
recipients named, remaining); Broaden delivers the send's remainder
through the S1 broaden call on its batch, never a fresh fan-out;
Offer instead posts the text as an S5 claim offer with a slot count,
and the offers list on the same screen shows claims and claimants
as they land (replies read through the batch filter).

- worker: GET /fleet/<credential>/offers opens the owner's offer
  list (offer-list op, claims included) to a read-scope credential
  naming no agent; the agent's eligible-offers view is unchanged.
- fleet-bridge CLI: send learns --limit and --broaden <batch>;
  new offer and offers verbs (owner token).
- console Ops: glob targets validated against the bridge's own
  segment grammar; send returns the parsed match report (an answer
  without one is an error, never a console-side recount); broaden,
  offer, offers alongside.
- edge: bridgeCall translates the limited/broadened send, offer
  and offers through the service binding as service:pm-stack; the
  composer's three actions are the edge's own while it holds the
  bridge credential, and held for a machine otherwise, exactly as
  message.send behaved. message.broaden/message.offer are HOLDABLE
  (subject: the batch, for broaden) in edge-proto and the outbox.
- app: composer + in-place report + offers section on Messages;
  book gains the #more/messages view; verbs.md lists the new verbs.

Refs #14375
…returns

Two pre-existing fixtures predated the report: the HTTP-surface
write-route recorder answered a send with nothing, and the edge
suite's bridge stub answered with the pre-S1 relay shape. Both now
answer with the match report every bridge send returns, and the
edge delivery test expects the report the action hands back.

Refs #14375
The offers-view test used a post helper the harness does not return;
its two posts (the owner's offer, felix's claim) now go through the
harness's call with JSON bodies, like its other routes.

Refs #14375
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 18c257ba-ff9e-4d26-8bd6-39b4fff34672

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…omposer

# Conflicts:
#	pkgs/fleet/crates/fleet-bridge/src/lib.rs
#	pkgs/message-bridge/worker/README.md
#	pkgs/message-bridge/worker/src/fleet.js
#	pm-stack/console/edge/src/edge.ts
#	pm-stack/console/public/outbox.js
#	pm-stack/console/src/edge-proto.ts
#	pm-stack/console/src/ops.ts
#	pm-stack/console/src/reads.ts
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Merge-refresh record (Felix lane, 2026-11-24): merged origin/main 7b75a8d5f (S10 provisioning PR #14506 et al.) into felix/14375-console-composer; new head b5411ca2755f646c7fff6402bb0fa3fde7599bab.

Conflicts (8 files, all resolved as additive unions — no credential-scope, sender-anonymity, show-once-mint, or HOLDABLE semantics changed on either side):

Re-verification (remote, fleet-command on developing-today/fleet; Target HEAD b5411ca27 named in every log):

  • Worker, nix build route — run 45450563875: success (messageBridge derivation built; checkPhase gates it).
  • Worker, direct suite — run 45453323705: 120 pass / 0 fail, incl. by name: "read scope: the offers list through the PM credential shows offers with their claims (Bridge build-out S9 — PM console composer: pattern+limit, match report, broaden, offers #14375)" and all five S10 provisioning tests (state list hash-free; console-path name binding; revoke-by-agent; read-scope twin with plainer doors shut; DO SQL store parity).
  • Console — run 45450583664: 657 pass / 0 fail, 26 files (S9's 656 + S10's addition).
  • fleet-bridge — run 45451559279: 22 passed / 0 failed, incl. broaden_carries_the_batch_and_no_text, offer_posts_its_slots_and_ttl_and_offers_lists, provisioning_verb_shapes. (First attempt run 45450603848 failed on invocation only — cargo run from the repo root instead of pkgs/fleet; re-run from the workspace root passed.)

Left unmerged for Felix's merge.

felix added 2 commits November 24, 2026 18:06
…omposer

# Conflicts:
#	pkgs/fleet/crates/fleet-bridge/src/lib.rs
#	pkgs/message-bridge/worker/README.md
…omposer

# Conflicts:
#	pkgs/fleet/crates/fleet-bridge/src/lib.rs
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Merge-refresh record (continuation lane, worker felix) — PR is MERGEABLE / CLEAN at head 617bcb0aca003fb3396b292c6e67012dcd2f0408, left unmerged for Felix.

This pass finished the second merge the previous lane had to stop mid-way (it hit an automated execution-risk flag on the worktree; this lane proceeded under Drewry's standing worktree approval, 2026-11-22, stated in its brief), plus one follow-on merge when main moved again during verification.

Merge 1 — origin/main daa66cbb9 into b5411ca27 → d6d54b409. Two conflicted files, both additive unions:

  • pkgs/fleet/crates/fleet-bridge/src/lib.rs — VALUE_FLAGS: S9's --broaden/--slots ∪ S4's --bootstrap (the tail already carried --scopes/--ttl/--notes-identity/--token-hash/--addr once each). Result: 27 flags, no duplicates.
  • pkgs/message-bridge/worker/README.md — route table: main's realigned table ∪ S9's row GET /fleet/<credential>/offers (credential read, Bridge build-out S9 — PM console composer: pattern+limit, match report, broaden, offers #14375), inserted after the credentials row at main's column widths. S4/S10 enroll-token rows and S8 pipeline/directory rows all stand.

Everything else auto-merged. Duplicate-definition scans over ops.ts / fleet.js / app.js / reads.ts / direct.ts / edge.ts / actions.ts / tests.rs: clean — ops.ts key methods (send, broaden, offer, offers, enrollTokens, mintEnrollToken, revokeEnrollTokens, mintCredential, revokeCredential, pipelineFeed, directory, credentials) each defined exactly once (no repeat of the first refresh's interleaved-send defect). Guardrails verified present after the merge: worker read-scope offers list (offer-list in fleet.js), S4's noteOrigin storeFor wrapper + DO method, notes kind/reply_to, credentialed-hello group pinning (if (cred) delete q.groups), --bootstrap in fleet-bridge + fleet-agent enroll, S10's enrollTokenList. No credential-scope, sender-anonymity, show-once-mint, or HOLDABLE semantics changed.

Verification at d6d54b409 (remote, fleet-command on developing-today/fleet; every log names that target HEAD): worker run 45456078571 — 123/123 pass (incl. by name "read scope: the offers list through the PM credential shows offers with their claims (#14375)", the S10 hash-free token-list tests, "notes replies route to the hidden sender through the DO store (storeFor, #14370)"); console run 45456149640 — 657 pass / 0 fail, 26 files; fleet-bridge run 45456180919 — 27 passed / 0 failed.

Merge 2 — origin/main 394a6706c (S6, PR #14430) into d6d54b409 → 617bcb0ac. One conflict, same union shape: VALUE_FLAGS — S9's --broaden/--slots ∪ S6's --state/--task (work verb). Result: 29 flags, no duplicates; work/offer/offers/broaden verbs and WORK_RULE all present. tests.rs / fleet.js / README auto-merged as clean unions (S6's work_marks_the_agents_own_rows_and_names_the_queue_task + work_help_carries_the_task_it_or_queue_it_rule tests, work_state worker fields and the /work README row all stand beside S9's pieces; no duplicate definitions or rows).

Re-verification at 617bcb0ac (same route; every log names that target HEAD): worker run 45458027119 — 129/129 pass (S6's lifecycle tests included; the S9/S10/S4 named tests above still pass); console run 45458056607 — 657 pass / 0 fail, 26 files; fleet-bridge run 45458090432 — 29 passed / 0 failed (incl. both S6 work tests and S9's broaden_carries_the_batch_and_no_text / offer_posts_its_slots_and_ttl_and_offers_lists).

Main has since moved again (49c20fb: S11 Android #14530, an id fix, others); a trial merge of this head against current main is conflict-free, and GitHub reports the PR MERGEABLE / CLEAN.

@developing-today-fleet
developing-today-fleet Bot merged commit 3ced0e1 into main Nov 24, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/14375-console-composer branch November 24, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants