The stub auto-clicks the confirm button so customConfirm() resolves
headlessly, but had no branch for "did not match". A reworded button would
leave the client waiting forever and node would run to the caller's 120s
subprocess timeout, surfacing as TimeoutExpired with a traceback - a
multi-minute mystery instead of a diagnosis.
Report and exit non-zero instead, naming the buttons that were seen and
where to update the pattern. The branch is guarded on there being buttons at
all: the ordinary error-path dialog has none, and firing on that would break
every capture.
Also correct what the predicate's comments claim. The two false-lead patterns
name the regression that already happened; they are not what makes the guard
general. Any substitution displaces the server's own text, so the server-body
clause is what catches a reworded revival - the patterns alone would not.