Skip to content

TUI Smoke

TUI Smoke #1

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
#
# Headless smoke for the pwm-tui real-checkpoint demo (no Docker). Separate from
# the merge gate because it downloads external Hugging Face assets and a torch
# environment. Runs on demand and weekly on main.
name: TUI Smoke
on:
workflow_dispatch:
schedule:
- cron: "41 5 * * 1"
permissions:
contents: read
jobs:
tui-headless:
name: pwm-tui headless real demo
runs-on: ubuntu-latest
timeout-minutes: 60
env:
NO_COLOR: "1"
PWM_CACHE_DIR: ${{ github.workspace }}/.pwm-cache
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8
- name: Build pwm-tui
run: cargo build -p pwm-tui --release --locked
- name: Cold run (downloads pinned assets, exports, proves)
run: |
set -euo pipefail
./target/release/pwm-tui --headless --json | tee tui-cold.log
tail -n 1 tui-cold.log > tui-summary.json
python3 - <<'PY'
import json
s = json.load(open("tui-summary.json"))
assert s["ok"] is True, s
r = s["report"]
assert r["accepted"] is True
assert r["weights_root_source"] == "export-bundle"
assert float(r["float_error"]) <= float(r["float_tolerance"])
assert r["tamper"]["rejected_with"], "tamper must be rejected"
print("cold run ok:", r["weights_root"][:16], r["z_out_head"])
PY
- name: Warm run (offline, bundle cache hit, pure Rust)
run: |
set -euo pipefail
./target/release/pwm-tui --headless --offline --json | tee tui-warm.log
grep -q "skipped: bundle cache hit" tui-warm.log
tail -n 1 tui-warm.log | python3 -c "import json,sys; s=json.load(sys.stdin); assert s['ok'] is True"
- name: Cache management commands
run: |
set -euo pipefail
./target/release/pwm-tui cache path
./target/release/pwm-tui cache ls
./target/release/pwm-tui cache clear --yes
./target/release/pwm-tui --headless --offline > offline-cold.log 2>&1 && exit 1 || true
grep -q "offline" offline-cold.log
- name: Upload logs
if: always()
uses: actions/upload-artifact@v7
with:
name: tui-smoke-${{ github.run_id }}
path: |
tui-cold.log
tui-warm.log
offline-cold.log
if-no-files-found: warn
retention-days: 14