mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 07:51:35 +00:00
fix(release): accept legacy zero skipped runtime summaries (#116429)
This commit is contained in:
@@ -207,9 +207,13 @@ export function validateQaRuntimePairSummary(summary, options = {}) {
|
||||
failed: 0,
|
||||
skipped,
|
||||
};
|
||||
const requiredCountKeys = ["total", "passed", "failed"];
|
||||
const skippedCountMatches =
|
||||
summary.counts?.skipped === skipped || (skipped === 0 && summary.counts?.skipped === undefined);
|
||||
if (
|
||||
!isRecord(summary.counts) ||
|
||||
Object.entries(expectedCounts).some(([key, value]) => summary.counts[key] !== value)
|
||||
requiredCountKeys.some((key) => summary.counts[key] !== expectedCounts[key]) ||
|
||||
!skippedCountMatches
|
||||
) {
|
||||
throw new Error("runtime-pair summary counts do not match validated scenario evidence");
|
||||
}
|
||||
|
||||
@@ -162,6 +162,34 @@ describe("frozen QA runtime-pair summary validation", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("accepts an older all-passing summary that omitted zero skipped count", () => {
|
||||
const fixture = summary([scenario({ name: "legacy passing", status: "pass" })]);
|
||||
delete (fixture.counts as { skipped?: number }).skipped;
|
||||
|
||||
expect(validateQaRuntimePairSummary(fixture)).toEqual({
|
||||
total: 1,
|
||||
passed: 1,
|
||||
failed: 0,
|
||||
skipped: 0,
|
||||
});
|
||||
});
|
||||
|
||||
it("requires skipped count when validated evidence contains skips", () => {
|
||||
const fixture = summary([
|
||||
scenario({
|
||||
name: "tracked gap",
|
||||
status: "skip",
|
||||
codexStatus: "skip",
|
||||
codexDetails: "known-harness-gap exec: tracked",
|
||||
}),
|
||||
]);
|
||||
delete (fixture.counts as { skipped?: number }).skipped;
|
||||
|
||||
expect(() => validateQaRuntimePairSummary(fixture)).toThrow(
|
||||
"counts do not match validated scenario evidence",
|
||||
);
|
||||
});
|
||||
|
||||
it("accepts a tracked Codex harness gap kept advisory by the current classifier", () => {
|
||||
const advisoryGap = scenario({
|
||||
name: "tracked advisory gap",
|
||||
|
||||
Reference in New Issue
Block a user