diff --git a/docs/ci.md b/docs/ci.md index 731e47d2bfc..ced0ce22feb 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -52,7 +52,7 @@ Local changed-lane logic lives in `scripts/changed-lanes.mjs` and is executed by On pushes, the `checks` matrix adds the push-only `compat-node22` lane. On pull requests, that lane is skipped and the matrix stays focused on the normal test/channel lanes. -The slowest Node test families are split or balanced so each job stays small: channel contracts split registry and core coverage into eight weighted shards each, auto-reply reply tests split by prefix group, and agentic gateway/plugin configs are spread across the existing source-only agentic Node jobs instead of waiting on built artifacts. `check-additional` keeps package-boundary compile/canary work together and separates it from runtime topology gateway/architecture work. +The slowest Node test families are split or balanced so each job stays small: channel contracts split registry and core coverage into eight weighted shards each, auto-reply reply tests split by prefix group, and agentic gateway/plugin configs are spread across the existing source-only agentic Node jobs instead of waiting on built artifacts. `check-additional` keeps package-boundary compile/canary work together and separates it from runtime topology gateway/architecture work; the gateway watch regression uses the minimal `gatewayWatch` build profile instead of rebuilding the full CI artifact sidecar set. GitHub may mark superseded jobs as `cancelled` when a newer push lands on the same PR or `main` ref. Treat that as CI noise unless the newest run for the same ref is also failing. Aggregate shard checks use `!cancelled() && always()` so they still report normal shard failures but do not queue after the whole workflow has already been superseded. The CI concurrency key is versioned (`CI-v2-*`) so a GitHub-side zombie in an old queue group cannot indefinitely block newer main runs. diff --git a/scripts/build-all.mjs b/scripts/build-all.mjs index 602cf99419a..50f436dec57 100644 --- a/scripts/build-all.mjs +++ b/scripts/build-all.mjs @@ -116,6 +116,7 @@ export const BUILD_ALL_PROFILES = { "write-cli-startup-metadata", "write-cli-compat", ], + gatewayWatch: ["tsdown", "runtime-postbuild", "build-stamp"], }; export function resolveBuildAllSteps(profile = "full") { diff --git a/scripts/check-gateway-watch-regression.mjs b/scripts/check-gateway-watch-regression.mjs index 6d17469826b..04856fb6777 100644 --- a/scripts/check-gateway-watch-regression.mjs +++ b/scripts/check-gateway-watch-regression.mjs @@ -583,9 +583,9 @@ async function main() { const options = parseArgs(process.argv.slice(2)); ensureDir(options.outputDir); if (!options.skipBuild) { - runCheckedCommand("pnpm", ["build:ci-artifacts"]); + runCheckedCommand("node", ["scripts/build-all.mjs", "gatewayWatch"]); // The watch harness must start from a completed dist/runtime baseline. - // Refresh the build stamp after the CI artifact build finishes so run-node + // Refresh the build stamp after the gateway build finishes so run-node // does not spuriously rebuild inside the bounded watch window. writeBuildStamp({ cwd: process.cwd() }); } diff --git a/test/scripts/build-all.test.ts b/test/scripts/build-all.test.ts index 27a2c1b9553..4e2d50dacfa 100644 --- a/test/scripts/build-all.test.ts +++ b/test/scripts/build-all.test.ts @@ -143,6 +143,14 @@ describe("resolveBuildAllSteps", () => { ]); }); + it("uses a minimal built runtime profile for gateway watch regression", () => { + expect(resolveBuildAllSteps("gatewayWatch").map((step) => step.label)).toEqual([ + "tsdown", + "runtime-postbuild", + "build-stamp", + ]); + }); + it("does not cache plugin-sdk entry shims over compiled JS", () => { const step = BUILD_ALL_STEPS.find((entry) => entry.label === "write-plugin-sdk-entry-dts"); expect(step).toBeTruthy();