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

推荐订阅源

雷峰网
雷峰网
B
Blog
博客园_首页
云风的 BLOG
云风的 BLOG
S
SegmentFault 最新的问题
罗磊的独立博客
Jina AI
Jina AI
C
Check Point Blog
Martin Fowler
Martin Fowler
J
Java Code Geeks
博客园 - 司徒正美
美团技术团队
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
有赞技术团队
有赞技术团队
U
Unit 42
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
小众软件
小众软件

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
fix(e2e): reject loose runtime smoke limits · openclaw/op...
vincentkoc · 2026-05-29 · via Recent Commits to openclaw:main

@@ -95,6 +95,31 @@ function runRuntimeSmoke(root: string, args: string[]) {

9595

});

9696

}

979798+

async function importRuntimeSmokeWithEnv(env: Record<string, string | undefined>) {

99+

const previous = new Map<string, string | undefined>();

100+

for (const [key, value] of Object.entries(env)) {

101+

previous.set(key, process.env[key]);

102+

if (value === undefined) {

103+

delete process.env[key];

104+

} else {

105+

process.env[key] = value;

106+

}

107+

}

108+

try {

109+

return await import(

110+

`${pathToFileURL(runtimeSmokePath).href}?case=${Date.now()}-${Math.random()}`

111+

);

112+

} finally {

113+

for (const [key, value] of previous.entries()) {

114+

if (value === undefined) {

115+

delete process.env[key];

116+

} else {

117+

process.env[key] = value;

118+

}

119+

}

120+

}

121+

}

122+98123

async function listenOnLoopback(server: HttpServer | NetServer): Promise<number> {

99124

return new Promise((resolve, reject) => {

100125

const onError = (error: Error) => {

@@ -151,6 +176,17 @@ describe("bundled plugin install/uninstall probe", () => {

151176

expect(second).toEqual({ text: "fghij", truncatedChars: 5 });

152177

});

153178179+

it("rejects loose runtime output limit env values instead of parsing prefixes", async () => {

180+

const runtimeSmoke = await importRuntimeSmokeWithEnv({

181+

OPENCLAW_BUNDLED_PLUGIN_RUNTIME_OUTPUT_CHARS: "5chars",

182+

});

183+184+

expect(runtimeSmoke.appendBoundedOutput({ text: "", truncatedChars: 0 }, "abcdef")).toEqual({

185+

text: "abcdef",

186+

truncatedChars: 0,

187+

});

188+

});

189+154190

it("keeps runtime log tail reads bounded", async () => {

155191

const runtimeSmoke = await import(pathToFileURL(runtimeSmokePath).href);

156192

const root = makePackageRoot();

@@ -165,6 +201,21 @@ describe("bundled plugin install/uninstall probe", () => {

165201

expect(fullRead).not.toHaveBeenCalled();

166202

});

167203204+

it("rejects loose runtime log scan byte env values instead of parsing prefixes", async () => {

205+

const runtimeSmoke = await importRuntimeSmokeWithEnv({

206+

OPENCLAW_BUNDLED_PLUGIN_RUNTIME_LOG_SCAN_BYTES: "64bytes",

207+

});

208+

const root = makePackageRoot();

209+

const logPath = path.join(root, "gateway.log");

210+

fs.writeFileSync(logPath, `${"old log line\n".repeat(20)}[gateway] ready\n`, "utf8");

211+212+

const tail = runtimeSmoke.readFileTail(logPath);

213+214+

expect(Buffer.byteLength(tail)).toBeGreaterThan(64);

215+

expect(tail).toContain("old log line");

216+

expect(tail).toContain("[gateway] ready");

217+

});

218+168219

it("remembers runtime ready logs after they fall outside the tail", async () => {

169220

const runtimeSmoke = await import(pathToFileURL(runtimeSmokePath).href);

170221

const root = makePackageRoot();