From 7a1f121fdd1d27604c6f99a60f616f72593139fc Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 9 Apr 2026 14:19:17 +0900 Subject: [PATCH] fix(ci): isolate model-resolution-pipeline test to prevent mock contamination The resolveModelPipeline test was consistently failing on CI (resolveModelPipeline > does not return unused explicit user config metadata in override result) while passing locally. Root cause is the same mock.module contamination pattern as #3243: when bun runs all test files in a single process, mock.module calls from other files (e.g. model-resolver.test.ts) leak into this file's module scope. Add mock.module('./logger', ...) so run-ci-tests.ts auto-detects the file and runs it in its own isolated bun process. This unblocks the v3.16.1 publish workflow which hit this flake twice. --- src/shared/model-resolution-pipeline.test.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/shared/model-resolution-pipeline.test.ts b/src/shared/model-resolution-pipeline.test.ts index a08ecc85c..26992da09 100644 --- a/src/shared/model-resolution-pipeline.test.ts +++ b/src/shared/model-resolution-pipeline.test.ts @@ -1,6 +1,13 @@ -import { describe, expect, test } from "bun:test" +import { describe, expect, mock, test } from "bun:test" import { resolveModelPipeline } from "./model-resolution-pipeline" +// Force test-runner isolation: files that import mock.module are auto-detected +// by run-ci-tests.ts and executed in their own bun process so they cannot be +// contaminated by (or contaminate) mock.module calls in other test files. +mock.module("./logger", () => ({ + log: () => {}, +})) + describe("resolveModelPipeline", () => { test("does not return unused explicit user config metadata in override result", () => { // given