Skip to content

detached-transport test: the mid-drain kill case settles on its drain, not on a recycle race - #768

Merged
SSFSKIM merged 2 commits into
masterfrom
detached-668
Nov 19, 2026
Merged

SSFSKIM merged 2 commits into
masterfrom
detached-668

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Fixes the flake at src/shared/host/detached-transport.test.ts:668 (expected +0 to be 1, twice on CI, green on re-run): the case "a host killed mid-drain, after it said draining and before its rows detached, is a crash" from #683 (#473).

Cause (the test's). The fake supervisor in that case had no host.handover handler. When it said draining, main took it back into the handover and asked it to hand over; the ask failed ("no handler for host.handover") and main recycled the link. So the case never ran the drain path it names. The kill then raced the recycle:

  • killed before the recycle closed the link, or after the reconnect: read as a crash (counted), so the test passed;
  • killed between the recycle's close and its reconnect: the recycle's relaunch spawns a successor without judging the dead process's exit, so restarts stays 0, the failure seen on CI.

Reproduced locally by killing the fake at the moment main logs recycling the connection: same assertion, restarts: 0, no "exited unexpectedly".

Fix. The fake answers the ask as a real engine host with a call in flight does (deferred, inFlight: 1, artifact_list), and the kill waits for that answer. The close is then the handover's (replace) on a link that carried the host's events, which counts a death the exit cannot show as clean. That is the #473 path. A run where the kill lands before the answer also counts (checked with a delayed answer).

Checks. The file locally: 104/104; the case 5/5 on repeat. Class 1a on Linux (scripts/ci-gate.sh --gates static,unit,probes): run 44434627607, all green.

Not changed (noted). A recycle that follows a failed handover ask (a host that never answers it) relaunches without judging the exit, so a host that dies inside that window restarts uncounted. Real hosts answer the ask, so #473's scenario never reaches this path; it is a separate, narrow gap.

Sminos-Session: master-landing-architect#37052769 (MAWS on macbook)

… ask, so it settles on the drain, not on a recycle race

The fake had no host.handover handler, so the take-back's ask failed and main recycled the link; a kill landing between
the recycle's close and its reconnect was read as no exit at all (restarts 0, the CI flake at :668). The fake now
defers as a real host with a call in flight does, and the kill waits for that answer.

Sminos-Session: master-landing-architect#37052769 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T01:19:48.523773Z 7cdebc5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…e is replaced uncounted (docs only)

Sminos-Session: master-landing-architect#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM merged commit 4915443 into master Nov 19, 2026
@SSFSKIM
SSFSKIM deleted the detached-668 branch November 19, 2026 01:19
SSFSKIM added a commit that referenced this pull request Nov 19, 2026
…e and DL163, #782 stopped rows, #779, #763, #765, #768)

Conflicts, each kept both sides:
- src/renderer/src/shell/DocumentSessionSpace.tsx: U10b's bar room (useBarRoom, --float-bar-room on the root) and ticket
  760's measure on [requested, enabled] with data-document-session-width; the root carries both the attribute and the style.
- src/renderer/src/shell/DocumentSessionSpace.test.tsx: U10b's bar-room case, then ticket 760's column-in-the-floating-render case.
- docs/tech-debt-tracker.md: the union's rows, then master's two of 2026-11-19 (master's removal of the anchoring row kept).
The wire is unchanged on master: WIRE_MINOR stays 57.

Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant