Repository navigation
fix(metro): report what the dev-server stop proved instead of assuming success - #3575
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
bc0c3af to
d79b109
Compare
Size Report
Startup median (7 runs, lower is better):
|
d79b109 to
523add4
Compare
|
The PR is ready at 523add4. I found nothing that needs a change before merge. Not blocking, and you can take or leave these: The three cubic-dev-ai threads are already fixed at this head, so please resolve them: the startTime stop identity (#3575 (comment)), the errno assertion in the companion test (#3575 (comment)), and the retained identity-unverified test case (#3575 (comment)). Smoke Tests is still queued, not failed. The diff only touches the Metro prepare cleanup and the bridge-wrapper details forwarding, and Smoke does not exercise a Metro readiness timeout, so I expect no overlap. I did not run the tests, so I judged that the new tests catch the old behavior by reading the pre-change code. I also did not check the Before merge, base PR #3551 has to land first and Smoke Tests has to finish. |
523add4 to
76ca452
Compare
…g success stopSpawnedMetroProcess read a refused SIGTERM as cleanup done and stayed quiet about it, so a dev server left running by a failed prepare looked stopped. It now runs on the same host-kit stopper the companion uses and decorates the readiness failure with the verdict: the pid, the reason, and the refusing signal and errno. The companion's own verdict also survives the bridge wrapper, which flattens the message into a bridgeError= fragment, by travelling in details - the verdict only, so the companion's log path and advice cannot be read as this command's.
76ca452 to
57873fc
Compare
|
Three quality items taken since the last review, rebased onto #3551's Shared verdict reporting.
Forwarding narrowed.
|
Problem
When a prepared dev server never became ready,
stopSpawnedMetroProcesstreated a refused SIGTERM as cleanup finished and said nothing: a Metro left running behind a failedprepareMetroRuntimewas reported stopped, with no pid to act on. Same class as #3540.Change
ensureMetroProcessReady's cleanup runs onstopProcessAndConfirmExitfrom #3551 and reports what the stop proved:stoppedleaves the readiness failure carrying no cleanup claim; a retained verdict names the pid,reason, and the refusingsignal/errno; a cleanup fault that is not a stop outcome travels as thecause. Both builders share host-kit's verdict projection and never-signalled wording, so the two surfaces cannot drift.startMetroProcessrecords the start time the host reports for the pid it spawned and passes it as the stop'sidentity, so a pid inherited during the readiness timeout is proven stale rather than signaled, and a start time the host will not confirm retains without signaling.That verdict also survives the bridge wrapper, which flattens the inner message into a
bridgeError=fragment: it is forwarded indetails, verdict keys only, gated on the typed reason — the companion's ownlogPathand retry advice describe a file this caller did not ask about and would outrank this command'sdetails.Stack
Depends on #3551, whose stopper signature this calls. The daemon and app-log stoppers are not migrated here — that needs the identity-pinned wait moved out of
daemon-contractsfirst.Validated:
check:affected --runexit 0 at57873fc42.