mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(ci): accept profiled partial Kova gates (#119121)
* fix(ci): accept profiled partial Kova gates * fix(ci): scope Kova secrets to live runs * fix(ci): require reviewed Kova refs for live runs * fix(ci): pin cross-profile Kova repair * fix(perf): preserve historical Kova report contracts * fix(ci): declare Kova gate options * fix(ci): preserve required Kova partial failures
This commit is contained in:
@@ -52,6 +52,11 @@ on:
|
||||
required: false
|
||||
default: ""
|
||||
type: string
|
||||
kova_config_contract:
|
||||
description: Optional fixture-contract override for a custom Kova ref
|
||||
required: false
|
||||
default: ""
|
||||
type: string
|
||||
dispatch_id:
|
||||
description: Optional parent workflow dispatch identifier
|
||||
required: false
|
||||
@@ -70,8 +75,8 @@ env:
|
||||
OCM_VERSION: v0.2.29
|
||||
OCM_LINUX_X64_SHA256: d966098d6ba2bc10891be3c76e162a37b07f28c4f51da75d2eb509886eb7e1cf
|
||||
KOVA_REPOSITORY: openclaw/Kova
|
||||
KOVA_CANONICAL_CONFIG_REF: 283070760a16655b28835061774158b8b11b4aff
|
||||
KOVA_LEGACY_LIST_CONFIG_REF: f3d037b5b8aacd6adf8ef1dd2ea4c1d778ec7c6c
|
||||
KOVA_CANONICAL_CONFIG_REF: 0f9e678e239b45db46d2bd930b7983203580df78
|
||||
KOVA_LEGACY_LIST_CONFIG_REF: 0f9e678e239b45db46d2bd930b7983203580df78
|
||||
PERFORMANCE_MODEL_ID: gpt-5.6-luna
|
||||
# Release matrices cold-build the candidate runtime before measurement.
|
||||
KOVA_SCENARIO_TIMEOUT_MS: ${{ inputs.profile == 'release' && '900000' || '300000' }}
|
||||
@@ -86,6 +91,8 @@ jobs:
|
||||
tested_ref: ${{ steps.resolve.outputs.tested_ref }}
|
||||
tested_sha: ${{ steps.resolve.outputs.tested_sha }}
|
||||
kova_ref: ${{ steps.resolve.outputs.kova_ref }}
|
||||
kova_config_contract: ${{ steps.resolve.outputs.kova_config_contract }}
|
||||
kova_ref_trusted_for_live: ${{ steps.resolve.outputs.kova_ref_trusted_for_live }}
|
||||
steps:
|
||||
- name: Resolve OpenClaw target ref
|
||||
id: resolve
|
||||
@@ -93,6 +100,7 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
TARGET_REF_INPUT: ${{ inputs.target_ref }}
|
||||
KOVA_REF_INPUT: ${{ inputs.kova_ref }}
|
||||
KOVA_CONFIG_CONTRACT_INPUT: ${{ inputs.kova_config_contract }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -118,17 +126,43 @@ jobs:
|
||||
fi
|
||||
|
||||
kova_ref="${KOVA_REF_INPUT:-}"
|
||||
if [[ -z "$kova_ref" ]]; then
|
||||
schema_content="$({
|
||||
kova_config_contract="${KOVA_CONFIG_CONTRACT_INPUT:-}"
|
||||
if [[ "$kova_ref" == *$'\n'* || "$kova_ref" == *$'\r'* ]]; then
|
||||
echo "::error::kova_ref must be a single line."
|
||||
exit 1
|
||||
fi
|
||||
if [[ "$kova_config_contract" == *$'\n'* || "$kova_config_contract" == *$'\r'* ]]; then
|
||||
echo "::error::kova_config_contract must be a single line."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$kova_ref" || -z "$kova_config_contract" ]]; then
|
||||
if schema_content="$({
|
||||
gh api "repos/${GITHUB_REPOSITORY}/contents/src/config/zod-schema.agent-defaults.ts?ref=${resolved_sha}" --jq '.content' |
|
||||
base64 --decode
|
||||
})"
|
||||
if grep -Fqx ' mediaModels: z' <<<"$schema_content"; then
|
||||
kova_ref="$KOVA_CANONICAL_CONFIG_REF"
|
||||
elif grep -Fqx ' imageGenerationModel: AgentToolModelSchema.optional(),' <<<"$schema_content"; then
|
||||
kova_ref="$KOVA_LEGACY_LIST_CONFIG_REF"
|
||||
})"; then
|
||||
:
|
||||
elif [[ -z "$kova_ref" ]]; then
|
||||
echo "::error::Unable to inspect the Kova config-fixture contract for target ${resolved_sha}. Supply kova_ref explicitly and optionally set kova_config_contract for that producer."
|
||||
exit 1
|
||||
else
|
||||
echo "::error::Target ${resolved_sha} has no recognized Kova config-fixture contract. Supply kova_ref explicitly after validating the fixture."
|
||||
schema_content=""
|
||||
fi
|
||||
if [[ -n "$schema_content" ]] && grep -Fqx ' mediaModels: z' <<<"$schema_content"; then
|
||||
detected_kova_config_contract="canonical"
|
||||
default_kova_ref="$KOVA_CANONICAL_CONFIG_REF"
|
||||
elif [[ -n "$schema_content" ]] && grep -Fqx ' imageGenerationModel: AgentToolModelSchema.optional(),' <<<"$schema_content"; then
|
||||
detected_kova_config_contract="legacy-list"
|
||||
default_kova_ref="$KOVA_LEGACY_LIST_CONFIG_REF"
|
||||
else
|
||||
detected_kova_config_contract=""
|
||||
default_kova_ref=""
|
||||
fi
|
||||
if [[ -n "$detected_kova_config_contract" ]]; then
|
||||
kova_config_contract="${kova_config_contract:-$detected_kova_config_contract}"
|
||||
kova_ref="${kova_ref:-$default_kova_ref}"
|
||||
elif [[ -z "$kova_ref" ]]; then
|
||||
echo "::error::Target ${resolved_sha} has no recognized Kova config-fixture contract. Supply kova_ref explicitly and optionally set kova_config_contract for that producer."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@@ -137,6 +171,12 @@ jobs:
|
||||
echo "tested_ref=$tested_ref" >> "$GITHUB_OUTPUT"
|
||||
echo "tested_sha=$resolved_sha" >> "$GITHUB_OUTPUT"
|
||||
echo "kova_ref=$kova_ref" >> "$GITHUB_OUTPUT"
|
||||
echo "kova_config_contract=$kova_config_contract" >> "$GITHUB_OUTPUT"
|
||||
if [[ "$kova_ref" == "$KOVA_CANONICAL_CONFIG_REF" || "$kova_ref" == "$KOVA_LEGACY_LIST_CONFIG_REF" ]]; then
|
||||
echo "kova_ref_trusted_for_live=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "kova_ref_trusted_for_live=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
kova:
|
||||
name: ${{ matrix.title }}
|
||||
@@ -176,6 +216,7 @@ jobs:
|
||||
expected_release_entries: "agent-cold-warm-message:mock-openai-provider"
|
||||
env:
|
||||
KOVA_REF: ${{ needs.resolve_target.outputs.kova_ref }}
|
||||
KOVA_OPENCLAW_CONFIG_CONTRACT: ${{ needs.resolve_target.outputs.kova_config_contract }}
|
||||
KOVA_HOME: ${{ github.workspace }}/.artifacts/kova/home/${{ matrix.lane }}
|
||||
PERFORMANCE_HELPER_DIR: ${{ github.workspace }}/.artifacts/performance-workflow
|
||||
REPORT_DIR: ${{ github.workspace }}/.artifacts/kova/reports/${{ matrix.lane }}
|
||||
@@ -193,6 +234,7 @@ jobs:
|
||||
MATRIX_REPEAT: ${{ matrix.repeat }}
|
||||
MATRIX_DEEP_PROFILE: ${{ matrix.deep_profile }}
|
||||
MATRIX_LIVE: ${{ matrix.live }}
|
||||
KOVA_REF_TRUSTED_FOR_LIVE: ${{ needs.resolve_target.outputs.kova_ref_trusted_for_live }}
|
||||
steps:
|
||||
- name: Decide lane
|
||||
id: lane
|
||||
@@ -209,6 +251,10 @@ jobs:
|
||||
run_lane=false
|
||||
reason="live_openai_candidate input is false"
|
||||
fi
|
||||
if [[ "$LANE_ID" == "live-openai-candidate" && "$run_lane" == "true" && "$KOVA_REF_TRUSTED_FOR_LIVE" != "true" ]]; then
|
||||
echo "::error::The live OpenAI lane only executes a reviewed immutable Kova default. Omit kova_ref or update the pinned workflow defaults after review."
|
||||
exit 1
|
||||
fi
|
||||
echo "run=$run_lane" >> "$GITHUB_OUTPUT"
|
||||
if [[ "$run_lane" != "true" ]]; then
|
||||
echo "Skipping ${LANE_ID}: ${reason}" >> "$GITHUB_STEP_SUMMARY"
|
||||
@@ -437,8 +483,8 @@ jobs:
|
||||
id: kova
|
||||
if: steps.lane.outputs.run == 'true'
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
|
||||
OPENAI_API_KEY: ${{ matrix.live == 'true' && secrets.OPENAI_API_KEY || '' }}
|
||||
OPENAI_BASE_URL: ${{ matrix.live == 'true' && secrets.OPENAI_BASE_URL || '' }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -497,7 +543,11 @@ jobs:
|
||||
|
||||
effective_status="$status"
|
||||
if [[ "$evidence_status" == "0" && "$FAIL_ON_REGRESSION" == "true" && "$status" != "0" ]]; then
|
||||
if node "$PERFORMANCE_HELPER_DIR/scripts/lib/kova-report-gate.mjs" "$report_json"
|
||||
gate_args=("$report_json")
|
||||
if [[ "$KOVA_REF" == "$KOVA_CANONICAL_CONFIG_REF" || "$KOVA_REF" == "$KOVA_LEGACY_LIST_CONFIG_REF" ]]; then
|
||||
gate_args+=(--require-instrumented-performance-contract)
|
||||
fi
|
||||
if node "$PERFORMANCE_HELPER_DIR/scripts/lib/kova-report-gate.mjs" "${gate_args[@]}"
|
||||
then
|
||||
effective_status=0
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user