Release RTT #316
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release RTT | |
| on: | |
| schedule: | |
| - cron: "15 */6 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| versions: | |
| description: Space or comma separated OpenClaw versions to measure | |
| required: false | |
| default: "" | |
| type: string | |
| rss_backfill: | |
| description: Backfill RSS onto existing release rows without changing RTT values | |
| required: false | |
| default: "false" | |
| type: choice | |
| options: | |
| - "false" | |
| - "true" | |
| rss_backfill_limit: | |
| description: Maximum existing release versions to backfill in this run | |
| required: false | |
| default: "4" | |
| type: string | |
| rss_backfill_skip_versions: | |
| description: Space or comma separated release versions to skip during RSS backfill | |
| required: false | |
| default: "" | |
| type: string | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: release-rtt-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| NODE_VERSION: "24.x" | |
| PNPM_VERSION: "11.2.2" | |
| jobs: | |
| measure: | |
| name: Measure OpenClaw release RTT | |
| runs-on: blacksmith-16vcpu-ubuntu-2404 | |
| timeout-minutes: 90 | |
| steps: | |
| - name: Checkout RTT tracker | |
| uses: actions/checkout@v7 | |
| with: | |
| path: openclaw-rtt | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Resolve OpenClaw packages | |
| id: release | |
| working-directory: openclaw-rtt | |
| env: | |
| INPUT_VERSIONS: ${{ github.event_name == 'workflow_dispatch' && inputs.versions || '' }} | |
| INPUT_RSS_BACKFILL: ${{ github.event_name == 'workflow_dispatch' && inputs.rss_backfill || 'false' }} | |
| INPUT_RSS_BACKFILL_LIMIT: ${{ github.event_name == 'workflow_dispatch' && inputs.rss_backfill_limit || '' }} | |
| INPUT_RSS_BACKFILL_SKIP_VERSIONS: ${{ github.event_name == 'workflow_dispatch' && inputs.rss_backfill_skip_versions || '' }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| node scripts/resolve-openclaw-package.mjs | |
| - name: Checkout OpenClaw harness | |
| if: steps.release.outputs.should_run == 'true' | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: openclaw/openclaw | |
| ref: main | |
| path: openclaw | |
| fetch-depth: 1 | |
| persist-credentials: false | |
| - name: Set up Blacksmith Docker Builder | |
| if: steps.release.outputs.should_run == 'true' | |
| uses: useblacksmith/setup-docker-builder@ab5c1da94f53f5cd75c1038092aa276dddfccbba # v1 | |
| with: | |
| max-cache-size-mb: 800000 | |
| - name: Setup pnpm | |
| if: steps.release.outputs.should_run == 'true' | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| corepack enable | |
| corepack prepare "pnpm@${PNPM_VERSION}" --activate | |
| - name: Locate pnpm store | |
| if: steps.release.outputs.should_run == 'true' | |
| id: pnpm-store | |
| working-directory: openclaw | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| echo "path=$(pnpm store path --silent)" >>"$GITHUB_OUTPUT" | |
| - name: Restore pnpm store | |
| if: steps.release.outputs.should_run == 'true' | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ steps.pnpm-store.outputs.path }} | |
| key: openclaw-release-rtt-pnpm-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('openclaw/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| openclaw-release-rtt-pnpm-${{ runner.os }}-${{ runner.arch }}- | |
| - name: Install OpenClaw harness dependencies | |
| if: steps.release.outputs.should_run == 'true' | |
| working-directory: openclaw | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| time pnpm install --frozen-lockfile --prefer-offline --ignore-scripts=false --config.engine-strict=false --config.enable-pre-post-scripts=true --config.side-effects-cache=true | |
| - name: Run RSS backfill | |
| if: steps.release.outputs.should_run == 'true' && steps.release.outputs.rss_backfill == 'true' | |
| working-directory: openclaw | |
| env: | |
| OPENCLAW_QA_TELEGRAM_GROUP_ID: ${{ secrets.OPENCLAW_QA_TELEGRAM_GROUP_ID }} | |
| OPENCLAW_QA_TELEGRAM_DRIVER_BOT_TOKEN: ${{ secrets.OPENCLAW_QA_TELEGRAM_DRIVER_BOT_TOKEN }} | |
| OPENCLAW_QA_TELEGRAM_SUT_BOT_TOKEN: ${{ secrets.OPENCLAW_QA_TELEGRAM_SUT_BOT_TOKEN }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| read -r -a specs <<< "${{ steps.release.outputs.specs }}" | |
| read -r -a versions <<< "${{ steps.release.outputs.versions }}" | |
| for index in "${!specs[@]}"; do | |
| spec="${specs[$index]}" | |
| version="${versions[$index]}" | |
| output="$RUNNER_TEMP/openclaw-rtt-runs/$(printf '%s' "$spec" | tr -c 'A-Za-z0-9._-' '_')" | |
| metrics_path="${output}/resource-metrics.env" | |
| mkdir -p "$output" | |
| set +e | |
| OPENCLAW_NPM_TELEGRAM_PACKAGE_SPEC="$spec" \ | |
| OPENCLAW_NPM_TELEGRAM_OUTPUT_DIR="$output/raw" \ | |
| OPENCLAW_NPM_TELEGRAM_PROVIDER_MODE=mock-openai \ | |
| OPENCLAW_NPM_TELEGRAM_SCENARIOS=telegram-mentioned-message-reply \ | |
| OPENCLAW_NPM_TELEGRAM_RTT_SAMPLES=20 \ | |
| OPENCLAW_QA_TELEGRAM_SCENARIO_TIMEOUT_MS=240000 \ | |
| /usr/bin/time \ | |
| -f 'max_rss_kb=%M\nelapsed_seconds=%e' \ | |
| -o "$metrics_path" \ | |
| timeout --kill-after=30s 10m \ | |
| pnpm test:docker:npm-telegram-live | |
| status="$?" | |
| set -e | |
| echo "exit_status=${status}" >>"$metrics_path" | |
| evidence_path="$output/raw/qa-evidence.json" | |
| if [[ ! -f "$evidence_path" ]]; then | |
| echo "Skipping RSS backfill for $spec because the rerun did not produce qa-evidence.json." >&2 | |
| continue | |
| fi | |
| run_status="$(node -e 'const fs = require("node:fs"); const evidence = JSON.parse(fs.readFileSync(process.argv[1], "utf8")); const failed = !Array.isArray(evidence.entries) || evidence.entries.some((entry) => entry?.result?.status !== "pass"); process.stdout.write(failed ? "fail" : "pass");' "$evidence_path")" | |
| if [[ "$run_status" != "pass" ]]; then | |
| echo "Skipping RSS backfill for failed rerun ${evidence_path} (status=${run_status:-missing})." >&2 | |
| continue | |
| fi | |
| ( | |
| cd ../openclaw-rtt | |
| git pull --rebase origin "${GITHUB_REF_NAME:-main}" | |
| node scripts/backfill-release-rss.mjs \ | |
| --family telegram \ | |
| --spec "$spec" \ | |
| --version "$version" \ | |
| --resource-metrics "$metrics_path" | |
| node scripts/validate.mjs | |
| git add data/channels/telegram/ runs/telegram/ | |
| if git diff --cached --quiet --exit-code; then | |
| echo "No RSS changes to commit for $spec." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git commit -m "data: record release rtt batch" | |
| git push || { | |
| git pull --rebase origin "${GITHUB_REF_NAME:-main}" | |
| git push | |
| } | |
| ) | |
| done | |
| - name: Run RTT | |
| if: steps.release.outputs.should_run == 'true' && steps.release.outputs.rss_backfill != 'true' | |
| id: rtt | |
| working-directory: openclaw | |
| env: | |
| OPENCLAW_QA_TELEGRAM_GROUP_ID: ${{ secrets.OPENCLAW_QA_TELEGRAM_GROUP_ID }} | |
| OPENCLAW_QA_TELEGRAM_DRIVER_BOT_TOKEN: ${{ secrets.OPENCLAW_QA_TELEGRAM_DRIVER_BOT_TOKEN }} | |
| OPENCLAW_QA_TELEGRAM_SUT_BOT_TOKEN: ${{ secrets.OPENCLAW_QA_TELEGRAM_SUT_BOT_TOKEN }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| result_paths="$RUNNER_TEMP/openclaw-rtt-result-paths.txt" | |
| : >"$result_paths" | |
| read -r -a specs <<< "${{ steps.release.outputs.specs }}" | |
| read -r -a versions <<< "${{ steps.release.outputs.versions }}" | |
| for index in "${!specs[@]}"; do | |
| spec="${specs[$index]}" | |
| version="${versions[$index]}" | |
| output="$RUNNER_TEMP/openclaw-rtt-runs/$(printf '%s' "$spec" | tr -c 'A-Za-z0-9._-' '_')" | |
| metrics_path="${output}/resource-metrics.env" | |
| mkdir -p "$output" | |
| started_at="$(node -e 'process.stdout.write(new Date().toISOString())')" | |
| set +e | |
| OPENCLAW_NPM_TELEGRAM_PACKAGE_SPEC="$spec" \ | |
| OPENCLAW_NPM_TELEGRAM_OUTPUT_DIR="$output/raw" \ | |
| OPENCLAW_NPM_TELEGRAM_PROVIDER_MODE=mock-openai \ | |
| OPENCLAW_NPM_TELEGRAM_SCENARIOS=telegram-mentioned-message-reply \ | |
| OPENCLAW_NPM_TELEGRAM_RTT_SAMPLES=20 \ | |
| OPENCLAW_QA_TELEGRAM_SCENARIO_TIMEOUT_MS=240000 \ | |
| /usr/bin/time \ | |
| -f 'max_rss_kb=%M\nelapsed_seconds=%e' \ | |
| -o "$metrics_path" \ | |
| pnpm test:docker:npm-telegram-live | |
| status="$?" | |
| set -e | |
| finished_at="$(node -e 'process.stdout.write(new Date().toISOString())')" | |
| echo "exit_status=${status}" >>"$metrics_path" | |
| evidence_path="$output/raw/qa-evidence.json" | |
| if [[ ! -f "$evidence_path" ]]; then | |
| echo "No qa-evidence.json produced for $spec." >&2 | |
| if [[ "${{ steps.release.outputs.rss_backfill }}" == "true" ]]; then | |
| echo "Skipping RSS backfill for $spec because the rerun did not produce qa-evidence.json." >&2 | |
| continue | |
| fi | |
| if [[ "$status" -eq 0 ]]; then | |
| status=1 | |
| fi | |
| exit "$status" | |
| fi | |
| printf '%s\t%s\t%s\t%s\t%s\n' "$evidence_path" "$metrics_path" "$version" "$started_at" "$finished_at" >>"$result_paths" | |
| done | |
| echo "result_paths=$result_paths" >>"$GITHUB_OUTPUT" | |
| - name: Import result | |
| if: steps.release.outputs.should_run == 'true' && steps.release.outputs.rss_backfill != 'true' | |
| working-directory: openclaw-rtt | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| git pull --rebase origin "${GITHUB_REF_NAME:-main}" | |
| while IFS=$'\t' read -r evidence_path metrics_path version started_at finished_at; do | |
| node scripts/import-result.mjs "$evidence_path" \ | |
| --version "$version" \ | |
| --started-at "$started_at" \ | |
| --finished-at "$finished_at" \ | |
| --resource-metrics "$metrics_path" | |
| done <"${{ steps.rtt.outputs.result_paths }}" | |
| node scripts/validate.mjs | |
| node scripts/summary.mjs | |
| - name: Commit result | |
| if: steps.release.outputs.should_run == 'true' && steps.release.outputs.rss_backfill != 'true' | |
| working-directory: openclaw-rtt | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| git add data/channels/telegram/ runs/telegram/ | |
| if git diff --cached --quiet --exit-code; then | |
| echo "No RTT changes to commit." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git commit -m "data: record release rtt batch" | |
| git push || { | |
| git pull --rebase origin "${GITHUB_REF_NAME:-main}" | |
| git push | |
| } | |
| - name: Report skipped package | |
| if: steps.release.outputs.should_run != 'true' | |
| run: | | |
| echo "No new release versions to measure after ${{ steps.release.outputs.anchor }} (${{ steps.release.outputs.reason }})" |