You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Main's integration run for the #368 merge (46773876279) failed on one leg, linux/aarch64 (TCG, CHR 7.25.2 arm64). test/integration/nic-properties.test.ts failed in assertPorts() → reported() → chr.exec():
QuickCHRError: exec failed (HTTP 400): {"detail":"Session closed","error":400,"message":"Bad Request"}
code: "EXEC_FAILED"
at restExecute (src/lib/exec.ts:69:9)
at async restExecuteWithRetry (src/lib/exec.ts:121:17)
at async exec (src/lib/quickchr.ts:1630:18)
at async reported (test/integration/nic-properties.test.ts:76:27)
It happened 34.6 s into the test, which restarts machines ("after a restart too"). Every other leg of that run passed, and #368 touches neither exec nor NIC properties. This is the first time this was seen; there's no earlier issue and nothing in the docs about Session closed.
Open question
Is Session closed a transient RouterOS answer, e.g. a console session torn down while the guest is still settling after a boot under TCG, that restExecuteWithRetry() should retry like a transport failure? Or does it mean the command may have run, so retrying is unsafe? The answer decides the fix.
Waiting on
A recurrence, or a grounded reproduction of when RouterOS answers /rest/execute with Session closed. The failed leg was rerun to restore the freshness gate. If the rerun also fails, this becomes P1, since a red main blocks every PR.
Done-when
The cause is known and either restExecuteWithRetry() handles it (with a unit test on the classification), or the test waits on the condition that causes it. The finding goes in routeros-rest.instructions.md.
It recurred, so this is now P1. The rerun of the failed leg (job 143131797796) failed at the same place:
nic-properties.test.ts, first boot, exec for ether2 (ether1's assertion had passed, 1 expect() calls);
HTTP 400 Session closed;
34.65 s into the test, against 34.64 s the first time.
Main is red, so the required Integration freshness check blocks every PR (including #373).
What I checked:
The last green run, 46757212240 at 00a7f31 (the commit before research(lab): QEMU netfilters for link impairment (#339) #368), passed this test on linux-arm64. Its environment matches the red runs exactly: ubuntu-24.04-arm image 20261111.635, QEMU 8.2.2 (Debian 1:8.2.2+ds-0ubuntu1.18), Bun 1.4.4, CHR 7.25.2 arm64.
research(lab): QEMU netfilters for link impairment (#339) #368's src/ change is in credentials.ts (realpath keys), secrets.ts (lock release retry) and cli/index.ts (the provisioning-window check on an attached start). Nothing obviously touches /rest/execute.
Locally at dd18f20 (KVM host, arm64 CHR under TCG, QEMU 11.1.2), the same six-NIC machine answers every exec correctly (ether1…ether6 all as expected). It doesn't reproduce outside CI.
Next steps, not taken yet: run nic-properties.test.ts alone on linux-arm64 at dd18f20 and at 00a7f31 (gh workflow run integration.yml --ref <sha> -f platforms=linux-arm64 -f test-filter=nic-properties.test.ts), to tell a #368 regression from an ordering or runner effect. Then decide whether restExecuteWithRetry() should treat Session closed as transient.
Main at dd18f20 failed twice, 23:53 and about 01:05 UTC, at 34.6 s both times. Every run since has passed, at either commit. Neither half of the preceding files reproduces it alone. So the evidence now favours a time-correlated runner condition over a #368 regression, though a cross-half interaction isn't ruled out. Main's failed leg is being rerun a third time. If it passes, this goes back to waiting and P3: the open question about whether Session closed is transient for /rest/execute stays, with these runs as the evidence.
The third rerun of main's linux-arm64 leg passed (run 46773876279, attempt 3), so main is green again, and #373 merged on it. Every run since the two failures has passed (table above), so this goes back to P3 / waiting. What it waits on: another Session closed from /rest/execute, or a grounded reproduction. Then decide whether restExecuteWithRetry() should treat it as transient. The probe/374-* branches are deleted.
Activity
mobileskyfi commentedon Dec 2, 2026
It recurred, so this is now P1. The rerun of the failed leg (job 143131797796) failed at the same place:
nic-properties.test.ts, first boot,execfor ether2 (ether1's assertion had passed,1 expect() calls);Session closed;Main is red, so the required
Integration freshnesscheck blocks every PR (including #373).What I checked:
src/change is incredentials.ts(realpath keys),secrets.ts(lock release retry) andcli/index.ts(the provisioning-window check on an attachedstart). Nothing obviously touches/rest/execute.execcorrectly (ether1…ether6all as expected). It doesn't reproduce outside CI.Next steps, not taken yet: run
nic-properties.test.tsalone on linux-arm64 at dd18f20 and at 00a7f31 (gh workflow run integration.yml --ref <sha> -f platforms=linux-arm64 -f test-filter=nic-properties.test.ts), to tell a #368 regression from an ordering or runner effect. Then decide whetherrestExecuteWithRetry()should treatSession closedas transient.mobileskyfi commentedon Dec 2, 2026
Bisect so far (linux-arm64,
-f platforms=linux-arm64):nic-propertiesalonenic-propertiesalonecredential-files,credential-propagation,nic-propertiesnic-propertiesMain at dd18f20 failed twice, 23:53 and about 01:05 UTC, at 34.6 s both times. Every run since has passed, at either commit. Neither half of the preceding files reproduces it alone. So the evidence now favours a time-correlated runner condition over a #368 regression, though a cross-half interaction isn't ruled out. Main's failed leg is being rerun a third time. If it passes, this goes back to
waitingand P3: the open question about whetherSession closedis transient for/rest/executestays, with these runs as the evidence.mobileskyfi commentedon Dec 2, 2026
The third rerun of main's linux-arm64 leg passed (run 46773876279, attempt 3), so main is green again, and #373 merged on it. Every run since the two failures has passed (table above), so this goes back to P3 /
waiting. What it waits on: anotherSession closedfrom/rest/execute, or a grounded reproduction. Then decide whetherrestExecuteWithRetry()should treat it as transient. Theprobe/374-*branches are deleted.