From 2592ccdaa69c78244afd39bc106466f28c8d811c Mon Sep 17 00:00:00 2001 From: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com> Date: Fri, 30 Oct 2026 14:32:03 +0800 Subject: [PATCH] diag(conpty): keep sampling every repeat after a failed handle check refs #21 The host probe returned on the first failing sample, so only one steady sample per mode survived; it now records every round and still exits non-zero. --- experiments/conpty/probe.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/experiments/conpty/probe.cpp b/experiments/conpty/probe.cpp index 96574b84..9c21f718 100644 --- a/experiments/conpty/probe.cpp +++ b/experiments/conpty/probe.cpp @@ -232,11 +232,13 @@ int main(int argc, char** argv) { // The supervisor assigns this host to its job before sending this gate. std::string gate; if (!std::getline(std::cin, gate) || gate != "GO") return 2; - if (!probe("normal", 0, true)) return 1; + bool failed = !probe("normal", 0, true); for (unsigned repeat = 0; repeat < repeats; ++repeat) { - if (!probe(mode, repeat)) return 1; + // Keep sampling after a failure: the acceptance evidence needs every + // round's counts, and stopping at the first red hid later growth. + if (!probe(mode, repeat)) failed = true; } - return 0; + return failed ? 1 : 0; } catch (const std::exception& error) { std::cerr << error.what() << '\n'; return 1; }