From 65fe2b7e911f00a58295a96f932e997ee9a1fbd6 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 30 May 2026 14:48:08 +0100 Subject: [PATCH] ci: tolerate release branches without llm core package --- .github/workflows/ci.yml | 16 ++++++++++++---- src/agents/run-wait.test.ts | 28 +++++++++++++++++----------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d56618055d..c6dcf200689 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1420,10 +1420,12 @@ jobs: find src \ -type f \( -name '*.ts' -o -name '*.tsx' -o -name '*.mts' -o -name '*.cts' -o -name '*.js' -o -name '*.mjs' -o -name '*.json' \) \ -exec touch -t 200001010000 {} + - find packages/llm-core/src \ - -type f \( -name '*.ts' -o -name '*.tsx' -o -name '*.mts' -o -name '*.cts' -o -name '*.js' -o -name '*.mjs' -o -name '*.json' \) \ - -exec touch -t 200001010000 {} + - touch -t 200001010000 \ + if [ -d packages/llm-core/src ]; then + find packages/llm-core/src \ + -type f \( -name '*.ts' -o -name '*.tsx' -o -name '*.mts' -o -name '*.cts' -o -name '*.js' -o -name '*.mjs' -o -name '*.json' \) \ + -exec touch -t 200001010000 {} + + fi + cache_inputs=( tsconfig.json \ tsconfig.plugin-sdk.dts.json \ packages/plugin-sdk/tsconfig.json \ @@ -1435,6 +1437,12 @@ jobs: scripts/lib/plugin-sdk-entries.mjs \ package.json \ pnpm-lock.yaml + ) + for cache_input in "${cache_inputs[@]}"; do + if [ -e "$cache_input" ]; then + touch -t 200001010000 "$cache_input" + fi + done - name: Run additional check shard env: diff --git a/src/agents/run-wait.test.ts b/src/agents/run-wait.test.ts index 354e499545e..9b8ebf51fde 100644 --- a/src/agents/run-wait.test.ts +++ b/src/agents/run-wait.test.ts @@ -517,20 +517,26 @@ describe("waitForAgentRunsToDrain", () => { }); it("defaults non-finite drain timeouts before computing the deadline", async () => { + vi.useFakeTimers(); + vi.setSystemTime(new Date("2026-05-30T00:00:00Z")); callGatewayMock.mockResolvedValue({ status: "ok" }); let activeRunIds = ["run-1"]; - const result = await waitForAgentRunsToDrain({ - timeoutMs: Number.NaN, - getPendingRunIds: () => { - const current = activeRunIds; - activeRunIds = []; - return current; - }, - }); + try { + const result = await waitForAgentRunsToDrain({ + timeoutMs: Number.NaN, + getPendingRunIds: () => { + const current = activeRunIds; + activeRunIds = []; + return current; + }, + }); - expect(result.timedOut).toBe(false); - expect(Number.isFinite(result.deadlineAtMs)).toBe(true); - expectAgentWaitRequest(requireRequestAt(gatewayWaitRequests(), 0), "run-1", 1); + expect(result.timedOut).toBe(false); + expect(Number.isFinite(result.deadlineAtMs)).toBe(true); + expectAgentWaitRequest(requireRequestAt(gatewayWaitRequests(), 0), "run-1", 1); + } finally { + vi.useRealTimers(); + } }); });