fix(qa): finish aggregate suites without shared cache races (#120816)

* fix(qa): bound parallel aggregate script runs

Punchcard-Session: amber-workshop-workshop-36
Co-authored-by: Dallin Romney <6581799+RomneyDa@users.noreply.github.com>

* test(tui): wait for adopted session frame

Punchcard-Session: amber-workshop-workshop-36

---------

Co-authored-by: Dallin Romney <6581799+RomneyDa@users.noreply.github.com>
This commit is contained in:
Vincent Koc
2026-08-10 03:32:04 +08:00
committed by GitHub
parent 27be810311
commit 2e4683ba7f
39 changed files with 346 additions and 17 deletions
@@ -232,6 +232,7 @@ describe("TUI PTY evidence producer", () => {
it("builds fake and local PTY commands with the required environment", () => {
vi.stubEnv("OPENCLAW_TUI_PTY_INCLUDE_LOCAL", "1");
vi.stubEnv("OPENCLAW_TUI_PTY_USE_BUILT_CLI", "inherited");
vi.stubEnv("OPENCLAW_VITEST_FS_MODULE_CACHE_PATH", "/shared/vitest-cache");
const fake = buildTuiPtyVitestCommand({
cases: [makeCase()],
cliMode: "source",
@@ -252,6 +253,9 @@ describe("TUI PTY evidence producer", () => {
expect(fake.env.OPENCLAW_BEHAVIOR_EVIDENCE).toBe("1");
expect(fake.env.OPENCLAW_TUI_PTY_INCLUDE_LOCAL).toBeUndefined();
expect(fake.env.OPENCLAW_TUI_PTY_USE_BUILT_CLI).toBeUndefined();
expect(fake.env.OPENCLAW_VITEST_FS_MODULE_CACHE_PATH).toBe(
path.join("/artifacts", "vitest-fs-module-cache"),
);
const oracle = buildTuiPtyVitestCommand({
cases: [makeCase({ testFile: ASSERTION_SUPPORT_FILE })],
@@ -265,11 +269,17 @@ describe("TUI PTY evidence producer", () => {
cases: [makeCase({ testFile: LOCAL_FILE })],
cliMode: "built",
repoRoot: "/repo",
reportPath: "/artifacts/report.json",
reportPath: "/artifacts-local/report.json",
});
expect(local.args).toContain(LOCAL_FILE);
expect(local.env.OPENCLAW_TUI_PTY_INCLUDE_LOCAL).toBe("1");
expect(local.env.OPENCLAW_TUI_PTY_USE_BUILT_CLI).toBe("1");
expect(oracle.env.OPENCLAW_VITEST_FS_MODULE_CACHE_PATH).toBe(
fake.env.OPENCLAW_VITEST_FS_MODULE_CACHE_PATH,
);
expect(local.env.OPENCLAW_VITEST_FS_MODULE_CACHE_PATH).not.toBe(
fake.env.OPENCLAW_VITEST_FS_MODULE_CACHE_PATH,
);
});
it("rejects wrong-file and unmatched-pattern reports", async () => {
@@ -267,6 +267,10 @@ export function buildTuiPtyVitestCommand(params: {
const env: NodeJS.ProcessEnv = {
...process.env,
OPENCLAW_BEHAVIOR_EVIDENCE: "1",
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH: path.join(
path.dirname(params.reportPath),
"vitest-fs-module-cache",
),
};
if (usesLocalPty) {
env.OPENCLAW_TUI_PTY_INCLUDE_LOCAL = "1";