diff --git a/.github/actions/bazel-cache/action.yml b/.github/actions/bazel-cache/action.yml index 6247e2c9f..1fa3eff6f 100644 --- a/.github/actions/bazel-cache/action.yml +++ b/.github/actions/bazel-cache/action.yml @@ -137,10 +137,14 @@ runs: # generations wrote would otherwise ride along forever; drop # anything untouched for 14 days (tar preserves mtimes across # the actions/cache round trip, so age survives restores). - # Covers the repo download/contents cache too — bazel's own - # contents-cache GC only runs on idle servers, which short-lived - # CI invocations never have. - find "$HOME/.cache/omp-bazel-disk" "$HOME/.cache/omp-bazel-repo" -type f -mtime +14 -delete 2>/dev/null || true + # DISK CACHE ONLY: never prune omp-bazel-repo file-by-file — + # extracted repo contents keep upstream-archive mtimes (often + # months old), so an mtime sweep guts contents-cache entries + # while bazel still trusts their recorded_inputs, materializing + # hollow external repos ("BUILD file not found" — v17.2.0 + # release run 30519253683). The repo cache is bounded by the + # GitHub cache TTL/LRU at the archive level instead. + find "$HOME/.cache/omp-bazel-disk" -type f -mtime +14 -delete 2>/dev/null || true { echo "common --config=ci" echo "common --disk_cache=$HOME/.cache/omp-bazel-disk" diff --git a/packages/utils/test/logger-contract.test.ts b/packages/utils/test/logger-contract.test.ts index e714d1f5b..f6f0a7b93 100644 --- a/packages/utils/test/logger-contract.test.ts +++ b/packages/utils/test/logger-contract.test.ts @@ -248,22 +248,30 @@ describe("central logger transport lifecycle", () => { expect(payload).toEqual({ reconfigureThrew: true, sinkCount: 1, sinkSameContext: true }); }); - test("preserves burst order and drains on close and natural child exit", async () => { - for (const scenario of ["burst-close", "burst-natural"] as const) { - const result = await runScenario(scenario); - expect(result.stdout).toBe(""); - expect(result.stderr).toBe(""); - const text = (await readSingleLog(result.primaryDir)).text; - expect(text.endsWith(os.EOL)).toBe(true); - const lines = text.split(os.EOL); - expect(lines.pop()).toBe(""); - expect(lines).toHaveLength(1_000); - for (const [index, line] of lines.entries()) { - const entry = JSON.parse(line) as { message: string; index: number }; - expect(entry).toMatchObject({ message: scenario, index }); + // Two sequential probe children writing 1000 records each measure ~4.4 s + // on an unloaded runner — bun's 5 s default test timeout SIGTERMed the + // probe (exit 143) whenever CI runners shared cores. The contract is + // order + drain, not latency; give it an explicit budget. + test( + "preserves burst order and drains on close and natural child exit", + async () => { + for (const scenario of ["burst-close", "burst-natural"] as const) { + const result = await runScenario(scenario); + expect(result.stdout).toBe(""); + expect(result.stderr).toBe(""); + const text = (await readSingleLog(result.primaryDir)).text; + expect(text.endsWith(os.EOL)).toBe(true); + const lines = text.split(os.EOL); + expect(lines.pop()).toBe(""); + expect(lines).toHaveLength(1_000); + for (const [index, line] of lines.entries()) { + const entry = JSON.parse(line) as { message: string; index: number }; + expect(entry).toMatchObject({ message: scenario, index }); + } } - } - }); + }, + 30_000, + ); test("runs local console output before sinks and isolates throwing or disposed sinks", async () => { const result = await runScenario("sink-order");