founding: the private path never writes the community header — seat, guest auto-start and the home VM row all read unfounded (ADR 0129 live smoke) #312

Closed
opened 2026-08-06 05:22:27 +00:00 by ben · 2 comments
Owner

Found live on the 2026-08-05 clean drive (branch private-standup-polish, ADR 0129 smoke).

Symptom: after a fully-live private founding (deploy.outcome = live), a relaunched app rests at Welcome (seat: unconfigured), the helper's guest auto-start never fires, and Operator home's local-VM row (with Stop/Start the VM) is unreachable — while stop-on-close and no-boot-autostart both work as ADR 0129 specifies.

Root cause: all three read one signal — clan.ReadCommunityName(<state>/clan-config), the config-repo community/brand-kit header (seat-source-real, #202, Ben's ruling). Nothing on the private path ever writes that header into the LOCAL config repo: SeedCommunity writes flake.nix/clan.nix/machine config, and the deploy's brand stage applies the kit to the portal/sign-in/dashboard — but no header file lands in clan-config/. So founded() honestly answers false forever on a private community.

Suggested shape: the seed (or the brand apply) writes the community header into the config repo — community identity is founding data and the header is already the ruled seat source. Candidate home: clan.SeedCommunity alongside the flake (same single-writer commit). The fleet-seeding arc (spec 2026-08-05) touches config-repo authority and may be the natural carrier.

Interim operator workaround: systemctl --user start ourcloud-guest.service brings the community back by hand.

Related: #311 (seat-staleness race after auto-start — moot until this lands, since auto-start currently never fires).

Found live on the 2026-08-05 clean drive (branch `private-standup-polish`, ADR 0129 smoke). **Symptom:** after a fully-live private founding (`deploy.outcome = live`), a relaunched app rests at **Welcome** (seat: `unconfigured`), the helper's guest **auto-start never fires**, and Operator home's local-VM row (with Stop/Start the VM) is unreachable — while stop-on-close and no-boot-autostart both work as ADR 0129 specifies. **Root cause:** all three read one signal — `clan.ReadCommunityName(<state>/clan-config)`, the config-repo **community/brand-kit header** (seat-source-real, #202, Ben's ruling). Nothing on the private path ever writes that header into the LOCAL config repo: `SeedCommunity` writes `flake.nix`/`clan.nix`/machine config, and the deploy's brand stage applies the kit to the portal/sign-in/dashboard — but no header file lands in `clan-config/`. So `founded()` honestly answers false forever on a private community. **Suggested shape:** the seed (or the brand apply) writes the community header into the config repo — community identity is founding data and the header is already the ruled seat source. Candidate home: `clan.SeedCommunity` alongside the flake (same single-writer commit). The fleet-seeding arc (spec 2026-08-05) touches config-repo authority and may be the natural carrier. **Interim operator workaround:** `systemctl --user start ourcloud-guest.service` brings the community back by hand. Related: #311 (seat-staleness race after auto-start — moot until this lands, since auto-start currently never fires).
Author
Owner

This was generated by AI during triage.

Triage

Verification against the codebase (2026-08-06):

  • Confirmed: the community-header signal (ourcloud/brand-kit.json in the config repo, read by clan.ReadCommunityName) is exactly what feeds the seat resolution that lands the app on Welcome/unconfigured. The private founding path (seed + deploy's brand-apply stage) never writes this file into the local config repo — it's written in exactly one place repo-wide, the Settings dashboard's manual config-repo brand-kit apply, which is only reachable after founding already resolves as founded. So a private community that goes fully live still reads unconfigured forever, exactly as reported. This part of the root cause is solid.
  • Not confirmed: the report attributes the helper's guest auto-start-never-fires and Operator home's local-VM row being unreachable to the same missing-header signal. Neither traces to it. Auto-start is wired to the systemd unit created once at founding time (independent of any later header read). The local-VM row is unreachable because OperatorSeat.localVm is an intentionally-absent, not-yet-built field (existing "honest absence over fabrication" posture) — unrelated to this bug and already the documented state regardless of the header. Also, no clan.SeedCommunity function exists in this repo; the real private-founding entry points are the seed and deploy stages.
  • Not already implemented for the private path (redundancy check: the header write exists only on the post-founding Settings path). No .out-of-scope/ entry exists (directory doesn't exist yet) — not a prior rejection. No ADR names the header as seat source; that ruling is issue #202's body text only.

Scoping this ticket to the confirmed bug (Welcome-never-clears on a live private founding). The auto-start and VM-row symptoms are not caused by this and are left alone — #311 already tracks a related-but-distinct VM-row staleness bug.

Agent Brief

Category: bug
Summary: A fully-live private founding never writes the community/brand-kit header into the local config repo, so the seat resolution that reads it answers "unconfigured" forever and a relaunched app rests at Welcome instead of Operator home.

Current behavior:
Seat resolution treats a parseable community header in the operator's local config repo as the sole real signal that this machine operates a founded community (ruled in #202: header present → operator seat with the community name; absent/unparseable → unconfigured, nothing else consulted). Public founding paths that use the Settings-side config-repo brand-kit apply produce this header. Private founding's own seed and deploy stages write flake/machine config and apply the brand kit to the portal/sign-in/dashboard surfaces, but never write the header file into the config repo itself. A private founding can therefore reach deploy.outcome = live and still have a relaunched app rest at Welcome, with the community effectively invisible to itself.

Desired behavior:
Some step in the private founding path (seed or brand-apply, single-writer commit preferred, mirroring how founding data already lands as one commit alongside the flake/machine config) writes the community header into the local config repo using the same format/writer the existing config-repo header-apply path already uses — don't invent a second writer. After a private founding reaches live, a relaunched app resolves the real operator seat (community name) and lands on Operator home, not Welcome, with no manual workaround needed.

Key interfaces:

  • The community-header writer already used by the post-founding config-repo brand-kit apply path should be reused (not duplicated) by whichever private-founding stage becomes the writer.
  • The seat-resolution read path (community header → operator seat) is unchanged — this brief is about producing the header earlier, not changing how it's consumed.

Acceptance criteria:

  • After a private founding completes with deploy.outcome = live, the local config repo contains a parseable community header with the correct community name.
  • A relaunched app after that point resolves to the real operator seat (Operator home, correct community name) without any manual systemctl workaround.
  • The existing post-founding Settings-path header write is unchanged and still works (no regression, no duplicate writer).
  • A test covers private founding end-to-end through to a header-based seat read landing on the operator seat (not unconfigured).

Out of scope:

  • The helper's guest auto-start behavior — confirmed unrelated to this signal; do not touch guestlifecycle/autostart wiring under this ticket.
  • Operator home's local-VM row visibility — that field is intentionally absent (unbuilt slice), unrelated to this header; do not wire it up here.
  • #311's seat-staleness race after auto-start — separate, already-tracked follow-up; not blocking and not fixed by this brief.
> *This was generated by AI during triage.* ## Triage **Verification against the codebase (2026-08-06):** - **Confirmed:** the community-header signal (`ourcloud/brand-kit.json` in the config repo, read by `clan.ReadCommunityName`) is exactly what feeds the seat resolution that lands the app on Welcome/`unconfigured`. The private founding path (seed + deploy's brand-apply stage) never writes this file into the local config repo — it's written in exactly one place repo-wide, the Settings dashboard's manual config-repo brand-kit apply, which is only reachable *after* founding already resolves as founded. So a private community that goes fully live still reads `unconfigured` forever, exactly as reported. This part of the root cause is solid. - **Not confirmed:** the report attributes the helper's guest auto-start-never-fires and Operator home's local-VM row being unreachable to the *same* missing-header signal. Neither traces to it. Auto-start is wired to the systemd unit created once at founding time (independent of any later header read). The local-VM row is unreachable because `OperatorSeat.localVm` is an intentionally-absent, not-yet-built field (existing "honest absence over fabrication" posture) — unrelated to this bug and already the documented state regardless of the header. Also, no `clan.SeedCommunity` function exists in this repo; the real private-founding entry points are the seed and deploy stages. - Not already implemented for the private path (redundancy check: the header write exists only on the post-founding Settings path). No `.out-of-scope/` entry exists (directory doesn't exist yet) — not a prior rejection. No ADR names the header as seat source; that ruling is issue #202's body text only. **Scoping this ticket to the confirmed bug** (Welcome-never-clears on a live private founding). The auto-start and VM-row symptoms are not caused by this and are left alone — #311 already tracks a related-but-distinct VM-row staleness bug. ## Agent Brief **Category:** bug **Summary:** A fully-live private founding never writes the community/brand-kit header into the local config repo, so the seat resolution that reads it answers "unconfigured" forever and a relaunched app rests at Welcome instead of Operator home. **Current behavior:** Seat resolution treats a parseable community header in the operator's local config repo as the sole real signal that this machine operates a founded community (ruled in #202: header present → operator seat with the community name; absent/unparseable → unconfigured, nothing else consulted). Public founding paths that use the Settings-side config-repo brand-kit apply produce this header. Private founding's own seed and deploy stages write flake/machine config and apply the brand kit to the portal/sign-in/dashboard surfaces, but never write the header file into the config repo itself. A private founding can therefore reach `deploy.outcome = live` and still have a relaunched app rest at Welcome, with the community effectively invisible to itself. **Desired behavior:** Some step in the private founding path (seed or brand-apply, single-writer commit preferred, mirroring how founding data already lands as one commit alongside the flake/machine config) writes the community header into the local config repo using the same format/writer the existing config-repo header-apply path already uses — don't invent a second writer. After a private founding reaches live, a relaunched app resolves the real operator seat (community name) and lands on Operator home, not Welcome, with no manual workaround needed. **Key interfaces:** - The community-header writer already used by the post-founding config-repo brand-kit apply path should be reused (not duplicated) by whichever private-founding stage becomes the writer. - The seat-resolution read path (community header → operator seat) is unchanged — this brief is about producing the header earlier, not changing how it's consumed. **Acceptance criteria:** - [ ] After a private founding completes with `deploy.outcome = live`, the local config repo contains a parseable community header with the correct community name. - [ ] A relaunched app after that point resolves to the real operator seat (Operator home, correct community name) without any manual `systemctl` workaround. - [ ] The existing post-founding Settings-path header write is unchanged and still works (no regression, no duplicate writer). - [ ] A test covers private founding end-to-end through to a header-based seat read landing on the operator seat (not unconfigured). **Out of scope:** - The helper's guest auto-start behavior — confirmed unrelated to this signal; do not touch `guestlifecycle`/autostart wiring under this ticket. - Operator home's local-VM row visibility — that field is intentionally absent (unbuilt slice), unrelated to this header; do not wire it up here. - #311's seat-staleness race after auto-start — separate, already-tracked follow-up; not blocking and not fixed by this brief.
Author
Owner

Fixed in 4cdc0dd (on origin/main).

Root cause confirmed & fixed: the operator app's seat reads one real signal (#202) — the config-repo community header (ourcloud/brand-kit.json, clan.ReadCommunityName) — and nothing on the private founding path wrote it into the local config repo. StandUpPrivate's enrollment bakes inventory + per-machine nix, and runDeploy's brand stage only compiles the surfaces (applyBrand), so a founding at deploy.outcome = live still read unconfigured and rested at Welcome forever.

Fix: the gateway deploy now records the header through the clan single writer.

  • internal/clan/community.go: new WriteCommunityName(ctx, repo, name) — the writer beside the existing reader; only Name is written (the one field the seat decodes, a subset of the full-kit doc the post-founding Settings apply writes to the SAME path — one header path/format, no second writer).
  • internal/clan/clan.go + config.go: Config.SetCommunityName seam method over the single-writer repo.
  • internal/founding/deploy.go: runDeploy calls it right after applyBrand, failing loud like the brand apply so a broken seat never rests as a phantom-live founding.

AC coverage:

  • AC1/AC2/AC4: internal/founding/privatepath_test.go TestPrivateFounding_LiveDeployLandsOperatorSeat — end-to-end private founding to a live deploy, then a real ReadCommunityName seat read landing on the operator seat (Operator home, community name), not Welcome.
  • Writer↔reader loop: internal/clan/community_test.go TestWriteCommunityName_RoundTrip, TestConfigSetCommunityName_SeamWritesHeader.
  • AC3: compose.go ApplyBrandKit (post-founding Settings apply) unchanged.

Scope: header write only. Guest auto-start and Operator home's local-VM row are confirmed unrelated and left alone (per the triage brief; #311 tracks the VM-row follow-up).

go build/go vet/go test/golangci-lint green; pre-push hook ran the full suite.

Fixed in `4cdc0dd` (on `origin/main`). **Root cause confirmed & fixed:** the operator app's seat reads one real signal (#202) — the config-repo community header (`ourcloud/brand-kit.json`, `clan.ReadCommunityName`) — and nothing on the private founding path wrote it into the local config repo. `StandUpPrivate`'s enrollment bakes inventory + per-machine nix, and `runDeploy`'s brand stage only *compiles* the surfaces (`applyBrand`), so a founding at `deploy.outcome = live` still read `unconfigured` and rested at Welcome forever. **Fix:** the gateway deploy now records the header through the clan single writer. - `internal/clan/community.go`: new `WriteCommunityName(ctx, repo, name)` — the writer beside the existing reader; only `Name` is written (the one field the seat decodes, a subset of the full-kit doc the post-founding Settings apply writes to the SAME path — one header path/format, no second writer). - `internal/clan/clan.go` + `config.go`: `Config.SetCommunityName` seam method over the single-writer repo. - `internal/founding/deploy.go`: `runDeploy` calls it right after `applyBrand`, failing loud like the brand apply so a broken seat never rests as a phantom-live founding. **AC coverage:** - AC1/AC2/AC4: `internal/founding/privatepath_test.go` `TestPrivateFounding_LiveDeployLandsOperatorSeat` — end-to-end private founding to a live deploy, then a real `ReadCommunityName` seat read landing on the operator seat (Operator home, community name), not Welcome. - Writer↔reader loop: `internal/clan/community_test.go` `TestWriteCommunityName_RoundTrip`, `TestConfigSetCommunityName_SeamWritesHeader`. - AC3: `compose.go` `ApplyBrandKit` (post-founding Settings apply) unchanged. **Scope:** header write only. Guest auto-start and Operator home's local-VM row are confirmed unrelated and left alone (per the triage brief; #311 tracks the VM-row follow-up). `go build`/`go vet`/`go test`/`golangci-lint` green; pre-push hook ran the full suite.
ben closed this issue 2026-08-06 08:47:16 +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.

Dependencies

No dependencies set.

Reference
Matou/idss#312
No description provided.