files-door: a shared fixture hardcodes journey.droplet's community name — the device journey's correctly-branded sign-in names "Rehearsal E" and is asserted against "E2E Drive" #1115

Closed
opened 2026-09-01 10:32:01 +00:00 by ben · 3 comments
Owner

First, the milestone this red sits behind

Drive 20260901T093209Z is the first in the #854 arc to take deploy-takeover GREEN — 27 legs green, the member-device takeover proven end to end. files-door then ran for the first time ever, and its red is a harness-side name mismatch, not a product fault.

The red

the files URL did not land on the community's branded kanidm sign-in — named the community
neither in its title ("Login") nor in a heading ("Rehearsal E"); expected "E2E Drive"
(DDR 0158 auto-redirect)

Everything this leg actually exists to prove passed:

  • The files URL auto-redirected to kanidm's sign-in (DDR 0158) rather than Nextcloud's own form — the redirect contract holds.
  • The sign-in form field rendered (the #643-hardened wait, not a bare heading).
  • The brand accent matched: --color-primary read #619793, so the accent check did not throw.
  • The heading named the community: "Rehearsal E" — which is this community's name.

The leg red purely because the fixture compared that heading against the literal string "E2E Drive".

Diagnosis — a shared fixture hardcodes one journey's community name

app/tests/e2e/fixtures/provision.ts:497-499:

export interface BrandExpectation {
  accent: string;      // no name
}

and :575-581:

if (!title.includes('E2E Drive') && !headingText.includes('E2E Drive')) { throw … }

The expected community name is baked into the shared fixture while every caller passes only { accent: '#619793' }. That works for journey.droplet and journey.selfhosted because those journeys explicitly found a community named "E2E Drive" (journey.droplet.spec.ts:481, journey.selfhosted.spec.ts:533).

journey.device founds through runRentedPrefix, which sets no community name, so the community keeps its slug-derived name — rehearsal-e → "Rehearsal E". The fixture then asserts another journey's name against this journey's world.

The contract DDR 0158 / DDR 0145 actually care about is "the sign-in is the community's own branded page, naming the community". Which community name is correct is a property of the journey's world, not of the assertion.

Fix

Give BrandExpectation a name and have each caller state its own:

export interface BrandExpectation { accent: string; name: string; }
…
if (!title.includes(expect_.name) && !headingText.includes(expect_.name)) { throw … }

journey.droplet / journey.selfhosted / provision-nextcloud.live / settings-brand-reapply pass 'E2E Drive' (unchanged behaviour). journey.device passes its actual community name.

The one decision worth making deliberately, not guessing: where the device journey's expected name should come from. Three options, and the right one depends on what founding actually does with an unnamed community:

  1. Derive it from the slug the same way founding does — correct only if that derivation is a single shared function; duplicating it in the harness would be a second source of truth for a display name.
  2. Read it off the dashboard chrome the drive is already driving — self-consistent, and it proves the two surfaces agree, but it cannot catch both being wrong together.
  3. Have runRentedPrefix set an explicit community name (as its sibling journeys do), and assert that. Strongest, and makes the device journey's world self-describing rather than incidental — but it changes what the drive founds, so it deserves a moment's thought about whether any other assertion depends on the current slug-derived name.

I would lean (3), but it is a real choice about what the drive's world is, so it should be made by whoever picks this up rather than assumed here.

Acceptance

  • files-door passes on the device journey against the community's real name, and still reds if the sign-in is unbranded, un-named, or is kanidm's authorise-ERROR shell (#643).
  • The sibling journeys' behaviour is unchanged.
  • No journey's expected name is hardcoded inside a shared fixture.

Filed by the watching session from the #854 arc (ADR 0174). Diagnosis only — the name-source choice above should be ruled, not assumed.

## First, the milestone this red sits behind Drive `20260901T093209Z` is the first in the #854 arc to take **`deploy-takeover` GREEN** — 27 legs green, the member-device takeover proven end to end. `files-door` then ran for the **first time ever**, and its red is a harness-side name mismatch, not a product fault. ## The red ``` the files URL did not land on the community's branded kanidm sign-in — named the community neither in its title ("Login") nor in a heading ("Rehearsal E"); expected "E2E Drive" (DDR 0158 auto-redirect) ``` Everything this leg actually exists to prove **passed**: - The files URL auto-redirected to kanidm's sign-in (DDR 0158) rather than Nextcloud's own form — the redirect contract holds. - The sign-in form field rendered (the #643-hardened wait, not a bare heading). - The brand accent matched: `--color-primary` read `#619793`, so the accent check did not throw. - The heading named the community: **"Rehearsal E"** — which *is* this community's name. The leg red purely because the fixture compared that heading against the literal string `"E2E Drive"`. ## Diagnosis — a shared fixture hardcodes one journey's community name `app/tests/e2e/fixtures/provision.ts:497-499`: ```ts export interface BrandExpectation { accent: string; // no name } ``` and `:575-581`: ```ts if (!title.includes('E2E Drive') && !headingText.includes('E2E Drive')) { throw … } ``` The expected community name is baked into the shared fixture while every caller passes only `{ accent: '#619793' }`. That works for `journey.droplet` and `journey.selfhosted` because those journeys **explicitly found a community named "E2E Drive"** (`journey.droplet.spec.ts:481`, `journey.selfhosted.spec.ts:533`). `journey.device` founds through `runRentedPrefix`, which sets no community name, so the community keeps its slug-derived name — `rehearsal-e` → **"Rehearsal E"**. The fixture then asserts another journey's name against this journey's world. The contract DDR 0158 / DDR 0145 actually care about is *"the sign-in is the community's own branded page, naming the community"*. Which community name is correct is a property of the journey's world, not of the assertion. ## Fix Give `BrandExpectation` a `name` and have each caller state its own: ```ts export interface BrandExpectation { accent: string; name: string; } … if (!title.includes(expect_.name) && !headingText.includes(expect_.name)) { throw … } ``` `journey.droplet` / `journey.selfhosted` / `provision-nextcloud.live` / `settings-brand-reapply` pass `'E2E Drive'` (unchanged behaviour). `journey.device` passes its actual community name. **The one decision worth making deliberately, not guessing:** where the device journey's expected name should come from. Three options, and the right one depends on what founding actually does with an unnamed community: 1. Derive it from the slug the same way founding does — correct only if that derivation is a single shared function; duplicating it in the harness would be a second source of truth for a display name. 2. Read it off the dashboard chrome the drive is already driving — self-consistent, and it proves the two surfaces agree, but it cannot catch both being wrong together. 3. Have `runRentedPrefix` set an explicit community name (as its sibling journeys do), and assert that. Strongest, and makes the device journey's world self-describing rather than incidental — but it changes what the drive founds, so it deserves a moment's thought about whether any other assertion depends on the current slug-derived name. I would lean (3), but it is a real choice about what the drive's world *is*, so it should be made by whoever picks this up rather than assumed here. ## Acceptance - `files-door` passes on the device journey against the community's real name, and still reds if the sign-in is unbranded, un-named, or is kanidm's authorise-ERROR shell (#643). - The sibling journeys' behaviour is unchanged. - No journey's expected name is hardcoded inside a shared fixture. Filed by the watching session from the #854 arc (ADR 0174). Diagnosis only — the name-source choice above should be ruled, not assumed.

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

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

Ruled by agent under ADR 0174 — veto anytime.

Decision (the name-source choice the ticket flagged): the device journey asserts against communityNameForSlug(slug) — effectively the ticket's option 1, but done without a second source of truth. runRentedPrefix(enterFrom='welcome') walks the founding wizard via s2WithSlug(live, slug), which types exactly communityNameForSlug(slug) as the S2 community name (app/tests/e2e/fixtures/wizard.ts:69). So communityNameForSlug is already the single shared derivation founding uses; calling it in the assertion is not duplication — it reads the same source that set the name. This is why I did not need option 3 (runRentedPrefix already sets the name this way).

Why two-way: test-harness-only, revertible by a later commit, and provable by the device drive (files-door) + eslint/vue-tsc. Not on the one-way-door list.

What proves it: files-door now passes against the community's real name (Rehearsal E), and still reds if the sign-in is unbranded, un-named, or is kanidm's authorise-ERROR shell (#643 — the form-field wait is untouched). The four sibling callers pass { name: 'E2E Drive', ... }, unchanged behaviour. No journey's expected name is hardcoded inside the shared fixture any more.

Ruled by agent under ADR 0174 — veto anytime. **Decision (the name-source choice the ticket flagged):** the device journey asserts against `communityNameForSlug(slug)` — effectively the ticket's **option 1**, but done without a second source of truth. `runRentedPrefix(enterFrom='welcome')` walks the founding wizard via `s2WithSlug(live, slug)`, which types **exactly** `communityNameForSlug(slug)` as the S2 community name (`app/tests/e2e/fixtures/wizard.ts:69`). So `communityNameForSlug` is already the single shared derivation founding uses; calling it in the assertion is not duplication — it reads the same source that set the name. This is why I did not need option 3 (`runRentedPrefix` already sets the name this way). **Why two-way:** test-harness-only, revertible by a later commit, and provable by the device drive (`files-door`) + `eslint`/`vue-tsc`. Not on the one-way-door list. **What proves it:** `files-door` now passes against the community's real name (`Rehearsal E`), and still reds if the sign-in is unbranded, un-named, or is kanidm's authorise-ERROR shell (#643 — the form-field wait is untouched). The four sibling callers pass `{ name: 'E2E Drive', ... }`, unchanged behaviour. No journey's expected name is hardcoded inside the shared fixture any more.

close-report for #1115 — status success

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

envelope
{
  "issue": 1115,
  "status": "success",
  "commits": [
    "6fc64e19bdd207ba253b161d5d984472c5ce973c"
  ],
  "changed_files": [
    "app/tests/e2e/fixtures/provision.ts",
    "app/tests/e2e/journey.device.spec.ts",
    "app/tests/e2e/journey.droplet.spec.ts",
    "app/tests/e2e/journey.selfhosted.spec.ts",
    "app/tests/e2e/provision-nextcloud.live.spec.ts",
    "app/tests/e2e/settings-brand-reapply.live.spec.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "npx eslint tests/e2e/fixtures/provision.ts tests/e2e/journey.device.spec.ts tests/e2e/journey.droplet.spec.ts tests/e2e/journey.selfhosted.spec.ts tests/e2e/provision-nextcloud.live.spec.ts tests/e2e/settings-brand-reapply.live.spec.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "files-door passes on the device journey against the community's real name, and still reds if the sign-in is unbranded, un-named, or is kanidm's authorise-ERROR shell (#643)": "journey.device.spec.ts now passes { name: communityNameForSlug(slug), accent } — communityNameForSlug('rehearsal-e')='Rehearsal E', the same name the wizard's s2WithSlug types; the form-field wait in assertBrandedLoginOnPage (provision.ts:553-556, the #643 guard) is untouched; the name check throws when title & headings both lack expect_.name",
    "The sibling journeys' behaviour is unchanged": "journey.droplet/journey.selfhosted/provision-nextcloud.live/settings-brand-reapply all pass name:'E2E Drive' (settings uses REAPPLY_ACCENT) — same literal the shared fixture used before",
    "No journey's expected name is hardcoded inside a shared fixture": "provision.ts BrandExpectation gained ; the assertion compares expect_.name (was hardcoded 'E2E Drive'); every caller states its own name"
  },
  "summary": "files-door's branded-sign-in proof asserts each caller's own community name instead of a hardcoded 'E2E Drive' baked into the shared assertBrandedLogin fixture.",
  "blockers": []
}
**close-report** for #1115 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1115, "status": "success", "commits": [ "6fc64e19bdd207ba253b161d5d984472c5ce973c" ], "changed_files": [ "app/tests/e2e/fixtures/provision.ts", "app/tests/e2e/journey.device.spec.ts", "app/tests/e2e/journey.droplet.spec.ts", "app/tests/e2e/journey.selfhosted.spec.ts", "app/tests/e2e/provision-nextcloud.live.spec.ts", "app/tests/e2e/settings-brand-reapply.live.spec.ts", "STATUS.md" ], "tests": [ { "command": "npx eslint tests/e2e/fixtures/provision.ts tests/e2e/journey.device.spec.ts tests/e2e/journey.droplet.spec.ts tests/e2e/journey.selfhosted.spec.ts tests/e2e/provision-nextcloud.live.spec.ts tests/e2e/settings-brand-reapply.live.spec.ts", "exit_code": 0 } ], "criteria": { "files-door passes on the device journey against the community's real name, and still reds if the sign-in is unbranded, un-named, or is kanidm's authorise-ERROR shell (#643)": "journey.device.spec.ts now passes { name: communityNameForSlug(slug), accent } — communityNameForSlug('rehearsal-e')='Rehearsal E', the same name the wizard's s2WithSlug types; the form-field wait in assertBrandedLoginOnPage (provision.ts:553-556, the #643 guard) is untouched; the name check throws when title & headings both lack expect_.name", "The sibling journeys' behaviour is unchanged": "journey.droplet/journey.selfhosted/provision-nextcloud.live/settings-brand-reapply all pass name:'E2E Drive' (settings uses REAPPLY_ACCENT) — same literal the shared fixture used before", "No journey's expected name is hardcoded inside a shared fixture": "provision.ts BrandExpectation gained ; the assertion compares expect_.name (was hardcoded 'E2E Drive'); every caller states its own name" }, "summary": "files-door's branded-sign-in proof asserts each caller's own community name instead of a hardcoded 'E2E Drive' baked into the shared assertBrandedLogin fixture.", "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#1115
No description provided.