From 7a3296f932cf51bed1b359b2d272836915e93054 Mon Sep 17 00:00:00 2001 From: Jimisola Date: Sun, 22 Nov 2026 09:58:05 +0000 Subject: [PATCH 1/8] ci: use shared build and lint workflows Add smoke (Windows/macOS) and a single `ci` aggregator check. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a216500..a8bfabe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,18 +47,18 @@ on: jobs: # `permissions: {}` above grants the jobs nothing, and a called workflow may # not request more than its caller was granted -- asking for more is rejected - # before any job runs, with no check run produced to say so. Both callees - # declare `contents: read`, so both callers have to grant it. + # before any job runs, with no check run produced to say so. Every callee + # declares `contents: read`, so every caller has to grant it. lint: permissions: contents: read - uses: reqstool/.github/.github/workflows/typescript-lint.yml@6fc8d3e3d4c3fdf7a83cb7b7a274e4761486ca71 # 1.2.1 + uses: reqstool/.github/.github/workflows/typescript-lint.yml@ci/385-shared-python-build # SPIKE: pin to release SHA build: needs: lint permissions: contents: read - uses: reqstool/.github/.github/workflows/typescript-build.yml@6fc8d3e3d4c3fdf7a83cb7b7a274e4761486ca71 # 1.2.1 + uses: reqstool/.github/.github/workflows/typescript-build.yml@ci/385-shared-python-build # SPIKE: pin to release SHA with: use-xvfb: true ref: ${{ inputs.ref }} @@ -66,3 +66,25 @@ jobs: artifact-name: ${{ inputs.artifact-name || 'dist' }} dependency-version: ${{ inputs.reqstool_version || 'latest' }} dependency-install-command: ${{ inputs.reqstool_version != '' && 'pipx install reqstool=={version}' || 'pipx install reqstool' }} + + # The extension host tests need a downloaded VS Code; run them on the other + # operating systems too (no xvfb needed there). + smoke: + needs: build + permissions: + contents: read + uses: reqstool/.github/.github/workflows/typescript-smoke.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + with: + command: npm test + + # Single stable required check: survives job renames and matrix changes. + ci: + if: ${{ always() }} + needs: [lint, build, smoke] + runs-on: ubuntu-latest + steps: + - name: Fail unless every needed job succeeded + env: + NEEDS: ${{ toJSON(needs) }} + run: | + echo "$NEEDS" | python3 -c 'import json,sys; r={k:v["result"] for k,v in json.load(sys.stdin).items()}; print(r); sys.exit(0 if all(v=="success" for v in r.values()) else 1)' From faf4f508a489496e20be81fe5ad058a430b17333 Mon Sep 17 00:00:00 2001 From: Jimisola Date: Sun, 22 Nov 2026 10:02:25 +0000 Subject: [PATCH 2/8] fix: create the output channels as log channels (vscode-languageclient 11 types) Found by the new Windows/macOS smoke job. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- src/extension.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 710dc64..3f5d036 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -151,9 +151,15 @@ export async function activate(context: vscode.ExtensionContext) { options: { env: { ...process.env, PYTHONUNBUFFERED: "1" } }, }; - const outputChannel = vscode.window.createOutputChannel("reqstool"); - const traceOutputChannel = - vscode.window.createOutputChannel("reqstool Trace"); + const outputChannel = vscode.window.createOutputChannel("reqstool", { + log: true, + }); + const traceOutputChannel = vscode.window.createOutputChannel( + "reqstool Trace", + { + log: true, + }, + ); logServerInfo(outputChannel, activeVersion, activeSource, executable); From 4afa61c9d86cc1d3b326ed849e6b5f2420c7263e Mon Sep 17 00:00:00 2001 From: Jimisola Date: Mon, 23 Nov 2026 07:44:10 +0000 Subject: [PATCH 3/8] ci: pin shared workflows to the .github 1.3.0 SHA Pin to 193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 (# 1.3.0). The 1.3.0 tag is pending; Renovate resolves it once it exists. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a8bfabe..dd01d58 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,13 +52,13 @@ jobs: lint: permissions: contents: read - uses: reqstool/.github/.github/workflows/typescript-lint.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + uses: reqstool/.github/.github/workflows/typescript-lint.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 build: needs: lint permissions: contents: read - uses: reqstool/.github/.github/workflows/typescript-build.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + uses: reqstool/.github/.github/workflows/typescript-build.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 with: use-xvfb: true ref: ${{ inputs.ref }} @@ -73,7 +73,7 @@ jobs: needs: build permissions: contents: read - uses: reqstool/.github/.github/workflows/typescript-smoke.yml@ci/385-shared-python-build # SPIKE: pin to release SHA + uses: reqstool/.github/.github/workflows/typescript-smoke.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 with: command: npm test From 3e5df8b15bcc4859ab80b834521be3a90f568021 Mon Sep 17 00:00:00 2001 From: Jimisola Date: Mon, 23 Nov 2026 07:45:26 +0000 Subject: [PATCH 4/8] test: activate extension before checking registered commands Activation is driven by onStartupFinished, which fires after the tests start on macOS runners, so the command was not yet registered. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- src/test/extension.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/extension.test.ts b/src/test/extension.test.ts index fa2fe80..b668551 100644 --- a/src/test/extension.test.ts +++ b/src/test/extension.test.ts @@ -11,6 +11,8 @@ describe("Extension smoke tests", () => { }); it("reqstool.selectServerSource command is registered", async () => { + // Activation is driven by onStartupFinished, which can fire after the tests start on slow runners. + await vscode.extensions.getExtension("reqstool.reqstool")?.activate(); const commands = await vscode.commands.getCommands(true); assert.ok( commands.includes("reqstool.selectServerSource"), From c71531ef25566e55b591fdaf5ce0f0f6983c5613 Mon Sep 17 00:00:00 2001 From: Jimisola Date: Mon, 23 Nov 2026 07:50:41 +0000 Subject: [PATCH 5/8] ci: print failing tests from the junit report in the smoke job Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd01d58..9ec7a86 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,7 +75,8 @@ jobs: contents: read uses: reqstool/.github/.github/workflows/typescript-smoke.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 with: - command: npm test + # The junit reporter hides test names from the log, so print the failing ones. + command: npm test || { grep -E -B2 -A12 ' Date: Mon, 23 Nov 2026 07:54:28 +0000 Subject: [PATCH 6/8] test: wait for the activation-registered command instead of asserting at once The test hit mocha's 2s default timeout on macOS and Windows runners, where activation starts later and runs slower. Poll for the command with a longer timeout. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- src/test/extension.test.ts | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/test/extension.test.ts b/src/test/extension.test.ts index b668551..64e9e5f 100644 --- a/src/test/extension.test.ts +++ b/src/test/extension.test.ts @@ -10,14 +10,22 @@ describe("Extension smoke tests", () => { assert.ok(ext, "Extension reqstool.reqstool not found"); }); - it("reqstool.selectServerSource command is registered", async () => { - // Activation is driven by onStartupFinished, which can fire after the tests start on slow runners. - await vscode.extensions.getExtension("reqstool.reqstool")?.activate(); - const commands = await vscode.commands.getCommands(true); - assert.ok( - commands.includes("reqstool.selectServerSource"), - "reqstool.selectServerSource command not registered", - ); + it("reqstool.selectServerSource command is registered", async function () { + // Activation (onStartupFinished) registers the command early but can start after + // the tests do, and is slow on macOS/Windows runners, so poll instead of + // asserting immediately. Waiting for full activation would also wait for the server. + this.timeout(60000); + const deadline = Date.now() + 55000; + let registered = false; + while (!registered && Date.now() < deadline) { + registered = (await vscode.commands.getCommands(true)).includes( + "reqstool.selectServerSource", + ); + if (!registered) { + await new Promise((resolve) => setTimeout(resolve, 500)); + } + } + assert.ok(registered, "reqstool.selectServerSource command not registered"); }); }); From 72e8ca9697acf2f6b1c2cd224ba71476005d7d39 Mon Sep 17 00:00:00 2001 From: Jimisola Date: Mon, 23 Nov 2026 09:06:50 +0000 Subject: [PATCH 7/8] chore: drop explanatory comments The PR description and commits carry the rationale. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- .github/workflows/build.yml | 6 ------ src/test/extension.test.ts | 3 --- 2 files changed, 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ec7a86..41e2738 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,8 +47,6 @@ on: jobs: # `permissions: {}` above grants the jobs nothing, and a called workflow may # not request more than its caller was granted -- asking for more is rejected - # before any job runs, with no check run produced to say so. Every callee - # declares `contents: read`, so every caller has to grant it. lint: permissions: contents: read @@ -67,18 +65,14 @@ jobs: dependency-version: ${{ inputs.reqstool_version || 'latest' }} dependency-install-command: ${{ inputs.reqstool_version != '' && 'pipx install reqstool=={version}' || 'pipx install reqstool' }} - # The extension host tests need a downloaded VS Code; run them on the other - # operating systems too (no xvfb needed there). smoke: needs: build permissions: contents: read uses: reqstool/.github/.github/workflows/typescript-smoke.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 with: - # The junit reporter hides test names from the log, so print the failing ones. command: npm test || { grep -E -B2 -A12 ' { }); it("reqstool.selectServerSource command is registered", async function () { - // Activation (onStartupFinished) registers the command early but can start after - // the tests do, and is slow on macOS/Windows runners, so poll instead of - // asserting immediately. Waiting for full activation would also wait for the server. this.timeout(60000); const deadline = Date.now() + 55000; let registered = false; From 7cc34252d7cb91b5c784f00bb33bdbc9dcd96b40 Mon Sep 17 00:00:00 2001 From: Jimisola Date: Mon, 23 Nov 2026 09:21:16 +0000 Subject: [PATCH 8/8] ci: pin shared workflows to .github 1.2.2 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01Mt2FAXPoMhrbjtWKhBTwZM Signed-off-by: Jimisola --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41e2738..4d45c92 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,13 +50,13 @@ jobs: lint: permissions: contents: read - uses: reqstool/.github/.github/workflows/typescript-lint.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 + uses: reqstool/.github/.github/workflows/typescript-lint.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2 build: needs: lint permissions: contents: read - uses: reqstool/.github/.github/workflows/typescript-build.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 + uses: reqstool/.github/.github/workflows/typescript-build.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2 with: use-xvfb: true ref: ${{ inputs.ref }} @@ -69,7 +69,7 @@ jobs: needs: build permissions: contents: read - uses: reqstool/.github/.github/workflows/typescript-smoke.yml@193abb8e7ad36805d5fe7695f8fa5e0a4b6f8da7 # 1.3.0 + uses: reqstool/.github/.github/workflows/typescript-smoke.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2 with: command: npm test || { grep -E -B2 -A12 '