ci flake, recurring: live-control-plane seams RST on EVERY dashboard suite run — #882's ephemeral-range diagnosis is ruled out #888
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#888
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
cirun 12567 (seam stage, sha590d40d9) reddened on one test out of 1261:alongside, in the same worker:
This is the same failure class as #882 (
joinEntry, port 41321), on adifferent file, after #882's fix (
d8f60e81) shipped.dashboard/tests/unit/mailEntry.test.ts:116is the first assertion after mount—
expect(m1).not.toBeNull(). It failed becausebootMailSurface's first liveround-trip (
GET /api/v1/mail/status) was RST, so the surface fell through toSurfaceErrorBoundaryinstead of the M1 screen. A transport reset, not a logicregression.
#882's diagnosis is ruled out — its fix treated a symptom
#882 concluded the RST was a loopback self-connect:
server.listen(0)bindsinside the host ephemeral range (
ip_local_port_range = 32768–60999), a client'sown ephemeral source port can land on it, and the kernel answers a
simultaneous-open with RST.
d8f60e81moved every bind intolistenLoopback()(
dashboard/tests/support/liveServer.ts), a random port in 20000–32767 —below the ephemeral floor, where that collision is structurally impossible.
Verified applied: 24 seam files import
listenLoopback; zerolisten(0)remain.
But every port in every reset observed since is inside 20000–32767 — the
band
listenLoopbackbinds into, which no client source port can ever equal:So the band change did not remove the cause. It only re-rolled the dice.
New evidence: this is NOT rare, and NOT a port collision
Healer investigation on
matou-workstation, workdir tip747ab179:mailEntry.test.tsalone × 15 → 15/15 green, zero ECONNRESET. File-locallogic is fine.
connect ECONNRESETin 3 of 3 runs(23979, 29670, 29433) — yet 110/110 files passed each time. The reset is a
constant background condition of the suite; whether it reds depends only on
whether it lands on a request a live assertion is awaiting. #882's "1 in 1258"
framing understated it badly.
vitest run --no-file-parallelism× 2 → the reset still happens (31009,29952), 110/110 green. With one worker and one server listening at a time,
cross-worker port collision cannot be the cause. That family is dead.
--reporter=verbosethe reset is emitted unattributed to any test,from happy-dom's
Fetch.onError— i.e. a client fetch fired between tests,after the owning file's tests finished (see
pendingLive→monitoringAlertContactboundary in the log). That points at a late/in-flight fetch from a disposed
surface meeting its control plane's
server.close(): closing a listeningsocket with a SYN still in its accept queue makes the kernel RST it, which the
client reports as
connect ECONNRESET(a closed port would give ECONNREFUSED).ss -ltn: nothing on the host listens in 20000–32767 except mongod:27017.pnpm -r run test(scripts/seam-smoke.sh:133) — dashboard, app,openapi-spec and ui-kit suites run concurrently, so CI carries more load
than the dashboard-only reproduction above.
host.txtfor this incident alsoshows the runner under memory pressure (2080 MB swap in use, 2190 MB free),
which widens any accept-queue race.
The exact triggering mechanism is not yet identified. What is established is
what it is not: not file-local, not cross-worker port collision, not ephemeral
self-connect, not rare.
What a fix should decide
#882 listed three options and shipped option 1 (bind outside the ephemeral
range). Option 1 is now falsified. The remaining honest choices:
order in each seam's
afterEach(dispose()→settle()→server.close()):ensure no surface can have a fetch in flight or a keep-alive socket open when
close()runs, and destroy live sockets deterministically rather than relyingon
settle()'s 30 ms. Covers all 24 seams; product code untouched.(
ECONNRESET/ECONNREFUSEDonly, never an HTTP status). #882 flagged this asa real product decision — a member's phone on a flaky link arguably deserves
it — but it must not mask a genuinely dead control plane: the honest dead ends
(S3x / M2x) and
SurfaceErrorBoundaryhave to stay reachable (ADR 0100).seamgatespublishandpublish-broker, so a random red stops the reseed and broker rails on main,and the reset now demonstrably fires on every run.
Per ADR 0174 this is a two-way door (revertible by commit, provable by the
reproduction above), so an agent may rule between 1 and 2 and proceed.
Acceptance
with zero
ECONNRESETin any log, not merely zero failed tests. A greensuite that still logs the reset has not fixed this.
docs/GOTCHAS.mdgains an entry — #882 closed without one,which is part of why this recurred unrecognised.
Reproduction
Evidence
5863482b87fa(#882's wasba24de31e015)TypeScript: build (tsc), test (vitest), lint (eslint), exit 1d8f60e81dashboard/tests/support/liveServer.ts, and theafterEachteardown shared by the 24 seams that import itswarm-claim host=elitebook-distributed-server-03 run=12576
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #888 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope