Skip to content

Commit 4919c70

Browse files
authored
fix(ci): use OCM native workspace adapter (#124341)
Pin OCM v0.2.32 so Performance validation uses upstream native .mts discovery and transitive workspace dependency handling instead of the local Bash/tsx trampoline.
1 parent 289a9ca commit 4919c70

2 files changed

Lines changed: 15 additions & 41 deletions

File tree

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

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ concurrency:
7272

7373
env:
7474
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
75-
OCM_VERSION: v0.2.29
76-
OCM_LINUX_X64_SHA256: d966098d6ba2bc10891be3c76e162a37b07f28c4f51da75d2eb509886eb7e1cf
75+
OCM_VERSION: v0.2.32
76+
OCM_LINUX_X64_SHA256: 5b20c21b2825f69b89eb37baa657f0f0062124517e6e6828e9857c7e9bbd3070
7777
KOVA_REPOSITORY: openclaw/Kova
7878
KOVA_CANONICAL_CONFIG_REF: 0f9e678e239b45db46d2bd930b7983203580df78
7979
KOVA_LEGACY_LIST_CONFIG_REF: 0f9e678e239b45db46d2bd930b7983203580df78
@@ -388,29 +388,6 @@ jobs:
388388
chmod 0755 "$HOME/.local/bin/kova"
389389
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
390390
391-
- name: Configure OCM local workspace dependencies
392-
if: steps.lane.outputs.run == 'true'
393-
shell: bash
394-
run: |
395-
set -euo pipefail
396-
npm_wrapper="$PERFORMANCE_HELPER_DIR/scripts/ocm-npm-workspace-deps.mts"
397-
npm_adapter="${RUNNER_TEMP}/openclaw-ocm-npm"
398-
workspace_dependency_dirs=""
399-
if [[ -f "${GITHUB_WORKSPACE}/packages/ai/package.json" ]]; then
400-
workspace_dependency_dirs="${GITHUB_WORKSPACE}/packages/ai"
401-
fi
402-
cat > "$npm_adapter" <<'EOF'
403-
#!/usr/bin/env bash
404-
exec node --import tsx "$OPENCLAW_OCM_NPM_WRAPPER" "$@"
405-
EOF
406-
chmod 0755 "$npm_adapter"
407-
{
408-
echo "OCM_INTERNAL_NPM_BIN=$npm_adapter"
409-
echo "OPENCLAW_OCM_NPM_WRAPPER=$npm_wrapper"
410-
echo "OPENCLAW_OCM_REAL_NPM_BIN=$(command -v npm)"
411-
echo "OPENCLAW_OCM_WORKSPACE_DEPENDENCY_DIRS=$workspace_dependency_dirs"
412-
} >> "$GITHUB_ENV"
413-
414391
- name: Kova version and plan sanity
415392
if: steps.lane.outputs.run == 'true'
416393
shell: bash

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

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ describe("OpenClaw performance workflow", () => {
232232
const workflow = readFileSync(WORKFLOW, "utf8");
233233
const installRun = findStep("Install OCM and Kova").run ?? "";
234234

235-
expect(workflow).toContain("OCM_VERSION: v0.2.29");
235+
expect(workflow).toContain("OCM_VERSION: v0.2.32");
236236
expect(workflow).toContain(
237-
"OCM_LINUX_X64_SHA256: d966098d6ba2bc10891be3c76e162a37b07f28c4f51da75d2eb509886eb7e1cf",
237+
"OCM_LINUX_X64_SHA256: 5b20c21b2825f69b89eb37baa657f0f0062124517e6e6828e9857c7e9bbd3070",
238238
);
239239
expect(installRun).toContain(
240240
'"https://github.com/shakkernerd/ocm/releases/download/${OCM_VERSION}/ocm-x86_64-unknown-linux-gnu.tar.gz"',
@@ -1076,22 +1076,19 @@ esac
10761076
expect(publish.run).not.toContain("report_jsons");
10771077
});
10781078

1079-
it("installs local workspace packages beside the OCM root tarball", () => {
1080-
const workflow = readWorkflow();
1081-
const configure = findStep("Configure OCM local workspace dependencies");
1079+
it("lets OCM discover its native workspace dependency adapter", () => {
1080+
const workflowText = readFileSync(WORKFLOW, "utf8");
1081+
const steps = readWorkflow().jobs?.kova?.steps ?? [];
1082+
const installIndex = steps.findIndex((step) => step.name === "Install OCM and Kova");
10821083

1083-
expect(workflow.jobs?.kova?.env).not.toHaveProperty("OPENCLAW_OCM_RUNTIME_BUILD_PROFILE");
1084-
expect(configure.run).toContain(
1085-
'npm_wrapper="$PERFORMANCE_HELPER_DIR/scripts/ocm-npm-workspace-deps.mts"',
1086-
);
1087-
expect(configure.run).toContain("OCM_INTERNAL_NPM_BIN=$npm_adapter");
1088-
expect(configure.run).toContain("OPENCLAW_OCM_NPM_WRAPPER=$npm_wrapper");
1089-
expect(configure.run).toContain(
1090-
'if [[ -f "${GITHUB_WORKSPACE}/packages/ai/package.json" ]]; then',
1091-
);
1092-
expect(configure.run).toContain(
1093-
"OPENCLAW_OCM_WORKSPACE_DEPENDENCY_DIRS=$workspace_dependency_dirs",
1084+
expect(installIndex).toBeGreaterThanOrEqual(0);
1085+
expect(steps.map((step) => step.name)).not.toContain(
1086+
"Configure OCM local workspace dependencies",
10941087
);
1088+
expect(workflowText).not.toContain("OCM_INTERNAL_NPM_BIN");
1089+
expect(workflowText).not.toContain("OPENCLAW_OCM_NPM_WRAPPER");
1090+
expect(workflowText).not.toContain("OPENCLAW_OCM_WORKSPACE_DEPENDENCY_DIRS");
1091+
expect(steps[installIndex + 1]?.name).toBe("Kova version and plan sanity");
10951092
});
10961093

10971094
it("fails selected live Kova lanes when live auth is missing", () => {

0 commit comments

Comments
 (0)