Skip to content

Commit 2a1d6e4

Browse files
authored
fix(ci): run Telegram release QA from trusted harness (#103207)
* fix(ci): use trusted Telegram QA harness * fix(ci): restrict trusted Telegram QA candidate * fix(ci): isolate trusted Telegram QA candidate * fix(ci): harden Telegram QA process boundary * fix(ci): pass Telegram QA release gates * test(qa): stub Telegram env explicitly * fix(ci): harden Telegram release QA boundary * test(ci): harden trusted workflow and memory guards
1 parent 7a38f14 commit 2a1d6e4

23 files changed

Lines changed: 6632 additions & 210 deletions

‎.github/workflows/openclaw-release-checks.yml‎

Lines changed: 40 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ jobs:
130130
release_package_spec: ${{ steps.inputs.outputs.release_package_spec }}
131131
package_acceptance_package_spec: ${{ steps.inputs.outputs.package_acceptance_package_spec }}
132132
codex_plugin_spec: ${{ steps.inputs.outputs.codex_plugin_spec }}
133+
trusted_workflow_sha: ${{ steps.trusted_workflow.outputs.sha }}
133134
steps:
134135
- name: Require trusted workflow ref for release checks
135136
env:
@@ -172,6 +173,13 @@ jobs:
172173
path: workflow
173174
fetch-depth: 1
174175

176+
- name: Resolve trusted main Telegram workflow SHA
177+
id: trusted_workflow
178+
run: |
179+
bash workflow/scripts/github/resolve-openclaw-ref.sh \
180+
--ref refs/heads/main \
181+
--github-output "$GITHUB_OUTPUT"
182+
175183
- name: Fast-resolve selected ref
176184
id: fast_ref
177185
env:
@@ -1462,6 +1470,22 @@ jobs:
14621470
name: Run QA Lab live Telegram lane
14631471
needs: [resolve_target]
14641472
if: contains(fromJSON('["all","qa","qa-live"]'), needs.resolve_target.outputs.rerun_group) && needs.resolve_target.outputs.qa_live_telegram_enabled == 'true'
1473+
permissions:
1474+
actions: read
1475+
attestations: write
1476+
contents: read
1477+
id-token: write
1478+
pull-requests: read
1479+
uses: openclaw/openclaw/.github/workflows/openclaw-release-telegram-qa.yml@main
1480+
with:
1481+
expected_trusted_workflow_sha: ${{ needs.resolve_target.outputs.trusted_workflow_sha }}
1482+
target_ref: ${{ needs.resolve_target.outputs.ref }}
1483+
target_sha: ${{ needs.resolve_target.outputs.revision }}
1484+
1485+
qa_live_discord_release_checks:
1486+
name: Run QA Lab live Discord lane
1487+
needs: [resolve_target]
1488+
if: contains(fromJSON('["all","qa","qa-live"]'), needs.resolve_target.outputs.rerun_group) && needs.resolve_target.outputs.qa_live_discord_enabled == 'true'
14651489
continue-on-error: true
14661490
runs-on: ubuntu-24.04
14671491
timeout-minutes: 60
@@ -1511,103 +1535,6 @@ jobs:
15111535
NODE_OPTIONS: --max-old-space-size=8192
15121536
run: node scripts/build-all.mjs qaRuntime
15131537

1514-
- name: Run Telegram live lane
1515-
id: run_lane
1516-
shell: bash
1517-
env:
1518-
OPENCLAW_QA_CONVEX_SITE_URL: ${{ secrets.OPENCLAW_QA_CONVEX_SITE_URL }}
1519-
OPENCLAW_QA_CONVEX_SECRET_CI: ${{ secrets.OPENCLAW_QA_CONVEX_SECRET_CI }}
1520-
OPENCLAW_QA_CREDENTIAL_ACQUIRE_TIMEOUT_MS: "1800000"
1521-
OPENCLAW_QA_REDACT_PUBLIC_METADATA: "1"
1522-
run: |
1523-
set -euo pipefail
1524-
1525-
output_dir=".artifacts/qa-e2e/telegram-live-release-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
1526-
echo "output_dir=${output_dir}" >> "$GITHUB_OUTPUT"
1527-
1528-
for attempt in 1 2; do
1529-
attempt_output_dir="${output_dir}/attempt-${attempt}"
1530-
if pnpm openclaw qa telegram \
1531-
--repo-root . \
1532-
--output-dir "${attempt_output_dir}" \
1533-
--provider-mode mock-openai \
1534-
--model mock-openai/gpt-5.5 \
1535-
--alt-model mock-openai/gpt-5.5-alt \
1536-
--fast \
1537-
--credential-source convex \
1538-
--credential-role ci; then
1539-
exit 0
1540-
fi
1541-
if [[ "${attempt}" == "2" ]]; then
1542-
exit 1
1543-
fi
1544-
echo "Telegram live lane failed on attempt ${attempt}; retrying once..." >&2
1545-
sleep 10
1546-
done
1547-
1548-
- name: Upload Telegram QA artifacts
1549-
id: upload_telegram_qa_artifacts
1550-
if: always()
1551-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
1552-
with:
1553-
name: release-qa-live-telegram-${{ needs.resolve_target.outputs.revision }}
1554-
path: .artifacts/qa-e2e/
1555-
retention-days: 14
1556-
if-no-files-found: error
1557-
1558-
- name: Record advisory status
1559-
if: always()
1560-
shell: bash
1561-
env:
1562-
RELEASE_CHECK_JOB: qa_live_telegram_release_checks
1563-
RELEASE_CHECK_TARGET_SHA: ${{ needs.resolve_target.outputs.revision }}
1564-
JOB_STATUS: ${{ job.status }}
1565-
RELEASE_CHECK_STEP_OUTCOMES: ${{ steps.run_lane.outcome }} ${{ steps.upload_telegram_qa_artifacts.outcome }}
1566-
run: *record_release_check_advisory_status
1567-
1568-
- name: Upload advisory status
1569-
if: always()
1570-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
1571-
with:
1572-
name: release-check-status-qa-live-telegram-${{ needs.resolve_target.outputs.revision }}-${{ github.run_id }}-${{ github.run_attempt }}
1573-
path: .artifacts/release-check-status/qa_live_telegram_release_checks-${{ github.run_id }}-${{ github.run_attempt }}.env
1574-
retention-days: 14
1575-
if-no-files-found: error
1576-
1577-
qa_live_discord_release_checks:
1578-
name: Run QA Lab live Discord lane
1579-
needs: [resolve_target]
1580-
if: contains(fromJSON('["all","qa","qa-live"]'), needs.resolve_target.outputs.rerun_group) && needs.resolve_target.outputs.qa_live_discord_enabled == 'true'
1581-
continue-on-error: true
1582-
runs-on: ubuntu-24.04
1583-
timeout-minutes: 60
1584-
permissions:
1585-
contents: read
1586-
pull-requests: read
1587-
environment: qa-live-shared
1588-
env:
1589-
OPENCLAW_BUILD_PRIVATE_QA: "1"
1590-
OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1"
1591-
steps:
1592-
- name: Checkout selected ref
1593-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
1594-
with:
1595-
persist-credentials: false
1596-
ref: ${{ needs.resolve_target.outputs.revision }}
1597-
fetch-depth: 1
1598-
1599-
- name: Setup Node environment
1600-
uses: ./.github/actions/setup-node-env
1601-
with:
1602-
node-version: ${{ env.NODE_VERSION }}
1603-
install-bun: "true"
1604-
1605-
- *release_qa_required_credentials_step
1606-
- name: Build private QA runtime
1607-
env:
1608-
NODE_OPTIONS: --max-old-space-size=8192
1609-
run: node scripts/build-all.mjs qaRuntime
1610-
16111538
- name: Run Discord live lane
16121539
id: run_lane
16131540
shell: bash
@@ -1906,6 +1833,7 @@ jobs:
19061833
- name: Verify release check results
19071834
shell: bash
19081835
env:
1836+
RESOLVE_TARGET_RESULT: ${{ needs.resolve_target.result }}
19091837
PREPARE_RELEASE_PACKAGE_RESULT: ${{ needs.prepare_release_package.result }}
19101838
INSTALL_SMOKE_RELEASE_CHECKS_RESULT: ${{ needs.install_smoke_release_checks.result }}
19111839
CROSS_OS_RELEASE_CHECKS_RESULT: ${{ needs.cross_os_release_checks.result }}
@@ -1919,6 +1847,7 @@ jobs:
19191847
RUNTIME_TOOL_COVERAGE_RELEASE_CHECKS_RESULT: ${{ needs.runtime_tool_coverage_release_checks.result }}
19201848
QA_LIVE_MATRIX_RELEASE_CHECKS_RESULT: ${{ needs.qa_live_matrix_release_checks.result }}
19211849
QA_LIVE_TELEGRAM_RELEASE_CHECKS_RESULT: ${{ needs.qa_live_telegram_release_checks.result }}
1850+
QA_LIVE_TELEGRAM_SELECTED: ${{ contains(fromJSON('["all","qa","qa-live"]'), needs.resolve_target.outputs.rerun_group) && needs.resolve_target.outputs.qa_live_telegram_enabled == 'true' }}
19221851
QA_LIVE_DISCORD_RELEASE_CHECKS_RESULT: ${{ needs.qa_live_discord_release_checks.result }}
19231852
QA_LIVE_WHATSAPP_RELEASE_CHECKS_RESULT: ${{ needs.qa_live_whatsapp_release_checks.result }}
19241853
QA_LIVE_SLACK_RELEASE_CHECKS_RESULT: ${{ needs.qa_live_slack_release_checks.result }}
@@ -1930,6 +1859,7 @@ jobs:
19301859
set -euo pipefail
19311860
failed=0
19321861
release_check_items=(
1862+
"resolve_target=${RESOLVE_TARGET_RESULT}"
19331863
"prepare_release_package=${PREPARE_RELEASE_PACKAGE_RESULT}"
19341864
"install_smoke_release_checks=${INSTALL_SMOKE_RELEASE_CHECKS_RESULT}"
19351865
"cross_os_release_checks=${CROSS_OS_RELEASE_CHECKS_RESULT}"
@@ -2055,6 +1985,7 @@ jobs:
20551985
local saw=0
20561986
local saw_failure=0
20571987
local saw_cancelled=0
1988+
local saw_skipped=0
20581989
local variants=()
20591990
if [[ "$fallback" != "skipped" ]]; then
20601991
if [[ "$name" == "qa_lab_parity_lane_release_checks" ]]; then
@@ -2076,7 +2007,8 @@ jobs:
20762007
saw=1
20772008
status="$(status_field "$file" status)" || status=""
20782009
case "$status" in
2079-
success|skipped) ;;
2010+
success) ;;
2011+
skipped) saw_skipped=1 ;;
20802012
cancelled) saw_cancelled=1 ;;
20812013
failure|"") saw_failure=1 ;;
20822014
*) saw_failure=1 ;;
@@ -2090,6 +2022,8 @@ jobs:
20902022
printf 'failure\n'
20912023
elif [[ "$saw_cancelled" == "1" ]]; then
20922024
printf 'cancelled\n'
2025+
elif [[ "$saw_skipped" == "1" ]]; then
2026+
printf 'skipped\n'
20932027
elif [[ "$fallback" != "success" && "$fallback" != "skipped" ]]; then
20942028
printf '%s\n' "$fallback"
20952029
elif [[ "$saw" == "1" ]]; then
@@ -2118,10 +2052,16 @@ jobs:
21182052
else
21192053
result="$raw_result"
21202054
fi
2121-
if [[ "$result" != "success" && "$result" != "skipped" ]]; then
2055+
require_success=false
2056+
if [[ "$name" == "qa_live_telegram_release_checks" &&
2057+
"$QA_LIVE_TELEGRAM_SELECTED" == "true" ]]; then
2058+
require_success=true
2059+
fi
2060+
if [[ "$result" != "success" &&
2061+
( "$result" != "skipped" || "$require_success" == "true" ) ]]; then
21222062
if [[ "$tideclaw_alpha" == "true" ]]; then
21232063
case "$name" in
2124-
prepare_release_package|install_smoke_release_checks|package_acceptance_release_checks) ;;
2064+
resolve_target|prepare_release_package|install_smoke_release_checks|package_acceptance_release_checks) ;;
21252065
*)
21262066
echo "::warning::${name} ended with ${result}; Tideclaw alpha treats non-package-safety release-check lanes as advisory."
21272067
continue

0 commit comments

Comments
 (0)