test(workspace): add top-down release gates

This commit is contained in:
huanghuoguoguo
2026-07-19 08:53:39 +08:00
parent 7706634c34
commit 3359951837
26 changed files with 1351 additions and 19 deletions
+12
View File
@@ -54,6 +54,7 @@ import { repoRoot } from "../src/cli.ts";
import {
classifyDebugChatResult,
findNewFailureSignal,
hasDebugChatOutcome,
minExpectedOccurrences,
} from "../scripts/e2e/lib/debug-chat.mjs";
import {
@@ -1913,6 +1914,17 @@ test("debug chat classifier distinguishes new failure signals from old history",
assert.equal(custom.failure_signal, "qa-plugin-smoke:mcp-ok-local-agent");
});
test("debug chat outcome wait can stop on a new failure signal", () => {
const baselines = [{ signal: "runner.timeout", count: 1 }];
assert.equal(hasDebugChatOutcome("old runner.timeout", "EXPECTED", 1, baselines), false);
assert.equal(
hasDebugChatOutcome("old runner.timeout\nnew runner.timeout", "EXPECTED", 1, baselines),
true,
);
assert.equal(hasDebugChatOutcome("EXPECTED", "EXPECTED", 1, baselines), true);
});
test("debug chat classifier lets new failure signals override stale expected history", () => {
const result = classifyDebugChatResult({
beforeText: "Bot: qa_mcp_echo:mcp-ok-local-agent",