惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Vercel News
Vercel News
F
Fortinet All Blogs
月光博客
月光博客
G
Google Developers Blog
博客园 - Franky
GbyAI
GbyAI
The Cloudflare Blog
I
InfoQ
雷峰网
雷峰网
WordPress大学
WordPress大学
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
T
The Blog of Author Tim Ferriss
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
小众软件
小众软件
腾讯CDC
B
Blog
量子位
V
V2EX
S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: catch transitive gateway cold imports · openclaw/op...
steipete · 2026-04-28 · via Recent Commits to openclaw:main

@@ -58,11 +58,9 @@ export function listStaticImportSpecifiers(source) {

5858

return [...source.matchAll(STATIC_IMPORT_RE)].map((match) => match.groups?.specifier ?? "");

5959

}

606061-

export function collectCliBootstrapExternalImportErrors(params = {}) {

62-

const rootDir = params.rootDir ?? process.cwd();

63-

const entrypoints = params.entrypoints ?? DEFAULT_ENTRYPOINTS;

64-

const fsImpl = params.fs ?? fs;

65-

const queue = entrypoints.map((entrypoint) => path.resolve(rootDir, entrypoint));

61+

function walkStaticImportGraph(params) {

62+

const { fsImpl, rootDir } = params;

63+

const queue = params.roots.map((entrypoint) => path.resolve(rootDir, entrypoint));

6664

const visited = new Set();

6765

const errors = [];

6866

@@ -82,18 +80,12 @@ export function collectCliBootstrapExternalImportErrors(params = {}) {

8280

);

8381

continue;

8482

}

85-8683

for (const specifier of listStaticImportSpecifiers(source)) {

8784

if (!specifier || isBuiltinSpecifier(specifier)) {

8885

continue;

8986

}

9087

if (!isRelativeSpecifier(specifier)) {

91-

errors.push(

92-

`CLI bootstrap static graph imports external package "${specifier}" from ${path.relative(

93-

rootDir,

94-

filePath,

95-

)}.`,

96-

);

88+

params.onExternalSpecifier?.({ filePath, specifier, errors });

9789

continue;

9890

}

9991

const resolved = resolveRelativeImport(filePath, specifier, fsImpl);

@@ -106,12 +98,34 @@ export function collectCliBootstrapExternalImportErrors(params = {}) {

10698

);

10799

continue;

108100

}

101+

params.onRelativeSpecifier?.({ filePath, resolved, specifier, errors });

109102

if (!visited.has(resolved)) {

110103

queue.push(resolved);

111104

}

112105

}

113106

}

114107108+

return errors;

109+

}

110+111+

export function collectCliBootstrapExternalImportErrors(params = {}) {

112+

const rootDir = params.rootDir ?? process.cwd();

113+

const entrypoints = params.entrypoints ?? DEFAULT_ENTRYPOINTS;

114+

const fsImpl = params.fs ?? fs;

115+

const errors = walkStaticImportGraph({

116+

fsImpl,

117+

rootDir,

118+

roots: entrypoints,

119+

onExternalSpecifier: ({ filePath, specifier, errors: graphErrors }) => {

120+

graphErrors.push(

121+

`CLI bootstrap static graph imports external package "${specifier}" from ${path.relative(

122+

rootDir,

123+

filePath,

124+

)}.`,

125+

);

126+

},

127+

});

128+115129

return errors.toSorted((left, right) => left.localeCompare(right));

116130

}

117131

@@ -176,15 +190,32 @@ export function collectGatewayRunChunkBudgetErrors(params = {}) {

176190

);

177191

}

178192179-

for (const specifier of listStaticImportSpecifiers(source)) {

180-

for (const forbidden of GATEWAY_RUN_FORBIDDEN_STATIC_IMPORTS) {

181-

if (specifier.includes(forbidden)) {

182-

errors.push(

183-

`Gateway run chunk ${relativePath} statically imports cold path "${specifier}".`,

193+

errors.push(

194+

...walkStaticImportGraph({

195+

fsImpl,

196+

rootDir,

197+

roots: [filePath],

198+

onRelativeSpecifier: ({

199+

filePath: importerPath,

200+

resolved,

201+

specifier,

202+

errors: graphErrors,

203+

}) => {

204+

const resolvedRelativePath = path.relative(rootDir, resolved) || resolved;

205+

const coldPath = [specifier, resolvedRelativePath].find((candidate) =>

206+

GATEWAY_RUN_FORBIDDEN_STATIC_IMPORTS.some((forbidden) => candidate.includes(forbidden)),

184207

);

185-

}

186-

}

187-

}

208+

if (!coldPath) {

209+

return;

210+

}

211+

graphErrors.push(

212+

`Gateway run chunk ${relativePath} static graph imports cold path "${coldPath}" from ${

213+

path.relative(rootDir, importerPath) || importerPath

214+

}.`,

215+

);

216+

},

217+

}),

218+

);

188219

}

189220190221

return errors.toSorted((left, right) => left.localeCompare(right));