From 907cb5a3f635730e2a67a0e5e941df8fc85cb593 Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza Date: Wed, 15 Jul 2026 10:22:24 -0300 Subject: [PATCH] fix(build): enforce bin/cli/utils/versionFastPath.mjs in the pack-artifact gate bin/omniroute.mjs now imports ./cli/utils/versionFastPath.mjs on its boot path (the --version fast-path). bin/cli/ is only an allowlist PREFIX, so the file vanishing from the npm tarball would never fail the unexpected-paths check -- only PACK_ARTIFACT_REQUIRED_PATHS makes its absence loud (#7065 class). Adds the required path and updates the hardcoded expectation in pack-artifact-policy.test.ts, matching the existing data-dir.mjs / storageKeyProvision.mjs entries. Fixes the red in tests/unit/pack-artifact-entrypoint-closures.test.ts, which derives the requirement from the entrypoint's own imports. --- scripts/build/pack-artifact-policy.ts | 1 + tests/unit/pack-artifact-policy.test.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/build/pack-artifact-policy.ts b/scripts/build/pack-artifact-policy.ts index 9adde22c1f..50bd94d9e2 100644 --- a/scripts/build/pack-artifact-policy.ts +++ b/scripts/build/pack-artifact-policy.ts @@ -166,6 +166,7 @@ export const PACK_ARTIFACT_REQUIRED_PATHS: string[] = [ // tests/unit/pack-artifact-entrypoint-closures.test.ts). "bin/cli/data-dir.mjs", "bin/cli/utils/storageKeyProvision.mjs", + "bin/cli/utils/versionFastPath.mjs", "bin/mcp-server.mjs", "bin/nodeRuntimeSupport.mjs", "bin/omniroute.mjs", diff --git a/tests/unit/pack-artifact-policy.test.ts b/tests/unit/pack-artifact-policy.test.ts index ae24d23dea..670dfb18f3 100644 --- a/tests/unit/pack-artifact-policy.test.ts +++ b/tests/unit/pack-artifact-policy.test.ts @@ -108,6 +108,7 @@ test("findMissingArtifactPaths flags missing root runtime files in the tarball", "bin/cli/data-dir.mjs", "bin/cli/program.mjs", "bin/cli/utils/storageKeyProvision.mjs", + "bin/cli/utils/versionFastPath.mjs", "bin/mcp-server.mjs", "bin/nodeRuntimeSupport.mjs", "dist/head-response-guard.cjs",