Skip to content

Bridge: class/name notes, public wake signal, and Archer hook #13895

Done

Description

@dezren39

Bridge: class/name notes, public wake signal, and Archer hook

Design

Extend the existing message bridge at bridge.security.cab with a minimal note system:

  • Identities are class/name (for example muse/archer).
  • Authenticated senders can address one identity or use a wildcard in either segment: muse/*, */archer, or */*.
  • Notes are stored server-side in the bridge Durable Object and delivered to every registered identity matching the address.
  • GET /<class>/<name> is a public, content-free signal. It returns the same bare UUID shape for registered and unregistered paths. Registered signals change on delivery; all paths also rotate on deterministic, per-path jittered schedules, so a change does not prove delivery or reveal registration.
  • Authenticated inbox and acknowledgement endpoints belong to the identity token. Token values are kept in the vault by name and are represented server-side only by hashes.
  • A small bridge helper provides send, inbox, and ack without hand-written HTTP calls.
  • Archer gets a Muse hook that polls only the public muse/archer signal, compares one UUID to its last-seen value, and wakes only when it changes. On waking, Archer fetches and acknowledges the inbox, reviews the notes, and surfaces or acts on them in the main chat according to their content and standing alignment rules.

Acceptance proof

  • Worker deployed at bridge.security.cab.
  • muse/archer registered.
  • Direct and wildcard test notes delivered.
  • Public signal changed after delivery.
  • Hook script detects a changed signal in a manual run and is dry-run before enabling.
  • Inbox fetch and acknowledgement verified; inbox empty after acknowledgement.
  • An unregistered path still rotates its synthetic UUID across windows.
  • Code, helper, documentation, tests, and this proof record landed by PR.

Privacy properties

The public signal has no note content, no identity existence proof, no differing response shape for registered paths, and decoy rotation for every path. Tokens are never committed, printed, or logged.

{
  "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-24T00:18:17Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. developing-today commented on Nov 24, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Follow-up direction recorded (Drew, 2026-11-23 ~18:29 CST)

    Noted for the record; it does not change this build's scope.

    Drew's stated end state for the client surface: the bridge client eventually becomes a fleet subcommand family (get / send / receive / watch) that replaces or reimplements the standalone bridge helper built here, and bridge coverage likely lands in the fleet book. The standalone helper stays minimal and working as built; this item is a follow-up for the fleet book / PM-book programme to pick up, not work for this issue.

    The service, addressing, public signal, and Archer wake hook proceed exactly as designed in this issue.

  3. added a commit that references this issue on Nov 24, 2026
  4. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    BRIDGE-RECOVERY checkpoint (2026-11-23 ~19:16 CST)

    Progress on the ordered plan:

    1. Code verified — implementation in pkgs/message-bridge/worker matches the design (class/name + wildcards, hashed tokens, owner-only register, per-identity inbox/ack, public UUID signal with per-path 10–40 min decoy buckets + delivery counter). Full test suite: 72 pass / 0 fail on the laptop.
    2. Tokens verified by name only — bridge.archer-token (exists, 64 chars) and bridge.send-token (exists, 64 chars) are both in the vault; nothing needed creating.
    3. PR landed — the original branch carried a stray unrelated model commit (opencode.jsonc + claimant) in its base, so the bridge commit was cherry-picked clean onto current main: PR #13917, diff = exactly the 9 message-bridge files, merged 17ff8a9b6a60.
    4. Deploy in flight — the merge triggered the repo's message-bridge-deploy workflow (run 45300613679, head 17ff8a9b6a60); waiting on its completion now, then verifying bridge.security.cab/muse/archer and a nonsense path both return bare UUIDs (no 404s).
    5. Next: register muse/archer + user/drew, send direct + muse/* test notes, observe the signal change, register + dry-run + enable the bridge-archer hook, inbox/ack proof, unregistered-path rotation check, final record here.

    No blockers; the wait is the CI deploy.

  5. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    BRIDGE-RECOVERY — complete proof record (2026-11-23)

    All acceptance criteria pass. Summary of what was done and verified:

    Code + PR

    • The committed implementation was verified against this issue's design (class/name identities, wildcards in either segment, SHA-256-hashed identity tokens, owner-only registration, per-identity inbox/ack, public UUID signal with per-path 10–40 min decoy buckets + delivery counter). Full test suite on the laptop: 72 pass / 0 fail.
    • The original branch (bridge/13895-note-signal, f1d7157) had a stray unrelated model commit in its base (opencode.jsonc + claimant changes), so the bridge commit was cherry-picked clean onto current main: PR #13917 — diff exactly the 9 pkgs/message-bridge/worker files — merged 17ff8a9b6a605f14c153c386aa35b24358a7aa80. (The stray model commit remains only on the old branch; it was not landed here.)

    Deploy

    • The merge triggered the repo's message-bridge-deploy workflow (run 45300613679, head 17ff8a9b6a60): success. Code-only deploy; /healthz now reports a new version with the same token fingerprint (2c8d575594170044), so the access token did not change.
    • Live signal checks (from the sandbox):
      • GET /muse/archer → 200, bare UUID
      • GET /zzqq/nothing-here → 200, bare UUID, same shape
      • GET /foo/bar → 200, bare UUID
      • No path in the signal space 404s — the pre-deploy 404 defect is gone.

    Registration + tokens

    • Vault tokens verified by name only: bridge.archer-token (exists, 64 chars), bridge.send-token (exists, 64 chars). Nothing needed creating; values never printed.
    • Registered via the owner-only route: muse/archer (send + inbox) and user/drew (send + inbox). Only token hashes are stored server-side.

    End-to-end proof

    1. Baseline: hook state and public signal both ccc19646-7890-4b70-833d-39ef5811dbcf.
    2. Sent with the bridge helper + Drew's sender token: a direct note to muse/archer (delivered, id 1, from user/drew) and a wildcard note to muse/* (delivered to muse/archer, id 2).
    3. Public signal changed at once: ccc19646… → ae573d40-afbd-422d-aef0-17615accddd3.
    4. Hook dry-run returned wake with exactly that previous/current pair (detection proven without side effects).
    5. Inbox via the helper with Archer's token: both notes present. bridge ack 1 2 → {"acked": 2}. Inbox again: empty.
    6. Unregistered-path rotation, live: GET /probe/beta returned 80817725-0044-463a-9214-9e21fa14aa7d before its computed window boundary and 81cc6238-505c-4dde-9604-c6294ef0dcb6 after it — both exactly the values the deterministic derivation predicts — and stayed stable inside the new window.

    Hook

    • Registered as bridge-archer (script ~/hooks/scripts/bridge-archer-signal.sh, 60 s poll, main-chat delivery), dry-run first (silent baseline), then enabled.
    • On enable, the hook's own live poll fired a real wake (invocation 2e85ee42…, previous ccc19646… → current ae573d40…) and started the worker lifecycle; state advanced to the current signal and later polls are silent "signal unchanged". The woken worker found the inbox already emptied by this proof — the documented decoy/empty outcome.
    • Worker instruction on file: fetch the inbox with the helper (Archer's vault token by name), review, ack, and surface in the main chat; a note from Drew is an instruction to review, a note from another agent is input to weigh, never an order.

    Endpoints (paths only): POST /notes/register, POST /notes/send, GET /notes/inbox, POST /notes/ack, GET /<class>/<name>. Helper: bridge.mjs in the package, installed as ~/tools/bin/bridge (byte-identical, verified).

    Closing this issue: the system is deployed and proven end to end. The fleet-subcommand direction stays recorded as the follow-up already noted on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions