fix: address Codex PR review findings

This commit is contained in:
gitea committed 2026-10-25 22:32:45 +08:00
1 parent 0f164b6de5
commit a7974abb08
44 files changed
+3317 -667

No files matched your search

@@ -0,0 +1,15 @@
import { expect, test } from "bun:test";
import { extractCodeNodeSummaries } from "./shared.js";
import { flattenExecutionTree } from "../../../domains/platform/services.js";
test("test and job summaries retain nested execution containers and repeated loop executions", () => {
const tree = [{ id: "loop", type: "every", children: [
{ id: "iteration-1", type: "condition", tasks: [{ id: "a", name: "script", type: "code", output: { count: 3 } }] },
{ id: "iteration-2", type: "condition", subTasks: [{ id: "b", name: "script", type: "code-js2", output: [1, 2] }] },
{ id: "iteration-3", type: "condition", items: [{ id: "c", name: "script", type: "code", output: 7 }] },
] }];
const summaries = extractCodeNodeSummaries(tree);
expect(summaries.map(item => item.id)).toEqual(["a", "b", "c"]);
expect(summaries[0].rawOutput).toEqual({ count: 3 });
expect(summaries).toEqual(extractCodeNodeSummaries(tree, flattenExecutionTree as any));
});