perf: improve gateway startup diagnostics

This commit is contained in:
Peter Steinberger
2026-04-28 01:47:52 +01:00
parent 13d3777cf3
commit 75e126ef6a
7 changed files with 144 additions and 44 deletions

View File

@@ -1,5 +1,6 @@
import { describe, expect, it } from "vitest";
import {
hasGatewayReadyLog,
isIgnoredDistRuntimeWatchPath,
shouldRefreshBuildStampForRestoredArtifacts,
} from "../../scripts/check-gateway-watch-regression.mjs";
@@ -23,6 +24,12 @@ describe("check-gateway-watch-regression", () => {
).toBe(false);
});
it("recognizes current and legacy gateway ready logs", () => {
expect(hasGatewayReadyLog("[gateway] http server listening (0 plugins, 0.8s)")).toBe(true);
expect(hasGatewayReadyLog("[gateway] ready (0 plugins, 0.8s)")).toBe(true);
expect(hasGatewayReadyLog("[gateway] starting HTTP server...")).toBe(false);
});
it("refreshes restored build stamps only for skip-build config mtime drift", () => {
expect(
shouldRefreshBuildStampForRestoredArtifacts({