Harden Webcast runtime and update operator console surfaces #95
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: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint-and-typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python 3.11 | |
| run: uv python install 3.11 | |
| - name: Sync dev environment | |
| run: uv sync --frozen --extra ml_backend --group dev | |
| - name: Ruff lint | |
| run: uv run ruff check packages/ services/ tests/ automation/ | |
| - name: Ruff format check | |
| run: uv run ruff format --check packages/ services/ tests/ automation/ | |
| - name: Mypy type check | |
| run: uv run mypy packages/ services/ tests/ automation/ --python-version 3.11 --ignore-missing-imports --explicit-package-bases | |
| - name: Schema consistency check | |
| run: uv run python scripts/check_schema_consistency.py | |
| - name: Canonical terminology audit | |
| shell: bash | |
| run: | | |
| if grep -rnE \ | |
| --exclude='check.sh' \ | |
| --exclude='check.ps1' \ | |
| --exclude='mechanical.py' \ | |
| --exclude='*.pyc' \ | |
| --exclude-dir='__pycache__' \ | |
| 'GPU worker|video pipe|free-form rationale|free-form rationales|free-form semantic rationale|free-form semantic rationales|x[_-]?max[- ]normalized reward|x[_-]?max as reward input|x[_-]?max reward input|\bpitch_f0\b|legacy acoustic scalar|scalar-only acoustic|\[0\.0, 5\.0\].*AU12|AU12.*\[0\.0, 5\.0\]|AU12 clamp.*5\.0|clamp.*AU12.*5\.0' \ | |
| services/ packages/ scripts/; then | |
| exit 1 | |
| fi | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-typecheck | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python 3.11 | |
| run: uv python install 3.11 | |
| - name: Install Qt runtime libraries and FFmpeg | |
| # PySide6's QtWidgets dynamically loads libEGL.so.1 / libGL.so.1 | |
| # at import time, even under QT_QPA_PLATFORM=offscreen. The | |
| # ubuntu-latest runner does not ship these by default, so the | |
| # operator-console conftests (unit + integration) fail at import | |
| # before any test body runs. libxkbcommon / libdbus / libfontconfig | |
| # are additional transitive dlopen targets for QtGui / QtWidgets. | |
| # ffmpeg is required for the synthetic replay capture tests. | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| libegl1 libgl1 libxkbcommon0 libdbus-1-3 libfontconfig1 ffmpeg | |
| - name: Sync runtime + dev environment | |
| run: uv sync --frozen --extra ml_backend --group dev | |
| - name: Run tests | |
| env: | |
| # Belt-and-suspenders: conftest sets this with setdefault, but | |
| # pinning it at the job level keeps the intent visible in the | |
| # workflow and guards against a future test that imports Qt | |
| # before the fixture runs. | |
| QT_QPA_PLATFORM: offscreen | |
| run: uv run pytest tests/ -x -q --tb=short | |
| audit: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-typecheck | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python 3.11 | |
| run: uv python install 3.11 | |
| - name: Sync runtime + dev environment | |
| run: uv sync --frozen --extra ml_backend --group dev | |
| - name: Run strict §13 audit harness | |
| run: uv run python scripts/run_audit.py --strict | |
| visual-drift: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-typecheck | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python 3.11 | |
| run: uv python install 3.11 | |
| - name: Set up Node 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Cache Playwright browser binaries | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | |
| - name: Install Qt runtime libraries and FFmpeg | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| libegl1 libgl1 libxkbcommon0 libdbus-1-3 libfontconfig1 ffmpeg fonts-liberation | |
| - name: Sync runtime + dev environment | |
| run: uv sync --frozen --group dev | |
| - name: Install pinned visual-drift tooling | |
| run: npm ci | |
| - name: Check generated PySide tokens | |
| run: uv run python scripts/generate_pyside_tokens.py --export-dir services/operator_console/design_system --manifest services/operator_console/design_system/designer_export_manifest.json --check | |
| - name: Check visual-drift scripts | |
| run: node --check scripts/capture_html_reference.js && node --check scripts/generate_drift_report.js | |
| - name: Render PySide runtime screenshots | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| LSIE_SCREENSHOT_DIR: captures/runtime | |
| run: uv run python scripts/render_console_screens.py | |
| - name: Summarize advisory visual drift | |
| shell: bash | |
| run: | | |
| PORTAL_URL="https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/" | |
| { | |
| echo "## Operator Console visual drift" | |
| echo | |
| echo "Generated synthetic PySide runtime captures for advisory review." | |
| echo | |
| echo "Designer-reference and PySide-baseline comparisons remain advisory until immutable external artifacts are approved and wired into this job." | |
| echo | |
| echo "[🚪 Open the Designer Portal]($PORTAL_URL)" | |
| echo | |
| echo "Check the 'Automated Reports' section on the portal homepage for the latest visual drift results." | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload runtime captures | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: operator-console-runtime-captures | |
| path: captures/runtime | |
| retention-days: 14 |