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.
This commit is contained in:
YeonGyu-Kim
2026-04-09 14:19:17 +09:00
parent d17b78afe6
commit 7a1f121fdd
+8 -1
View File
@@ -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