From f865cb4705e1ac1a3d390e835847c83cbb7ec938 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:26:59 +0100 Subject: [PATCH 01/25] ci: decouple unit tests from interactive startup and classify E2E failures safely --- .github/workflows/ci.yml | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55113741..4798f8db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,14 +38,47 @@ jobs: - name: Containerized Linting run: docker compose -f compose/docker-compose.yml --profile lint run --rm lint-runner scripts/ci/lint.sh - - name: Containerized Unit Tests - run: docker compose -f compose/docker-compose.yml --profile test --profile interactive run --rm test-runner scripts/ci/test.sh + - name: Containerized Unit Tests (runtime-independent) + run: docker compose -f compose/docker-compose.yml --profile test run --rm --no-deps test-runner scripts/ci/test.sh + + - name: Start interactive dependency for browser E2E + id: start-e2e-runtime + run: docker compose -f compose/docker-compose.yml --profile interactive up --detach --wait --wait-timeout 150 winebot-interactive + + - name: Classify failed interactive startup without printing service logs + if: ${{ failure() && steps.start-e2e-runtime.outcome == 'failure' }} + run: | + set -euo pipefail + container_id="$(docker compose -f compose/docker-compose.yml --profile interactive ps -q winebot-interactive || true)" + if [ -z "$container_id" ]; then + echo "STARTUP_DIAGNOSTIC container=absent" + else + docker inspect --format='STARTUP_DIAGNOSTIC status={{.State.Status}} exit_code={{.State.ExitCode}} oom={{.State.OOMKilled}}' "$container_id" || true + fi + # Read privately; emit only enumerated stage names, never raw logs or tokens. + docker compose -f compose/docker-compose.yml --profile interactive logs --no-color --tail 200 winebot-interactive 2>/dev/null | + python3 -c 'import sys +text = sys.stdin.read() +stages = ( + ("Pass 2: Infrastructure", "infrastructure"), + ("Pass 3: Wine Environment", "wine"), + ("Pass 4: Services", "services"), + ("WINEBOT_STARTUP_ERROR", "explicit_failure"), + ("Xvfb failed to start", "xvfb_failure"), + ("Configuration admission rejected", "configuration_rejected"), +) +for needle, label in stages: + print("STARTUP_DIAGNOSTIC stage=" + label) if needle in text else None' || true - name: Deterministic E2E subset run: | - docker compose -f compose/docker-compose.yml --profile interactive --profile test run --rm test-runner \ + docker compose -f compose/docker-compose.yml --profile test run --rm --no-deps test-runner \ pytest -q /work/tests/e2e/test_dashboard_e2e.py /work/tests/e2e/test_ux_keyboard_accessibility.py + - name: Stop E2E runtime + if: always() + run: docker compose -f compose/docker-compose.yml --profile interactive down --remove-orphans || true + conformance: name: Conformance (Contracts) needs: pre-flight From 66ddadc2dbe2b9fb0f329e97a95d968010e14c9e Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:27:51 +0100 Subject: [PATCH 02/25] fix(startup): emit bounded, nonsecret stage on early entrypoint exit --- docker/entrypoint.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 44c5e16c..ccd34e85 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -41,6 +41,9 @@ if [ "$(id -u)" = "0" ]; then fi # --- USER CONTEXT (winebot) --- +# Classify an early failure by a fixed stage, never echoing environment values. +WINEBOT_STARTUP_STAGE="configuration" +trap 'startup_rc=$?; if [ "$startup_rc" -ne 0 ]; then printf "WINEBOT_STARTUP_ERROR stage=%s rc=%s\\n" "$WINEBOT_STARTUP_STAGE" "$startup_rc" >&2; fi' EXIT write_instance_state() { local state="$1" local reason="${2:-}" @@ -116,17 +119,22 @@ if { [ "$BUILD_INTENT" = "rel" ] || [ "$BUILD_INTENT" = "rel-runner" ]; } && [ " echo "--> Support Mode enabled for ${ttl_min} minutes (until epoch ${WINEBOT_SUPPORT_MODE_UNTIL_EPOCH})." fi +WINEBOT_STARTUP_STAGE="infrastructure" # 2. Infrastructure Setup (Session, X11, WM) echo "--> Pass 2: Infrastructure..." source /scripts/init/10-setup-infra.sh +WINEBOT_STARTUP_STAGE="wine" # 3. Wine Environment Setup (Prefix, Theme, VNC) echo "--> Pass 3: Wine Environment..." source /scripts/init/20-setup-wine.sh +WINEBOT_STARTUP_STAGE="services" # 4. Service Startup (API, Recorder, Supervisor) echo "--> Pass 4: Services..." source /scripts/init/30-start-services.sh +# Startup complete; do not misclassify later application failures. +trap - EXIT if [ "${DEBUG:-0}" = "1" ]; then echo "--> DEBUG: Windows automation tool versions..." From 586b4a525f712d2c28c3f503c9ec69b85c04db4a Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:28:19 +0100 Subject: [PATCH 03/25] security(api): stop leaking generated API credential to container logs --- scripts/init/30-start-services.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/init/30-start-services.sh b/scripts/init/30-start-services.sh index 3ba7665d..84b7f7dd 100755 --- a/scripts/init/30-start-services.sh +++ b/scripts/init/30-start-services.sh @@ -77,8 +77,9 @@ if [ "${ENABLE_API:-0}" = "1" ]; then if [ -z "${API_TOKEN:-}" ]; then # Generate a random 16-char token for secure-by-default operation export API_TOKEN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1) - echo "--> [SECURITY] No API_TOKEN provided. Generated random token: ${API_TOKEN}" - echo "--> [SECURITY] Use this token in 'X-API-Key' header for all requests." + # Never print the generated credential into public CI/service logs. + echo "--> [SECURITY] Generated an ephemeral API token (value not logged)." + echo "--> [SECURITY] Token is available only through existing local file discovery." fi # Persist for internal tool discovery (use /tmp as /run is root-only) From f98ee8ca3fbdee77be429abb1df1df9485921d6b Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:29:13 +0100 Subject: [PATCH 04/25] test(ci): guard unit independence, startup stage and token-log boundary --- tests/test_ci_unit_isolation.py | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/test_ci_unit_isolation.py diff --git a/tests/test_ci_unit_isolation.py b/tests/test_ci_unit_isolation.py new file mode 100644 index 00000000..7473a144 --- /dev/null +++ b/tests/test_ci_unit_isolation.py @@ -0,0 +1,50 @@ +"""Source-level regression for isolated unit CI and safe startup diagnostics.""" + +from pathlib import Path +import unittest + +ROOT = Path(__file__).resolve().parent.parent + + +class CIUnitIsolationTests(unittest.TestCase): + def test_units_do_not_start_interactive_runtime(self): + source = (ROOT / ".github/workflows/ci.yml").read_text(encoding="utf-8") + unit = "run --rm --no-deps test-runner scripts/ci/test.sh" + startup = "up --detach --wait --wait-timeout 150 winebot-interactive" + e2e = "pytest -q /work/tests/e2e/test_dashboard_e2e.py" + self.assertEqual(source.count(unit), 1) + self.assertEqual(source.count(startup), 1) + self.assertLess(source.index(unit), source.index(startup)) + self.assertLess(source.index(startup), source.index(e2e)) + self.assertIn("Stop E2E runtime", source) + self.assertIn("if: always()", source) + + def test_failed_startup_emits_only_bounded_markers(self): + source = (ROOT / ".github/workflows/ci.yml").read_text(encoding="utf-8") + self.assertIn("Classify failed interactive startup without printing service logs", source) + self.assertIn("python3 -c 'import sys", source) + self.assertIn('print("STARTUP_DIAGNOSTIC stage=" + label)', source) + self.assertIn("State.OOMKilled", source) + self.assertNotIn("docker compose -f compose/docker-compose.yml logs --tail", source) + + def test_entrypoint_stage_is_fixed_and_cleared_at_ready(self): + source = (ROOT / "docker/entrypoint.sh").read_text(encoding="utf-8") + for marker in ('WINEBOT_STARTUP_STAGE="configuration"', + 'WINEBOT_STARTUP_STAGE="infrastructure"', + 'WINEBOT_STARTUP_STAGE="wine"', + 'WINEBOT_STARTUP_STAGE="services"', + "WINEBOT_STARTUP_ERROR stage=%s", + "trap - EXIT"): + self.assertIn(marker, source) + self.assertLess(source.index('WINEBOT_STARTUP_STAGE="services"'), + source.index("trap - EXIT")) + + def test_generated_api_token_is_not_ever_echoed(self): + source = (ROOT / "scripts/init/30-start-services.sh").read_text(encoding="utf-8") + self.assertNotIn("Generated random token: ${API_TOKEN}", source) + self.assertIn("value not logged", source) + self.assertIn('echo -n "$API_TOKEN" > /tmp/winebot_api_token', source) + + +if __name__ == "__main__": + unittest.main() From f5958d5f58ec14d4e19326bc45f505efa397bbe4 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:29:46 +0100 Subject: [PATCH 05/25] ci: qualify unit/E2E separation on public-only source contract --- .github/workflows/ci-unit-isolation.yml | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ci-unit-isolation.yml diff --git a/.github/workflows/ci-unit-isolation.yml b/.github/workflows/ci-unit-isolation.yml new file mode 100644 index 00000000..fc071abc --- /dev/null +++ b/.github/workflows/ci-unit-isolation.yml @@ -0,0 +1,29 @@ +name: CI Unit Isolation and Startup Safety +on: + pull_request: + paths: + - '.github/workflows/ci.yml' + - '.github/workflows/ci-unit-isolation.yml' + - 'docker/entrypoint.sh' + - 'scripts/init/30-start-services.sh' + - 'scripts/ci/test.sh' + - 'tests/test_ci_unit_isolation.py' + +permissions: + contents: read + +jobs: + safe-startup-contract: + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - name: Checkout public source without saved credentials + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + with: + persist-credentials: false + - name: Shell syntax and isolated CI regression + shell: bash + run: | + set -euo pipefail + bash -n docker/entrypoint.sh scripts/init/30-start-services.sh scripts/ci/test.sh + python3 tests/test_ci_unit_isolation.py From 6cfdbec634c9aaedb5696c04427ec3a25737ff17 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:30:12 +0100 Subject: [PATCH 06/25] test(ci): include startup/unit boundary regression in standard unit suite --- scripts/ci/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci/test.sh b/scripts/ci/test.sh index 8ca4ff8c..86617202 100755 --- a/scripts/ci/test.sh +++ b/scripts/ci/test.sh @@ -25,4 +25,5 @@ pytest \ tests/test_ui_accessibility.py \ tests/test_visual_profile_cli.py \ tests/test_ci_trust_pack_provenance.py \ - tests/test_ci_public_conformance_summary.py + tests/test_ci_public_conformance_summary.py \ + tests/test_ci_unit_isolation.py From 391c6263e5df9f5c3d566adc83f28efebc3e5f72 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:34:51 +0100 Subject: [PATCH 07/25] ci(test): execute full unit suite independently on free public runner --- .github/workflows/ci-unit-isolation.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci-unit-isolation.yml b/.github/workflows/ci-unit-isolation.yml index fc071abc..8eee1ea8 100644 --- a/.github/workflows/ci-unit-isolation.yml +++ b/.github/workflows/ci-unit-isolation.yml @@ -27,3 +27,19 @@ jobs: set -euo pipefail bash -n docker/entrypoint.sh scripts/init/30-start-services.sh scripts/ci/test.sh python3 tests/test_ci_unit_isolation.py + + runtime-independent-unit-suite: + runs-on: ubuntu-24.04 + timeout-minutes: 40 + steps: + - name: Checkout public source without saved credentials + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + with: + persist-credentials: false + - name: Build unit image without starting Wine + run: docker compose -f compose/docker-compose.yml --profile test build test-runner + - name: Execute real project unit suite with no service dependencies + run: docker compose -f compose/docker-compose.yml --profile test run --rm --no-deps test-runner scripts/ci/test.sh + - name: Cleanup test-only containers + if: always() + run: docker compose -f compose/docker-compose.yml --profile test down --remove-orphans || true From 717b5aae63c0ee9ad12c3accc6e7c22caae48066 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:35:53 +0100 Subject: [PATCH 08/25] test(rdte): independently qualify real Wine startup with bounded nonsecret failure evidence --- .github/workflows/ci-unit-isolation.yml | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.github/workflows/ci-unit-isolation.yml b/.github/workflows/ci-unit-isolation.yml index 8eee1ea8..9ab7ea30 100644 --- a/.github/workflows/ci-unit-isolation.yml +++ b/.github/workflows/ci-unit-isolation.yml @@ -43,3 +43,50 @@ jobs: - name: Cleanup test-only containers if: always() run: docker compose -f compose/docker-compose.yml --profile test down --remove-orphans || true + + bounded-interactive-startup: + runs-on: ubuntu-24.04 + timeout-minutes: 40 + steps: + - name: Checkout public source without saved credentials + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + with: + persist-credentials: false + - name: Build exact WineBot interactive image on public runner + run: docker compose -f compose/docker-compose.yml --profile interactive build winebot-interactive + - name: Exercise real interactive health gate + id: startup + continue-on-error: true + run: docker compose -f compose/docker-compose.yml --profile interactive up --detach --wait --wait-timeout 150 winebot-interactive + - name: Classify startup failure without revealing service logs + if: ${{ always() && steps.startup.outcome == 'failure' }} + run: | + set -euo pipefail + cid="$(docker compose -f compose/docker-compose.yml --profile interactive ps -q winebot-interactive || true)" + if [ -z "$cid" ]; then + echo "STARTUP_DIAGNOSTIC container=absent" + else + docker inspect --format='STARTUP_DIAGNOSTIC status={{.State.Status}} exit_code={{.State.ExitCode}} oom={{.State.OOMKilled}}' "$cid" || true + fi + docker compose -f compose/docker-compose.yml --profile interactive logs --no-color --tail 200 winebot-interactive 2>/dev/null | + python3 -c 'import sys +text = sys.stdin.read() +for needle, label in ( + ("Pass 2: Infrastructure", "infrastructure"), + ("Pass 3: Wine Environment", "wine"), + ("Pass 4: Services", "services"), + ("WINEBOT_STARTUP_ERROR stage=configuration", "failed_configuration"), + ("WINEBOT_STARTUP_ERROR stage=infrastructure", "failed_infrastructure"), + ("WINEBOT_STARTUP_ERROR stage=wine", "failed_wine"), + ("WINEBOT_STARTUP_ERROR stage=services", "failed_services"), +): + if needle in text: + print("STARTUP_DIAGNOSTIC stage=" + label)' || true + - name: Reject unqualified interactive startup + if: always() + env: + STARTUP_OUTCOME: ${{ steps.startup.outcome }} + run: test "$STARTUP_OUTCOME" = success + - name: Stop isolated interactive service + if: always() + run: docker compose -f compose/docker-compose.yml --profile interactive down --remove-orphans || true From 258afa76f6b0650bf2095ccd76a5a387feff08a5 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:38:30 +0100 Subject: [PATCH 09/25] fix(ci): validate both Compose profiles while isolating runner with no-deps --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4798f8db..61ab602d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: run: docker compose -f compose/docker-compose.yml --profile lint run --rm lint-runner scripts/ci/lint.sh - name: Containerized Unit Tests (runtime-independent) - run: docker compose -f compose/docker-compose.yml --profile test run --rm --no-deps test-runner scripts/ci/test.sh + run: docker compose -f compose/docker-compose.yml --profile test --profile interactive run --rm --no-deps test-runner scripts/ci/test.sh - name: Start interactive dependency for browser E2E id: start-e2e-runtime @@ -72,7 +72,7 @@ for needle, label in stages: - name: Deterministic E2E subset run: | - docker compose -f compose/docker-compose.yml --profile test run --rm --no-deps test-runner \ + docker compose -f compose/docker-compose.yml --profile test --profile interactive run --rm --no-deps test-runner \ pytest -q /work/tests/e2e/test_dashboard_e2e.py /work/tests/e2e/test_ux_keyboard_accessibility.py - name: Stop E2E runtime From 655bd8236ba2126171283d333d753c9e20632994 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:38:42 +0100 Subject: [PATCH 10/25] fix(ci): validate both Compose profiles while isolating runner with no-deps --- .github/workflows/ci-unit-isolation.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-unit-isolation.yml b/.github/workflows/ci-unit-isolation.yml index 9ab7ea30..a51841df 100644 --- a/.github/workflows/ci-unit-isolation.yml +++ b/.github/workflows/ci-unit-isolation.yml @@ -37,12 +37,12 @@ jobs: with: persist-credentials: false - name: Build unit image without starting Wine - run: docker compose -f compose/docker-compose.yml --profile test build test-runner + run: docker compose -f compose/docker-compose.yml --profile test --profile interactive build test-runner - name: Execute real project unit suite with no service dependencies - run: docker compose -f compose/docker-compose.yml --profile test run --rm --no-deps test-runner scripts/ci/test.sh + run: docker compose -f compose/docker-compose.yml --profile test --profile interactive run --rm --no-deps test-runner scripts/ci/test.sh - name: Cleanup test-only containers if: always() - run: docker compose -f compose/docker-compose.yml --profile test down --remove-orphans || true + run: docker compose -f compose/docker-compose.yml --profile test --profile interactive down --remove-orphans || true bounded-interactive-startup: runs-on: ubuntu-24.04 From de429fb2eb4c21a98c8bb9ace2ece30335ae8c59 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:38:56 +0100 Subject: [PATCH 11/25] fix(ci): validate both Compose profiles while isolating runner with no-deps --- tests/test_ci_unit_isolation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_ci_unit_isolation.py b/tests/test_ci_unit_isolation.py index 7473a144..d4679689 100644 --- a/tests/test_ci_unit_isolation.py +++ b/tests/test_ci_unit_isolation.py @@ -9,7 +9,7 @@ class CIUnitIsolationTests(unittest.TestCase): def test_units_do_not_start_interactive_runtime(self): source = (ROOT / ".github/workflows/ci.yml").read_text(encoding="utf-8") - unit = "run --rm --no-deps test-runner scripts/ci/test.sh" + unit = "--profile test --profile interactive run --rm --no-deps test-runner scripts/ci/test.sh" startup = "up --detach --wait --wait-timeout 150 winebot-interactive" e2e = "pytest -q /work/tests/e2e/test_dashboard_e2e.py" self.assertEqual(source.count(unit), 1) From 9715878aa6f64ce25ec984070d00af1d7d1570c2 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:45:32 +0100 Subject: [PATCH 12/25] fix(ci): keep bounded Python startup classifier inside valid YAML run block --- .github/workflows/ci.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61ab602d..99220739 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,18 +57,7 @@ jobs: fi # Read privately; emit only enumerated stage names, never raw logs or tokens. docker compose -f compose/docker-compose.yml --profile interactive logs --no-color --tail 200 winebot-interactive 2>/dev/null | - python3 -c 'import sys -text = sys.stdin.read() -stages = ( - ("Pass 2: Infrastructure", "infrastructure"), - ("Pass 3: Wine Environment", "wine"), - ("Pass 4: Services", "services"), - ("WINEBOT_STARTUP_ERROR", "explicit_failure"), - ("Xvfb failed to start", "xvfb_failure"), - ("Configuration admission rejected", "configuration_rejected"), -) -for needle, label in stages: - print("STARTUP_DIAGNOSTIC stage=" + label) if needle in text else None' || true + python3 -c 'import sys; data = sys.stdin.read(); stages = (("Pass 2: Infrastructure", "infrastructure"), ("Pass 3: Wine Environment", "wine"), ("Pass 4: Services", "services"), ("WINEBOT_STARTUP_ERROR", "explicit_failure"), ("Xvfb failed to start", "xvfb_failure"), ("Configuration admission rejected", "configuration_rejected")); [print("STARTUP_DIAGNOSTIC stage=" + label) for needle, label in stages if needle in data]' || true - name: Deterministic E2E subset run: | From 725a8e859fe527637cd62268d4d0e6a222457d31 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:45:46 +0100 Subject: [PATCH 13/25] fix(ci): keep bounded Python startup classifier inside valid YAML run block --- .github/workflows/ci-unit-isolation.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/ci-unit-isolation.yml b/.github/workflows/ci-unit-isolation.yml index a51841df..f04ab872 100644 --- a/.github/workflows/ci-unit-isolation.yml +++ b/.github/workflows/ci-unit-isolation.yml @@ -69,19 +69,7 @@ jobs: docker inspect --format='STARTUP_DIAGNOSTIC status={{.State.Status}} exit_code={{.State.ExitCode}} oom={{.State.OOMKilled}}' "$cid" || true fi docker compose -f compose/docker-compose.yml --profile interactive logs --no-color --tail 200 winebot-interactive 2>/dev/null | - python3 -c 'import sys -text = sys.stdin.read() -for needle, label in ( - ("Pass 2: Infrastructure", "infrastructure"), - ("Pass 3: Wine Environment", "wine"), - ("Pass 4: Services", "services"), - ("WINEBOT_STARTUP_ERROR stage=configuration", "failed_configuration"), - ("WINEBOT_STARTUP_ERROR stage=infrastructure", "failed_infrastructure"), - ("WINEBOT_STARTUP_ERROR stage=wine", "failed_wine"), - ("WINEBOT_STARTUP_ERROR stage=services", "failed_services"), -): - if needle in text: - print("STARTUP_DIAGNOSTIC stage=" + label)' || true + python3 -c 'import sys; data = sys.stdin.read(); stages = (("Pass 2: Infrastructure", "infrastructure"), ("Pass 3: Wine Environment", "wine"), ("Pass 4: Services", "services"), ("WINEBOT_STARTUP_ERROR stage=configuration", "failed_configuration"), ("WINEBOT_STARTUP_ERROR stage=infrastructure", "failed_infrastructure"), ("WINEBOT_STARTUP_ERROR stage=wine", "failed_wine"), ("WINEBOT_STARTUP_ERROR stage=services", "failed_services")); [print("STARTUP_DIAGNOSTIC stage=" + label) for needle, label in stages if needle in data]' || true - name: Reject unqualified interactive startup if: always() env: From 9b901f875c0407c84882ab5e6fd70de68439f11d Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:46:15 +0100 Subject: [PATCH 14/25] test(ci): parse both modified workflow YAML files before expensive public runs --- .github/workflows/ci-unit-isolation.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci-unit-isolation.yml b/.github/workflows/ci-unit-isolation.yml index f04ab872..af174406 100644 --- a/.github/workflows/ci-unit-isolation.yml +++ b/.github/workflows/ci-unit-isolation.yml @@ -27,6 +27,12 @@ jobs: set -euo pipefail bash -n docker/entrypoint.sh scripts/init/30-start-services.sh scripts/ci/test.sh python3 tests/test_ci_unit_isolation.py + - name: Validate GitHub Actions workflow YAML + shell: bash + run: | + set -euo pipefail + python3 -m pip install --disable-pip-version-check PyYAML==6.0.3 + python3 -c 'import yaml; from pathlib import Path; files = (".github/workflows/ci.yml", ".github/workflows/ci-unit-isolation.yml"); [yaml.safe_load(Path(p).read_text(encoding="utf-8")) for p in files]; print("PASS: workflow YAML parsed")' runtime-independent-unit-suite: runs-on: ubuntu-24.04 From 01dc6f73bb853e334fcd5edc2080eec65762801b Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:50:31 +0100 Subject: [PATCH 15/25] style(ci): fix public-lint import order at startup acceptance head --- tests/test_ci_unit_isolation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_ci_unit_isolation.py b/tests/test_ci_unit_isolation.py index d4679689..7f16e329 100644 --- a/tests/test_ci_unit_isolation.py +++ b/tests/test_ci_unit_isolation.py @@ -1,7 +1,7 @@ """Source-level regression for isolated unit CI and safe startup diagnostics.""" -from pathlib import Path import unittest +from pathlib import Path ROOT = Path(__file__).resolve().parent.parent From 617087ff72dd9e387403539f920a1846382d38e9 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:58:02 +0100 Subject: [PATCH 16/25] diagnostic(ci): classify exact Wine startup stage without leaking service logs --- .github/workflows/ci-unit-isolation.yml | 4 +- .github/workflows/ci.yml | 2 +- scripts/ci/classify-startup-logs.py | 49 +++++++++++++++++++++++++ scripts/init/30-start-services.sh | 12 ++++++ tests/test_ci_unit_isolation.py | 19 +++++++++- 5 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 scripts/ci/classify-startup-logs.py mode change 100755 => 100644 scripts/init/30-start-services.sh diff --git a/.github/workflows/ci-unit-isolation.yml b/.github/workflows/ci-unit-isolation.yml index af174406..45b32e08 100644 --- a/.github/workflows/ci-unit-isolation.yml +++ b/.github/workflows/ci-unit-isolation.yml @@ -7,6 +7,7 @@ on: - 'docker/entrypoint.sh' - 'scripts/init/30-start-services.sh' - 'scripts/ci/test.sh' + - 'scripts/ci/classify-startup-logs.py' - 'tests/test_ci_unit_isolation.py' permissions: @@ -27,6 +28,7 @@ jobs: set -euo pipefail bash -n docker/entrypoint.sh scripts/init/30-start-services.sh scripts/ci/test.sh python3 tests/test_ci_unit_isolation.py + python3 -m py_compile scripts/ci/classify-startup-logs.py - name: Validate GitHub Actions workflow YAML shell: bash run: | @@ -75,7 +77,7 @@ jobs: docker inspect --format='STARTUP_DIAGNOSTIC status={{.State.Status}} exit_code={{.State.ExitCode}} oom={{.State.OOMKilled}}' "$cid" || true fi docker compose -f compose/docker-compose.yml --profile interactive logs --no-color --tail 200 winebot-interactive 2>/dev/null | - python3 -c 'import sys; data = sys.stdin.read(); stages = (("Pass 2: Infrastructure", "infrastructure"), ("Pass 3: Wine Environment", "wine"), ("Pass 4: Services", "services"), ("WINEBOT_STARTUP_ERROR stage=configuration", "failed_configuration"), ("WINEBOT_STARTUP_ERROR stage=infrastructure", "failed_infrastructure"), ("WINEBOT_STARTUP_ERROR stage=wine", "failed_wine"), ("WINEBOT_STARTUP_ERROR stage=services", "failed_services")); [print("STARTUP_DIAGNOSTIC stage=" + label) for needle, label in stages if needle in data]' || true + python3 scripts/ci/classify-startup-logs.py || true - name: Reject unqualified interactive startup if: always() env: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99220739..9e7b827a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: fi # Read privately; emit only enumerated stage names, never raw logs or tokens. docker compose -f compose/docker-compose.yml --profile interactive logs --no-color --tail 200 winebot-interactive 2>/dev/null | - python3 -c 'import sys; data = sys.stdin.read(); stages = (("Pass 2: Infrastructure", "infrastructure"), ("Pass 3: Wine Environment", "wine"), ("Pass 4: Services", "services"), ("WINEBOT_STARTUP_ERROR", "explicit_failure"), ("Xvfb failed to start", "xvfb_failure"), ("Configuration admission rejected", "configuration_rejected")); [print("STARTUP_DIAGNOSTIC stage=" + label) for needle, label in stages if needle in data]' || true + python3 scripts/ci/classify-startup-logs.py || true - name: Deterministic E2E subset run: | diff --git a/scripts/ci/classify-startup-logs.py b/scripts/ci/classify-startup-logs.py new file mode 100644 index 00000000..b680b46a --- /dev/null +++ b/scripts/ci/classify-startup-logs.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python3 +"""Emit only fixed startup diagnostic codes; never echo untrusted service log text.""" + +from __future__ import annotations + +import sys + +SPECIFIC_STAGES = ( + ("services/trace-log-path", "failed_trace_log_path"), + ("services/trace-script-path", "failed_trace_script_path"), + ("services/trace-launch", "failed_trace_launch"), + ("services/api-token", "failed_api_token"), + ("services/native-input-trace", "failed_native_trace"), + ("services/recording", "failed_recorder"), + ("services/api", "failed_api"), + ("services/supervisor", "failed_supervisor"), + ("services/input-trace", "failed_input_trace"), + ("services/complete", "failed_services_complete"), + ("services", "failed_services"), + ("configuration", "failed_configuration"), + ("infrastructure", "failed_infrastructure"), + ("wine", "failed_wine"), +) + + +def main() -> int: + # Compose logs may contain credentials or user-facing window titles. + # Read job-locally; print ONLY enumerated codes, never raw text. + raw = sys.stdin.read(262144) + for marker, code in SPECIFIC_STAGES: + if "WINEBOT_STARTUP_ERROR stage=" + marker + " " in raw: + print("STARTUP_DIAGNOSTIC stage=" + code) + return 0 + for marker, code in ( + ("Pass 4: Services", "reached_services"), + ("Pass 3: Wine Environment", "reached_wine"), + ("Pass 2: Infrastructure", "reached_infrastructure"), + ("Xvfb failed to start", "xvfb_failure"), + ("Configuration admission rejected", "configuration_rejected"), + ): + if marker in raw: + print("STARTUP_DIAGNOSTIC stage=" + code) + return 0 + print("STARTUP_DIAGNOSTIC stage=unknown") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/init/30-start-services.sh b/scripts/init/30-start-services.sh old mode 100755 new mode 100644 index 84b7f7dd..587ea524 --- a/scripts/init/30-start-services.sh +++ b/scripts/init/30-start-services.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # 30-start-services.sh: Start API, Tracing, and Supervisor Loop +WINEBOT_STARTUP_STAGE="services/input-trace" echo "--> Pass 4: Service Startup (WINEBOT_INPUT_TRACE_WINDOWS=${WINEBOT_INPUT_TRACE_WINDOWS:-unset})" # Post-Init Tracing (Ensures wineserver is stable) @@ -9,8 +10,11 @@ if [ "${WINEBOT_INPUT_TRACE_WINDOWS:-0}" = "1" ]; then sleep 2 WIN_TRACE_MS="${WINEBOT_INPUT_TRACE_WINDOWS_SAMPLE_MS:-5}" mkdir -p "$SESSION_DIR/logs" + WINEBOT_STARTUP_STAGE="services/trace-log-path" WINE_LOG_PATH=$(winepath -w "$SESSION_DIR/logs/input_events_windows.jsonl") + WINEBOT_STARTUP_STAGE="services/trace-script-path" WINE_SCRIPT_PATH=$(winepath -w /automation/core/input_trace_windows.ahk) + WINEBOT_STARTUP_STAGE="services/trace-launch" echo "--> Starting Windows Input Trace..." ( TRACE_RESTART_WINDOW="${WINEBOT_TRACE_RESTART_WINDOW_SECONDS:-120}" @@ -47,11 +51,13 @@ if [ "${WINEBOT_INPUT_TRACE_WINDOWS:-0}" = "1" ]; then ) & fi +WINEBOT_STARTUP_STAGE="services/native-input-trace" if [ "${WINEBOT_INPUT_TRACE:-0}" = "1" ]; then python3 -m automation.input_trace start --session-dir "$SESSION_DIR" >/dev/null 2>&1 & fi # Recorder (if enabled) +WINEBOT_STARTUP_STAGE="services/recording" if [ "${WINEBOT_RECORD:-0}" = "1" ]; then if [[ "$SCREEN" == *x*x* ]]; then RES="${SCREEN%x*}"; else RES="$SCREEN"; fi @@ -73,10 +79,13 @@ if [ "${WINEBOT_RECORD:-0}" = "1" ]; then fi # API +WINEBOT_STARTUP_STAGE="services/api" if [ "${ENABLE_API:-0}" = "1" ]; then if [ -z "${API_TOKEN:-}" ]; then # Generate a random 16-char token for secure-by-default operation + WINEBOT_STARTUP_STAGE="services/api-token" export API_TOKEN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1) + WINEBOT_STARTUP_STAGE="services/api" # Never print the generated credential into public CI/service logs. echo "--> [SECURITY] Generated an ephemeral API token (value not logged)." echo "--> [SECURITY] Token is available only through existing local file discovery." @@ -102,6 +111,7 @@ if [ "${ENABLE_API:-0}" = "1" ]; then fi # Supervisor +WINEBOT_STARTUP_STAGE="services/supervisor" if [ "${WINEBOT_SUPERVISE_EXPLORER:-1}" = "1" ]; then echo "--> Starting Desktop Supervisor..." # Settle time @@ -183,3 +193,5 @@ if [ "${WINEBOT_SUPERVISE_EXPLORER:-1}" = "1" ]; then else echo "--> Desktop Supervisor disabled (WINEBOT_SUPERVISE_EXPLORER=0)." fi + +WINEBOT_STARTUP_STAGE="services/complete" diff --git a/tests/test_ci_unit_isolation.py b/tests/test_ci_unit_isolation.py index 7f16e329..f4365e8f 100644 --- a/tests/test_ci_unit_isolation.py +++ b/tests/test_ci_unit_isolation.py @@ -22,8 +22,8 @@ def test_units_do_not_start_interactive_runtime(self): def test_failed_startup_emits_only_bounded_markers(self): source = (ROOT / ".github/workflows/ci.yml").read_text(encoding="utf-8") self.assertIn("Classify failed interactive startup without printing service logs", source) - self.assertIn("python3 -c 'import sys", source) - self.assertIn('print("STARTUP_DIAGNOSTIC stage=" + label)', source) + self.assertIn("python3 scripts/ci/classify-startup-logs.py", source) + self.assertIn('STARTUP_DIAGNOSTIC stage=', (ROOT / "scripts/ci/classify-startup-logs.py").read_text(encoding="utf-8")) self.assertIn("State.OOMKilled", source) self.assertNotIn("docker compose -f compose/docker-compose.yml logs --tail", source) @@ -39,6 +39,21 @@ def test_entrypoint_stage_is_fixed_and_cleared_at_ready(self): self.assertLess(source.index('WINEBOT_STARTUP_STAGE="services"'), source.index("trap - EXIT")) + def test_classifier_redacts_untrusted_log_contents(self): + import subprocess + import sys + + marker = "SYNTHETIC-CREDENTIAL-NOT-FOR-RELEASE" + output = subprocess.run( + [sys.executable, str(ROOT / "scripts/ci/classify-startup-logs.py")], + input=marker + "\\nWINEBOT_STARTUP_ERROR stage=services/trace-log-path rc=1\\n", + text=True, + capture_output=True, + check=True, + ).stdout + self.assertEqual(output.strip(), "STARTUP_DIAGNOSTIC stage=failed_trace_log_path") + self.assertNotIn(marker, output) + def test_generated_api_token_is_not_ever_echoed(self): source = (ROOT / "scripts/init/30-start-services.sh").read_text(encoding="utf-8") self.assertNotIn("Generated random token: ${API_TOKEN}", source) From 05c4378a7edea30be639c4bac64c9c3dcbcd0366 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 14:10:20 +0100 Subject: [PATCH 17/25] fix(wine): bound retry of transient input-trace winepath lookup without disabling sensor --- scripts/init/winepath-with-retry.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 scripts/init/winepath-with-retry.sh diff --git a/scripts/init/winepath-with-retry.sh b/scripts/init/winepath-with-retry.sh new file mode 100644 index 00000000..7c309e59 --- /dev/null +++ b/scripts/init/winepath-with-retry.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Convert one Linux path for Wine input tracing, retrying transient Wine startup. +# No fallback path and no sensitive Wine stderr are admitted to caller logs. +set -euo pipefail +if [ "$#" -ne 1 ] || [ -z "$1" ]; then + exit 2 +fi +for attempt in 1 2 3 4; do + translated="" + if translated="$(timeout 8s winepath -w "$1" 2>/dev/null)" && + [ -n "$translated" ] && + [[ "$translated" != *$'\n'* ]] && + [[ "$translated" != *$'\r'* ]]; then + printf '%s\n' "$translated" + exit 0 + fi + if [ "$attempt" -lt 4 ]; then sleep 1; fi +done +exit 1 From d1844b7bcddfc8d266f4c0d09b68f1430a4d35b4 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 14:10:42 +0100 Subject: [PATCH 18/25] fix(startup): retry both mandatory Wine trace paths without disabling observability --- scripts/init/30-start-services.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/init/30-start-services.sh b/scripts/init/30-start-services.sh index 587ea524..1528d52e 100644 --- a/scripts/init/30-start-services.sh +++ b/scripts/init/30-start-services.sh @@ -11,9 +11,9 @@ if [ "${WINEBOT_INPUT_TRACE_WINDOWS:-0}" = "1" ]; then WIN_TRACE_MS="${WINEBOT_INPUT_TRACE_WINDOWS_SAMPLE_MS:-5}" mkdir -p "$SESSION_DIR/logs" WINEBOT_STARTUP_STAGE="services/trace-log-path" - WINE_LOG_PATH=$(winepath -w "$SESSION_DIR/logs/input_events_windows.jsonl") + WINE_LOG_PATH="$(/scripts/init/winepath-with-retry.sh "$SESSION_DIR/logs/input_events_windows.jsonl")" WINEBOT_STARTUP_STAGE="services/trace-script-path" - WINE_SCRIPT_PATH=$(winepath -w /automation/core/input_trace_windows.ahk) + WINE_SCRIPT_PATH="$(/scripts/init/winepath-with-retry.sh /automation/core/input_trace_windows.ahk)" WINEBOT_STARTUP_STAGE="services/trace-launch" echo "--> Starting Windows Input Trace..." ( From 9bfcc3baf8baa31a96f41564bd735d337db55a84 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 14:11:35 +0100 Subject: [PATCH 19/25] test(wine): prove bounded path retry, invalid-output refusal and no log disclosure --- tests/test_winepath_startup_retry.py | 75 ++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 tests/test_winepath_startup_retry.py diff --git a/tests/test_winepath_startup_retry.py b/tests/test_winepath_startup_retry.py new file mode 100644 index 00000000..1bf3d6ab --- /dev/null +++ b/tests/test_winepath_startup_retry.py @@ -0,0 +1,75 @@ +"""Fail-closed Wine trace-path retries without native Wine or private fixtures.""" + +import os +import subprocess +from pathlib import Path + +import pytest + +SCRIPT = Path("scripts/init/winepath-with-retry.sh") + + +@pytest.mark.parametrize( + ("mode", "expected_rc", "expected_count"), + [("recover", 0, 3), ("fail", 1, 4), ("multiline", 1, 4)], +) +def test_bounded_trace_path_retry( + tmp_path: Path, mode: str, expected_rc: int, expected_count: int +) -> None: + tool = tmp_path / "winepath" + tool.write_text( + "#!/bin/sh\n" + "set -eu\n" + 'count="$(cat "$WINEPATH_COUNTER" 2>/dev/null || printf 0)"\n' + 'count=$((count + 1))\n' + 'printf "%s" "$count" > "$WINEPATH_COUNTER"\n' + 'if [ "$WINEPATH_MODE" = recover ] && [ "$count" -ge 3 ]; then\n' + " printf 'Z:\\\\trace.jsonl\\n'\n" + " exit 0\n" + "fi\n" + 'if [ "$WINEPATH_MODE" = multiline ]; then\n' + " printf 'Z:\\\\trace.jsonl\\nSYNTHETIC_PRIVATE_MARKER\\n'\n" + " exit 0\n" + "fi\n" + "echo SYNTHETIC_PRIVATE_MARKER >&2\n" + "exit 1\n", + encoding="utf-8", + ) + tool.chmod(0o755) + sleep = tmp_path / "sleep" + sleep.write_text("#!/bin/sh\nexit 0\n", encoding="utf-8") + sleep.chmod(0o755) + counter = tmp_path / "counter" + env = os.environ.copy() + env.update( + PATH=f"{tmp_path}:{env['PATH']}", + WINEPATH_COUNTER=str(counter), + WINEPATH_MODE=mode, + ) + result = subprocess.run( + ["bash", str(SCRIPT), "/synthetic/trace.jsonl"], + env=env, + capture_output=True, + text=True, + timeout=45, + check=False, + ) + assert result.returncode == expected_rc + assert int(counter.read_text(encoding="utf-8")) == expected_count + assert "SYNTHETIC_PRIVATE_MARKER" not in result.stdout + result.stderr + if expected_rc == 0: + assert result.stdout == "Z:\\trace.jsonl\n" + else: + assert not result.stdout + + +def test_no_input_rejected_without_wine_process() -> None: + result = subprocess.run( + ["bash", str(SCRIPT)], + capture_output=True, + text=True, + timeout=5, + check=False, + ) + assert result.returncode == 2 + assert result.stdout == "" From 464afaaad1bedfe7d812414919d23ba7d31d80d4 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 14:11:56 +0100 Subject: [PATCH 20/25] test(wine): include bounded trace-path regression in public unit suite --- scripts/ci/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci/test.sh b/scripts/ci/test.sh index 86617202..c69a680d 100755 --- a/scripts/ci/test.sh +++ b/scripts/ci/test.sh @@ -26,4 +26,5 @@ pytest \ tests/test_visual_profile_cli.py \ tests/test_ci_trust_pack_provenance.py \ tests/test_ci_public_conformance_summary.py \ - tests/test_ci_unit_isolation.py + tests/test_ci_unit_isolation.py \ + tests/test_winepath_startup_retry.py From 0ba4f9d4447d559cd6ed00c66e6433fef80c380a Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 14:12:21 +0100 Subject: [PATCH 21/25] ci(wine): requalify public startup workflow when bounded Wine paths change --- .github/workflows/ci-unit-isolation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-unit-isolation.yml b/.github/workflows/ci-unit-isolation.yml index 45b32e08..a81873bc 100644 --- a/.github/workflows/ci-unit-isolation.yml +++ b/.github/workflows/ci-unit-isolation.yml @@ -6,6 +6,8 @@ on: - '.github/workflows/ci-unit-isolation.yml' - 'docker/entrypoint.sh' - 'scripts/init/30-start-services.sh' + - 'scripts/init/winepath-with-retry.sh' + - 'tests/test_winepath_startup_retry.py' - 'scripts/ci/test.sh' - 'scripts/ci/classify-startup-logs.py' - 'tests/test_ci_unit_isolation.py' From 9dacb10dc51b44c80c6ef93983680439da1ab9cb Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 14:19:52 +0100 Subject: [PATCH 22/25] fix(ci): pin Wine runtime jobs to known passing Ubuntu 24.04 runner --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e7b827a..47b8b4cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ concurrency: jobs: pre-flight: name: Pre-flight (Lint & Unit) - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - name: Verify capability matrix references @@ -71,7 +71,7 @@ jobs: conformance: name: Conformance (Contracts) needs: pre-flight - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd From ffabbeb17d51483677bdb7cd3e21749475a8cd14 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 14:20:12 +0100 Subject: [PATCH 23/25] fix(ci): pin Wine runtime jobs to known passing Ubuntu 24.04 runner --- .github/workflows/reusable-build-smoke-gate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-smoke-gate.yml b/.github/workflows/reusable-build-smoke-gate.yml index 14d58b2b..c5a4ea74 100644 --- a/.github/workflows/reusable-build-smoke-gate.yml +++ b/.github/workflows/reusable-build-smoke-gate.yml @@ -70,7 +70,7 @@ defaults: jobs: build-smoke-gate: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 timeout-minutes: 60 steps: - name: Maximize disk space From 35059aebed233d76c666602119de17fe333b01a2 Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 14:20:39 +0100 Subject: [PATCH 24/25] test(ci): guard known passing public Ubuntu 24.04 Wine execution venue --- tests/test_ci_unit_isolation.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_ci_unit_isolation.py b/tests/test_ci_unit_isolation.py index f4365e8f..c6cab0ce 100644 --- a/tests/test_ci_unit_isolation.py +++ b/tests/test_ci_unit_isolation.py @@ -54,6 +54,16 @@ def test_classifier_redacts_untrusted_log_contents(self): self.assertEqual(output.strip(), "STARTUP_DIAGNOSTIC stage=failed_trace_log_path") self.assertNotIn(marker, output) + def test_wine_ci_runner_image_pinned_to_qualified_public_venue(self): + ci = (ROOT / ".github/workflows/ci.yml").read_text(encoding="utf-8") + reusable = (ROOT / ".github/workflows/reusable-build-smoke-gate.yml").read_text( + encoding="utf-8" + ) + self.assertEqual(ci.count("runs-on: ubuntu-24.04"), 2) + self.assertEqual(reusable.count("runs-on: ubuntu-24.04"), 1) + self.assertNotIn("runs-on: ubuntu-latest", ci) + self.assertNotIn("runs-on: ubuntu-latest", reusable) + def test_generated_api_token_is_not_ever_echoed(self): source = (ROOT / "scripts/init/30-start-services.sh").read_text(encoding="utf-8") self.assertNotIn("Generated random token: ${API_TOKEN}", source) From 3fb7f9f5de757485cc67591913ff5ad9302959be Mon Sep 17 00:00:00 2001 From: "Mark E. DeYoung" <1854350+mark-e-deyoung@users.noreply.github.com> Date: Fri, 6 Nov 2026 14:21:03 +0100 Subject: [PATCH 25/25] ci: requalify Wine runner pin whenever reusable smoke workflow changes --- .github/workflows/ci-unit-isolation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-unit-isolation.yml b/.github/workflows/ci-unit-isolation.yml index a81873bc..a340314b 100644 --- a/.github/workflows/ci-unit-isolation.yml +++ b/.github/workflows/ci-unit-isolation.yml @@ -3,6 +3,7 @@ on: pull_request: paths: - '.github/workflows/ci.yml' + - '.github/workflows/reusable-build-smoke-gate.yml' - '.github/workflows/ci-unit-isolation.yml' - 'docker/entrypoint.sh' - 'scripts/init/30-start-services.sh'