app-card-operator-home: ADR 0247 empties the portal door the card reads — it never loads #1741

Closed
opened 2026-09-22 17:26:13 +00:00 by matou-build-agent · 3 comments

The failure

Leg app-card-operator-home — the drive's only red (45/46 green, 0 skips). The operator home rendered fine; the community-app card was absent entirely — not pending, not ready, no card at all.

artifacts/verdict.json:

"firstRedLeg": "app-card-operator-home",
"legs": { "total": 46, "green": 45, "red": 1, "skip": 0 }

artifacts/legs.json:

Locator: locator('[data-field="community-app"][data-status="ready"]').first()
Expected: visible
Timeout: 60000ms
Error: element(s) not found

The leg's prior failure mode did not recur: the three earlier fires red'd on getting off the IDIP hand-off, but artifacts/legs/app-card-operator-home.png shows the home reached and drawn (E2E Drive, OPEN DASHBOARD, RESCUE TOOLS / LOGS / ENROLLMENT CODES).

This is NOT the known frontier

The known frontier is pairing never flipping (the own-VPS carrier issue). Not this run: {"leg": "pair", "status": "green", "ms": 4598}, "skip": 0, and legs.json carries no skip reasons at all. The record genuinely flipped — live box, curl http://127.0.0.1:8080/api/v1/community-app:

{"state":"ready","slug":"e2e-drive","submitted_at":"2026-09-22T17:12:17Z",
 "last_checked_at":"2026-09-22T17:18:03Z","reason":"",
 "downloads_url":"https://coa.matou.nz/c/rehearsal-f/downloads","platforms":["android","ios"]}

And the dashboard half of the same two-surface contract passed (coa-ready green, idip-coa-ready-card.png written). One record, two surfaces — exactly one of them is broken.

Root cause: the home never issued the read

logs/droplet-caddy.txt over the whole run: 47 GETs of /api/v1/community-app, every one from the dashboard browser; zero from the Electron renderer (UA Electron/33.4.11, matching the screenshot's v33.4.11). The Electron app's last request to the box of any kind was 17:12:21 — six minutes before the leg. Through the leg window (17:18:29–17:19:29) caddy logged only the dashboard's 10s polls:

17:19:04 ... "host":"rehearsal-f.idss.nz","uri":"/api/v1/idip/roster"
17:19:24 ... "host":"rehearsal-f.idss.nz","uri":"/api/v1/idip/stewards/rotation"

HTTPS was healthy the entire time. The home simply never asked. The chain, all in-repo:

  1. internal/hostnames/hostnames.go:113 — const ApexServes = ApexSurfacePanel (ADR 0247).
  2. internal/hostnames/hostnames.go:160 — func PortalDoor(apex) { if ApexServes != ApexSurfacePortal { return "" } ... }. The member Portal door is withdrawn: empty under this posture, on both paths (PortalDoorReachable too).
  3. internal/founding/seat.go:100 — res.Portal = hostnames.PortalDoor(res.Apex) → the seat op emits no portal, even though the apex is recorded (state/clan-config/idss/apex = rehearsal-f.idss.nz).
  4. app/src/lib/seatSource.ts:43 — portalUrl: result.portal → undefined.
  5. app/src/bootstrap.ts:234 — return s.kind === 'operator' ? s.community.portalUrl : undefined;
  6. app/src/lib/communityApp.ts:66 — if (!base) return null; → no HTTP is attempted at all.
  7. OperatorHomeScreen.vue:131 sets communityApp.value = null; OcCommunityAppCard's v-if="card" renders nothing.

Two artifacts corroborate the exact step: the leg screenshot shows the home's name line but no address line under it — <div class="oc-home__url" data-field="portal-url">{{ seat.community.portalUrl }}</div> rendered empty, precisely as the chain predicts. And artifacts/operator-home-renderer.txt is a single newline — no console or page errors — because the null is silent by design: "every non-200 … yields null (no card), never a thrown error: the card must never red the home".

Why the dashboard works: dashboard/src/lib/api/communityAppClient.ts builds with baseUrl = '' — a relative read off the origin it is served from, which under ADR 0247 is the apex. The operator home is the only surface that had to name an origin, and it names the one ADR 0247 emptied.

This is a missed follow-on. 34ccc184 (#1516) wired the home to portalUrl while the Portal door was still real; 98757010 (ADR 0247) landed after it the same day and switched the Portal off. ADR 0247's own note says every surface that shows or opens the panel derives from hostnames.Dashboard "so none of them learns about the switch" — this one was left deriving from PortalDoor.

Suspected layer

Product. The record is correct on the box, caddy served the whole window, and the leg asserts the right thing.

One infra red herring to discount: rehearsal-f.idss.nz now resolves to 143.198.134.168, not this drive's box, so a fresh curl to the apex fails with tlsv1 alert internal error. That is the lab DNS record having moved after the run — direct to 170.64.159.219 with SNI the cert is a valid Let's Encrypt CN=rehearsal-f.idss.nz (NotAfter Dec 11 2026), and caddy logged the drive's own HTTP/2 traffic throughout. It played no part in the red.

What plugging it needs

  1. Re-address the read. app/src/bootstrap.ts:234 should resolve the base from the control-plane/dashboard door — s.localVm?.dashboardUrl ?? s.community.dashboardUrl, the hostnames.Dashboard derivation ADR 0247 keeps correct under both postures — not s.community.portalUrl. /api/v1/community-app is a control-plane route; the dashboard reads it at that origin 47 times in this very log.

  2. Make the read live. Fixing (1) alone would not green this leg. The read is mount-only (onMounted, OperatorHomeScreen.vue:131 — no watcher, no poll). The home mounted at the ~17:12 hand-off, when the record read submitted/pending (submitted_at: 2026-09-22T17:12:17Z); it only flipped at last_checked_at: 2026-09-22T17:18:03Z. The leg finds the home already visible and asserts without relaunching, so a long-resting home must re-read (watch the seat's base once it lands, and/or poll on the gateway's cadence) to ever show ready.

  3. Close the seam gap. app/tests/unit/operatorHomeCommunityApp.test.ts only ever injects FakeCommunityAppSource against a seat with portalUrl: 'https://example.nz' — it never exercises HttpCommunityAppSource, so the empty portal door is invisible to it. Add a case over the real source with an ADR 0247 seat (no portal door), and one asserting the card follows a record that flips under a resting home.

drive 20260922T165205Z red at app-card-operator-home: expect(locator).toBeVisible() failed Locator: locator('[data-field="community-app"][data-status="ready"]').first() Expected: visible Timeout: 60000ms Error: element(s) not found Call log: - Expect "to
evidence: /home/swarm/session-runner/idss/test-results/drive-idip/20260922T165205Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure Leg `app-card-operator-home` — the drive's only red (45/46 green, **0 skips**). The operator home rendered fine; the community-app card was absent entirely — not `pending`, not `ready`, no card at all. `artifacts/verdict.json`: ``` "firstRedLeg": "app-card-operator-home", "legs": { "total": 46, "green": 45, "red": 1, "skip": 0 } ``` `artifacts/legs.json`: ``` Locator: locator('[data-field="community-app"][data-status="ready"]').first() Expected: visible Timeout: 60000ms Error: element(s) not found ``` The leg's prior failure mode did **not** recur: the three earlier fires red'd on getting off the IDIP hand-off, but `artifacts/legs/app-card-operator-home.png` shows the home reached and drawn (`E2E Drive`, `OPEN DASHBOARD`, `RESCUE TOOLS / LOGS / ENROLLMENT CODES`). ## This is NOT the known frontier The known frontier is pairing never flipping (the own-VPS carrier issue). Not this run: `{"leg": "pair", "status": "green", "ms": 4598}`, `"skip": 0`, and `legs.json` carries no skip reasons at all. The record genuinely flipped — live box, `curl http://127.0.0.1:8080/api/v1/community-app`: ``` {"state":"ready","slug":"e2e-drive","submitted_at":"2026-09-22T17:12:17Z", "last_checked_at":"2026-09-22T17:18:03Z","reason":"", "downloads_url":"https://coa.matou.nz/c/rehearsal-f/downloads","platforms":["android","ios"]} ``` And the dashboard half of the same two-surface contract passed (`coa-ready` green, `idip-coa-ready-card.png` written). One record, two surfaces — exactly one of them is broken. ## Root cause: the home never issued the read `logs/droplet-caddy.txt` over the whole run: **47** GETs of `/api/v1/community-app`, every one from the dashboard browser; **zero** from the Electron renderer (UA `Electron/33.4.11`, matching the screenshot's `v33.4.11`). The Electron app's last request to the box of *any* kind was 17:12:21 — six minutes before the leg. Through the leg window (17:18:29–17:19:29) caddy logged only the dashboard's 10s polls: ``` 17:19:04 ... "host":"rehearsal-f.idss.nz","uri":"/api/v1/idip/roster" 17:19:24 ... "host":"rehearsal-f.idss.nz","uri":"/api/v1/idip/stewards/rotation" ``` HTTPS was healthy the entire time. The home simply never asked. The chain, all in-repo: 1. `internal/hostnames/hostnames.go:113` — `const ApexServes = ApexSurfacePanel` (ADR 0247). 2. `internal/hostnames/hostnames.go:160` — `func PortalDoor(apex) { if ApexServes != ApexSurfacePortal { return "" } ... }`. The member Portal door is withdrawn: empty under this posture, on **both** paths (`PortalDoorReachable` too). 3. `internal/founding/seat.go:100` — `res.Portal = hostnames.PortalDoor(res.Apex)` → the seat op emits no `portal`, even though the apex *is* recorded (`state/clan-config/idss/apex` = `rehearsal-f.idss.nz`). 4. `app/src/lib/seatSource.ts:43` — `portalUrl: result.portal` → `undefined`. 5. `app/src/bootstrap.ts:234` — `return s.kind === 'operator' ? s.community.portalUrl : undefined;` 6. `app/src/lib/communityApp.ts:66` — `if (!base) return null;` → **no HTTP is attempted at all**. 7. `OperatorHomeScreen.vue:131` sets `communityApp.value = null`; `OcCommunityAppCard`'s `v-if="card"` renders nothing. Two artifacts corroborate the exact step: the leg screenshot shows the home's name line but **no address line** under it — `<div class="oc-home__url" data-field="portal-url">{{ seat.community.portalUrl }}</div>` rendered empty, precisely as the chain predicts. And `artifacts/operator-home-renderer.txt` is a single newline — no console or page errors — because the null is silent by design: *"every non-200 … yields `null` (no card), never a thrown error: the card must never red the home"*. Why the dashboard works: `dashboard/src/lib/api/communityAppClient.ts` builds with `baseUrl = ''` — a relative read off the origin it is served from, which under ADR 0247 *is* the apex. The operator home is the only surface that had to name an origin, and it names the one ADR 0247 emptied. This is a missed follow-on. `34ccc184` (#1516) wired the home to `portalUrl` while the Portal door was still real; `98757010` (ADR 0247) landed after it the same day and switched the Portal off. ADR 0247's own note says every surface that shows or opens the panel derives from `hostnames.Dashboard` *"so none of them learns about the switch"* — this one was left deriving from `PortalDoor`. ## Suspected layer **Product.** The record is correct on the box, caddy served the whole window, and the leg asserts the right thing. One infra red herring to discount: `rehearsal-f.idss.nz` *now* resolves to `143.198.134.168`, not this drive's box, so a fresh `curl` to the apex fails with `tlsv1 alert internal error`. That is the lab DNS record having moved after the run — direct to `170.64.159.219` with SNI the cert is a valid Let's Encrypt `CN=rehearsal-f.idss.nz` (NotAfter Dec 11 2026), and caddy logged the drive's own HTTP/2 traffic throughout. It played no part in the red. ## What plugging it needs 1. **Re-address the read.** `app/src/bootstrap.ts:234` should resolve the base from the control-plane/dashboard door — `s.localVm?.dashboardUrl ?? s.community.dashboardUrl`, the `hostnames.Dashboard` derivation ADR 0247 keeps correct under both postures — not `s.community.portalUrl`. `/api/v1/community-app` is a control-plane route; the dashboard reads it at that origin 47 times in this very log. 2. **Make the read live.** Fixing (1) alone would *not* green this leg. The read is mount-only (`onMounted`, `OperatorHomeScreen.vue:131` — no watcher, no poll). The home mounted at the ~17:12 hand-off, when the record read submitted/pending (`submitted_at: 2026-09-22T17:12:17Z`); it only flipped at `last_checked_at: 2026-09-22T17:18:03Z`. The leg finds the home already visible and asserts without relaunching, so a long-resting home must re-read (watch the seat's base once it lands, and/or poll on the gateway's cadence) to ever show `ready`. 3. **Close the seam gap.** `app/tests/unit/operatorHomeCommunityApp.test.ts` only ever injects `FakeCommunityAppSource` against a seat with `portalUrl: 'https://example.nz'` — it never exercises `HttpCommunityAppSource`, so the empty portal door is invisible to it. Add a case over the real source with an ADR 0247 seat (no portal door), and one asserting the card follows a record that flips under a resting home. drive `20260922T165205Z` red at `app-card-operator-home`: `expect(locator).toBeVisible() failed Locator: locator('[data-field="community-app"][data-status="ready"]').first() Expected: visible Timeout: 60000ms Error: element(s) not found Call log: - Expect "to` evidence: `/home/swarm/session-runner/idss/test-results/drive-idip/20260922T165205Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: b56696d84303 -->
Author
Member

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

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

close-report for #1741 — status success

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

envelope
{
  "issue": 1741,
  "status": "success",
  "commits": [
    "294e29e3b49dde12abfad9ab0a46396719c4ff5a"
  ],
  "changed_files": [
    "app/src/lib/communityApp.ts",
    "app/src/bootstrap.ts",
    "app/src/components/shell/OperatorHomeScreen.vue",
    "app/tests/unit/operatorHomeCommunityApp.test.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "npx vitest run tests/unit/operatorHomeCommunityApp.test.ts (in app/)",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit (in app/)",
      "exit_code": 0
    },
    {
      "command": "npx eslint <changed files> (repo root)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "1. Re-address the read off the control-plane/dashboard door, not the ADR 0247-emptied portal door": "communityApp.ts communityAppBase(seat) returns localVm?.dashboardUrl ?? community.dashboardUrl; bootstrap.ts wires it in place of s.community.portalUrl (commit 294e29e3)",
    "2. Make the read live so a resting home follows the record flipping (pending->ready)": "OperatorHomeScreen.vue re-reads on a 30s cadence (communityAppRefreshMs) + exposed reloadCommunityApp; test 'a resting home re-reads and follows the record flipping (pending -> ready)' green",
    "3. Close the seam gap: exercise the real HttpCommunityAppSource with an ADR 0247 seat (no portal door) + a record that flips under a resting home": "operatorHomeCommunityApp.test.ts new suite: base-resolution unit, live HttpCommunityAppSource read at the dashboard origin under an ADR 0247 seat, and the resting-home flip case — 9 tests green"
  },
  "summary": "Operator home now issues its community-app read off the control-plane dashboard door (not the ADR 0247-emptied portal door) and re-reads on a cadence so a resting home follows the record flipping to ready; seam tests over the real HTTP source under an ADR 0247 seat added.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1741 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1741, "status": "success", "commits": [ "294e29e3b49dde12abfad9ab0a46396719c4ff5a" ], "changed_files": [ "app/src/lib/communityApp.ts", "app/src/bootstrap.ts", "app/src/components/shell/OperatorHomeScreen.vue", "app/tests/unit/operatorHomeCommunityApp.test.ts", "STATUS.md" ], "tests": [ { "command": "npx vitest run tests/unit/operatorHomeCommunityApp.test.ts (in app/)", "exit_code": 0 }, { "command": "npx vue-tsc -p tsconfig.json --noEmit (in app/)", "exit_code": 0 }, { "command": "npx eslint <changed files> (repo root)", "exit_code": 0 } ], "criteria": { "1. Re-address the read off the control-plane/dashboard door, not the ADR 0247-emptied portal door": "communityApp.ts communityAppBase(seat) returns localVm?.dashboardUrl ?? community.dashboardUrl; bootstrap.ts wires it in place of s.community.portalUrl (commit 294e29e3)", "2. Make the read live so a resting home follows the record flipping (pending->ready)": "OperatorHomeScreen.vue re-reads on a 30s cadence (communityAppRefreshMs) + exposed reloadCommunityApp; test 'a resting home re-reads and follows the record flipping (pending -> ready)' green", "3. Close the seam gap: exercise the real HttpCommunityAppSource with an ADR 0247 seat (no portal door) + a record that flips under a resting home": "operatorHomeCommunityApp.test.ts new suite: base-resolution unit, live HttpCommunityAppSource read at the dashboard origin under an ADR 0247 seat, and the resting-home flip case — 9 tests green" }, "summary": "Operator home now issues its community-app read off the control-plane dashboard door (not the ADR 0247-emptied portal door) and re-reads on a cadence so a resting home follows the record flipping to ready; seam tests over the real HTTP source under an ADR 0247 seat added.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Author
Member

Note for the next drive / #1740 relationship (found while fixing this):

This ticket removes the "no read at all" defect — the home now issues GET /api/v1/community-app off the control-plane dashboard door (hostnames.Dashboard, correct under both ADR 0247 postures) and re-reads on a 30 s cadence so a resting home follows the record flipping to ready. That is necessary and correct regardless of auth.

But /api/v1/community-app is not in apexAllowList (internal/clan/frontdoor.go): under ADR 0247's panel posture the apex gates it behind the operator forward_auth template (the admin pseudo-service). So a session-less renderer read will 401→redirect rather than 200, unless the Electron app carries a front-door session for the apex origin (plausible if DDR 0163's in-app pinned-CA sign-in shares the renderer's session partition — unverified here).

If the re-armed leg reds on a 401 / sign-in redirect (not an empty card), that is exactly #1740's still-open ruling — A machine token over the apex / B founding loopback forward / C drop the card. The zero-Electron-reads evidence in this ticket shows #1740's original "the app reads and gets 302'd" premise was wrong (the app read nothing); #1740's decision about how the app should authenticate to read gated operator data still stands.

Note for the next drive / #1740 relationship (found while fixing this): This ticket removes the **"no read at all"** defect — the home now issues `GET /api/v1/community-app` off the control-plane dashboard door (`hostnames.Dashboard`, correct under both ADR 0247 postures) and re-reads on a 30 s cadence so a resting home follows the record flipping to `ready`. That is necessary and correct regardless of auth. But `/api/v1/community-app` is **not** in `apexAllowList` (`internal/clan/frontdoor.go`): under ADR 0247's panel posture the apex gates it behind the operator `forward_auth` template (the `admin` pseudo-service). So a **session-less** renderer read will 401→redirect rather than 200, unless the Electron app carries a front-door session for the apex origin (plausible if DDR 0163's in-app pinned-CA sign-in shares the renderer's session partition — unverified here). If the re-armed leg reds on a **401 / sign-in redirect** (not an empty card), that is exactly **#1740**'s still-open ruling — **A** machine token over the apex / **B** founding loopback forward / **C** drop the card. The zero-Electron-reads evidence in this ticket shows #1740's original "the app reads and gets 302'd" premise was wrong (the app read nothing); #1740's *decision* about how the app should authenticate to read gated operator data still stands.
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#1741
No description provided.