fix(ci): recalibrate status startup memory budget (#109887)

This commit is contained in:
Peter Steinberger
2026-07-17 11:09:01 +01:00
committed by GitHub
parent 93e9e2fe93
commit 5a0bb2a146
2 changed files with 7 additions and 6 deletions
+3 -3
View File
@@ -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,
};
}
@@ -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`,
);
});