mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 02:06:43 +00:00
fix(ci): recalibrate status startup memory budget (#109887)
This commit is contained in:
@@ -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`,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user