Repository navigation
fix(react-devtools): let the command's own failure outrank the cleanup stop - #3559
Conversation
…p stop `react-devtools stop` ran its action in a try/finally, so a companion whose stop could not be confirmed replaced the failure the stop was cleaning up after. Both faults are now collected and the action's wins; the stop's verdict is still reported, whatever it rejects with, when the action passed.
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Size Report
Startup median (7 runs, lower is better):
|
The precedence change dropped the stop verdict in the both-fail path: the action's fault is the right thing to throw, but an operator who saw only `devtools package failed` never learned a companion was still holding the bridge scope. It is now written to stderr beside the thrown fault, on the same channel the file already uses for its wait hint.
|
Reviewed 817b6aa. The command's own failure now outranks the cleanup stop failure, and I found no problems in the change. Not blocking, take or leave: the "unconfirmed stop" and "non-Error rejection" tests in The cubic P3 thread about discarding CI is green and there are no conflicts. This is CLI-local control flow with a mocked companion, so no device run is needed. |
|
Problem
react-devtools stopran the user's action in atry/finallyand cleaned the remote companion up in thefinally. When both fault — the action fails and the companion could not be confirmed stopped — the cleanup failure replaces the action's failure, so the user sees teardown noise instead of the fault that actually happened.Change
Collect both outcomes and let the action's fault win. A companion the host would not confirm stopped still fails the command when the action passed, whatever it rejects with (not only an
Error). In the both-fault case the companion's verdict goes to stderr beside the thrown action fault, so nothing is discarded on either path.Split out of #3551 to keep that PR inside its diff budget and one command family. #3551 keeps the
finallyshape, which already propagates an unconfirmed stop; this PR changes only which fault wins, and stops losing the other one.Validation
pnpm typecheck,pnpm lint,pnpm check:affected --runpass locally at the pushed head.stoppedthrow makes the action-fault path return a value it must not.Follows up on #3551.