Repository navigation
e2e supervisor.spec: (h) and (f) settle on the app's own state - #645
Merged
Merged
Conversation
(h) quit with the guard reading "1 busy terminal" though the case had polled both shells busy (fifth sighting, run 43520247669, 3.1 s into the case, so neither 8 s command had ended). The guard reads nothing cached: it asks the pty host's pty.foreground live, as the poll did. The probe reads a freshly spawned shell busy while node-pty's spawn-helper execs it and while a startup file runs a child, then idle until the shell reads its command, then busy (node-pty 1.1.0, probed locally: within 20 ms for /bin/sh, 700 ms for zsh). The poll took the writer's spawn-time busy for its command; the guard probed it in the idle stretch after. Each command now prints its start and holds the terminal as one job until the case releases it after the quit; the case waits for both starts in the app's ring, then for the guard's own report (globalThis.__maws_quit, MAWS_E2E in an unpackaged build only) to count two, and waits for both commands' end files with no app instead of a fixed 18 s. (f) read host.status once after the successor's pid moved and could see matches 'build' (run 43522613800). matches compares the successor's status with mawsd's daemon.status, which reach main apart, and mawsd's engine-host build reads as the seam's 'stale' until it has started a host of its own. The four cases asserting 'same' after a stale-build update now poll the same read until it says 'same' (30 s), so a successor that stays 'build' still fails. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
…ches race and transcript (28)'s second The quit guard's row gets the fifth sighting (43520247669) with the cause found there, C9's probe reading a starting shell busy, idle, then busy, not a stale guard, the fix on this branch, and the verdict that the guard's count is no product defect on the daemon shape. The hosted-Mac row gets run 43522613800: transcript (28)'s second sighting and case (f)'s red at :834 as a new entry (38), repaired here. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
… words Review finding: the release and completion paths were interpolated inside double quotes, where a $(...) or backtick in a tmpdir path would expand. They are now single-quoted words. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
This was referenced Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes two e2e:supervisor-daemon flakes under R2: a scene settles on a state the app shows.
(h), the quit guard's count (
supervisor.spec.ts:969, red at :994). Tracker row 2026-11-06 has five sightings; the fifth is 43520247669, on the mini's host under--lane no-hosted. The guard does not read a stale count. It callspty.foregroundlive (busyReport,src/main/lifecycle/quit-guard.ts:89, throughsrc/main/app.ts:1032), the same probe the case polled. For a freshly spawned shell,foregroundOf(src/pty-host/foreground.ts:28) reads busy while node-pty's spawn-helper execs, then idle until the shell reads its command, then busy. That was measured with node-pty 1.1.0 on a Mac: about 20 ms for /bin/sh and about 700 ms for zsh. The case took the spawn-time busy for its command running, and the guard probed in the idle gap after it.pty.attach.report()until it reads what the assertion accepts. It reads it through a test-only hook,globalThis.__maws_quit, installed only underMAWS_E2E=1in an unpackaged build, as__maws_wakeis.Product verdict: not a defect. On the daemon shape a quit asks only about unsaved files, and the busy count only goes to the log.
(f) and its three siblings (
supervisor.spec.ts:801, red at :834). This was a flaky pass in 43522613800. The firsthost.statusread after the pid changes can still say'build', because mawsd's owndaemon.statusreaches main separately.successorOfOwnBuildnow waits for the pid to change, then polls the same read for'same', bounded at 30 s. A successor that stays'build'still fails.Tracker.
A review finding is fixed too: the scratch paths reach the shell single-quoted.
Gates:
--lane no-hosted): 43531431935 at a356816, 27 passed, 0 flaky. The only commit since then quotes three paths.test/endpoint/org-recovery.local.test.ts:110, 'no the fork refused within 5000 ms'. It goes into the daily flake collection.Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)