From 786a7dcc1249d6f4d2f753fe64f3ecbe8cc12e69 Mon Sep 17 00:00:00 2001 From: Philip Z Date: Sun, 18 Oct 2026 14:56:03 +0800 Subject: [PATCH 1/4] ci: qualify HTTP resilience on macOS --- .github/workflows/http-macos.yml | 48 ++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/http-macos.yml diff --git a/.github/workflows/http-macos.yml b/.github/workflows/http-macos.yml new file mode 100644 index 00000000..928303f1 --- /dev/null +++ b/.github/workflows/http-macos.yml @@ -0,0 +1,48 @@ +name: HTTP resilience macOS + +on: + workflow_dispatch: + push: + branches: [main] + paths: + - .github/workflows/http-macos.yml + - pom.xml + - teaql-core/** + - teaql-runtime/** + - teaql-context-runtime-tools/** + - teaql-tool-http/** + - examples/http-resilience/** + pull_request: + branches: [main] + paths: + - .github/workflows/http-macos.yml + - pom.xml + - teaql-core/** + - teaql-runtime/** + - teaql-context-runtime-tools/** + - teaql-tool-http/** + - examples/http-resilience/** + +permissions: + contents: read + +jobs: + http-resilience: + name: HTTP contract and example (macOS) + runs-on: macos-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: temurin + cache: maven + - name: Run focused HTTP contract tests + run: >- + mvn -B -pl teaql-tool-http -am + -Dtest=HttpResilienceTest + -Dsurefire.failIfNoSpecifiedTests=false test + - name: Run Context-owned HTTP example twice + run: bash examples/http-resilience/verify.sh From ef716a98c988bb702b2cb6903c6ba46b1ec624c3 Mon Sep 17 00:00:00 2001 From: Philip Z Date: Sun, 18 Oct 2026 15:02:21 +0800 Subject: [PATCH 2/4] ci: extend HTTP qualification to Windows --- .../{http-macos.yml => http-platforms.yml} | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) rename .github/workflows/{http-macos.yml => http-platforms.yml} (74%) diff --git a/.github/workflows/http-macos.yml b/.github/workflows/http-platforms.yml similarity index 74% rename from .github/workflows/http-macos.yml rename to .github/workflows/http-platforms.yml index 928303f1..ee40c113 100644 --- a/.github/workflows/http-macos.yml +++ b/.github/workflows/http-platforms.yml @@ -1,11 +1,11 @@ -name: HTTP resilience macOS +name: HTTP resilience cross-OS on: workflow_dispatch: push: branches: [main] paths: - - .github/workflows/http-macos.yml + - .github/workflows/http-platforms.yml - pom.xml - teaql-core/** - teaql-runtime/** @@ -15,7 +15,7 @@ on: pull_request: branches: [main] paths: - - .github/workflows/http-macos.yml + - .github/workflows/http-platforms.yml - pom.xml - teaql-core/** - teaql-runtime/** @@ -28,9 +28,16 @@ permissions: jobs: http-resilience: - name: HTTP contract and example (macOS) - runs-on: macos-latest + name: HTTP contract and example (${{ matrix.os }}) + runs-on: ${{ matrix.os }} timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest] + defaults: + run: + shell: bash steps: - uses: actions/checkout@v4 - name: Set up JDK 21 From 1c808b32bc3c9298491be29f02675957c872d3fd Mon Sep 17 00:00:00 2001 From: Philip Z Date: Sun, 18 Oct 2026 15:04:33 +0800 Subject: [PATCH 3/4] test: drain privacy probe POST before fixture response --- .../test/java/io/teaql/tools/http/HttpResilienceTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/teaql-tool-http/src/test/java/io/teaql/tools/http/HttpResilienceTest.java b/teaql-tool-http/src/test/java/io/teaql/tools/http/HttpResilienceTest.java index 6c66e1ac..1b0a9d91 100644 --- a/teaql-tool-http/src/test/java/io/teaql/tools/http/HttpResilienceTest.java +++ b/teaql-tool-http/src/test/java/io/teaql/tools/http/HttpResilienceTest.java @@ -668,7 +668,9 @@ private void handle(Socket socket) { if (line.toLowerCase(java.util.Locale.ROOT).startsWith("content-length:")) contentLength = Integer.parseInt(line.substring(line.indexOf(':') + 1).trim()); } - if (target.contains("/retry-post")) { + // Drain the request before replying. Closing a socket with unread POST bytes + // can reset an otherwise valid response on Windows TCP stacks. + if (target.contains("/retry-post") || target.contains("/private-response")) { char[] body = new char[contentLength]; int offset = 0; while (offset < body.length) { @@ -676,7 +678,7 @@ private void handle(Socket socket) { if (count < 0) return; offset += count; } - retryBodies.add(new String(body)); + if (target.contains("/retry-post")) retryBodies.add(new String(body)); } if (target.contains("/close")) return; if (target.endsWith("/slow")) Thread.sleep(300); From 03bbe02a04711c94faa52233c7cab0da99d101ad Mon Sep 17 00:00:00 2001 From: Philip Z Date: Sun, 18 Oct 2026 15:31:22 +0800 Subject: [PATCH 4/4] ci: qualify HTTP on pinned macOS and Windows runners --- .github/workflows/http-platforms.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/http-platforms.yml b/.github/workflows/http-platforms.yml index ee40c113..8513cf93 100644 --- a/.github/workflows/http-platforms.yml +++ b/.github/workflows/http-platforms.yml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, windows-latest] + os: [macos-26, macos-26-intel, windows-2025] defaults: run: shell: bash