From 51c7ec0f88ad2429ad4bd8103b2482552469e330 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Mon, 30 Nov 2026 04:47:44 +0100 Subject: [PATCH 1/3] test: qualify 55-minute exact-mode post-STOP soak with state and resource checks --- scripts/ci/qualify-candidate-images.sh | 67 ++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/scripts/ci/qualify-candidate-images.sh b/scripts/ci/qualify-candidate-images.sh index 212e5031..a1de7b1a 100755 --- a/scripts/ci/qualify-candidate-images.sh +++ b/scripts/ci/qualify-candidate-images.sh @@ -138,6 +138,73 @@ for mode in runtime instrumented; do "$work/pressure.log" || fail pressure_result_missing [ "$(docker inspect --format '{{.State.OOMKilled}} {{.RestartCount}} {{.State.Running}}' "$cid")" = 'false 0 true' ] || fail pressure_container_state printf 'WINE11_CANDIDATE_PRESSURE mode=%s clients=4 requests=480 result=pass\n' "$mode" + # Sustain each exact image under post-STOP observation for at least 55 + # minutes. This is not a hostile actor or physical hardware test. + soak_events() { + timeout 10 docker exec "$cid" cat /sys/fs/cgroup/memory.events /sys/fs/cgroup/pids.events | + grep -E '^(max|oom|oom_kill) [0-9]+ "artifacts/candidate-images/$mode.png" >/dev/null 2>&1 || fail screenshot_copy + emit_screenshot "artifacts/candidate-images/$mode.png" "$mode.png" + if ! CANDIDATE_SOURCE_SHA="$source_sha" docker compose \ + -f compose/docker-compose.yml -f compose/candidate-browser-probe.yml \ + --profile test --profile interactive run --rm --no-deps --pull never -T \ + test-runner python tests/qualification/candidate_browser_probe.py \ + >"$work/browser.log" 2>&1; then + sed -nE '/^WINE11_CANDIDATE_BROWSER phase=[a-z_]+ category=[A-Za-z]+ line=[0-9]+ result=fail$/p' "$work/browser.log" | head -n 3 + fail "${mode}_browser" + fi + grep -Eq "^WINE11_CANDIDATE_BROWSER mode=$mode result=pass$" "$work/browser.log" || fail browser_result_missing + printf 'WINE11_CANDIDATE_BROWSER mode=%s result=pass\n' "$mode" + emit_screenshot "artifacts/candidate-images/$mode-dashboard.png" "$mode-dashboard.png" + # Exercise abrupt disposable runtime loss with the exact same persistent + # external volumes. No production container or foreign volume is touched. + "${compose[@]}" kill -s SIGKILL winebot >/dev/null 2>&1 || fail fault_injection + [ "$(docker inspect --format '{{.State.ExitCode}}' "$cid")" = 137 ] || fail fault_not_observed + "${compose[@]}" up --no-build --force-recreate --detach --wait --wait-timeout 240 \ + >"$work/recreate.log" 2>&1 || fail recreate + cid="$("${compose[@]}" ps -q winebot)" + if ! docker exec -i "$cid" python3 - "$mode" replay \ + < tests/qualification/candidate_runtime_probe.py >"$work/replay.log" 2>&1; then + probe_failure "${mode}_replay" "$work/replay.log" + fi + printf 'WINE11_CANDIDATE mode=%s phase=replay result=pass\n' "$mode" + "${compose[@]}" down --remove-orphans >/dev/null 2>&1 || fail teardown + project="" +done + +cat > artifacts/candidate-images/qualification.json <"$work/soak.log" 2>&1; then + probe_failure "${mode}_soak_replay" "$work/soak.log" + fi + grep -Fxq "WINE11_CANDIDATE mode=$mode phase=replay result=pass" "$work/soak.log" || fail "${mode}_soak_missing" + [ "$(docker inspect --format '{{.State.OOMKilled}} {{.RestartCount}} {{.State.Running}}' "$cid")" = 'false 0 true' ] || fail "${mode}_soak_container_state" + soak_after="$(soak_events)" || fail "${mode}_soak_counters" + [ "$soak_after" = "$soak_before" ] || fail "${mode}_soak_limit_events" + if (( sample % 5 == 0 )); then + printf 'WINE11_CANDIDATE_SOAK_PROGRESS mode=%s samples=%s elapsed_seconds=%s\n' "$mode" "$sample" "$((SECONDS - soak_start))" + fi + done + (( SECONDS - soak_start >= 3300 )) || fail "${mode}_soak_duration" + # Re-exercise STOP and read-only denials after the elapsed interval. + if ! timeout 120 docker exec -i "$cid" python3 - "$mode" pressure \ + < tests/qualification/candidate_runtime_probe.py >"$work/post-soak.log" 2>&1; then + probe_failure "${mode}_post_soak_pressure" "$work/post-soak.log" + fi + grep -Fxq "WINE11_CANDIDATE_PRESSURE mode=$mode clients=4 requests=480 result=pass" "$work/post-soak.log" || fail "${mode}_post_soak_result_missing" + soak_after="$(soak_events)" || fail "${mode}_post_soak_counters" + [ "$soak_after" = "$soak_before" ] || fail "${mode}_post_soak_limit_events" + [ "$(docker inspect --format '{{.State.OOMKilled}} {{.RestartCount}} {{.State.Running}}' "$cid")" = 'false 0 true' ] || fail "${mode}_post_soak_container_state" + printf 'WINE11_CANDIDATE_SOAK mode=%s samples=55 elapsed_seconds=%s result=pass\n' "$mode" "$((SECONDS - soak_start))" docker cp "$cid:/artifacts/candidate-$mode.png" "artifacts/candidate-images/$mode.png" >/dev/null 2>&1 || fail screenshot_copy emit_screenshot "artifacts/candidate-images/$mode.png" "$mode.png" if ! CANDIDATE_SOURCE_SHA="$source_sha" docker compose \ From 9d65a6645c400a948c1da4126433abd7bfb2f95f Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Mon, 30 Nov 2026 04:47:46 +0100 Subject: [PATCH 2/3] ci: bound two sequential 55-minute public image soaks to 180 minutes --- .github/workflows/wine11-candidate-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wine11-candidate-images.yml b/.github/workflows/wine11-candidate-images.yml index 691319c6..075dad72 100644 --- a/.github/workflows/wine11-candidate-images.yml +++ b/.github/workflows/wine11-candidate-images.yml @@ -39,7 +39,7 @@ jobs: github.repository == 'SemperSupra/WineBot' && github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-24.04 - timeout-minutes: 60 + timeout-minutes: 180 permissions: contents: read env: From 70237f55a4f6a482d56ec047007aee7d9821423b Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Mon, 30 Nov 2026 04:48:13 +0100 Subject: [PATCH 3/3] fix: restore literal end-anchor in cgroup sampler before opening qualification PR --- scripts/ci/qualify-candidate-images.sh | 37 ++------------------------ 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/scripts/ci/qualify-candidate-images.sh b/scripts/ci/qualify-candidate-images.sh index a1de7b1a..020890b8 100755 --- a/scripts/ci/qualify-candidate-images.sh +++ b/scripts/ci/qualify-candidate-images.sh @@ -142,40 +142,7 @@ for mode in runtime instrumented; do # minutes. This is not a hostile actor or physical hardware test. soak_events() { timeout 10 docker exec "$cid" cat /sys/fs/cgroup/memory.events /sys/fs/cgroup/pids.events | - grep -E '^(max|oom|oom_kill) [0-9]+ "artifacts/candidate-images/$mode.png" >/dev/null 2>&1 || fail screenshot_copy - emit_screenshot "artifacts/candidate-images/$mode.png" "$mode.png" - if ! CANDIDATE_SOURCE_SHA="$source_sha" docker compose \ - -f compose/docker-compose.yml -f compose/candidate-browser-probe.yml \ - --profile test --profile interactive run --rm --no-deps --pull never -T \ - test-runner python tests/qualification/candidate_browser_probe.py \ - >"$work/browser.log" 2>&1; then - sed -nE '/^WINE11_CANDIDATE_BROWSER phase=[a-z_]+ category=[A-Za-z]+ line=[0-9]+ result=fail$/p' "$work/browser.log" | head -n 3 - fail "${mode}_browser" - fi - grep -Eq "^WINE11_CANDIDATE_BROWSER mode=$mode result=pass$" "$work/browser.log" || fail browser_result_missing - printf 'WINE11_CANDIDATE_BROWSER mode=%s result=pass\n' "$mode" - emit_screenshot "artifacts/candidate-images/$mode-dashboard.png" "$mode-dashboard.png" - # Exercise abrupt disposable runtime loss with the exact same persistent - # external volumes. No production container or foreign volume is touched. - "${compose[@]}" kill -s SIGKILL winebot >/dev/null 2>&1 || fail fault_injection - [ "$(docker inspect --format '{{.State.ExitCode}}' "$cid")" = 137 ] || fail fault_not_observed - "${compose[@]}" up --no-build --force-recreate --detach --wait --wait-timeout 240 \ - >"$work/recreate.log" 2>&1 || fail recreate - cid="$("${compose[@]}" ps -q winebot)" - if ! docker exec -i "$cid" python3 - "$mode" replay \ - < tests/qualification/candidate_runtime_probe.py >"$work/replay.log" 2>&1; then - probe_failure "${mode}_replay" "$work/replay.log" - fi - printf 'WINE11_CANDIDATE mode=%s phase=replay result=pass\n' "$mode" - "${compose[@]}" down --remove-orphans >/dev/null 2>&1 || fail teardown - project="" -done - -cat > artifacts/candidate-images/qualification.json < artifacts/candidate-images/qualification.json <