


























@@ -5,6 +5,11 @@ on:
55 - cron: "11 5 * * *"
66workflow_dispatch:
77inputs:
8+target_ref:
9+description: OpenClaw ref to benchmark; defaults to the workflow ref
10+required: false
11+default: ""
12+type: string
813profile:
914description: Kova profile to run
1015required: false
@@ -92,6 +97,7 @@ jobs:
9297SUMMARY_DIR: ${{ github.workspace }}/.artifacts/kova/summaries
9398SOURCE_PERF_DIR: ${{ github.workspace }}/.artifacts/openclaw-performance/source/${{ matrix.lane }}
9499LANE_ID: ${{ matrix.lane }}
100+TARGET_REF: ${{ inputs.target_ref || github.ref_name }}
95101PROFILE: ${{ inputs.profile || 'diagnostic' }}
96102REQUESTED_REPEAT: ${{ inputs.repeat || '3' }}
97103FAIL_ON_REGRESSION: ${{ inputs.fail_on_regression || 'false' }}
@@ -139,9 +145,25 @@ jobs:
139145if: steps.lane.outputs.run == 'true'
140146uses: actions/checkout@v6
141147with:
148+ref: ${{ inputs.target_ref || github.ref }}
142149fetch-depth: 1
143150persist-credentials: false
144151152+ - name: Record tested revision
153+if: steps.lane.outputs.run == 'true'
154+shell: bash
155+run: |
156+ set -euo pipefail
157+ tested_sha="$(git rev-parse HEAD)"
158+ echo "TESTED_REF=${TARGET_REF}" >> "$GITHUB_ENV"
159+ echo "TESTED_SHA=${tested_sha}" >> "$GITHUB_ENV"
160+ {
161+ echo "Tested ref: ${TARGET_REF}"
162+ echo "Tested SHA: ${tested_sha}"
163+ echo "Workflow ref: ${GITHUB_REF_NAME}"
164+ echo "Workflow SHA: ${GITHUB_SHA}"
165+ } >> "$GITHUB_STEP_SUMMARY"
166+145167 - name: Set up Node environment
146168if: steps.lane.outputs.run == 'true'
147169uses: ./.github/actions/setup-node-env
@@ -281,7 +303,7 @@ jobs:
281303282304 kova report bundle "$report_json" --output-dir "$BUNDLE_DIR" --json | tee "$BUNDLE_DIR/bundle.json"
283305284- ref_slug="$(printf '%s' "${GITHUB_REF_NAME}" | tr -c 'A-Za-z0-9._-' '-')"
306+ ref_slug="$(printf '%s' "${TESTED_REF}" | tr -c 'A-Za-z0-9._-' '-')"
285307 run_slug="${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
286308 report_url=""
287309 if [[ "${CLAWGRIT_REPORTS_TOKEN_PRESENT:-false}" == "true" ]]; then
@@ -293,6 +315,23 @@ jobs:
293315 summary_args+=(--report-url "$report_url")
294316 fi
295317 "${summary_args[@]}"
318+ cat >> "$summary_path" <<EOF
319+320+ ## Test scope
321+322+ - Repository: ${GITHUB_REPOSITORY}
323+ - Tested ref: ${TESTED_REF}
324+ - Tested SHA: ${TESTED_SHA}
325+ - Workflow ref: ${GITHUB_REF_NAME}
326+ - Workflow SHA: ${GITHUB_SHA}
327+ - Kova repository: ${KOVA_REPOSITORY}
328+ - Kova ref: ${KOVA_REF}
329+ - Kova profile: ${PROFILE}
330+ - Lane auth: ${AUTH_MODE}
331+ - Lane model: ${PERFORMANCE_MODEL_ID}
332+ - Lane repeat: ${repeat}
333+ - Include filters: ${INCLUDE_FILTERS}
334+ EOF
296335 cat "$summary_path" >> "$GITHUB_STEP_SUMMARY"
297336298337 if [[ "$FAIL_ON_REGRESSION" == "true" && "$status" != "0" ]]; then
@@ -438,7 +477,7 @@ jobs:
438477run: |
439478 set -euo pipefail
440479 reports_root=".artifacts/clawgrit-reports"
441- ref_slug="$(printf '%s' "${GITHUB_REF_NAME}" | tr -c 'A-Za-z0-9._-' '-')"
480+ ref_slug="$(printf '%s' "${TESTED_REF}" | tr -c 'A-Za-z0-9._-' '-')"
442481 run_slug="${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
443482 dest="${reports_root}/openclaw-performance/${ref_slug}/${run_slug}/${LANE_ID}"
444483 mkdir -p "$dest"
@@ -466,8 +505,12 @@ jobs:
466505 cat > "${reports_root}/openclaw-performance/${ref_slug}/latest-${LANE_ID}.json" <<EOF
467506 {
468507 "repository": "${GITHUB_REPOSITORY}",
469- "ref": "${GITHUB_REF_NAME}",
470- "sha": "${GITHUB_SHA}",
508+ "ref": "${TESTED_REF}",
509+ "sha": "${TESTED_SHA}",
510+ "tested_ref": "${TESTED_REF}",
511+ "tested_sha": "${TESTED_SHA}",
512+ "workflow_ref": "${GITHUB_REF_NAME}",
513+ "workflow_sha": "${GITHUB_SHA}",
471514 "workflow": "${GITHUB_WORKFLOW}",
472515 "run_id": "${GITHUB_RUN_ID}",
473516 "run_attempt": "${GITHUB_RUN_ATTEMPT}",
@@ -483,5 +526,5 @@ jobs:
483526 echo "No clawgrit report changes to publish."
484527 exit 0
485528 fi
486- git -C "$reports_root" commit -m "perf: add OpenClaw ${LANE_ID} report ${GITHUB_SHA::12}"
529+ git -C "$reports_root" commit -m "perf: add OpenClaw ${LANE_ID} report ${TESTED_SHA::12}"
487530 git -C "$reports_root" push origin HEAD:main
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。