

















@@ -18,6 +18,7 @@ import {
1818renderRemoteSetup,
1919renderSelectDesktopChat,
2020runCommand,
21+stageFullSessionArtifacts,
2122startLocalSut,
2223waitForLog,
2324} from "../../scripts/e2e/telegram-user-crabbox-proof.ts";
@@ -210,6 +211,39 @@ describe("telegram user Crabbox proof log polling", () => {
210211expect(renderSelectDesktopChat({ chatTitle: payload })).toContain(`chat_title='${payload}'`);
211212});
212213214+it("stages full publish artifacts without session control files", () => {
215+const outputDir = makeTempDir();
216+const publishDir = path.join(outputDir, "publish-full-artifacts");
217+fs.mkdirSync(publishDir);
218+fs.writeFileSync(path.join(publishDir, "stale.txt"), "stale");
219+fs.mkdirSync(path.join(outputDir, "publish-gif-only"));
220+fs.writeFileSync(path.join(outputDir, "session.json"), '{"sshKey":"/private/tmp/openclaw/key"}');
221+fs.writeFileSync(path.join(outputDir, "lease.json"), '{"token":"secret"}');
222+fs.writeFileSync(path.join(outputDir, "status.json"), '{"ok":true}');
223+fs.writeFileSync(path.join(outputDir, "probe.json"), '{"ok":true}');
224+fs.writeFileSync(path.join(outputDir, "telegram-user-crabbox-session-summary.json"), "{}");
225+fs.writeFileSync(path.join(outputDir, "telegram-user-crabbox-proof.md"), "report");
226+fs.writeFileSync(path.join(outputDir, "telegram-desktop.log"), "log");
227+fs.writeFileSync(path.join(outputDir, "telegram-user-crabbox-session-motion.gif"), "gif");
228+fs.writeFileSync(path.join(outputDir, "telegram-user-crabbox-session.mp4"), "video");
229+230+const stagedDir = stageFullSessionArtifacts(outputDir);
231+232+expect(stagedDir).toBe(publishDir);
233+expect(fs.readdirSync(stagedDir).sort()).toEqual([
234+"probe.json",
235+"status.json",
236+"telegram-desktop.log",
237+"telegram-user-crabbox-proof.md",
238+"telegram-user-crabbox-session-motion.gif",
239+"telegram-user-crabbox-session-summary.json",
240+"telegram-user-crabbox-session.mp4",
241+]);
242+expect(fs.existsSync(path.join(stagedDir, "session.json"))).toBe(false);
243+expect(fs.existsSync(path.join(stagedDir, "lease.json"))).toBe(false);
244+expect(fs.existsSync(path.join(stagedDir, "stale.txt"))).toBe(false);
245+});
246+213247posixIt("does not expand generated remote probe arguments in the shell", () => {
214248const root = makeTempDir();
215249const fakePython = path.join(root, "python3");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。