Skip to content

Main RTT

Main RTT #279

Workflow file for this run

name: Main RTT
on:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
inputs:
samples:
description: Number of Telegram RTT samples
required: false
default: "20"
type: string
permissions:
contents: write
concurrency:
group: main-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 main 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: Checkout OpenClaw main
uses: actions/checkout@v7
with:
repository: openclaw/openclaw
ref: main
path: openclaw
fetch-depth: 1
persist-credentials: false
- name: Set up Blacksmith Docker Builder
uses: useblacksmith/setup-docker-builder@ab5c1da94f53f5cd75c1038092aa276dddfccbba # v1
with:
max-cache-size-mb: 800000
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
shell: bash
run: |
set -euo pipefail
corepack enable
corepack prepare "pnpm@${PNPM_VERSION}" --activate
- name: Locate pnpm store
id: pnpm-store
working-directory: openclaw
shell: bash
run: |
set -euo pipefail
echo "path=$(pnpm store path --silent)" >>"$GITHUB_OUTPUT"
- name: Restore pnpm store
uses: actions/cache@v6
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: openclaw-main-rtt-pnpm-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('openclaw/pnpm-lock.yaml') }}
restore-keys: |
openclaw-main-rtt-pnpm-${{ runner.os }}-${{ runner.arch }}-
- name: Build OpenClaw package
id: pack
working-directory: openclaw
shell: bash
run: |
set -euo pipefail
echo "::group::pnpm install"
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
echo "::endgroup::"
echo "::group::pnpm build"
time pnpm build
echo "::endgroup::"
mkdir -p .artifacts/rtt-package
echo "::group::npm pack"
time npm pack --ignore-scripts --silent --pack-destination .artifacts/rtt-package
echo "::endgroup::"
package_tgz="$(find .artifacts/rtt-package -maxdepth 1 -name '*.tgz' -type f | sort | tail -1)"
if [[ -z "$package_tgz" ]]; then
echo "No package tgz produced." >&2
exit 1
fi
package_version="$(node -e 'const fs = require("node:fs"); process.stdout.write(JSON.parse(fs.readFileSync("package.json", "utf8")).version)')+$(git rev-parse --short=10 HEAD)"
echo "package_tgz=${PWD}/${package_tgz}" >>"$GITHUB_OUTPUT"
echo "package_version=$package_version" >>"$GITHUB_OUTPUT"
- name: Run RTT
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 }}
INPUT_SAMPLES: ${{ github.event_name == 'workflow_dispatch' && inputs.samples || '20' }}
shell: bash
run: |
samples="${INPUT_SAMPLES:-20}"
if ! [[ "$samples" =~ ^[1-9][0-9]*$ ]]; then
echo "samples must be a positive integer, got: $samples" >&2
exit 1
fi
output="$RUNNER_TEMP/openclaw-rtt-runs/main"
rtt_env=(
OPENCLAW_NPM_TELEGRAM_PACKAGE_SPEC="openclaw@main"
OPENCLAW_NPM_TELEGRAM_PACKAGE_TGZ="${{ steps.pack.outputs.package_tgz }}"
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="$samples"
OPENCLAW_QA_TELEGRAM_SCENARIO_TIMEOUT_MS=240000
)
metrics_path="$RUNNER_TEMP/openclaw-rtt-resource-metrics.env"
started_at="$(node -e 'process.stdout.write(new Date().toISOString())')"
set +e
env \
"${rtt_env[@]}" \
/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())')"
evidence_path="$output/raw/qa-evidence.json"
if [[ ! -f "$evidence_path" ]]; then
echo "No qa-evidence.json produced." >&2
exit "$status"
fi
{
echo "evidence_path=$evidence_path"
echo "resource_metrics_path=$metrics_path"
echo "started_at=$started_at"
echo "finished_at=$finished_at"
} >>"$GITHUB_OUTPUT"
- name: Import result
working-directory: openclaw-rtt
shell: bash
run: |
set -euo pipefail
git pull --rebase origin main
node scripts/import-result.mjs "${{ steps.rtt.outputs.evidence_path }}" \
--version "${{ steps.pack.outputs.package_version }}" \
--started-at "${{ steps.rtt.outputs.started_at }}" \
--finished-at "${{ steps.rtt.outputs.finished_at }}" \
--resource-metrics "${{ steps.rtt.outputs.resource_metrics_path }}"
node scripts/validate.mjs
node scripts/summary.mjs
- name: Commit result
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 main rtt"
git push || {
git pull --rebase origin main
git push
}