docs(desktop): record that the merged-tail seed is dormant under the current call ordering
Both callers build the wait in the same synchronous block as `outputTail.attach(child)`, and stream 'data' is asynchronous, so `bufferedOutput()` is always empty at the seed and this block recovers nothing today. Say so at the code, so nobody reads the seed as the live recovery path for a lost READY sentinel — and so the condition that makes it load-bearing again (any await reintroduced between attach and this call, the pre-#100442 ordering) is written down next to the code that depends on it.
This commit is contained in:
@@ -137,6 +137,19 @@ function waitForDashboardPort(
|
||||
// listener attaches, so no chunk can fall between snapshot and listener.
|
||||
// Scanned with the merged-tail regex, not the line-anchored one: the tail
|
||||
// interleaves both streams and can splice a partial line onto the sentinel.
|
||||
//
|
||||
// REACHABILITY — do not mistake this for a hot path. Both callers in
|
||||
// main.ts (spawnPoolBackend, startHermes) build this wait in the SAME
|
||||
// synchronous block as `outputTail.attach(child)`, with no `await`
|
||||
// between them, and stream 'data' is delivered asynchronously. So under
|
||||
// the current ordering `bufferedOutput()` is always empty here and this
|
||||
// block recovers nothing — it is a dormant safety net, not a live fix.
|
||||
//
|
||||
// It stops being dormant the moment ANY await is reintroduced between
|
||||
// attach and this call. That was the real ordering before #100442, and it
|
||||
// is one refactor away from returning: the surrounding region is claim /
|
||||
// boot-progress / token-handoff code that repeatedly grows awaits. Keep
|
||||
// the net correct while it is cheap, and keep the tests that pin it.
|
||||
if (!done) {
|
||||
const alreadyBuffered = bufferedOutput()
|
||||
const m = alreadyBuffered ? alreadyBuffered.match(_READY_IN_MERGED_TAIL_RE) : null
|
||||
|
||||
Reference in New Issue
Block a user