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: diff --git a/scripts/ci/qualify-candidate-images.sh b/scripts/ci/qualify-candidate-images.sh index 212e5031..020890b8 100755 --- a/scripts/ci/qualify-candidate-images.sh +++ b/scripts/ci/qualify-candidate-images.sh @@ -138,6 +138,40 @@ 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]+$' + } + soak_before="$(soak_events)" || fail "${mode}_soak_counters" + [ "$(printf '%s\n' "$soak_before" | wc -l)" -eq 4 ] || fail "${mode}_soak_counter_shape" + soak_start=$SECONDS + for sample in $(seq 1 55); do + sleep 60 + if ! timeout 40 docker exec -i "$cid" python3 - "$mode" replay \ + < tests/qualification/candidate_runtime_probe.py >"$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 \ @@ -168,6 +202,6 @@ for mode in runtime instrumented; do done cat > artifacts/candidate-images/qualification.json <