Skip to content

Commit b0485e6

Browse files
committed
fix: serialize generated workflow validation
1 parent 76bfe80 commit b0485e6

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

mise.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,22 @@ fi
101101
description = "Fast pre-commit gate — typecheck + lint + format in parallel"
102102
depends = ["typecheck", "lint", "format"]
103103

104+
[tasks.test-ci]
105+
description = "Run the full suite after generated workflow validation completes"
106+
depends = ["workflows"]
107+
run = "mise run test"
108+
104109
[tasks.ci]
105110
description = "Full CI suite (everything until-done's runtime CI runs on agent_settled)"
106111
depends = [
107112
"typecheck",
108113
"lint",
109114
"format",
110115
"compile",
111-
"test",
116+
"test-ci",
112117
"test-node",
113118
"build",
114119
"structure",
115-
"workflows",
116120
]
117121
depends_post = ["fmt-toml"]
118122

tests/workflows/invariants.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ describe("Pi lockstep agentic workflows", () => {
108108
expect(source).toContain("Docker unavailable; strict gh-aw compile completed");
109109
});
110110

111+
test("serializes generated workflow writes before the full test suite", async () => {
112+
const source = await readFile(resolve(root, "mise.toml"), "utf8");
113+
const testCi = source.match(/\[tasks\.test-ci\][\s\S]*?\n\n/)?.[0];
114+
const ci = source.match(/\[tasks\.ci\][\s\S]*?\n\n/)?.[0];
115+
expect(testCi).toContain('depends = ["workflows"]');
116+
expect(testCi).toContain('run = "mise run test"');
117+
expect(ci).toContain('"test-ci"');
118+
expect(ci).not.toContain('\n "test",');
119+
});
120+
111121
test("removes the stale PAT and CodeRabbit merge gate", async () => {
112122
const path = resolve(
113123
root,

0 commit comments

Comments
 (0)