Settings brand editor opens EMPTY after a live founding — the founding kit never lands in brand-kit.json #355

Closed
opened 2026-08-09 16:09:22 +00:00 by ben · 2 comments
Owner

Found during the DDR 0147 arc (explorer trace). Founding writes a Name-only community header (WriteCommunityName, seed+deploy legs); configRepoSettings.BrandKit() (control-plane compose.go) loads that doc as a full brandkit.Kit, so after a live founding the Settings editor shows an empty accent, empty logo source, empty greeting — the operator's founding palette is invisible there, and the FIRST Settings apply overwrites the header with whatever the editor was showing.

Fix shape: founding lands the full kit into ourcloud/brand-kit.json (a superset carrying Name — ReadCommunityName and the kanidm-brand-push jq both keep working), or the Settings read falls back to the founding draft's kit. One writer, one doc (ADR 0102/0103).

Found during the DDR 0147 arc (explorer trace). Founding writes a Name-only community header (`WriteCommunityName`, seed+deploy legs); `configRepoSettings.BrandKit()` (control-plane compose.go) loads that doc as a full `brandkit.Kit`, so after a live founding the Settings editor shows an empty accent, empty logo source, empty greeting — the operator's founding palette is invisible there, and the FIRST Settings apply overwrites the header with whatever the editor was showing. Fix shape: founding lands the full kit into `ourcloud/brand-kit.json` (a superset carrying Name — `ReadCommunityName` and the kanidm-brand-push jq both keep working), or the Settings read falls back to the founding draft's kit. One writer, one doc (ADR 0102/0103).
Author
Owner

This was generated by AI during triage.

Verified. Read the code paths this issue names — the claim holds exactly as described:

  • The founding deploy leg's community-name writer persists only {Name: ...} to the config-repo document, and runs after the artifact-compile step (which applies compiled CSS/fonts to surfaces but never saves the full kit document).
  • The Settings brand editor's reader loads that same document as a full kit with no fallback, so a name-only document decodes to an empty accent, empty logo source, and empty greeting.
  • The write path that does save a full kit document is the Settings "apply" flow itself — meaning the first post-founding edit persists whatever empty state the editor showed, discarding the founding palette permanently.

This is independent of "DDR 0147" (mentioned in the issue only as how it was found, not as a landed dependency) — no missing design contract, no open judgement call. Moving to ready-for-agent.

Agent Brief

Category: bug
Summary: Settings brand editor opens empty after a live founding because the founding write path only persists the community name, not the full brand kit, to the document the editor reads

Current behavior:
A live founding captures a full brand kit (accent/palette, logo source, greeting) and compiles+applies its artifacts (CSS, fonts) to surfaces during the deploy leg. But the document that later readers treat as "the landed brand kit" only ever receives the community name — never the palette, logo source, or greeting. Opening the Settings brand editor after founding therefore shows an empty accent, empty logo source, and empty greeting, even though founding's compiled artifacts are live on the fleet. Worse, because the editor starts from that empty state, the first "apply" in Settings persists the empty values back to the document — permanently discarding the founding palette, including the name if the writer isn't careful to preserve it.

Desired behavior:
After a live founding, opening the Settings brand editor shows the operator's founding-chosen accent, logo source, and greeting exactly as chosen during founding — not empty. The community name established at founding is never silently blanked by a subsequent Settings apply. There is exactly one authoritative document (and one writer discipline) that both founding and Settings agree on for "the landed brand kit," consistent with this repo's existing config-repo single-writer principle.

Key interfaces:

  • The community-header document (read by both the community-name reader and the Settings brand-kit reader) should carry a shape that a full-kit write and a name-only write both produce consistently — no reader should assume fields exist that the writer never set.
  • The founding deploy leg's writer should persist the full brand kit (not just the name) to the document Settings reads, when founding has a full kit to give it — or, alternatively, the Settings reader should fall back to the founding draft's kit when the landed document lacks palette/logo/greeting fields. Pick one; per this repo's single-writer principle, prefer the shape with exactly one writer for the eventual full-kit document rather than two paths that can race.

Acceptance criteria:

  • After a live founding that set an accent, logo, and greeting, opening the Settings brand editor shows those exact values.
  • The community name set during founding survives a subsequent Settings "apply" that doesn't touch the name field.
  • Exactly one write path lands the full brand-kit document post-founding — no second writer can race it.
  • A community whose landed document currently only has a name (pre-fix state) doesn't crash the Settings editor — it degrades to today's empty-field behavior rather than erroring.

Out of scope:

  • Retroactively repairing already-founded communities' documents on disk (fix applies going forward; degrade gracefully for old ones per the last acceptance criterion).
  • Changes to the compiled-artifacts write path (CSS/fonts) — that mechanism already works; this brief is only about the config document the Settings editor reads.
> *This was generated by AI during triage.* **Verified.** Read the code paths this issue names — the claim holds exactly as described: - The founding deploy leg's community-name writer persists only `{Name: ...}` to the config-repo document, and runs after the artifact-compile step (which applies compiled CSS/fonts to surfaces but never saves the full kit document). - The Settings brand editor's reader loads that same document as a full kit with no fallback, so a name-only document decodes to an empty accent, empty logo source, and empty greeting. - The write path that *does* save a full kit document is the Settings "apply" flow itself — meaning the first post-founding edit persists whatever empty state the editor showed, discarding the founding palette permanently. This is independent of "DDR 0147" (mentioned in the issue only as how it was found, not as a landed dependency) — no missing design contract, no open judgement call. Moving to `ready-for-agent`. ## Agent Brief **Category:** bug **Summary:** Settings brand editor opens empty after a live founding because the founding write path only persists the community name, not the full brand kit, to the document the editor reads **Current behavior:** A live founding captures a full brand kit (accent/palette, logo source, greeting) and compiles+applies its artifacts (CSS, fonts) to surfaces during the deploy leg. But the document that later readers treat as "the landed brand kit" only ever receives the community name — never the palette, logo source, or greeting. Opening the Settings brand editor after founding therefore shows an empty accent, empty logo source, and empty greeting, even though founding's compiled artifacts are live on the fleet. Worse, because the editor starts from that empty state, the first "apply" in Settings persists the empty values back to the document — permanently discarding the founding palette, including the name if the writer isn't careful to preserve it. **Desired behavior:** After a live founding, opening the Settings brand editor shows the operator's founding-chosen accent, logo source, and greeting exactly as chosen during founding — not empty. The community name established at founding is never silently blanked by a subsequent Settings apply. There is exactly one authoritative document (and one writer discipline) that both founding and Settings agree on for "the landed brand kit," consistent with this repo's existing config-repo single-writer principle. **Key interfaces:** - The community-header document (read by both the community-name reader and the Settings brand-kit reader) should carry a shape that a full-kit write and a name-only write both produce consistently — no reader should assume fields exist that the writer never set. - The founding deploy leg's writer should persist the full brand kit (not just the name) to the document Settings reads, when founding has a full kit to give it — or, alternatively, the Settings reader should fall back to the founding draft's kit when the landed document lacks palette/logo/greeting fields. Pick one; per this repo's single-writer principle, prefer the shape with exactly one writer for the eventual full-kit document rather than two paths that can race. **Acceptance criteria:** - [ ] After a live founding that set an accent, logo, and greeting, opening the Settings brand editor shows those exact values. - [ ] The community name set during founding survives a subsequent Settings "apply" that doesn't touch the name field. - [ ] Exactly one write path lands the full brand-kit document post-founding — no second writer can race it. - [ ] A community whose landed document currently only has a name (pre-fix state) doesn't crash the Settings editor — it degrades to today's empty-field behavior rather than erroring. **Out of scope:** - Retroactively repairing already-founded communities' documents on disk (fix applies going forward; degrade gracefully for old ones per the last acceptance criterion). - Changes to the compiled-artifacts write path (CSS/fonts) — that mechanism already works; this brief is only about the config document the Settings editor reads.
Author
Owner

Fixed in d3ba46f (on origin/main).

The founding legs wrote a Name-only community header via SetCommunityName, but configRepoSettings.BrandKit() loads that same ourcloud/brand-kit.json back as a whole brandkit.Kit — so post-founding the Settings editor opened empty and its first apply overwrote the founding palette.

Fix (one writer, one doc, ADR 0102/0103): founding now lands the FULL captured kit through the new clan.WriteCommunityKit. The full kit is a superset of the Name-only header with the same .Name key, so ReadCommunityName and the kanidm brand-push jq (.Name) keep working. Both founding legs (deploy-leg seat write, private seed-leg gateway-build write) call WriteCommunityKit(ctx, Draft.brandKit(false)); idempotent, deploy leg still covers deploy-only resume.

Acceptance:

  • AC1 — TestCrossOrchestrator_BrandKitReadsTheFoundingKit asserts BrandKit() returns the founding accent/logo/greeting.
  • AC2 — same test: an apply keeping the name preserves the community name in the doc.
  • AC3 — one write path (WriteCommunityKit) lands the full doc; WriteBrandKit/Settings apply write the same doc/path/format.
  • AC4 — TestCrossOrchestrator_BrandKitDegradesOnNameOnlyHeader: a pre-fix Name-only header degrades to empty fields, no crash.

Also TestWriteCommunityKit_RoundTrip (clan seam). Out-of-scope items (retro-repair of existing docs, CSS/font artifact path) untouched. STATUS.md header marks #355 FIXED.

Fixed in d3ba46f (on origin/main). The founding legs wrote a Name-only community header via `SetCommunityName`, but `configRepoSettings.BrandKit()` loads that same `ourcloud/brand-kit.json` back as a whole `brandkit.Kit` — so post-founding the Settings editor opened empty and its first apply overwrote the founding palette. Fix (one writer, one doc, ADR 0102/0103): founding now lands the FULL captured kit through the new `clan.WriteCommunityKit`. The full kit is a superset of the Name-only header with the same `.Name` key, so `ReadCommunityName` and the kanidm brand-push jq (`.Name`) keep working. Both founding legs (deploy-leg seat write, private seed-leg gateway-build write) call `WriteCommunityKit(ctx, Draft.brandKit(false))`; idempotent, deploy leg still covers deploy-only resume. Acceptance: - **AC1** — `TestCrossOrchestrator_BrandKitReadsTheFoundingKit` asserts `BrandKit()` returns the founding accent/logo/greeting. - **AC2** — same test: an apply keeping the name preserves the community name in the doc. - **AC3** — one write path (`WriteCommunityKit`) lands the full doc; `WriteBrandKit`/Settings apply write the same doc/path/format. - **AC4** — `TestCrossOrchestrator_BrandKitDegradesOnNameOnlyHeader`: a pre-fix Name-only header degrades to empty fields, no crash. Also `TestWriteCommunityKit_RoundTrip` (clan seam). Out-of-scope items (retro-repair of existing docs, CSS/font artifact path) untouched. STATUS.md header marks #355 FIXED.
ben closed this issue 2026-08-09 17:36:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#355
No description provided.