join: the community display name is empty in the agent's enroll banner and pairing lines #940

Closed
opened 2026-08-28 13:10:04 +00:00 by matou-build-agent · 4 comments

The defect

Everywhere the joining agent prints the community's display name it is empty:

  • the enroll banner — idss-agent unknown · joining (trailing space)
  • the pairing confirmation — ✓ connection request sent to (trailing space; cat -A confirms sent to ^M$)

Seen in both the curl … | sh doorway transcript and the direct idss-agent enroll transcript of the phase-5 device drive 20260828T123909Z (#939). It is not the cause of any red — cosmetic — but it ships in the published doorway's output. The name resolves fine elsewhere: the portal header reads Rehearsal C — IDSS.

Cause

internal/join/cli.go's RunTerminal prints resp.Community.Name from the redeem response. In production the gateway builds its enroll ledger with an empty enroll.Config.Community — see control-plane/cmd/control-plane/whole_composition.go (var enrollCfg enroll.Config around line 155, then openEnrollLedger(deps.stateDir, enrollCfg)): Community.Name is never set. So l.community().Name (and thus every redeemResponse) is empty. The community display name actually lives in the applied brand kit at brandKitDocPath in the config repo, read live via configRepoBrand/configRepoKit (DDR 0007 — brandkit is the single authority; "never a fabricated community name", read live so a re-brand needs no restart). The enroll ledger simply isn't wired to that authority.

Suspected fix (needs design)

Thread the live brand-kit name into the redeem response without minting a stale second copy (DDR 0007). Options:

  • give enroll.Ledger a live community-name source (a func() string over the brand kit) rather than a static Config.Community.Name, so redeem reads the current name; or
  • have the control-plane redeem HTTP handler overlay the live brand name onto the response.

Seeding enrollCfg.Community.Name once at boot from the kit is the easy path but violates DDR 0007's single-authority/no-static-copy rule and goes stale on re-brand — hence needs-triage/needs-design rather than a blind fix.

Found while working

#939 (the published curl|sh doorway dropped the waiting-on-operator wait). The wait defect is fixed there; this display-name residue is explicitly the "separate, lesser" item #3 of that ticket, filed out so the doorway-wait slice stays scoped.

## The defect Everywhere the joining agent prints the community's display name it is **empty**: - the enroll banner — `idss-agent unknown · joining ` (trailing space) - the pairing confirmation — `✓ connection request sent to ` (trailing space; `cat -A` confirms `sent to ^M$`) Seen in **both** the `curl … | sh` doorway transcript and the direct `idss-agent enroll` transcript of the phase-5 device drive `20260828T123909Z` (#939). It is **not** the cause of any red — cosmetic — but it ships in the published doorway's output. The name resolves fine elsewhere: the portal header reads `Rehearsal C — IDSS`. ## Cause `internal/join/cli.go`'s `RunTerminal` prints `resp.Community.Name` from the redeem response. In production the gateway builds its enroll ledger with an **empty** `enroll.Config.Community` — see `control-plane/cmd/control-plane/whole_composition.go` (`var enrollCfg enroll.Config` around line 155, then `openEnrollLedger(deps.stateDir, enrollCfg)`): `Community.Name` is never set. So `l.community().Name` (and thus every `redeemResponse`) is empty. The community display name actually lives in the **applied brand kit** at `brandKitDocPath` in the config repo, read live via `configRepoBrand`/`configRepoKit` (DDR 0007 — brandkit is the single authority; "never a fabricated community name", read live so a re-brand needs no restart). The enroll ledger simply isn't wired to that authority. ## Suspected fix (needs design) Thread the **live** brand-kit name into the redeem response without minting a stale second copy (DDR 0007). Options: - give `enroll.Ledger` a live community-name source (a `func() string` over the brand kit) rather than a static `Config.Community.Name`, so redeem reads the current name; or - have the control-plane redeem HTTP handler overlay the live brand name onto the response. Seeding `enrollCfg.Community.Name` once at boot from the kit is the easy path but violates DDR 0007's single-authority/no-static-copy rule and goes stale on re-brand — hence `needs-triage`/`needs-design` rather than a blind fix. ## Found while working #939 (the published `curl|sh` doorway dropped the waiting-on-operator wait). The wait defect is fixed there; this display-name residue is explicitly the "separate, lesser" item #3 of that ticket, filed out so the doorway-wait slice stays scoped.
Owner

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Ruling: ready-for-agent, not needs-design

The filer parked this on needs-triage/needs-design out of caution that the fix might collide with DDR 0007 (brand kit is the single authority; no static second copy). It doesn't — the design already exists and was already built. Verified against the tree:

  • The late-bound source the issue asks for (option 1, "a live community-name source rather than a static Config.Community.Name") is already a first-class field: enroll.Config.CommunitySource func() (Community, bool) (internal/enroll/ledger.go:66-79, ADR 0024 / #910). The ledger consults it per Redeem/Pending and returns (zero,false) until the name is stamped — never a fabricated name (ADR 0100). This is exactly DDR 0007-compliant: read live, no static copy.
  • It is already wired in the helper enroll path: newEnrollLedger() sets CommunitySource: communityHeaderSource() (app/helper/cmd/helper/wiring_prod.go:253, reading live via clan.ReadCommunityName).
  • The only gap is that the control-plane enroll path never sets it: whole_composition.go:155 does var enrollCfg enroll.Config and wires only OnEnrolled, then openEnrollLedger(...). So RedeemResponse.Community.Name is blank on that path — the empty banner (internal/join/cli.go:143) and empty pairing line (internal/join/cli.go:200).

So there is no open design question — just an unwired seam. That makes this a two-way door: revertible by a single commit, provable by an existing test pattern. Not on the one-way-door list (no personal creds, no security-posture change, no member-facing trust accept, no data destruction, no spend). Hence ready-for-agent, not needs-design or ready-for-human.

Agent brief

Goal. The joining agent's enroll banner and pairing line show the community's real display name (matching the portal header the same process serves), on the control-plane enroll path — without minting a static copy (DDR 0007).

The one-line fix. In control-plane/cmd/control-plane/whole_composition.go (~line 155), set enrollCfg.CommunitySource to a late-bound func that reads the live community name, before openEnrollLedger(deps.stateDir, enrollCfg). Mirror the helper's reference implementation communityHeaderSourceAt (app/helper/cmd/helper/wiring_prod.go:263).

Source-of-truth choice (agent's call, both DDR 0007-clean). Prefer the applied brand kit name (kit.Name via brandKitDocPath), because that is what the portal header renders through configRepoBrand.Identity() (whole_composition.go:682-688), so the enroll banner will match the portal the operator already sees (the issue's Rehearsal C — IDSS example). deps.repo (*clan.ConfigRepo) is already in scope in that composition. The config-repo community header (clan.ReadCommunityName, as the helper uses) is an acceptable alternative if it reads the same live value. Either way: read live per-call, return (zero,false) when nothing is applied yet — never a fabricated name (ADR 0100).

Tests (make it provable).

  • Unit: extend the existing regression pattern TestRedeem_CommunitySource_LateBound (internal/enroll/enroll_test.go:758) — pre-founding redeem is blank, post-founding redeem carries the name.
  • Wiring/seam: add a control-plane test mirroring the helper's communityHeaderSourceAt seam test — drive the chosen live source over a temp repo dir, assert blank-then-named.
  • Regression guard against the exact symptom: a redeem-through-the-composition assertion that RedeemResponse.Community.Name is non-empty once the brand kit / header is applied.

Scope guard. Do not seed enrollCfg.Community.Name statically at boot — that is the DDR 0007 violation the filer correctly flagged (goes stale on re-brand). Cosmetic only; not a red cause.

Suggested model (optional, veto anytime): this is mechanical wiring with a working reference impl — a model-sonnet candidate. Left at fleet default; apply the label by hand if desired.

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** ## Ruling: `ready-for-agent`, not `needs-design` The filer parked this on `needs-triage`/`needs-design` out of caution that the fix might collide with DDR 0007 (brand kit is the single authority; no static second copy). **It doesn't — the design already exists and was already built.** Verified against the tree: - The late-bound source the issue asks for (option 1, "a live community-name source rather than a static `Config.Community.Name`") is already a first-class field: `enroll.Config.CommunitySource func() (Community, bool)` (`internal/enroll/ledger.go:66-79`, ADR 0024 / #910). The ledger consults it per Redeem/Pending and returns `(zero,false)` until the name is stamped — never a fabricated name (ADR 0100). This is exactly DDR 0007-compliant: read live, no static copy. - It is already wired in the **helper** enroll path: `newEnrollLedger()` sets `CommunitySource: communityHeaderSource()` (`app/helper/cmd/helper/wiring_prod.go:253`, reading live via `clan.ReadCommunityName`). - The **only** gap is that the **control-plane** enroll path never sets it: `whole_composition.go:155` does `var enrollCfg enroll.Config` and wires only `OnEnrolled`, then `openEnrollLedger(...)`. So `RedeemResponse.Community.Name` is blank on that path — the empty banner (`internal/join/cli.go:143`) and empty pairing line (`internal/join/cli.go:200`). So there is no open design question — just an unwired seam. That makes this a **two-way door**: revertible by a single commit, provable by an existing test pattern. Not on the one-way-door list (no personal creds, no security-posture change, no member-facing trust accept, no data destruction, no spend). Hence `ready-for-agent`, not `needs-design` or `ready-for-human`. ## Agent brief **Goal.** The joining agent's enroll banner and pairing line show the community's real display name (matching the portal header the same process serves), on the control-plane enroll path — without minting a static copy (DDR 0007). **The one-line fix.** In `control-plane/cmd/control-plane/whole_composition.go` (~line 155), set `enrollCfg.CommunitySource` to a late-bound func that reads the **live** community name, before `openEnrollLedger(deps.stateDir, enrollCfg)`. Mirror the helper's reference implementation `communityHeaderSourceAt` (`app/helper/cmd/helper/wiring_prod.go:263`). **Source-of-truth choice (agent's call, both DDR 0007-clean).** Prefer the **applied brand kit name** (`kit.Name` via `brandKitDocPath`), because that is what the portal header renders through `configRepoBrand.Identity()` (`whole_composition.go:682-688`), so the enroll banner will match the portal the operator already sees (the issue's `Rehearsal C — IDSS` example). `deps.repo` (`*clan.ConfigRepo`) is already in scope in that composition. The config-repo community header (`clan.ReadCommunityName`, as the helper uses) is an acceptable alternative if it reads the same live value. Either way: read live per-call, return `(zero,false)` when nothing is applied yet — never a fabricated name (ADR 0100). **Tests (make it provable).** - Unit: extend the existing regression pattern `TestRedeem_CommunitySource_LateBound` (`internal/enroll/enroll_test.go:758`) — pre-founding redeem is blank, post-founding redeem carries the name. - Wiring/seam: add a control-plane test mirroring the helper's `communityHeaderSourceAt` seam test — drive the chosen live source over a temp repo dir, assert blank-then-named. - Regression guard against the exact symptom: a redeem-through-the-composition assertion that `RedeemResponse.Community.Name` is non-empty once the brand kit / header is applied. **Scope guard.** Do not seed `enrollCfg.Community.Name` statically at boot — that is the DDR 0007 violation the filer correctly flagged (goes stale on re-brand). Cosmetic only; not a red cause. **Suggested model (optional, veto anytime):** this is mechanical wiring with a working reference impl — a `model-sonnet` candidate. Left at fleet default; apply the label by hand if desired.
Author
Member

This was generated by AI during triage.

Label applied: needs-triage → ready-for-agent. Completing the ADR-0174 ruling above, which was posted but never actually transitioned the label — the issue was still sitting on needs-triage.

Re-verified the ruling against the tree before applying:

  • enroll.Config.CommunitySource func() (Community, bool) exists and the ledger consults it (internal/enroll/ledger.go:79, :329).
  • Helper wires it live (app/helper/cmd/helper/wiring_prod.go:253 → communityHeaderSource()).
  • The gap is real and control-plane-only: whole_composition.go:155 sets var enrollCfg enroll.Config and wires only OnEnrolled (:157) before openEnrollLedger (:159) — CommunitySource is never set.
  • Brand-kit source is in scope: configRepoBrand.Identity() → kit.Name (whole_composition.go:682), deps.repo available.
  • Symptom sites: internal/join/cli.go:143 (banner) and :200 (pairing line).
  • Regression test pattern exists: TestRedeem_CommunitySource_LateBound (internal/enroll/enroll_test.go:767).

No open design question (the seam exists and is built), no missing flow/wireframe/seam contract → not needs-design. Two-way door, none of the one-way-door items → not ready-for-human. ready-for-agent stands; the agent brief above is the work.

> *This was generated by AI during triage.* **Label applied: `needs-triage` → `ready-for-agent`.** Completing the ADR-0174 ruling above, which was posted but never actually transitioned the label — the issue was still sitting on `needs-triage`. Re-verified the ruling against the tree before applying: - `enroll.Config.CommunitySource func() (Community, bool)` exists and the ledger consults it (`internal/enroll/ledger.go:79`, `:329`). - Helper wires it live (`app/helper/cmd/helper/wiring_prod.go:253` → `communityHeaderSource()`). - The gap is real and control-plane-only: `whole_composition.go:155` sets `var enrollCfg enroll.Config` and wires only `OnEnrolled` (`:157`) before `openEnrollLedger` (`:159`) — `CommunitySource` is never set. - Brand-kit source is in scope: `configRepoBrand.Identity()` → `kit.Name` (`whole_composition.go:682`), `deps.repo` available. - Symptom sites: `internal/join/cli.go:143` (banner) and `:200` (pairing line). - Regression test pattern exists: `TestRedeem_CommunitySource_LateBound` (`internal/enroll/enroll_test.go:767`). No open design question (the seam exists and is built), no missing flow/wireframe/seam contract → **not** `needs-design`. Two-way door, none of the one-way-door items → **not** `ready-for-human`. `ready-for-agent` stands; the agent brief above is the work.
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=13265
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=13265 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #940 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 940,
  "status": "success",
  "commits": [
    "e453b8f4ca2f0fdd5b7400c448fef1d89899f595"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/whole_composition.go",
    "control-plane/cmd/control-plane/whole_composition_community_test.go"
  ],
  "tests": [
    {
      "command": "go test ./control-plane/cmd/control-plane/ -run TestCommunityBrandSource_LateBinds|TestWholeComposition_RedeemNamesAppliedCommunity -count=1",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/enroll/ -run TestRedeem_CommunitySource_LateBound -count=1",
      "exit_code": 0
    },
    {
      "command": "go vet ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "go test ./control-plane/cmd/control-plane/ -count=1",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The joining agent's enroll banner and pairing line show the community's real display name on the control-plane enroll path": "whole_composition.go: enrollCfg.CommunitySource = communityBrandSource(deps.repo) late-binds the ledger's community header to the applied brand kit; RedeemResponse.Community.Name (printed by internal/join/cli.go:143 banner and :200 pairing line) is now populated. Proven by TestWholeComposition_RedeemNamesAppliedCommunity.",
    "Read live from the single brand-kit authority, no static second copy (DDR 0007)": "communityBrandSource reads configRepoBrand.Identity() (kit.Name at brandKitDocPath) per Redeem call — the SAME source the portal header renders — so a re-brand needs no restart; no enrollCfg.Community.Name seeded at boot. Proven by TestCommunityBrandSource_LateBinds (live per-call, blank-then-named).",
    "Honest blank until founding applies the kit, never a fabricated name (ADR 0100)": "communityBrandSource returns (zero,false) on nil repo / unreadable kit / empty name; pre-apply Redeem carries the blank. Proven by TestCommunityBrandSource_LateBinds (nil source + pre-apply false) and the pre-apply assertion in TestWholeComposition_RedeemNamesAppliedCommunity."
  },
  "summary": "Wired the control-plane enroll ledger's community header to the live applied brand kit so the joining agent's banner and pairing line name the community, matching the portal header, with no static copy (DDR 0007).",
  "blockers": []
}
**close-report** for #940 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 940, "status": "success", "commits": [ "e453b8f4ca2f0fdd5b7400c448fef1d89899f595" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/whole_composition.go", "control-plane/cmd/control-plane/whole_composition_community_test.go" ], "tests": [ { "command": "go test ./control-plane/cmd/control-plane/ -run TestCommunityBrandSource_LateBinds|TestWholeComposition_RedeemNamesAppliedCommunity -count=1", "exit_code": 0 }, { "command": "go test ./internal/enroll/ -run TestRedeem_CommunitySource_LateBound -count=1", "exit_code": 0 }, { "command": "go vet ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "golangci-lint run ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "go test ./control-plane/cmd/control-plane/ -count=1", "exit_code": 0 } ], "criteria": { "The joining agent's enroll banner and pairing line show the community's real display name on the control-plane enroll path": "whole_composition.go: enrollCfg.CommunitySource = communityBrandSource(deps.repo) late-binds the ledger's community header to the applied brand kit; RedeemResponse.Community.Name (printed by internal/join/cli.go:143 banner and :200 pairing line) is now populated. Proven by TestWholeComposition_RedeemNamesAppliedCommunity.", "Read live from the single brand-kit authority, no static second copy (DDR 0007)": "communityBrandSource reads configRepoBrand.Identity() (kit.Name at brandKitDocPath) per Redeem call — the SAME source the portal header renders — so a re-brand needs no restart; no enrollCfg.Community.Name seeded at boot. Proven by TestCommunityBrandSource_LateBinds (live per-call, blank-then-named).", "Honest blank until founding applies the kit, never a fabricated name (ADR 0100)": "communityBrandSource returns (zero,false) on nil repo / unreadable kit / empty name; pre-apply Redeem carries the blank. Proven by TestCommunityBrandSource_LateBinds (nil source + pre-apply false) and the pre-apply assertion in TestWholeComposition_RedeemNamesAppliedCommunity." }, "summary": "Wired the control-plane enroll ledger's community header to the live applied brand kit so the joining agent's banner and pairing line name the community, matching the portal header, with no static copy (DDR 0007).", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#940
No description provided.