diff --git a/scripts/check-cli-startup-memory.mjs b/scripts/check-cli-startup-memory.mjs index bc88ce97c23c..8b547ca7aafd 100644 --- a/scripts/check-cli-startup-memory.mjs +++ b/scripts/check-cli-startup-memory.mjs @@ -99,9 +99,9 @@ function resolveDefaultLimitsMb(platform = process.platform) { // Plugin discovery is heavier than help, but must stay below the doctor/channel // runtime graph that an empty metadata-only invocation must not import. pluginsList: platform === "darwin" ? 500 : 400, - // Node 24 status startup sits near 400 MB; retain regression signal without - // failing on sub-megabyte runner RSS variance. - statusJson: 425, + // Node 24 status startup reaches ~430 MB on current Linux runner images; + // retain useful regression headroom without failing on allocator variance. + statusJson: 450, gatewayStatus: 500, }; } diff --git a/test/scripts/check-cli-startup-memory.test.ts b/test/scripts/check-cli-startup-memory.test.ts index 87adc9ce228f..258fef1bb290 100644 --- a/test/scripts/check-cli-startup-memory.test.ts +++ b/test/scripts/check-cli-startup-memory.test.ts @@ -92,7 +92,7 @@ describe("check-cli-startup-memory", () => { }); it("keeps status startup headroom above Linux runner RSS variance", () => { - expect(testing.resolveDefaultLimitsMb("linux").statusJson).toBe(425); + expect(testing.resolveDefaultLimitsMb("linux").statusJson).toBe(450); }); it("uses the median of three cold-start RSS samples", () => { @@ -115,10 +115,11 @@ describe("check-cli-startup-memory", () => { return; } - const helpSamplesMb = [120, 110, 80]; + const helpLimitMb = testing.resolveDefaultLimitsMb(process.platform).help; + const helpSamplesMb = [helpLimitMb + 20, helpLimitMb + 10, 80]; expect(() => runStartupMemoryCheckWithHelpSamples(helpSamplesMb)).toThrow( - "--help median max RSS 110.0 MB exceeded 100 MB", + `--help median max RSS ${(helpLimitMb + 10).toFixed(1)} MB exceeded ${helpLimitMb} MB`, ); });