brand kit: post-founding apply never lands logo bytes — Settings claims a kit the fleet does not hold (ADR 0100) #1211

Closed
opened 2026-09-04 09:13:55 +00:00 by ben · 2 comments
Owner

What is broken

A post-founding brand-kit edit in Settings never lands logo bytes. BrandKitDraft carries only Name, LogoSource, Accent, Greeting (controlapi settings draft shape) — no logo bytes, no background/preset/status — and ApplyBrandKit (control-plane compose path) never calls WriteBrandLogo / WriteSurfaceLogos. So an operator who changes the community logo after founding gets: Settings claims the kit applied, tokens.css updates, but every logo-bearing surface (kanidm sign-in image, Nextcloud logo, per-surface logo objects) keeps the founding-era bytes — or the letter-mark. That is a selectable lie (ADR 0100): the surface reports a state the fleet does not hold.

Masked today because founding-time apply (the deploy-prep path) DOES land bytes, and nobody has driven a post-founding logo change end-to-end (settings-brand-reapply.live.spec.ts reapplies accent/name, not the logo).

What to build

The post-founding apply path lands the SAME artifact set the founding path does: kit document + compiled artifacts + WriteBrandLogo (+ type sidecar) + WriteSurfaceLogos over the logo-bearing surfaces, in the one config-repo commit (ADR 0102 single writer). The Settings draft shape carries what that needs (logo bytes/source, background/preset — or an explicit ruling that some fields are founding-only, surfaced honestly in the UI rather than silently dropped).

Acceptance criteria

  • A post-founding logo change lands new bytes at the idp-login logo path and every registered logo-bearing surface's logo object, in the same commit as the kit document.
  • kanidm's brand-push and Nextcloud's brand oneshot re-fire on that commit's deploy (their restartTriggers see new bytes).
  • A test proves the failure path: apply with changed logo, then read the logo objects back — stale bytes red the test (no vacuous pass on absent files).
  • Fields the draft deliberately does not carry are either added or explicitly surfaced as not-editable — never silently ignored.

Why it matters now

Gate for the brand-reach arc (full surface registration over the catalogue ports): with 8 more branded services, a silent logo no-op multiplies across the fleet.

Blocked by

None — can start immediately.

## What is broken A post-founding brand-kit edit in Settings never lands logo bytes. `BrandKitDraft` carries only `Name`, `LogoSource`, `Accent`, `Greeting` (controlapi settings draft shape) — no logo bytes, no background/preset/status — and `ApplyBrandKit` (control-plane compose path) never calls `WriteBrandLogo` / `WriteSurfaceLogos`. So an operator who changes the community logo after founding gets: Settings claims the kit applied, tokens.css updates, but every logo-bearing surface (kanidm sign-in image, Nextcloud logo, per-surface logo objects) keeps the founding-era bytes — or the letter-mark. That is a selectable lie (ADR 0100): the surface reports a state the fleet does not hold. Masked today because founding-time apply (the deploy-prep path) DOES land bytes, and nobody has driven a post-founding logo change end-to-end (`settings-brand-reapply.live.spec.ts` reapplies accent/name, not the logo). ## What to build The post-founding apply path lands the SAME artifact set the founding path does: kit document + compiled artifacts + `WriteBrandLogo` (+ type sidecar) + `WriteSurfaceLogos` over the logo-bearing surfaces, in the one config-repo commit (ADR 0102 single writer). The Settings draft shape carries what that needs (logo bytes/source, background/preset — or an explicit ruling that some fields are founding-only, surfaced honestly in the UI rather than silently dropped). ## Acceptance criteria - [ ] A post-founding logo change lands new bytes at the idp-login logo path and every registered logo-bearing surface's logo object, in the same commit as the kit document. - [ ] kanidm's brand-push and Nextcloud's brand oneshot re-fire on that commit's deploy (their restartTriggers see new bytes). - [ ] A test proves the failure path: apply with changed logo, then read the logo objects back — stale bytes red the test (no vacuous pass on absent files). - [ ] Fields the draft deliberately does not carry are either added or explicitly surfaced as not-editable — never silently ignored. ## Why it matters now Gate for the brand-reach arc (full surface registration over the catalogue ports): with 8 more branded services, a silent logo no-op multiplies across the fleet. ## Blocked by None — can start immediately.

swarm-claim host=matou-dev-server-01 run=17682
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=17682 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1211 — status success

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

envelope
{
  "issue": 1211,
  "status": "success",
  "commits": [
    "e519ef809c6cb9a52e720366ee7e2bef9f825089"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/compose.go",
    "control-plane/cmd/control-plane/crossorchestrator_integration_test.go",
    "dashboard/src/components/shell/BrandKitScreen.vue",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/brandkit.ts",
    "dashboard/tests/unit/brandKitTheming.test.ts",
    "internal/controlapi/settings.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "go test ./control-plane/cmd/control-plane/ -run TestCrossOrchestrator_BrandKit -count=1",
      "exit_code": 0
    },
    {
      "command": "go test ./control-plane/cmd/control-plane/ ./internal/controlapi/ ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "node ./node_modules/vitest/vitest.mjs run tests/unit/brandKitTheming.test.ts",
      "exit_code": 0
    },
    {
      "command": "node ./node_modules/vue-tsc/bin/vue-tsc.js -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A post-founding logo change lands new bytes at the idp-login logo path and every registered logo-bearing surface's logo object, in the same commit as the kit document": "configRepoSettings.ApplyBrandKit (compose.go) decodes draft.LogoData and, inside the single Mutate closure that writes the kit doc + compiled artifacts, calls writeBrandLogoIn to land clan.BrandLogoPath + every brandkit.LogoBearingSurfaces sibling object — one commit. Proven by TestCrossOrchestrator_BrandKitApplyLandsChangedLogoBytes: reads the idp-login + each surface object back (equals the new bytes) and asserts head commit carries brandKitDocPath + clan.BrandLogoPath + a surface logo object together.",
    "kanidm's brand-push and Nextcloud's brand oneshot re-fire on that commit's deploy (their restartTriggers see new bytes)": "The bytes land at the SAME fixed paths founding uses (DDR 0147/#356) and the deploy stays RestartChanged:true, so the units' restartTriggers observe changed bytes and re-fire. Asserted in the same test: exactly one deploy with RestartChanged true.",
    "A test proves the failure path: apply with changed logo, then read the logo objects back — stale bytes red the test (no vacuous pass on absent files)": "TestCrossOrchestrator_BrandKitApplyLandsChangedLogoBytes applies logo A, reads bytes back (fails on absent files, not vacuous), then applies logo B and re-reads — stale A bytes red assertLogo('updated-logo-bytes').",
    "Fields the draft deliberately does not carry are either added or explicitly surfaced as not-editable — never silently ignored": "Logo bytes ADDED as write-only BrandKitDraft.LogoData (controlapi + OpenAPI logo_data + generated client + lib logoData + wired Upload flow). The kit's preset/background/status overrides are documented as founding-only and surfaced as not-editable by their absence from the DS2 editor (settings.go draft doc, openapi.yaml schema description)."
  },
  "summary": "The post-founding brand-kit apply now decodes the uploaded logo and lands its bytes at the idp-login path and every logo-bearing surface in the same commit as the kit document, with the upload wired end-to-end through the Settings editor.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1211 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1211, "status": "success", "commits": [ "e519ef809c6cb9a52e720366ee7e2bef9f825089" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/compose.go", "control-plane/cmd/control-plane/crossorchestrator_integration_test.go", "dashboard/src/components/shell/BrandKitScreen.vue", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/brandkit.ts", "dashboard/tests/unit/brandKitTheming.test.ts", "internal/controlapi/settings.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "go test ./control-plane/cmd/control-plane/ -run TestCrossOrchestrator_BrandKit -count=1", "exit_code": 0 }, { "command": "go test ./control-plane/cmd/control-plane/ ./internal/controlapi/ ./internal/clan/", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "node ./node_modules/vitest/vitest.mjs run tests/unit/brandKitTheming.test.ts", "exit_code": 0 }, { "command": "node ./node_modules/vue-tsc/bin/vue-tsc.js -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 } ], "criteria": { "A post-founding logo change lands new bytes at the idp-login logo path and every registered logo-bearing surface's logo object, in the same commit as the kit document": "configRepoSettings.ApplyBrandKit (compose.go) decodes draft.LogoData and, inside the single Mutate closure that writes the kit doc + compiled artifacts, calls writeBrandLogoIn to land clan.BrandLogoPath + every brandkit.LogoBearingSurfaces sibling object — one commit. Proven by TestCrossOrchestrator_BrandKitApplyLandsChangedLogoBytes: reads the idp-login + each surface object back (equals the new bytes) and asserts head commit carries brandKitDocPath + clan.BrandLogoPath + a surface logo object together.", "kanidm's brand-push and Nextcloud's brand oneshot re-fire on that commit's deploy (their restartTriggers see new bytes)": "The bytes land at the SAME fixed paths founding uses (DDR 0147/#356) and the deploy stays RestartChanged:true, so the units' restartTriggers observe changed bytes and re-fire. Asserted in the same test: exactly one deploy with RestartChanged true.", "A test proves the failure path: apply with changed logo, then read the logo objects back — stale bytes red the test (no vacuous pass on absent files)": "TestCrossOrchestrator_BrandKitApplyLandsChangedLogoBytes applies logo A, reads bytes back (fails on absent files, not vacuous), then applies logo B and re-reads — stale A bytes red assertLogo('updated-logo-bytes').", "Fields the draft deliberately does not carry are either added or explicitly surfaced as not-editable — never silently ignored": "Logo bytes ADDED as write-only BrandKitDraft.LogoData (controlapi + OpenAPI logo_data + generated client + lib logoData + wired Upload flow). The kit's preset/background/status overrides are documented as founding-only and surfaced as not-editable by their absence from the DS2 editor (settings.go draft doc, openapi.yaml schema description)." }, "summary": "The post-founding brand-kit apply now decodes the uploaded logo and lands its bytes at the idp-login path and every logo-bearing surface in the same commit as the kit document, with the upload wired end-to-end through the Settings editor.", "reason": "", "blockers": [], "no_code_change": "" } ``` </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#1211
No description provided.