From 3f3f46d3ba5b3a6262ca38fdb2fd81228a4d3b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 11 Nov 2026 11:37:24 +0100 Subject: [PATCH 1/2] ci: right-size coverage and run numeric ranges independently --- .github/workflows/ci.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7cf158fa8..809d22b3ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -265,10 +265,6 @@ jobs: uses: ./.github/actions/run-gate with: { gate: daemon-wire-compat } - - name: Check numeric ranges - uses: ./.github/actions/run-gate - with: { gate: freerange } - # Shares fallow's `.fallow` cache directory with the audit, so it starts once the audit ends. - name: Wait for the Fallow audit wait: fallow-audit @@ -277,11 +273,26 @@ jobs: uses: ./.github/actions/run-gate with: { gate: production-exports } + numeric-ranges: + name: Numeric Ranges + runs-on: blacksmith-4vcpu-ubuntu-2404 + timeout-minutes: 20 + steps: + - name: Checkout + uses: useblacksmith/checkout@2b9fe87d796feea153b455ec2f3125b471a7b0e7 # v1.8.2 + + - name: Setup toolchain + uses: ./.github/actions/setup-node-pnpm + + - name: Check numeric ranges + uses: ./.github/actions/run-gate + with: { gate: freerange } + # Runs the full unit + provider-integration suites under coverage with # thresholds, so a separate unit-tests job would rerun the same tests. coverage: name: Coverage - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 30 steps: - name: Checkout From 80dc3c3dde9ca96deec2337ec3435430dc912aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 11 Nov 2026 12:14:46 +0100 Subject: [PATCH 2/2] fix(daemon): confirm exit after reading process identity --- packages/daemon-contracts/src/daemon-process.ts | 8 +++++--- src/__tests__/daemon-exit-wait.test.ts | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/packages/daemon-contracts/src/daemon-process.ts b/packages/daemon-contracts/src/daemon-process.ts index edcc2b5be3..c02d9a4856 100644 --- a/packages/daemon-contracts/src/daemon-process.ts +++ b/packages/daemon-contracts/src/daemon-process.ts @@ -80,9 +80,11 @@ export async function waitForDaemonExit( const hasExited = (): boolean => { if (!isProcessAlive(identity.pid)) return true; const observed = readHostProcessIdentityObservations([identity.pid]).get(identity.pid); - return Boolean( - observed?.state.startsWith('Z') || - (observed?.startTime && observed.startTime !== identity.startTime), + return ( + Boolean( + observed?.state.startsWith('Z') || + (observed?.startTime && observed.startTime !== identity.startTime), + ) || !isProcessAlive(identity.pid) ); }; let exited = hasExited(); diff --git a/src/__tests__/daemon-exit-wait.test.ts b/src/__tests__/daemon-exit-wait.test.ts index 68cd3ebc0d..8eff6188f7 100644 --- a/src/__tests__/daemon-exit-wait.test.ts +++ b/src/__tests__/daemon-exit-wait.test.ts @@ -149,6 +149,22 @@ test('an unreadable process start time does not prove exit', async () => { }); }); +test.each([ + ['missing', undefined], + ['same-lifetime', OURS], +] as const)( + 'a daemon reaped during a %s snapshot proves exit without a polling budget', + async (_label, startTime) => { + vi.spyOn(state.starts, 'get').mockImplementationOnce(() => { + state.alive.set(PID, false); + return startTime; + }); + expect(await waitForDaemonExit({ pid: PID, startTime: OURS }, { timeoutMs: 0 })).toMatchObject({ + exited: true, + }); + }, +); + test('a recycled pid proves the original exit even when its successor is a zombie', async () => { state.starts.set(PID, RECYCLED); state.states.set(PID, 'Z');