mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 20:44:47 +00:00
fix(qa): serialize runtime parity cells
This commit is contained in:
@@ -138,6 +138,25 @@ describe("runtime parity", () => {
|
||||
expect(result.drift).toBe("none");
|
||||
});
|
||||
|
||||
it("runs runtime cells serially so shared QA state cannot cross-contaminate", async () => {
|
||||
const events: string[] = [];
|
||||
const result = await runRuntimeParityScenario({
|
||||
scenarioId: "serial",
|
||||
runCell: async (runtime) => {
|
||||
events.push(`start:${runtime}`);
|
||||
await Promise.resolve();
|
||||
events.push(`finish:${runtime}`);
|
||||
return {
|
||||
scenarioStatus: "pass",
|
||||
cell: makeCell(runtime),
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
expect(result.drift).toBe("none");
|
||||
expect(events).toEqual(["start:pi", "finish:pi", "start:codex", "finish:codex"]);
|
||||
});
|
||||
|
||||
it("classifies final-text-only differences as text-only", async () => {
|
||||
const result = await runRuntimeParityScenario({
|
||||
scenarioId: "text-only",
|
||||
|
||||
@@ -910,7 +910,8 @@ export async function runRuntimeParityScenario(params: {
|
||||
scenarioId: string;
|
||||
runCell: (runtime: RuntimeId) => Promise<RuntimeParityScenarioExecution>;
|
||||
}): Promise<RuntimeParityResult> {
|
||||
const [pi, codex] = await Promise.all([params.runCell("pi"), params.runCell("codex")]);
|
||||
const pi = await params.runCell("pi");
|
||||
const codex = await params.runCell("codex");
|
||||
const drift = classifyRuntimeParityCells({
|
||||
pi: pi.cell,
|
||||
codex: codex.cell,
|
||||
|
||||
Reference in New Issue
Block a user