app-card-operator-home: scrub wants a guest-trust key self-hosted never mints #1736

Closed
opened 2026-09-22 15:49:30 +00:00 by matou-build-agent · 3 comments

Not the known frontier

The brief names the KNOWN frontier as "pairing never flips — the own-VPS carrier issue named in legs.json's skip reasons." That is not this red. pair is green, this drive's carrier is self-hosted (not own-VPS), and legs.json carries no skip reasons at all:

{ "leg": "pair", "status": "green", "ms": 4866 }
"legs": { "total": 46, "green": 45, "red": 1, "skip": 0 },
"firstRedLeg": "app-card-operator-home",
"commit": "e1557cee421883dd8a9d7405d7a3cb2e63de3d89"
"access": {"kind": "self-hosted", "summary": "A machine at your place — checked when the machine connects", ...}

45/46 green. One red, and it is a new, structural one.

The failure

app-card-operator-home drives the Electron renderer (live.page), not the dashboard browser. It clicks Open your dashboard on the S12 hand-off and waits 2 min for the app to land on Operator home:

Locator: locator('[data-status="operator-home"]').or(locator('[data-action="enter-community"]')).first()
Expected: visible
Timeout: 120000ms
Error: element(s) not found

artifacts/legs/app-card-operator-home.png shows the app still on the S12 hand-off — heading "stack is now live", both doors drawn (OPEN ADMIN CONTROL PANEL / OPEN MEMBERS PORTAL). It never left. artifacts/idip-coa-ready-home.png was never written.

The chain, proven end to end

1. The click took the IDIP branch and the completion failed. state/founding-state.json still exists at the end of the drive and reads:

"enrolment": { "offered": false, "registered": false, ... },
"kit": { "resolution": "declined", ... },
"done": false

offered:false satisfies the IDIP gate in FoundingStandup.vue:860, so onOpenDashboard ran window.open(url) then run(completeIdipHandOff, noSink). kit.resolution already moved offered → declined, so completeIdipHandOff got past the kit step and into client.completeHandOff(). The last event logged is:

hand-off | recovery-kit | recovery kit declined

No scrub events, done:false, and the state file was never deleted — so CompleteHandOff (internal/founding/handoff.go:699) returned an error before ho.Done = true.

2. It was not the readiness gate. handoff.go:717 is already IDIP-aware (ho.Enrolment.Offered && !ho.Enrolment.Registered), and with Offered:false + kit declined it passes. The failure is downstream, at verifyResidue (handoff.go:729).

3. The residue check demands a key this carrier never mints. handoff.go:792-793:

if !r.OperatorKey {
	return fmt.Errorf("%w: the operator key is missing (Tier-1 residue)", ErrScrubResidue)
}

OperatorKey comes from app/helper/cmd/helper/scrub.go:44, over a hardcoded path (wiring_prod.go:737, wiring_prod.go:119):

OperatorKey: exists(l.identity),          // scrub.go:44
identity:  filepath.Join(guestTrustDir(), "id_ed25519"),   // wiring_prod.go:737
func guestTrustDir() string { return filepath.Join(stateBaseDir(), "guest-trust") }

That file does not exist, and never did. IDSS_STATE_DIR is the run's state/ (it holds founding-state.json, clan-config/, own-vps/known_hosts, sops/), and:

ABSENT : state/guest-trust
ABSENT : state/guest-trust/id_ed25519
PRESENT: state/clan-config

This is by design on this carrier, not a lost file. guestTrust.Ensure has exactly three call sites — rentedpath.go:223, privatepath.go:586, ownvpspath.go:452. None on the self-hosted path. internal/founding/deploy.go:490-493 says so outright:

// Over the operator's OWN ambient key (SeedAmbient), not the guest-trust
// identity: unlike own-VPS (guest-trust key baked into access.nix via
// appendGuestTrust) the self-hosted box trusts only its own scraped root keys
// (#414), mirroring the AmbientSSH the compose Enroll already drives over.

Live box corroborates (134.199.170.219, still up). appendGuestTrust would have put the guest-trust public half into root's authorized_keys; it holds exactly one key — the ambient one we authenticated with:

=== count ===
1

The box is healthy, so this is not infra: systemctl --failed is empty, idss-control-plane and caddy are active, curl 127.0.0.1:8080/healthz → 200.

4. Why it is silent. FoundingStandup.vue:863 passes noSink, and FoundingStandup.vue:389 is const noSink: FaultSink = () => {};. ErrScrubResidue is swallowed with no render and no console write. The leg deliberately captures console + pageerror "whatever happens" — and artifacts/operator-home-renderer.txt is 1 byte, just a newline. The renderer said nothing for the full 120 s. This is precisely the "error swallowed by the handler's own sink" the leg's own comment names from the three earlier fires (20260921T202157Z / …211802Z / …215039Z); #1704 fixed the kanidm-branch dead-end but left the IDIP branch's completion failure invisible.

Suspected layer

Product, both halves — the seam and the renderer. Not harness (the locators and the 2-min wait are correct; the app genuinely never advances). Not infra (box green, 45 legs green, control plane 200). The leg has never passed on this carrier, so this is a standing structural red, not flake.

What plugging it needs

  1. Make the residue contract carrier-aware (the blocker). On self-hosted there is no app-held operator key — the app drives over the operator's own ambient key (#414), so repo replica + operator key is the wrong designed residue for this carrier. Precedent for the shape is in the same function: #1704 gated the passkey clause on the seam's own advertisement (Enrolment.Offered == false) rather than an identity flag. Gate verifyResidue's OperatorKey clause the same way — on whether this carrier holds an app-managed operator key — or have laptopAdapter report the carrier's actual Tier-1 identity instead of hardcoding guestTrustDir()/id_ed25519.
  2. Stop swallowing the completion failure. run(completeIdipHandOff, noSink) at FoundingStandup.vue:863 must render its fault (the top box, or the hand-off's own fault slot) instead of () => {}. An operator whose hand-off cannot complete currently sees a button that does nothing, forever, with nothing in the console.

Note for whoever takes it: choosing between (1a) gate the clause and (1b) mint/record a self-hosted operator key touches ADR 0044's residue contract. (1a) is the consistency migration the #1704 precedent already sanctions on this exact function; if the swarm judges the contract itself needs re-stating, that is ADR 0044's owner's call. Fix (2) is unambiguous either way and should land regardless — without it the next fire is just as mute.

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

## Not the known frontier The brief names the KNOWN frontier as "pairing never flips — the own-VPS carrier issue named in legs.json's skip reasons." **That is not this red.** `pair` is green, this drive's carrier is `self-hosted` (not own-VPS), and `legs.json` carries **no skip reasons at all**: ```json { "leg": "pair", "status": "green", "ms": 4866 } ``` ```json "legs": { "total": 46, "green": 45, "red": 1, "skip": 0 }, "firstRedLeg": "app-card-operator-home", "commit": "e1557cee421883dd8a9d7405d7a3cb2e63de3d89" ``` ```json "access": {"kind": "self-hosted", "summary": "A machine at your place — checked when the machine connects", ...} ``` 45/46 green. One red, and it is a new, structural one. ## The failure `app-card-operator-home` drives the **Electron renderer** (`live.page`), not the dashboard browser. It clicks *Open your dashboard* on the S12 hand-off and waits 2 min for the app to land on Operator home: ``` Locator: locator('[data-status="operator-home"]').or(locator('[data-action="enter-community"]')).first() Expected: visible Timeout: 120000ms Error: element(s) not found ``` `artifacts/legs/app-card-operator-home.png` shows the app **still on the S12 hand-off** — heading "stack is now live", both doors drawn (*OPEN ADMIN CONTROL PANEL* / *OPEN MEMBERS PORTAL*). It never left. `artifacts/idip-coa-ready-home.png` was never written. ## The chain, proven end to end **1. The click took the IDIP branch and the completion failed.** `state/founding-state.json` still exists at the end of the drive and reads: ```json "enrolment": { "offered": false, "registered": false, ... }, "kit": { "resolution": "declined", ... }, "done": false ``` `offered:false` satisfies the IDIP gate in `FoundingStandup.vue:860`, so `onOpenDashboard` ran `window.open(url)` then `run(completeIdipHandOff, noSink)`. `kit.resolution` already moved `offered → declined`, so `completeIdipHandOff` got **past** the kit step and into `client.completeHandOff()`. The last event logged is: ``` hand-off | recovery-kit | recovery kit declined ``` No `scrub` events, `done:false`, and the state file was never deleted — so `CompleteHandOff` (`internal/founding/handoff.go:699`) returned an error before `ho.Done = true`. **2. It was not the readiness gate.** `handoff.go:717` is already IDIP-aware (`ho.Enrolment.Offered && !ho.Enrolment.Registered`), and with `Offered:false` + kit `declined` it passes. The failure is downstream, at `verifyResidue` (`handoff.go:729`). **3. The residue check demands a key this carrier never mints.** `handoff.go:792-793`: ```go if !r.OperatorKey { return fmt.Errorf("%w: the operator key is missing (Tier-1 residue)", ErrScrubResidue) } ``` `OperatorKey` comes from `app/helper/cmd/helper/scrub.go:44`, over a hardcoded path (`wiring_prod.go:737`, `wiring_prod.go:119`): ```go OperatorKey: exists(l.identity), // scrub.go:44 identity: filepath.Join(guestTrustDir(), "id_ed25519"), // wiring_prod.go:737 func guestTrustDir() string { return filepath.Join(stateBaseDir(), "guest-trust") } ``` That file does not exist, and never did. `IDSS_STATE_DIR` is the run's `state/` (it holds `founding-state.json`, `clan-config/`, `own-vps/known_hosts`, `sops/`), and: ``` ABSENT : state/guest-trust ABSENT : state/guest-trust/id_ed25519 PRESENT: state/clan-config ``` **This is by design on this carrier, not a lost file.** `guestTrust.Ensure` has exactly three call sites — `rentedpath.go:223`, `privatepath.go:586`, `ownvpspath.go:452`. **None on the self-hosted path.** `internal/founding/deploy.go:490-493` says so outright: ``` // Over the operator's OWN ambient key (SeedAmbient), not the guest-trust // identity: unlike own-VPS (guest-trust key baked into access.nix via // appendGuestTrust) the self-hosted box trusts only its own scraped root keys // (#414), mirroring the AmbientSSH the compose Enroll already drives over. ``` **Live box corroborates** (134.199.170.219, still up). `appendGuestTrust` would have put the guest-trust public half into root's authorized_keys; it holds exactly **one** key — the ambient one we authenticated with: ``` === count === 1 ``` The box is healthy, so this is not infra: `systemctl --failed` is empty, `idss-control-plane` and `caddy` are `active`, `curl 127.0.0.1:8080/healthz` → `200`. **4. Why it is silent.** `FoundingStandup.vue:863` passes `noSink`, and `FoundingStandup.vue:389` is `const noSink: FaultSink = () => {};`. `ErrScrubResidue` is swallowed with no render and no console write. The leg deliberately captures console + `pageerror` "whatever happens" — and `artifacts/operator-home-renderer.txt` is **1 byte, just a newline**. The renderer said nothing for the full 120 s. This is precisely the "error swallowed by the handler's own sink" the leg's own comment names from the three earlier fires (20260921T202157Z / …211802Z / …215039Z); #1704 fixed the kanidm-branch dead-end but left the IDIP branch's completion failure invisible. ## Suspected layer **Product**, both halves — the seam and the renderer. Not harness (the locators and the 2-min wait are correct; the app genuinely never advances). Not infra (box green, 45 legs green, control plane 200). The leg has never passed on this carrier, so this is a standing structural red, not flake. ## What plugging it needs 1. **Make the residue contract carrier-aware** (the blocker). On self-hosted there is no app-held operator key — the app drives over the operator's own ambient key (#414), so `repo replica + operator key` is the wrong designed residue for this carrier. Precedent for the shape is in the same function: #1704 gated the passkey clause on the seam's own advertisement (`Enrolment.Offered == false`) rather than an identity flag. Gate `verifyResidue`'s `OperatorKey` clause the same way — on whether this carrier holds an app-managed operator key — or have `laptopAdapter` report the carrier's actual Tier-1 identity instead of hardcoding `guestTrustDir()/id_ed25519`. 2. **Stop swallowing the completion failure.** `run(completeIdipHandOff, noSink)` at `FoundingStandup.vue:863` must render its fault (the top box, or the hand-off's own fault slot) instead of `() => {}`. An operator whose hand-off cannot complete currently sees a button that does nothing, forever, with nothing in the console. Note for whoever takes it: choosing between (1a) gate the clause and (1b) mint/record a self-hosted operator key touches ADR 0044's residue contract. (1a) is the consistency migration the #1704 precedent already sanctions on this exact function; if the swarm judges the contract itself needs re-stating, that is ADR 0044's owner's call. Fix (2) is unambiguous either way and should land regardless — without it the next fire is just as mute. drive `20260922T151333Z` red at `app-card-operator-home`: `expect(locator).toBeVisible() failed Locator: locator('[data-status="operator-home"]').or(locator('[data-action="enter-community"]')).first() Expected: visible Timeout: 120000ms Error: element(s) not ` evidence: `/home/swarm/session-runner/idss/test-results/drive-idip/20260922T151333Z` 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=30219
(automated multi-host claim — lowest live claim id works this ticket)

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

Ruled by agent under ADR 0174 — veto anytime.

Decision: Take (1a) — make the S12 residue contract carrier-aware by gating verifyResidue's operator-key clause on the carrier, rather than (1b) minting/recording a self-hosted operator key. On the self-hosted carrier the app holds NO app-managed operator key: guestTrust.Ensure has no self-hosted call site (only rented/private/own-VPS), the box trusts its own scraped root keys, and the app drives over the operator's OWN ambient key (deploy.go, #414). So OperatorKey: false is the honest residue on this carrier, and demanding it is the bug.

Why this is a two-way door: It is revertible by a later commit (the clause is one predicate, carrierHoldsOperatorKey), and it does not widen any security posture — the operator-key clause stays fully enforced on every carrier that DOES mint one (own-VPS, rented, private). It is the exact carrier-aware shape #1704 already sanctioned on this same completion (it gated the passkey clause on Enrolment.Offered).

What proves it:

  • TestIDIP_SelfHostedHandOffCompletesWithNoOperatorKeyResidue — self-hosted IDIP hand-off now completes (scrub runs, state file deleted, lands on Operator home) with no operator-key residue; reproduces the drive-idip red before the fix (ErrScrubResidue: the operator key is missing).
  • TestScrub_RefusesMissingOperatorKeyOnKeyHoldingCarrier — the clause stays enforced on private (a key-holding carrier): a missing operator key there is still ErrScrubResidue.

If ADR 0044's owner judges the residue contract itself needs re-stating (self-hosted Tier-1 residue is repo replica alone), that remains their call — this commit only makes the check match the carrier's real minting behaviour.

**Ruled by agent under ADR 0174 — veto anytime.** **Decision:** Take **(1a)** — make the S12 residue contract carrier-aware by gating `verifyResidue`'s operator-key clause on the carrier, rather than **(1b)** minting/recording a self-hosted operator key. On the self-hosted carrier the app holds NO app-managed operator key: `guestTrust.Ensure` has no self-hosted call site (only rented/private/own-VPS), the box trusts its own scraped root keys, and the app drives over the operator's OWN ambient key (`deploy.go`, #414). So `OperatorKey: false` is the honest residue on this carrier, and demanding it is the bug. **Why this is a two-way door:** It is revertible by a later commit (the clause is one predicate, `carrierHoldsOperatorKey`), and it does not widen any security posture — the operator-key clause stays fully enforced on every carrier that DOES mint one (own-VPS, rented, private). It is the exact carrier-aware shape #1704 already sanctioned on this same completion (it gated the passkey clause on `Enrolment.Offered`). **What proves it:** - `TestIDIP_SelfHostedHandOffCompletesWithNoOperatorKeyResidue` — self-hosted IDIP hand-off now completes (scrub runs, state file deleted, lands on Operator home) with no operator-key residue; reproduces the drive-idip red before the fix (`ErrScrubResidue: the operator key is missing`). - `TestScrub_RefusesMissingOperatorKeyOnKeyHoldingCarrier` — the clause stays enforced on private (a key-holding carrier): a missing operator key there is still `ErrScrubResidue`. If ADR 0044's owner judges the residue contract itself needs re-stating (self-hosted Tier-1 residue is repo replica alone), that remains their call — this commit only makes the check match the carrier's real minting behaviour.
Author
Member

close-report for #1736 — status success

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

envelope
{
  "issue": 1736,
  "status": "success",
  "commits": [
    "e9faa2ff509d33bc68a69b0c75a8178d12bfe8b8"
  ],
  "changed_files": [
    "STATUS.md",
    "app/src/components/founding/FoundingStandup.vue",
    "app/tests/unit/foundingHandOffIdip.test.ts",
    "internal/founding/access.go",
    "internal/founding/handoff.go",
    "internal/founding/handoff_test.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/founding/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go build ./... && go vet ./internal/founding/... ./app/helper/...",
      "exit_code": 0
    },
    {
      "command": "npx vitest run tests/unit/foundingHandOffIdip.test.ts tests/unit/foundingStandup*.test.ts tests/unit/foundingHandOff.test.ts",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The S12 residue check no longer demands an operator key the self-hosted carrier never mints": "internal/founding/access.go carrierHoldsOperatorKey + internal/founding/handoff.go verifyResidue(wantOperatorKey); proven by TestIDIP_SelfHostedHandOffCompletesWithNoOperatorKeyResidue (red before fix: ErrScrubResidue 'the operator key is missing', green after)",
    "The operator-key clause stays enforced on carriers that DO mint one": "TestScrub_RefusesMissingOperatorKeyOnKeyHoldingCarrier (private still reds with ErrScrubResidue on a missing key)",
    "The IDIP completion failure is no longer swallowed by noSink": "app/src/components/founding/FoundingStandup.vue onOpenDashboard IDIP branch now run(completeIdipHandOff, setError); proven by frontend test 'surfaces a failed hand-off completion instead of swallowing it (#1736)'",
    "ADR 0044/0174 residue-contract ruling recorded": "issue comment 53357 — Ruled by agent under ADR 0174, (1a) carrier-aware gate, two-way door, veto anytime",
    "Project state updated": "STATUS.md milestone entry for #1736 prepended in the same commit"
  },
  "summary": "Made the S12 scrub residue contract carrier-aware so the self-hosted IDIP hand-off completes, and stopped the IDIP completion failure being swallowed into noSink.",
  "blockers": []
}
**close-report** for #1736 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1736, "status": "success", "commits": [ "e9faa2ff509d33bc68a69b0c75a8178d12bfe8b8" ], "changed_files": [ "STATUS.md", "app/src/components/founding/FoundingStandup.vue", "app/tests/unit/foundingHandOffIdip.test.ts", "internal/founding/access.go", "internal/founding/handoff.go", "internal/founding/handoff_test.go" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/founding/...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go build ./... && go vet ./internal/founding/... ./app/helper/...", "exit_code": 0 }, { "command": "npx vitest run tests/unit/foundingHandOffIdip.test.ts tests/unit/foundingStandup*.test.ts tests/unit/foundingHandOff.test.ts", "exit_code": 0 }, { "command": "npx vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 } ], "criteria": { "The S12 residue check no longer demands an operator key the self-hosted carrier never mints": "internal/founding/access.go carrierHoldsOperatorKey + internal/founding/handoff.go verifyResidue(wantOperatorKey); proven by TestIDIP_SelfHostedHandOffCompletesWithNoOperatorKeyResidue (red before fix: ErrScrubResidue 'the operator key is missing', green after)", "The operator-key clause stays enforced on carriers that DO mint one": "TestScrub_RefusesMissingOperatorKeyOnKeyHoldingCarrier (private still reds with ErrScrubResidue on a missing key)", "The IDIP completion failure is no longer swallowed by noSink": "app/src/components/founding/FoundingStandup.vue onOpenDashboard IDIP branch now run(completeIdipHandOff, setError); proven by frontend test 'surfaces a failed hand-off completion instead of swallowing it (#1736)'", "ADR 0044/0174 residue-contract ruling recorded": "issue comment 53357 — Ruled by agent under ADR 0174, (1a) carrier-aware gate, two-way door, veto anytime", "Project state updated": "STATUS.md milestone entry for #1736 prepended in the same commit" }, "summary": "Made the S12 scrub residue contract carrier-aware so the self-hosted IDIP hand-off completes, and stopped the IDIP completion failure being swallowed into noSink.", "blockers": [] } ``` </details>
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#1736
No description provided.