Skip to content

Commit 0ea03f3

Browse files
authored
fix(ci): apply Kova runtime-major RSS calibration (#127763)
* fix(ci): pin Kova runtime-major RSS calibration * fix(ci): separate Kova live trust pin * test(ci): prove Kova live trust boundary
1 parent 494ea4b commit 0ea03f3

2 files changed

Lines changed: 60 additions & 33 deletions

File tree

‎.github/workflows/openclaw-performance.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ env:
7575
OCM_VERSION: v0.2.32
7676
OCM_LINUX_X64_SHA256: 5b20c21b2825f69b89eb37baa657f0f0062124517e6e6828e9857c7e9bbd3070
7777
KOVA_REPOSITORY: openclaw/Kova
78-
KOVA_CANONICAL_CONFIG_REF: dfafaff9dcd49b9c76788c6260f1f72dd2ced593
79-
KOVA_LEGACY_LIST_CONFIG_REF: dfafaff9dcd49b9c76788c6260f1f72dd2ced593
78+
KOVA_CANONICAL_CONFIG_REF: 1fe2f4081877bb12b7f7ed355349f98b8a0a6882
79+
KOVA_LEGACY_LIST_CONFIG_REF: 1fe2f4081877bb12b7f7ed355349f98b8a0a6882
80+
KOVA_TRUSTED_LIVE_REF: 1fe2f4081877bb12b7f7ed355349f98b8a0a6882
8081
PERFORMANCE_MODEL_ID: gpt-5.6-luna
8182
# Release matrices cold-build the candidate runtime before measurement.
8283
KOVA_SCENARIO_TIMEOUT_MS: ${{ inputs.profile == 'release' && '900000' || '300000' }}
@@ -173,7 +174,7 @@ jobs:
173174
echo "tested_sha=$resolved_sha" >> "$GITHUB_OUTPUT"
174175
echo "kova_ref=$kova_ref" >> "$GITHUB_OUTPUT"
175176
echo "kova_config_contract=$kova_config_contract" >> "$GITHUB_OUTPUT"
176-
if [[ "$kova_ref" == "$KOVA_CANONICAL_CONFIG_REF" || "$kova_ref" == "$KOVA_LEGACY_LIST_CONFIG_REF" ]]; then
177+
if [[ "$kova_ref" == "$KOVA_TRUSTED_LIVE_REF" ]]; then
177178
echo "kova_ref_trusted_for_live=true" >> "$GITHUB_OUTPUT"
178179
else
179180
echo "kova_ref_trusted_for_live=false" >> "$GITHUB_OUTPUT"

‎test/scripts/openclaw-performance-workflow.test.ts‎

Lines changed: 56 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,17 @@ describe("OpenClaw performance workflow", () => {
127127

128128
it("pins the Kova evaluator with release validation contracts", () => {
129129
const workflow = readFileSync(WORKFLOW, "utf8");
130-
const canonicalKovaRef = "dfafaff9dcd49b9c76788c6260f1f72dd2ced593";
131-
const legacyKovaRef = "dfafaff9dcd49b9c76788c6260f1f72dd2ced593";
130+
const canonicalKovaRef = "1fe2f4081877bb12b7f7ed355349f98b8a0a6882";
131+
const legacyKovaRef = "1fe2f4081877bb12b7f7ed355349f98b8a0a6882";
132+
const trustedLiveKovaRef = "1fe2f4081877bb12b7f7ed355349f98b8a0a6882";
132133
const install = findStep("Install OCM and Kova");
133134
const installRun = install.run ?? "";
134135
const targetCheckout = findStep("Checkout target metadata", "resolve_target");
135136
const resolveTarget = findStep("Resolve OpenClaw target ref", "resolve_target");
136137

137138
expect(workflow).toContain(`KOVA_CANONICAL_CONFIG_REF: ${canonicalKovaRef}`);
138139
expect(workflow).toContain(`KOVA_LEGACY_LIST_CONFIG_REF: ${legacyKovaRef}`);
140+
expect(workflow).toContain(`KOVA_TRUSTED_LIVE_REF: ${trustedLiveKovaRef}`);
139141
expect(workflow).toContain("kova_config_contract:");
140142
expect(workflow).toContain("Optional fixture-contract override for a custom Kova ref");
141143
expect(readWorkflow().jobs?.resolve_target?.outputs?.kova_ref).toBe(
@@ -177,9 +179,7 @@ describe("OpenClaw performance workflow", () => {
177179
expect(resolveTarget.run).toContain(
178180
'echo "kova_config_contract=$kova_config_contract" >> "$GITHUB_OUTPUT"',
179181
);
180-
expect(resolveTarget.run).toContain(
181-
'if [[ "$kova_ref" == "$KOVA_CANONICAL_CONFIG_REF" || "$kova_ref" == "$KOVA_LEGACY_LIST_CONFIG_REF" ]]; then',
182-
);
182+
expect(resolveTarget.run).toContain('if [[ "$kova_ref" == "$KOVA_TRUSTED_LIVE_REF" ]]; then');
183183
expect(resolveTarget.run).toContain(
184184
'echo "kova_ref_trusted_for_live=true" >> "$GITHUB_OUTPUT"',
185185
);
@@ -215,16 +215,57 @@ describe("OpenClaw performance workflow", () => {
215215
});
216216

217217
it("keeps live credentials away from custom Kova refs", () => {
218+
const resolveTarget = findStep("Resolve OpenClaw target ref", "resolve_target");
218219
const decideLane = findStep("Decide lane");
219220
const configureLiveAuth = findStep("Configure live OpenAI auth");
220221
const runKova = findStep("Run Kova");
221222
const root = mkdtempSync(join(realpathSync(tmpdir()), "openclaw-kova-live-ref-"));
222-
const output = join(root, "output");
223+
const trustedRef = "1fe2f4081877bb12b7f7ed355349f98b8a0a6882";
224+
const compatibleUntrustedRef = "0f9e678e239b45db46d2bd930b7983203580df78";
223225
const decideLaneRun = (decideLane.run ?? "")
224226
.replaceAll("${{ github.event_name }}", "workflow_dispatch")
225227
.replaceAll("${{ inputs.deep_profile || 'false' }}", "false")
226228
.replaceAll("${{ inputs.live_openai_candidate || 'false' }}", "true");
227229

230+
const runBoundary = (kovaRef: string, name: string) => {
231+
const resolveOutput = join(root, `${name}-resolve-output`);
232+
const laneOutput = join(root, `${name}-lane-output`);
233+
const resolve = spawnSync("bash", ["-c", resolveTarget.run ?? ""], {
234+
encoding: "utf8",
235+
env: {
236+
...process.env,
237+
GITHUB_OUTPUT: resolveOutput,
238+
GITHUB_REF_NAME: "fix/kova-runtime-major-baseline",
239+
KOVA_CANONICAL_CONFIG_REF: compatibleUntrustedRef,
240+
KOVA_CONFIG_CONTRACT_INPUT: "canonical",
241+
KOVA_LEGACY_LIST_CONFIG_REF: compatibleUntrustedRef,
242+
KOVA_REF_INPUT: kovaRef,
243+
KOVA_TRUSTED_LIVE_REF: trustedRef,
244+
TARGET_CHECKOUT_DIR: process.cwd(),
245+
TARGET_REF_INPUT: "test-head",
246+
},
247+
});
248+
expect(resolve.status, resolve.stderr).toBe(0);
249+
const resolved = Object.fromEntries(
250+
readFileSync(resolveOutput, "utf8")
251+
.trim()
252+
.split("\n")
253+
.map((line) => line.split("=", 2)),
254+
);
255+
const lane = spawnSync("bash", ["-c", decideLaneRun], {
256+
encoding: "utf8",
257+
env: {
258+
...process.env,
259+
GITHUB_OUTPUT: laneOutput,
260+
GITHUB_STEP_SUMMARY: join(root, `${name}-summary`),
261+
KOVA_REF_TRUSTED_FOR_LIVE: resolved.kova_ref_trusted_for_live,
262+
LANE_ID: "live-openai-candidate",
263+
SECRET_ELIGIBLE: "true",
264+
},
265+
});
266+
return { lane, laneOutput, resolved };
267+
};
268+
228269
expect(decideLane.run).toContain(
229270
'if [[ "$LANE_ID" == "live-openai-candidate" && "$run_lane" == "true" && "$KOVA_REF_TRUSTED_FOR_LIVE" != "true" ]]; then',
230271
);
@@ -245,33 +286,18 @@ describe("OpenClaw performance workflow", () => {
245286
);
246287

247288
try {
248-
const rejected = spawnSync("bash", ["-c", decideLaneRun], {
249-
encoding: "utf8",
250-
env: {
251-
...process.env,
252-
GITHUB_OUTPUT: output,
253-
KOVA_REF_TRUSTED_FOR_LIVE: "false",
254-
LANE_ID: "live-openai-candidate",
255-
SECRET_ELIGIBLE: "true",
256-
},
257-
});
258-
expect(rejected.status).toBe(1);
259-
expect(rejected.stdout).toContain(
289+
const rejected = runBoundary(compatibleUntrustedRef, "untrusted");
290+
expect(rejected.resolved.kova_ref_trusted_for_live).toBe("false");
291+
expect(rejected.lane.status).toBe(1);
292+
expect(rejected.lane.stdout).toContain(
260293
"The live OpenAI lane only executes a reviewed immutable Kova default.",
261294
);
295+
expect(existsSync(rejected.laneOutput)).toBe(false);
262296

263-
const accepted = spawnSync("bash", ["-c", decideLaneRun], {
264-
encoding: "utf8",
265-
env: {
266-
...process.env,
267-
GITHUB_OUTPUT: output,
268-
KOVA_REF_TRUSTED_FOR_LIVE: "true",
269-
LANE_ID: "live-openai-candidate",
270-
SECRET_ELIGIBLE: "true",
271-
},
272-
});
273-
expect(accepted.status).toBe(0);
274-
expect(readFileSync(output, "utf8")).toContain("run=true\n");
297+
const accepted = runBoundary(trustedRef, "trusted");
298+
expect(accepted.resolved.kova_ref_trusted_for_live).toBe("true");
299+
expect(accepted.lane.status).toBe(0);
300+
expect(readFileSync(accepted.laneOutput, "utf8")).toContain("run=true\n");
275301
} finally {
276302
rmSync(root, { force: true, recursive: true });
277303
}

0 commit comments

Comments
 (0)