fix(ci): isolate config doc baseline heap pressure

This commit is contained in:
Vincent Koc
2026-03-19 13:56:40 -07:00
parent f1be7d4cb3
commit b7c39aa4d4
3 changed files with 16 additions and 5 deletions

View File

@@ -497,6 +497,7 @@ async function loadBundledConfigSchemaResponse(): Promise<ConfigSchemaResponse>
logConfigDocBaselineDebug(`imported ${channelPlugins.length} bundled channel plugins`);
return buildConfigSchema({
cache: false,
plugins: manifestRegistry.plugins
.filter((plugin) => plugin.origin === "bundled")
.map((plugin) => ({

View File

@@ -450,6 +450,7 @@ function buildBaseConfigSchema(): ConfigSchemaResponse {
export function buildConfigSchema(params?: {
plugins?: PluginUiMetadata[];
channels?: ChannelUiMetadata[];
cache?: boolean;
}): ConfigSchemaResponse {
const base = buildBaseConfigSchema();
const plugins = params?.plugins ?? [];
@@ -457,10 +458,13 @@ export function buildConfigSchema(params?: {
if (plugins.length === 0 && channels.length === 0) {
return base;
}
const cacheKey = buildMergedSchemaCacheKey({ plugins, channels });
const cached = mergedSchemaCache.get(cacheKey);
if (cached) {
return cached;
const useCache = params?.cache !== false;
const cacheKey = useCache ? buildMergedSchemaCacheKey({ plugins, channels }) : null;
if (cacheKey) {
const cached = mergedSchemaCache.get(cacheKey);
if (cached) {
return cached;
}
}
const mergedWithoutSensitiveHints = applyHeartbeatTargetHints(
applyChannelHints(applyPluginHints(base.uiHints, plugins), channels),
@@ -480,7 +484,9 @@ export function buildConfigSchema(params?: {
schema: mergedSchema,
uiHints: mergedHints,
};
setMergedSchemaCache(cacheKey, merged);
if (cacheKey) {
setMergedSchemaCache(cacheKey, merged);
}
return merged;
}

View File

@@ -23,6 +23,10 @@
"file": "src/cli/command-secret-gateway.test.ts",
"reason": "Clean in isolation, but can hang after sharing the broad lane."
},
{
"file": "src/config/doc-baseline.test.ts",
"reason": "Builds the full bundled config schema graph and is safer outside the shared unit-fast heap."
},
{
"file": "src/memory/manager.get-concurrency.test.ts",
"reason": "Memory manager cache concurrency coverage can spike shared unit-fast heap on Linux Node 24."