Skip to content

tower: builder→builder sends carry a reply hint pointing at the architect, not the sender #1576

Open

Description

@waleedkadous

Problem

Surfaced by CMAP review on PR #1575 (self-attesting message frames, #1574) — flagged as a follow-up rather than a change in that lane.

formatMessageForTarget's !isArchitectTarget branch is any → builder, not architect → builder. So when builder A sends to builder B, B now reads:

### [ARCHITECT INSTRUCTION → builder-b | ...] ###
<A's message>
###############################  (reply: afx send architect "…")

The [ARCHITECT INSTRUCTION] mislabel is pre-existing and harmless-ish. The reply instruction is new (#1574) and actively points somewhere: it routes B's reply to B's own spawning architect rather than back to A. B has no way to tell from the frame that the sender was a peer builder.

Why it is not urgent

Builder→builder traffic is rare, and the architect is a defensible escalation target — a reply landing there is misrouted, not lost. Blast radius is small, which is why it was left out of #1574 rather than widening that lane's surface.

Fix direction

The frame should key its reply hint on the actual sender, not only on the recipient's kind. That needs the same sender-identity work as #1521 item 3 (inter-architect headers do not name which architect sent them, because an architect sender is the literal string architect from commands/send.ts:317, detectCurrentBuilderId() ?? 'architect').

Both are the same underlying gap — the frame knows its recipient but not its sender's kind — so they are worth doing together:

  • Resolve the sender's kind (builder / architect / cron / vscode-user) at the send boundary rather than inferring it from a caller-controlled string.
  • Then: builder→builder renders the sender and a hint pointing back at A; inter-architect renders the sending architect's name.

Constraints

Refs: #1574 (introduced the hint), #1521 item 3 (same underlying gap), PR #1575 (review that found this).

Activity

  1. added
    area/tower
    on Sep 1, 2026
  2. added a commit that references this issue on Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/tower

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions