mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-21 05:32:53 +00:00
fix(ci): isolate config doc baseline heap pressure
This commit is contained in:
@@ -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) => ({
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
4
test/fixtures/test-parallel.behavior.json
vendored
4
test/fixtures/test-parallel.behavior.json
vendored
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user