From ccfc031beab57eec96f18a0014260e07edeb3c11 Mon Sep 17 00:00:00 2001 From: euphyra-dev <279452614+euphyra-dev@users.noreply.github.com> Date: Fri, 27 Nov 2026 10:24:53 +0100 Subject: [PATCH 1/3] ci: type check and offline tests of the hosted MCP Worker (workers/mcp) No workflow ran workers/mcp, so a green CI said nothing about the Worker. The new job installs from the lockfile without install scripts, then runs tsc --noEmit and the offline tests. No secret, no wrangler, no Docker; same pinned actions as the other jobs. --- .github/workflows/ci.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e53146..23bf2ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -# Offline tests of the three packages and of the publication tooling. No secret, no network call to the FacturX API. +# Offline tests of the three packages, of the hosted MCP Worker and of the publication tooling. No secret, no network call to the FacturX API. on: push: branches: [main] @@ -33,6 +33,28 @@ jobs: working-directory: node run: npm test + mcp-worker: + # The hosted MCP Worker: type check and offline tests. No secret, no wrangler, no Docker. + name: "workers/mcp (Node 24)" + runs-on: ubuntu-24.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: "24" + - name: Install (lockfile, no install scripts) + working-directory: workers/mcp + run: npm ci --ignore-scripts + - name: Type check + working-directory: workers/mcp + run: npm run check + - name: Offline tests + working-directory: workers/mcp + run: npm test + python: name: "facturx-api (Python ${{ matrix.python }})" runs-on: ubuntu-24.04 From 9f575f8932fc49ef7169fdcfff61a43aadad833e Mon Sep 17 00:00:00 2001 From: euphyra-dev <279452614+euphyra-dev@users.noreply.github.com> Date: Fri, 27 Nov 2026 10:24:53 +0100 Subject: [PATCH 2/3] ci witness: deliberately break one Worker test (reverted in the next commit) Shows that the new workers/mcp job turns red when a Worker test fails. --- workers/mcp/test/worker.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workers/mcp/test/worker.test.ts b/workers/mcp/test/worker.test.ts index 847bbc7..a206033 100644 --- a/workers/mcp/test/worker.test.ts +++ b/workers/mcp/test/worker.test.ts @@ -25,7 +25,7 @@ test("redirects are Claude, ChatGPT or a loopback callback", () => { assert.equal(redirectAllowed("https://chatgpt.com/connector/oauth/abc_123"), true); assert.equal(redirectAllowed("https://chatgpt.com/connector/oauth/abc/extra"), false); assert.equal(redirectAllowed("http://localhost:8787/callback"), true); // loopback: see the loopback tests - assert.equal(redirectAllowed("https://evil.example/callback"), false); + assert.equal(redirectAllowed("https://evil.example/callback"), true); // CI WITNESS: deliberately wrong, reverted next commit assert.equal(redirectAllowed("https://claude.ai/api/mcp/auth_callback?next=/"), false); }); From 9a38a26eed3b6d485c84c668f402ea9b791b3186 Mon Sep 17 00:00:00 2001 From: euphyra-dev <279452614+euphyra-dev@users.noreply.github.com> Date: Fri, 27 Nov 2026 10:24:53 +0100 Subject: [PATCH 3/3] Revert the CI witness: restore the Worker test The previous commit broke one test on purpose; the workers/mcp job turned red (run 45858241308). --- workers/mcp/test/worker.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workers/mcp/test/worker.test.ts b/workers/mcp/test/worker.test.ts index a206033..847bbc7 100644 --- a/workers/mcp/test/worker.test.ts +++ b/workers/mcp/test/worker.test.ts @@ -25,7 +25,7 @@ test("redirects are Claude, ChatGPT or a loopback callback", () => { assert.equal(redirectAllowed("https://chatgpt.com/connector/oauth/abc_123"), true); assert.equal(redirectAllowed("https://chatgpt.com/connector/oauth/abc/extra"), false); assert.equal(redirectAllowed("http://localhost:8787/callback"), true); // loopback: see the loopback tests - assert.equal(redirectAllowed("https://evil.example/callback"), true); // CI WITNESS: deliberately wrong, reverted next commit + assert.equal(redirectAllowed("https://evil.example/callback"), false); assert.equal(redirectAllowed("https://claude.ai/api/mcp/auth_callback?next=/"), false); });