fix(ci): honor Kova performance report contracts (#103030)

This commit is contained in:
Peter Steinberger
2026-07-09 20:08:25 +01:00
committed by GitHub
parent 8656c3b357
commit 11fa0cf2d5
4 changed files with 32 additions and 5 deletions

View File

@@ -83,14 +83,14 @@ jobs:
repeat: input
deep_profile: "false"
live: "false"
include_filters: "scenario:fresh-install scenario:gateway-performance scenario:bundled-plugin-startup scenario:bundled-runtime-deps scenario:agent-cold-warm-message"
include_filters: "scenario:fresh-install,scenario:gateway-performance,scenario:bundled-plugin-startup,scenario:bundled-runtime-deps,scenario:agent-cold-warm-message"
- lane: mock-deep-profile
title: Kova mock provider deep profile
auth: mock
repeat: "1"
deep_profile: "true"
live: "false"
include_filters: "scenario:fresh-install scenario:gateway-performance scenario:agent-cold-warm-message"
include_filters: "scenario:fresh-install,scenario:gateway-performance,scenario:agent-cold-warm-message"
- lane: live-openai-candidate
title: Kova live OpenAI GPT 5.5 agent turn
auth: live
@@ -344,9 +344,7 @@ jobs:
--json
)
for filter in $INCLUDE_FILTERS; do
args+=(--include "$filter")
done
args+=(--include "$INCLUDE_FILTERS")
if [[ "$MATRIX_DEEP_PROFILE" == "true" ]]; then
args+=(--deep-profile)

View File

@@ -142,6 +142,10 @@ function validateRecord(recordValue) {
return record;
}
function recordViolations(record) {
return record.violations === undefined ? [] : array(record.violations, "record violations");
}
function validateTargetCleanup(report) {
if (!text(report.target, "report target").startsWith("local-build:")) {
check(report.targetCleanup === null, "non-local target had cleanup metadata");

View File

@@ -852,6 +852,10 @@ describe("scripts/lib/kova-report-gate.mjs", () => {
"rejects PARTIAL records with violations",
(report) => setAt(report, ["records", 0, "violations"], [{}]),
],
[
"rejects PARTIAL records with null violations",
(report) => setAt(report, ["records", 0, "violations"], null),
],
[
"rejects PARTIAL reports without sampled RSS",
(report) => deleteAt(report, ["performance", "groups", 0, "metrics", "peakRssMb"]),

View File

@@ -16,6 +16,11 @@ type WorkflowStep = {
type WorkflowJob = {
steps?: WorkflowStep[];
strategy?: {
matrix?: {
include?: Array<{ include_filters?: string }>;
};
};
};
type Workflow = {
@@ -107,6 +112,22 @@ describe("OpenClaw performance workflow", () => {
);
});
it("passes every configured scenario through one Kova include flag", () => {
const workflow = readWorkflow();
const includeFilters = workflow.jobs?.kova?.strategy?.matrix?.include?.map(
(lane) => lane.include_filters,
);
const runKova = findStep("Run Kova");
expect(includeFilters).toEqual([
"scenario:fresh-install,scenario:gateway-performance,scenario:bundled-plugin-startup,scenario:bundled-runtime-deps,scenario:agent-cold-warm-message",
"scenario:fresh-install,scenario:gateway-performance,scenario:agent-cold-warm-message",
"scenario:agent-cold-warm-message",
]);
expect(runKova.run).toContain('args+=(--include "$INCLUDE_FILTERS")');
expect(runKova.run).not.toContain("for filter in $INCLUDE_FILTERS");
});
it("installs local workspace packages beside the OCM root tarball", () => {
const configure = findStep("Configure OCM local workspace dependencies");