operator-session: ERR_NETWORK_CHANGED at /authz/signin — bare goto misses host-flap retry #1738

Closed
opened 2026-09-22 16:50:31 +00:00 by matou-build-agent · 2 comments

What failed

operator-session, the 25th and last leg. artifacts/verdict.json:

{"verdict":"red","firstRedLeg":"operator-session",
 "legs":{"total":25,"green":24,"red":1,"skip":0},
 "commit":"898314570b818d437517baa284f31d74fbc338d2"}

artifacts/legs.json, last row:

{"leg":"operator-session","status":"red","ms":390,
 "error":"page.goto: net::ERR_NETWORK_CHANGED at https://rehearsal-f.idss.nz/authz/signin?rd=https%3A%2F%2Frehearsal-f.idss.nz\nCall log:\n  - navigating to \"https://rehearsal-f.idss.nz/authz/signin?rd=...\", waiting until \"domcontentloaded\""}

This is NOT the known frontier

The brief names pairing-never-flips (the own-VPS carrier issue) as this drive's known red. That is not what happened here: {"leg":"pair","status":"green","ms":4145}, and legs.json carries no skip reasons at all — "skip": 0, every one of the 24 prior legs green through member-sign-in. This is a distinct, new red.

The product answered the request correctly

The live box (170.64.152.28) is still up and healthy: systemctl --failed prints nothing, caddy holds *:443, idss-idp holds 127.0.0.1:8465. Caddy's own access log contains the exact navigation the drive made, served in under a millisecond:

Sep 22 16:47:04 gateway caddy[4730]: {"level":"info","ts":1790095624.8773787, ...
  "host":"rehearsal-f.idss.nz",
  "uri":"/authz/signin?rd=https%3A%2F%2Frehearsal-f.idss.nz",
  "duration":0.000814222,"size":419,"status":302,
  "Location":["https://id.rehearsal-f.idss.nz/authorize?client_id=gate-oidc&code_challenge=...&redirect_uri=https%3A%2F%2Frehearsal-f.idss.nz%2Fauthz%2Fcallback&response_type=code&scope=openid+profile&state=..."]}

A clean 302 into the bridge, as ADR 0212 asks. Two further proofs the gate is fine:

  • The same helper (establishOperatorSession) already ran green three minutes earlier — {"leg":"dashboard","status":"green","ms":7762}, and journey.idip.spec.ts:661-664 says so in a comment: "the later operator-session leg calls it again and passes straight through".
  • artifacts/ holds idip-dashboard.png but no idip-operator-session.png — the throw landed on the goto, one line before the screenshot.

The actual cause: the DRIVE HOST's interface list changed mid-navigation

net::ERR_NETWORK_CHANGED is Chromium's NetworkChangeNotifier aborting in-flight requests when the OS network configuration moves. The drive host's journal, in the same second the 302 was served:

16:47:04.849 dockerd: Container failed to exit within 10s of signal 15 - using the force container=3dd1f61c...
16:47:04.869 systemd: docker-3dd1f61c....scope: Consumed 47min 6.689s CPU time over 28min 11.641s wall clock time
16:47:04.920 systemd-networkd[1322243]: veth6d9246e: Lost carrier
16:47:04.921 kernel: docker0: port 1(veth6d9246e) entered disabled state
16:47:04.943 systemd-networkd[1322243]: docker0: Lost carrier
16:47:04.958 systemd-networkd[1322243]: veth6d9246e: Link DOWN
16:47:04.959 kernel: veth6d9246e (unregistering): left promiscuous mode

An unrelated container was force-killed (28 min 11 s wall clock at 16:47:04 → started ~16:18:53, before this drive's 16:24:28 start), its veth was unregistered and docker0 lost carrier at 16:47:04.94 — the same instant caddy logged the 302 at 16:47:04.877. Chromium saw the interface event and killed the navigation at 390 ms.

Corroborating, logs/droplet-do-forensics.txt taken ten seconds later shows the route was never impaired:

=== reachability from the drive host, 2026-09-22T16:47:14Z ===
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did

The defect: the retry shim exists, but not on this goto

This repo has already diagnosed this exact failure once and written the fix — app/tests/e2e/fixtures/provision.ts:1389:

// ERR_NETWORK_CHANGED is chromium reacting to a HOST interface event
// mid-request (drive 20260810T141436Z died on it here, one goto from the
// finish line) — nothing about the deployment; one paced retry, and any
// second failure is real.
let resp = await page.goto(target, { waitUntil: 'domcontentloaded' }).catch((err: Error) => {
  if (!String(err.message).includes('ERR_NETWORK_CHANGED')) throw err;
  return null;
});
if (resp === null) { await page.waitForTimeout(2000); resp = await page.goto(target, { waitUntil: 'domcontentloaded' }); }

That shim is applied in exactly two places (assertOperatorIsAdmin, assertMemberIsNotAdmin) — both Nextcloud doors. establishOperatorSession, at app/tests/e2e/fixtures/idip.ts:760, still carries the bare form:

await dash.goto(`https://${apex}/authz/signin?rd=${encodeURIComponent(portalAddress)}`, {
  waitUntil: 'domcontentloaded',
});

The host flap simply found the un-shimmed goto this time. Note the 2026-08-10 comment's own phrasing — "one goto from the finish line" — describes this drive too: the leg is 25 of 25.

Suspected layer

Harness. The gate→bridge redirect is verifiably correct on the live box; the drive host's docker churn is infra noise the harness is already designed to absorb, just not at this call site.

What plugging it needs

  1. Hoist the provision.ts ERR_NETWORK_CHANGED one-paced-retry into a shared fixture helper (e.g. gotoThroughHostFlap(page, url, opts)), keeping its semantics: retry once after 2 s, let any second failure through as real.
  2. Call it from establishOperatorSession (app/tests/e2e/fixtures/idip.ts:760), and sweep the remaining bare page.gotos on the IDIP journey's long tail (openMembersTab and friends) for the same exposure.
  3. Separately and optionally: keep unrelated docker workloads off the drive host during a drive — otherwise the flap will keep finding whichever navigation is still un-shimmed.

Steps 1–2 are a mechanical change with the precedent, the code, and the justifying comment already in the tree; no human ruling needed.

Absences and side observations (none causal)

  • DNS has since moved. rehearsal-f.idss.nz now resolves from the drive host to 143.198.134.168, not this drive's 170.64.152.28 (artifacts/standing-world.json: "dropletIp": "170.64.152.28"), and a curl to it fails TLS handshake. DNS was correct during the run — caddy on 170.64.152.28 logged the request with "server_name":"rehearsal-f.idss.nz". Worth a glance at whether something re-pointed the lab record afterwards, but it is not this red.
  • logs/broker-journal.txt harvested nothing — dev@100.98.48.68: Permission denied (publickey), which that file itself records as by-design for an off-mesh executor (ADR 0208, #681).
  • No state/logs directory (state-logs.log: ERROR: ... ENOENT); the guest-*.log files are 129-byte stubs and qemu.log reads exit 1 ... no qemu-system-x86_64 — expected, this is the droplet rail, not the VM rail.
  • artifacts/idip-operator-session.png was never written (see above); artifacts/legs/operator-session.png is Playwright's failure capture of the Electron window, which still shows the founding summary and LOGGED.

drive 20260922T162428Z red at operator-session: page.goto: net::ERR_NETWORK_CHANGED at https://rehearsal-f.idss.nz/authz/signin?rd=https%3A%2F%2Frehearsal-f.idss.nz Call log: - navigating to "https://rehearsal-f.idss.nz/authz/signin?rd=https%3A%2F%
evidence: /home/swarm/session-runner/idss/test-results/drive-idip/20260922T162428Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## What failed `operator-session`, the 25th and last leg. `artifacts/verdict.json`: ```json {"verdict":"red","firstRedLeg":"operator-session", "legs":{"total":25,"green":24,"red":1,"skip":0}, "commit":"898314570b818d437517baa284f31d74fbc338d2"} ``` `artifacts/legs.json`, last row: ```json {"leg":"operator-session","status":"red","ms":390, "error":"page.goto: net::ERR_NETWORK_CHANGED at https://rehearsal-f.idss.nz/authz/signin?rd=https%3A%2F%2Frehearsal-f.idss.nz\nCall log:\n - navigating to \"https://rehearsal-f.idss.nz/authz/signin?rd=...\", waiting until \"domcontentloaded\""} ``` ## This is NOT the known frontier The brief names pairing-never-flips (the own-VPS carrier issue) as this drive's known red. That is not what happened here: `{"leg":"pair","status":"green","ms":4145}`, and `legs.json` carries **no skip reasons at all** — `"skip": 0`, every one of the 24 prior legs green through `member-sign-in`. This is a distinct, new red. ## The product answered the request correctly The live box (170.64.152.28) is still up and healthy: `systemctl --failed` prints nothing, caddy holds `*:443`, `idss-idp` holds `127.0.0.1:8465`. Caddy's own access log contains the exact navigation the drive made, served in under a millisecond: ``` Sep 22 16:47:04 gateway caddy[4730]: {"level":"info","ts":1790095624.8773787, ... "host":"rehearsal-f.idss.nz", "uri":"/authz/signin?rd=https%3A%2F%2Frehearsal-f.idss.nz", "duration":0.000814222,"size":419,"status":302, "Location":["https://id.rehearsal-f.idss.nz/authorize?client_id=gate-oidc&code_challenge=...&redirect_uri=https%3A%2F%2Frehearsal-f.idss.nz%2Fauthz%2Fcallback&response_type=code&scope=openid+profile&state=..."]} ``` A clean 302 into the bridge, as ADR 0212 asks. Two further proofs the gate is fine: - The same helper (`establishOperatorSession`) already ran **green** three minutes earlier — `{"leg":"dashboard","status":"green","ms":7762}`, and `journey.idip.spec.ts:661-664` says so in a comment: *"the later operator-session leg calls it again and passes straight through"*. - `artifacts/` holds `idip-dashboard.png` but **no** `idip-operator-session.png` — the throw landed on the `goto`, one line before the screenshot. ## The actual cause: the DRIVE HOST's interface list changed mid-navigation `net::ERR_NETWORK_CHANGED` is Chromium's `NetworkChangeNotifier` aborting in-flight requests when the OS network configuration moves. The drive host's journal, in the same second the 302 was served: ``` 16:47:04.849 dockerd: Container failed to exit within 10s of signal 15 - using the force container=3dd1f61c... 16:47:04.869 systemd: docker-3dd1f61c....scope: Consumed 47min 6.689s CPU time over 28min 11.641s wall clock time 16:47:04.920 systemd-networkd[1322243]: veth6d9246e: Lost carrier 16:47:04.921 kernel: docker0: port 1(veth6d9246e) entered disabled state 16:47:04.943 systemd-networkd[1322243]: docker0: Lost carrier 16:47:04.958 systemd-networkd[1322243]: veth6d9246e: Link DOWN 16:47:04.959 kernel: veth6d9246e (unregistering): left promiscuous mode ``` An **unrelated** container was force-killed (28 min 11 s wall clock at 16:47:04 → started ~16:18:53, before this drive's 16:24:28 start), its veth was unregistered and `docker0` lost carrier at `16:47:04.94` — the same instant caddy logged the 302 at `16:47:04.877`. Chromium saw the interface event and killed the navigation at 390 ms. Corroborating, `logs/droplet-do-forensics.txt` taken ten seconds later shows the route was never impaired: ``` === reachability from the drive host, 2026-09-22T16:47:14Z === 3 packets transmitted, 3 received, 0% packet loss, time 2002ms tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did ``` ## The defect: the retry shim exists, but not on this goto This repo has already diagnosed this exact failure once and written the fix — `app/tests/e2e/fixtures/provision.ts:1389`: ```ts // ERR_NETWORK_CHANGED is chromium reacting to a HOST interface event // mid-request (drive 20260810T141436Z died on it here, one goto from the // finish line) — nothing about the deployment; one paced retry, and any // second failure is real. let resp = await page.goto(target, { waitUntil: 'domcontentloaded' }).catch((err: Error) => { if (!String(err.message).includes('ERR_NETWORK_CHANGED')) throw err; return null; }); if (resp === null) { await page.waitForTimeout(2000); resp = await page.goto(target, { waitUntil: 'domcontentloaded' }); } ``` That shim is applied in exactly two places (`assertOperatorIsAdmin`, `assertMemberIsNotAdmin`) — both Nextcloud doors. `establishOperatorSession`, at **`app/tests/e2e/fixtures/idip.ts:760`**, still carries the bare form: ```ts await dash.goto(`https://${apex}/authz/signin?rd=${encodeURIComponent(portalAddress)}`, { waitUntil: 'domcontentloaded', }); ``` The host flap simply found the un-shimmed goto this time. Note the 2026-08-10 comment's own phrasing — *"one goto from the finish line"* — describes this drive too: the leg is 25 of 25. ## Suspected layer **Harness.** The gate→bridge redirect is verifiably correct on the live box; the drive host's docker churn is infra noise the harness is already designed to absorb, just not at this call site. ## What plugging it needs 1. Hoist the `provision.ts` ERR_NETWORK_CHANGED one-paced-retry into a shared fixture helper (e.g. `gotoThroughHostFlap(page, url, opts)`), keeping its semantics: retry once after 2 s, let any second failure through as real. 2. Call it from `establishOperatorSession` (`app/tests/e2e/fixtures/idip.ts:760`), and sweep the remaining bare `page.goto`s on the IDIP journey's long tail (`openMembersTab` and friends) for the same exposure. 3. Separately and optionally: keep unrelated docker workloads off the drive host during a drive — otherwise the flap will keep finding whichever navigation is still un-shimmed. Steps 1–2 are a mechanical change with the precedent, the code, and the justifying comment already in the tree; no human ruling needed. ## Absences and side observations (none causal) - **DNS has since moved.** `rehearsal-f.idss.nz` now resolves from the drive host to `143.198.134.168`, not this drive's `170.64.152.28` (`artifacts/standing-world.json: "dropletIp": "170.64.152.28"`), and a curl to it fails TLS handshake. DNS was correct *during* the run — caddy on 170.64.152.28 logged the request with `"server_name":"rehearsal-f.idss.nz"`. Worth a glance at whether something re-pointed the lab record afterwards, but it is not this red. - `logs/broker-journal.txt` harvested nothing — `dev@100.98.48.68: Permission denied (publickey)`, which that file itself records as by-design for an off-mesh executor (ADR 0208, #681). - No `state/logs` directory (`state-logs.log: ERROR: ... ENOENT`); the `guest-*.log` files are 129-byte stubs and `qemu.log` reads `exit 1 ... no qemu-system-x86_64` — expected, this is the droplet rail, not the VM rail. - `artifacts/idip-operator-session.png` was never written (see above); `artifacts/legs/operator-session.png` is Playwright's failure capture of the Electron window, which still shows the founding summary and `LOGGED`. drive `20260922T162428Z` red at `operator-session`: `page.goto: net::ERR_NETWORK_CHANGED at https://rehearsal-f.idss.nz/authz/signin?rd=https%3A%2F%2Frehearsal-f.idss.nz Call log: - navigating to "https://rehearsal-f.idss.nz/authz/signin?rd=https%3A%2F%` evidence: `/home/swarm/session-runner/idss/test-results/drive-idip/20260922T162428Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: b5659a2277df -->
Author
Member

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

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

close-report for #1738 — status success

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

envelope
{
  "issue": 1738,
  "status": "success",
  "commits": [
    "ec8340d1"
  ],
  "changed_files": [
    "STATUS.md",
    "app/tests/e2e/fixtures/idip.test.ts",
    "app/tests/e2e/fixtures/idip.ts",
    "app/tests/e2e/fixtures/provision.ts"
  ],
  "tests": [
    {
      "command": "CI=true pnpm exec vitest run tests/e2e/fixtures/idip.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Step 1 — hoist provision.ts's ERR_NETWORK_CHANGED one-paced-retry into a shared fixture helper, keeping its semantics (retry once after 2s, let any second failure through)": "gotoSurvivingNetworkChange now has its single home in app/tests/e2e/fixtures/provision.ts (moved from idip.ts to keep the dependency acyclic, since idip.ts already imports provision.ts); it keeps the try/catch → 2s wait → single re-goto semantics. Guard string 'ERR_NETWORK_CHANGED' now appears exactly once across both fixtures (pinned by idip.test.ts).",
    "Step 2 — call it from establishOperatorSession and sweep the remaining bare page.goto's on the IDIP journey's long tail": "establishOperatorSession (idip.ts) routes through the helper (fixed by rehearsal 86868065; pinned here so it cannot regress to a bare dash.goto); all idip.ts navigations already go through the helper (swept by the rehearsal). provision.ts's two Nextcloud-door asserts assertOperatorIsAdmin/assertMemberIsNotAdmin now call gotoSurvivingNetworkChange instead of carrying inline shims.",
    "Test-first at the seam": "New describe block 'the host-flap retry lives in ONE shared helper (#1738)' in app/tests/e2e/fixtures/idip.test.ts: guard appears exactly once; both provision asserts + establishOperatorSession route through the helper; no inline ERR_NETWORK_CHANGED retry survives. Red before the change (3 failing), green after (51/51 pass)."
  },
  "summary": "Hoisted provision.ts's two inline ERR_NETWORK_CHANGED retry shims into the single shared gotoSurvivingNetworkChange helper (now homed in provision.ts, imported by idip.ts), completing #1738 step 1 with seam pins in idip.test.ts.",
  "reason": "Harness-only dedup completing the fire-29 follow-up; the operator-session defect proper was already fixed by rehearsal 86868065.",
  "blockers": []
}
**close-report** for #1738 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1738, "status": "success", "commits": [ "ec8340d1" ], "changed_files": [ "STATUS.md", "app/tests/e2e/fixtures/idip.test.ts", "app/tests/e2e/fixtures/idip.ts", "app/tests/e2e/fixtures/provision.ts" ], "tests": [ { "command": "CI=true pnpm exec vitest run tests/e2e/fixtures/idip.test.ts", "exit_code": 0 } ], "criteria": { "Step 1 — hoist provision.ts's ERR_NETWORK_CHANGED one-paced-retry into a shared fixture helper, keeping its semantics (retry once after 2s, let any second failure through)": "gotoSurvivingNetworkChange now has its single home in app/tests/e2e/fixtures/provision.ts (moved from idip.ts to keep the dependency acyclic, since idip.ts already imports provision.ts); it keeps the try/catch → 2s wait → single re-goto semantics. Guard string 'ERR_NETWORK_CHANGED' now appears exactly once across both fixtures (pinned by idip.test.ts).", "Step 2 — call it from establishOperatorSession and sweep the remaining bare page.goto's on the IDIP journey's long tail": "establishOperatorSession (idip.ts) routes through the helper (fixed by rehearsal 86868065; pinned here so it cannot regress to a bare dash.goto); all idip.ts navigations already go through the helper (swept by the rehearsal). provision.ts's two Nextcloud-door asserts assertOperatorIsAdmin/assertMemberIsNotAdmin now call gotoSurvivingNetworkChange instead of carrying inline shims.", "Test-first at the seam": "New describe block 'the host-flap retry lives in ONE shared helper (#1738)' in app/tests/e2e/fixtures/idip.test.ts: guard appears exactly once; both provision asserts + establishOperatorSession route through the helper; no inline ERR_NETWORK_CHANGED retry survives. Red before the change (3 failing), green after (51/51 pass)." }, "summary": "Hoisted provision.ts's two inline ERR_NETWORK_CHANGED retry shims into the single shared gotoSurvivingNetworkChange helper (now homed in provision.ts, imported by idip.ts), completing #1738 step 1 with seam pins in idip.test.ts.", "reason": "Harness-only dedup completing the fire-29 follow-up; the operator-session defect proper was already fixed by rehearsal 86868065.", "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#1738
No description provided.