Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
ci: twelve workflows become six, without dropping a single gate
Haraldb1d9baf68f56
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 94b61953f7..32c052ca3d 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -28,6 +28,21 @@## Action SHAs are pinned to 40-char commits already vetted elsewhere in this# repo's workflows (CVE-2025-30066 hardening).+#+# Consolidation (2026-08-20): three standalone workflows moved in here as jobs,+# because a contributor opening a PR should read ONE check list, not four. The+# behaviour each of them gated is unchanged, only its home is:+#+# * frontend.yml -> job `frontend` (npm test + build + bundle budget)+# * realtime-reliability.yml-> jobs `realtime-contract` / `realtime-slim` /+# `realtime-soak`. They keep their OWN fixed OS matrix (macOS on every run)+# instead of `needs: configure`, exactly as before: the point of that suite+# is a small focused macOS proof that does not multiply the full-suite cost.+# The one dropped trigger is `push: tags`, because a tag points at a SHA+# that main already proved on the push that created it.+# * dragdrop-verify.yml -> job `dragdrop`. GitHub has no per-job `paths:`+# filter, so the path gate moved into `configure` as a git diff (stdlib ++# git, no third-party action). Unresolvable base => the job RUNS.name: CI@@ -43,6 +58,10 @@ on:description: "Also run the macOS leg (~10x runner cost). On by default for a manual run, since proving macOS is usually the point of dispatching by hand."type: booleandefault: true+ run_contract_soak:+ description: "Run the extended synthetic realtime orchestration soak (not release evidence)."+ type: boolean+ default: true# Cost control: a new push to the same ref cancels the previous in-flight run,# so a burst of commits doesn't stack up billable runner minutes. Keyed on ref@@ -66,19 +85,80 @@ jobs:timeout-minutes: 5outputs:os-matrix: ${{ steps.pick.outputs.os-matrix }}+ dragdrop-matrix: ${{ steps.pick.outputs.dragdrop-matrix }}+ run-dragdrop: ${{ steps.paths.outputs.run-dragdrop }}steps:+ - name: Checkout (full history — the path gate needs a diff base)+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ fetch-depth: 0+ persist-credentials: false+- name: Pick OS matrixid: pickshell: bashrun: |if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.include_macos }}" = "true" ]; thenecho 'os-matrix=["ubuntu-latest","windows-latest","macos-latest"]' >> "$GITHUB_OUTPUT"+ echo 'dragdrop-matrix=["ubuntu-latest","windows-latest","macos-latest"]' >> "$GITHUB_OUTPUT"echo "macOS leg INCLUDED (manual dispatch)."elseecho 'os-matrix=["ubuntu-latest","windows-latest"]' >> "$GITHUB_OUTPUT"+ echo 'dragdrop-matrix=["ubuntu-latest","windows-latest"]' >> "$GITHUB_OUTPUT"echo "macOS leg SKIPPED (cheap push/PR run). Dispatch manually to include it."fi+ # GitHub offers `paths:` only per WORKFLOW, never per job — so the path+ # gate that dragdrop-verify.yml got for free as its own file has to be+ # computed here. git + stdlib only: no third-party action enters the+ # supply chain for a file-list comparison (CVE-2025-30066).+ #+ # Fails OPEN on purpose: a manual dispatch, an unresolvable diff base, or+ # a first push to a new branch RUNS the job. A missed drag-drop+ # regression costs a broken overlay on someone else's OS; a redundant run+ # costs two cheap runner minutes.+ - name: Path gate for the drag-drop proof+ id: paths+ shell: bash+ run: |+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then+ echo "run-dragdrop=true" >> "$GITHUB_OUTPUT"+ echo "Manual dispatch — drag-drop proof RUNS."+ exit 0+ fi+ base="${{ github.event.pull_request.base.sha }}"+ if [ -z "$base" ]; then+ base="${{ github.event.before }}"+ fi+ # An all-zero "before" means a branch's first push or a rewritten+ # history; treat it as no base at all.+ case "$base" in+ ""|*[!0]*) : ;;+ *) base="" ;;+ esac+ if [ -z "$base" ] || ! git cat-file -e "$base^{commit}" 2>/dev/null; then+ # checkout fetches the event's ref only, so origin/main may not exist+ # locally yet — same fetch the privacy-gate job below does.+ git fetch --no-tags origin main:refs/remotes/origin/main 2>/dev/null || true+ base="$(git merge-base HEAD refs/remotes/origin/main 2>/dev/null || echo "")"+ fi+ if [ -z "$base" ]; then+ echo "run-dragdrop=true" >> "$GITHUB_OUTPUT"+ echo "No usable diff base — drag-drop proof RUNS (fail open)."+ exit 0+ fi+ if git diff --name-only "$base" HEAD -- \+ jarvis/overlay/drop_target.py \+ jarvis/overlay/drop_bridge.py \+ scripts/crossplatform/verify_drop_target.py \+ .github/workflows/ci.yml | grep -q .; then+ echo "run-dragdrop=true" >> "$GITHUB_OUTPUT"+ echo "Drop-path files changed since $base — drag-drop proof RUNS."+ else+ echo "run-dragdrop=false" >> "$GITHUB_OUTPUT"+ echo "No drop-path file changed since $base — drag-drop proof SKIPPED."+ fi+test:name: test (${{ matrix.os }})needs: configure@@ -558,3 +638,214 @@ jobs:- name: Public reader docs contract (BLOCKING)run: python scripts/ci/check_public_docs.py++ # Frontend test + production build (was frontend.yml until 2026-08-20).+ # Own job rather than a step in `test`: it needs Node, not Python, and a+ # frontend-only change should get its signal without waiting on the OS matrix.+ frontend:+ name: frontend (test + production build)+ runs-on: ubuntu-latest+ timeout-minutes: 15+ defaults:+ run:+ working-directory: jarvis/ui/web/frontend++ steps:+ - name: Checkout+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ persist-credentials: false++ - name: Set up Node.js 22+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0+ with:+ node-version: "22"+ cache: npm+ cache-dependency-path: jarvis/ui/web/frontend/package-lock.json++ - name: Install locked dependencies+ run: npm ci++ - name: Run frontend tests+ run: npm test++ - name: Build and verify production assets+ run: npm run build++ # The entry chunk is parsed and executed before the UI paints a single+ # pixel, so its size IS startup latency. Guarding it here is the frontend+ # twin of the Python boot budget in .githooks/pre-push: both block the+ # same regression class, where a statically imported view or library+ # quietly adds seconds to every launch.+ - name: Check startup bundle budget+ working-directory: ${{ github.workspace }}+ run: python3 scripts/ci/check_frontend_bundle_budget.py++ # Realtime's small, blocking cross-platform contract (was+ # realtime-reliability.yml until 2026-08-20).+ #+ # Deliberately NOT `needs: configure`: this matrix is hard-coded to all three+ # OSes including macOS on EVERY run. That is the whole reason the suite is+ # small — it buys a macOS proof on every change without paying the hour-long+ # full-suite cost, which is why `test` above keeps macOS behind a dispatch.+ #+ # No job here owns a microphone, speaker, desktop session, or provider secret.+ # Physical microphone/acoustic-echo behavior, device hot-plug, and macOS TCC+ # prompts remain explicit human release sign-offs; a headless runner must never+ # turn their absence into a fake green result.+ realtime-contract:+ name: realtime provider contract (${{ matrix.os }})+ strategy:+ fail-fast: false+ matrix:+ os:+ - ubuntu-latest+ - windows-latest+ - macos-latest+ runs-on: ${{ matrix.os }}+ timeout-minutes: 25++ steps:+ - name: Checkout+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ persist-credentials: false++ - name: Set up Python 3.11+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0+ with:+ python-version: "3.11"++ - name: Install portable base and focused test runner+ shell: bash+ run: |+ python -m pip install --upgrade pip+ python -m pip install -e .+ python -m pip install pytest pytest-asyncio++ - name: Blocking provider-neutral realtime contract+ run: >-+ python -m pytest+ tests/contract/test_realtime_provider_contract.py+ tests/contract/test_realtime_reliability_gate.py+ -q -p no:cacheprovider++ realtime-slim:+ name: realtime on python:3.11-slim (no PortAudio)+ runs-on: ubuntu-latest+ container: python:3.11-slim+ timeout-minutes: 25++ steps:+ - name: Checkout+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ persist-credentials: false++ - name: Install base without system audio libraries+ run: |+ python -m pip install --upgrade pip+ python -m pip install -e .+ python -m pip install pytest pytest-asyncio++ - name: Prove the container really has no usable PortAudio+ run: |+ python - <<'PY'+ try:+ import sounddevice # noqa: F401+ except Exception as exc:+ print(f"NO_PORTAUDIO: {type(exc).__name__}: {exc}")+ else:+ raise SystemExit("python:3.11-slim unexpectedly loaded PortAudio")+ PY++ - name: Blocking headless realtime degradation contract+ run: >-+ python -m pytest+ tests/contract/test_realtime_provider_contract.py+ tests/contract/test_realtime_reliability_gate.py+ -q -p no:cacheprovider++ realtime-soak:+ name: realtime extended contract soak (not release evidence)+ # This synthetic orchestration proof must never green-light a tag. A real+ # release still needs same-SHA target measurements and manual acoustic+ # sign-off, neither of which a headless GitHub runner can produce.+ if: github.event_name == 'workflow_dispatch' && inputs.run_contract_soak+ runs-on: ubuntu-latest+ timeout-minutes: 25++ steps:+ - name: Checkout+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ persist-credentials: false++ - name: Set up Python 3.11+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0+ with:+ python-version: "3.11"++ - name: Install portable base+ run: |+ python -m pip install --upgrade pip+ python -m pip install -e .++ - name: Run provider-neutral orchestration soak+ run: python scripts/realtime_reliability_gate.py --contract-soak++ # Cross-platform drag-drop verification (was dragdrop-verify.yml until+ # 2026-08-20) — proves the overlay drop mechanism (tkdnd load + parse ++ # register + drop chain) actually EXECUTES on Windows, macOS AND Linux, by+ # running the same `scripts/crossplatform/verify_drop_target.py` on each.+ #+ # Gated by `configure`'s git-diff path check, because a workflow-level+ # `paths:` filter cannot apply to a single job. macOS (~10x cost) rides the+ # same dispatch-only rule as the rest of this file.+ dragdrop:+ name: drag-drop (${{ matrix.os }})+ needs: configure+ if: needs.configure.outputs.run-dragdrop == 'true'+ strategy:+ fail-fast: false+ matrix:+ os: ${{ fromJSON(needs.configure.outputs.dragdrop-matrix) }}+ runs-on: ${{ matrix.os }}+ timeout-minutes: 15++ steps:+ - name: Checkout+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ persist-credentials: false++ - name: Set up Python 3.11+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0+ with:+ python-version: "3.11"++ - name: Install tkinterdnd2 (+ Linux X11 runtime libs)+ shell: bash+ run: |+ python -m pip install --upgrade pip+ # Pin ==0.4.2: from 0.4.4.1 onward the osx-arm64 tkdnd binary is the+ # Tcl-9 build (libtcl9tkdnd2.9.5.dylib) that fails to load on the+ # standard Tcl-8.6 Python ("incompatible stubs mechanism"). 0.4.2 is the+ # highest version whose osx-arm64 binary is the Tcl-8 build+ # (libtkdnd2.9.3.dylib), which loads on Tcl-8.6 across all three OSes.+ pip install "tkinterdnd2==0.4.2"+ if [ "$RUNNER_OS" = "Linux" ]; then+ sudo apt-get update -qq+ sudo apt-get install -y --no-install-recommends \+ python3-tk xvfb libxcursor1 libxrender1 libxext6 \+ libxft2 libxinerama1 libxi6 libxrandr2+ fi++ - name: Verify drag-drop executes on ${{ matrix.os }}+ shell: bash+ run: |+ if [ "$RUNNER_OS" = "Linux" ]; then+ xvfb-run -a python scripts/crossplatform/verify_drop_target.py+ else+ python scripts/crossplatform/verify_drop_target.py+ fidiff --git a/.github/workflows/claude.yml b/.github/workflows/claude.ymldeleted file mode 100644index fc595b1a3c..0000000000--- a/.github/workflows/claude.yml+++ /dev/null@@ -1,46 +0,0 @@-name: Claude Code--on:- issue_comment:- types: [created]- pull_request_review_comment:- types: [created]- issues:- types: [opened, assigned]- pull_request_review:- types: [submitted]--jobs:- claude:- # SAFETY GATE: bot only runs on private repos.- # If this repo is ever flipped to public, the bot auto-disables — no- # action required. This prevents random external users from triggering- # paid Claude runs via "@claude" comments on a public issue tracker.- if: |- github.event.repository.private == true && (- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||- (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))- )- runs-on: ubuntu-latest- permissions:- contents: write- pull-requests: write- issues: write- id-token: write- actions: read- steps:- - name: Checkout repository- uses: actions/checkout@v6- with:- fetch-depth: 1-- - name: Run Claude Code- id: claude- uses: anthropics/claude-code-action@v1- with:- claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}- claude_args: |- --model claude-opus-4-7- --max-turns 30diff --git a/.github/workflows/dragdrop-verify.yml b/.github/workflows/dragdrop-verify.ymldeleted file mode 100644index a7cf536a4e..0000000000--- a/.github/workflows/dragdrop-verify.yml+++ /dev/null@@ -1,70 +0,0 @@-# Cross-platform drag-drop verification — proves the overlay drop mechanism-# (tkdnd load + parse + register + drop chain) actually EXECUTES on Windows,-# macOS AND Linux, by running the same-# `scripts/crossplatform/verify_drop_target.py` on each.-#-# Cost policy (2026-06-23): macOS runners bill at ~10x the Linux rate, so the-# macos-latest leg — the autonomous macOS proof that cannot be produced on a-# Windows dev box — runs ONLY on a manual `workflow_dispatch` (the Actions tab-# -> "Run workflow", or `gh workflow run dragdrop-verify.yml`). An ordinary-# push/PR that touches the drop files runs the cheap Linux + Windows legs. The-# `concurrency` group cancels a superseded in-flight run.-name: dragdrop-crossplatform-verify--on:- push:- paths:- - "jarvis/overlay/drop_target.py"- - "jarvis/overlay/drop_bridge.py"- - "scripts/crossplatform/verify_drop_target.py"- - ".github/workflows/dragdrop-verify.yml"- pull_request:- paths:- - "jarvis/overlay/drop_target.py"- - "jarvis/overlay/drop_bridge.py"- - "scripts/crossplatform/verify_drop_target.py"- workflow_dispatch: {}--# Cost control: a superseding push to the same ref cancels the in-flight run.-concurrency:- group: dragdrop-${{ github.workflow }}-${{ github.ref }}- cancel-in-progress: true--jobs:- verify:- name: drag-drop (${{ matrix.os }})- strategy:- fail-fast: false- # macOS (~10x cost) only on a manual dispatch; push/PR runs Linux + Windows.- matrix:- os: ${{ github.event_name == 'workflow_dispatch' && fromJSON('["ubuntu-latest","macos-latest","windows-latest"]') || fromJSON('["ubuntu-latest","windows-latest"]') }}- runs-on: ${{ matrix.os }}- steps:- - uses: actions/checkout@v4- - uses: actions/setup-python@v7- with:- python-version: "3.11"- - name: Install tkinterdnd2 (+ Linux X11 runtime libs)- shell: bash- run: |- python -m pip install --upgrade pip- # Pin ==0.4.2: from 0.4.4.1 onward the osx-arm64 tkdnd binary is the- # Tcl-9 build (libtcl9tkdnd2.9.5.dylib) that fails to load on the- # standard Tcl-8.6 Python ("incompatible stubs mechanism"). 0.4.2 is the- # highest version whose osx-arm64 binary is the Tcl-8 build- # (libtkdnd2.9.3.dylib), which loads on Tcl-8.6 across all three OSes.- pip install "tkinterdnd2==0.4.2"- if [ "$RUNNER_OS" = "Linux" ]; then- sudo apt-get update -qq- sudo apt-get install -y --no-install-recommends \- python3-tk xvfb libxcursor1 libxrender1 libxext6 \- libxft2 libxinerama1 libxi6 libxrandr2- fi- - name: Verify drag-drop executes on ${{ matrix.os }}- shell: bash- run: |- if [ "$RUNNER_OS" = "Linux" ]; then- xvfb-run -a python scripts/crossplatform/verify_drop_target.py- else- python scripts/crossplatform/verify_drop_target.py- fidiff --git a/.github/workflows/fresh-install-smoke.yml b/.github/workflows/fresh-install-smoke.ymldeleted file mode 100644index f08b3a7e85..0000000000--- a/.github/workflows/fresh-install-smoke.yml+++ /dev/null@@ -1,250 +0,0 @@-# Fresh-install smoke: prove the RAW installer path a real downloader runs-# (install/installer.py → editable install → runtime deps) end-to-end, then boot-# the headless server and confirm it actually answers on its real admin port.-#-# This is the CI twin of the manual Docker sandbox test: it is deliberately-# separate from `verify-installer-smoke.yml` (which exercises the SIGNED release-# wrapper against a published tag) and from `ci.yml` (which runs the dev test-# suite). Neither of those runs `installer.py` itself nor boots the server, so a-# port/boot regression on a fresh machine would slip past them.-#-# Cost policy (mirrors ci.yml): macOS runners bill at ~10x the Linux rate, so the-# macOS leg is OFF for ordinary pushes and ON only for a manual workflow_dispatch-# (include_macos, default true). Proving macOS is usually the whole point of-# dispatching by hand; a push that touches the installer still gets the cheap-# Linux leg for free.--name: Fresh-install smoke (installer.py end-to-end)--on:- workflow_dispatch:- inputs:- include_macos:- description: "Also run the macOS leg (~10x runner cost). On by default for a manual run, since proving macOS is usually the point of dispatching by hand."- type: boolean- default: true- push:- branches: [ main ]- paths:- - 'install/installer.py'- - 'install/install.sh'- - 'pyproject.toml'- - 'requirements.txt'- - 'jarvis/__main__.py'- - 'jarvis/setup/prefetch.py'- - 'jarvis/setup/model_report.py'- - 'jarvis/speech/wake_model_fetch.py'- - '.github/workflows/fresh-install-smoke.yml'--# A new push to the same ref cancels the previous in-flight run so a burst of-# commits doesn't stack billable minutes.-concurrency:- group: fresh-install-${{ github.workflow }}-${{ github.ref }}- cancel-in-progress: true--permissions:- contents: read--jobs:- # Single source of truth for which OS legs run (same cost-aware pattern as- # ci.yml): macOS only on a manual dispatch with include_macos=true.- configure:- name: configure matrix (cost-aware)- runs-on: ubuntu-latest- timeout-minutes: 5- outputs:- os-matrix: ${{ steps.pick.outputs.os-matrix }}- steps:- - name: Pick OS matrix- id: pick- shell: bash- run: |- if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.include_macos }}" = "true" ]; then- echo 'os-matrix=["ubuntu-latest","macos-latest"]' >> "$GITHUB_OUTPUT"- echo "macOS leg INCLUDED (manual dispatch)."- else- echo 'os-matrix=["ubuntu-latest"]' >> "$GITHUB_OUTPUT"- echo "macOS leg SKIPPED (cheap push run). Dispatch manually to include it."- fi-- smoke:- name: fresh install (${{ matrix.os }})- needs: configure- strategy:- fail-fast: false # we want to see ALL OS legs, not just the first red one- matrix:- os: ${{ fromJSON(needs.configure.outputs.os-matrix) }}- runs-on: ${{ matrix.os }}- timeout-minutes: 30-- steps:- - name: Checkout- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2- with:- persist-credentials: false-- - name: Set up Python 3.11- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0- with:- python-version: "3.11"-- - name: Run the REAL installer end-to-end (runner-appropriate profile)- shell: bash- run: |- set -euo pipefail- # Reproduce exactly what install.sh does after the git clone: a venv,- # the bootstrap deps, then hand off to installer.py. Ordinary Linux- # pushes prove the headless/base floor. A manually-requested macOS leg- # proves the advertised desktop [full] profile AND its complete model- # prefetch; running that leg headless used to leave this exact install- # contract untested. --no-launch keeps the runner from spawning a server- # we don't tear down here (a dedicated step below boots + probes it).- python -m venv .venv- . .venv/bin/activate- python -m pip install --upgrade pip- python -m pip install rich packaging- if [ "${{ matrix.os }}" = "macos-latest" ]; then- python install/installer.py --with-desktop --no-launch | tee install.log- else- python install/installer.py --headless --no-launch | tee install.log- fi- # The installer must never prompt: fail if anything interactive leaked in.- if grep -Eiq "input\(|\? \[y/n\]|press enter" install.log; then- echo "installer output contains an interactive prompt marker"; exit 8- fi-- - name: Import smoke (the package loads on a fresh machine)- shell: bash- run: |- set -euo pipefail- . .venv/bin/activate- python -c "import jarvis; print('import OK ->', jarvis.__file__)"-- - name: Boot the headless server + health probe on the REAL admin port- shell: bash- run: |- set -uo pipefail- . .venv/bin/activate- # Ask the launcher for the port it will actually bind (no jarvis.toml on- # a fresh checkout → the packaged default), so this can never drift the- # way the installer's launch hint did.- PORT=$(python -c "from jarvis.ui.web.launcher import _fast_admin_port; print(_fast_admin_port())")- echo "expected admin port: $PORT"- python -m jarvis.ui.web.launcher --headless > boot.log 2>&1 &- BOOTPID=$!- set +e- python - "$PORT" <<'PYEOF'- import sys, time, http.client- port = int(sys.argv[1])- for i in range(80): # up to ~120 s- try:- c = http.client.HTTPConnection("127.0.0.1", port, timeout=2)- c.request("GET", "/")- r = c.getresponse(); r.read()- # 503 = fast-boot bootstrap still holding the request while the- # full app warms up — keep polling until the real app takes over.- if r.status == 503 and i < 79:- time.sleep(1.5); continue- print(f"server UP: HTTP {r.status} after ~{i * 1.5:.0f}s")- sys.exit(0)- except Exception:- time.sleep(1.5)- print("server NEVER answered on the admin port within ~120 s")- sys.exit(7)- PYEOF- RC=$?- set -e- echo "----- boot.log (last 40 lines) -----"- tail -40 boot.log || true- if [ "$RC" -ne 0 ]; then- kill "$BOOTPID" 2>/dev/null || true- exit $RC- fi-- # ---- First-boot onboarding contract (the desktop gate's API) ----- # 1) The state must answer 200 FAST (served by the fast-boot path even- # while warming) and report completed=false on a fresh install.- # 2) Completing it must persist durably in the same store the real- # app reads.- set +e- python - "$PORT" <<'PYEOF'- import sys, time, json, http.client- port = int(sys.argv[1])-- def req(method, path, headers=None):- c = http.client.HTTPConnection("127.0.0.1", port, timeout=2)- c.request(method, path, headers=headers or {})- r = c.getresponse()- return r.status, r.read()-- deadline = time.time() + 15- state = None- while time.time() < deadline:- try:- status, body = req("GET", "/api/onboarding/state")- if status == 200:- state = json.loads(body)- break- except Exception:- pass- time.sleep(0.5)- assert state is not None, "onboarding state did not answer within 15 s of boot"- assert state["completed"] is False, f"fresh install must be incomplete: {state}"-- # Completing onboarding may schedule a desktop restart, so the route- # demands the same-origin Origin header a real browser click sends- # (lifecycle_guard.require_interactive_desktop_action) — a headless- # POST without one is refused with 403 by design.- status, _ = req(- "POST",- "/api/onboarding/complete",- headers={"Origin": f"http://127.0.0.1:{port}"},- )- assert status == 200, f"complete failed: {status}"- status, body = req("GET", "/api/onboarding/state")- assert json.loads(body)["completed"] is True, "completed did not persist"- print("onboarding contract OK")- sys.exit(0)- PYEOF- RC=$?- set -e- kill "$BOOTPID" 2>/dev/null || true- if [ "$RC" -ne 0 ]; then- echo "----- boot.log (last 40 lines) -----"- tail -40 boot.log || true- exit $RC- fi-- # ---- Restart leg: onboarding must NOT re-arm on a second boot ----- sleep 2- python -m jarvis.ui.web.launcher --headless > boot2.log 2>&1 &- BOOTPID2=$!- set +e- python - "$PORT" <<'PYEOF'- import sys, time, json, http.client- port = int(sys.argv[1])- for _ in range(30):- try:- c = http.client.HTTPConnection("127.0.0.1", port, timeout=2)- c.request("GET", "/api/onboarding/state")- r = c.getresponse()- if r.status == 200:- assert json.loads(r.read())["completed"] is True, \- "onboarding re-armed after restart!"- print("restart contract OK"); sys.exit(0)- except AssertionError:- raise- except Exception:- pass- time.sleep(1)- print("second boot never answered the onboarding state")- sys.exit(7)- PYEOF- RC=$?- set -e- if [ "$RC" -ne 0 ]; then- echo "----- boot2.log (last 40 lines) -----"- tail -40 boot2.log || true- fi- kill "$BOOTPID2" 2>/dev/null || true- exit $RCdiff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.ymldeleted file mode 100644index f026ab3a6a..0000000000--- a/.github/workflows/frontend.yml+++ /dev/null@@ -1,56 +0,0 @@-name: Frontend--on:- push:- branches:- - main- - "wip/cross-platform-cloud-first-20260529"- pull_request:- workflow_dispatch:--concurrency:- group: frontend-${{ github.workflow }}-${{ github.ref }}- cancel-in-progress: true--permissions:- contents: read--jobs:- test-and-build:- name: test and production build- runs-on: ubuntu-latest- timeout-minutes: 15- defaults:- run:- working-directory: jarvis/ui/web/frontend-- steps:- - name: Checkout- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2- with:- persist-credentials: false-- - name: Set up Node.js 22- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0- with:- node-version: "22"- cache: npm- cache-dependency-path: jarvis/ui/web/frontend/package-lock.json-- - name: Install locked dependencies- run: npm ci-- - name: Run frontend tests- run: npm test-- - name: Build and verify production assets- run: npm run build-- # The entry chunk is parsed and executed before the UI paints a single- # pixel, so its size IS startup latency. Guarding it here is the frontend- # twin of the Python boot budget in .githooks/pre-push: both block the- # same regression class, where a statically imported view or library- # quietly adds seconds to every launch.- - name: Check startup bundle budget- working-directory: ${{ github.workspace }}- run: python3 scripts/ci/check_frontend_bundle_budget.pydiff --git a/.github/workflows/installer-smoke.yml b/.github/workflows/installer-smoke.ymlnew file mode 100644index 0000000000..36bc08cf8b--- /dev/null+++ b/.github/workflows/installer-smoke.yml@@ -0,0 +1,432 @@+# Installer smoke tests — the two proofs that the paths a real downloader walks+# still work. Merged 2026-08-20 from fresh-install-smoke.yml and+# verify-installer-smoke.yml, which triggered on overlapping install/ paths and+# split one question ("can a stranger install this?") across two check lists.+#+# * job `fresh-install` — runs the RAW installer (install/installer.py →+# editable install → runtime deps), then boots the headless server and+# confirms it answers on its real admin port and honours the first-boot+# onboarding contract. This is the CI twin of the manual Docker sandbox test.+# * job `verify-release` — runs the SIGNED release wrapper (install-verify.sh)+# against the latest published tag, proving the signing → publishing →+# verifying chain is wired end to end.+#+# Neither replaces the other and neither is covered by ci.yml, which runs the+# dev test suite and never executes installer.py nor boots a server — so a+# port/boot regression on a fresh machine slips past it.+#+# Path gating: GitHub applies `paths:` per WORKFLOW, so the workflow-level list+# below is the UNION of both jobs' interests, and the `changes` job narrows it+# again per job with a git diff (git + stdlib, no third-party action —+# CVE-2025-30066). Both gates fail OPEN: an unresolvable diff base runs the job.+#+# Cost policy (mirrors ci.yml): macOS runners bill at ~10x the Linux rate, so+# the macOS leg of `fresh-install` is OFF for ordinary pushes/PRs and ON only+# for a manual workflow_dispatch (include_macos, default true).++name: Installer smoke++on:+ push:+ branches: [main]+ paths:+ - "install/**"+ - "pyproject.toml"+ - "requirements.txt"+ - "jarvis/__main__.py"+ - "jarvis/setup/prefetch.py"+ - "jarvis/setup/model_report.py"+ - "jarvis/speech/wake_model_fetch.py"+ - ".github/workflows/sign-installer.yml"+ - ".github/workflows/installer-smoke.yml"+ pull_request:+ branches: [main]+ paths:+ - "install/**"+ - "pyproject.toml"+ - "requirements.txt"+ - "jarvis/__main__.py"+ - "jarvis/setup/prefetch.py"+ - "jarvis/setup/model_report.py"+ - "jarvis/speech/wake_model_fetch.py"+ - ".github/workflows/sign-installer.yml"+ - ".github/workflows/installer-smoke.yml"+ workflow_dispatch:+ inputs:+ include_macos:+ description: "Also run the fresh-install macOS leg (~10x runner cost). On by default for a manual run, since proving macOS is usually the point of dispatching by hand."+ type: boolean+ default: true+ tag:+ description: "Release tag for the verify-release job (default: latest)"+ required: false+ default: ""++# A new push to the same ref cancels the previous in-flight run so a burst of+# commits doesn't stack billable minutes.+concurrency:+ group: installer-smoke-${{ github.workflow }}-${{ github.ref }}+ cancel-in-progress: true++permissions:+ contents: read++jobs:+ # Single source of truth for BOTH the cost-aware OS matrix and the per-job+ # path narrowing. The workflow-level `paths:` above is the union of what the+ # two jobs care about; without this step every installer.py change would also+ # re-run the release-signature check that cannot possibly be affected by it.+ changes:+ name: configure (matrix + per-job paths)+ runs-on: ubuntu-latest+ timeout-minutes: 5+ outputs:+ os-matrix: ${{ steps.pick.outputs.os-matrix }}+ run-fresh: ${{ steps.paths.outputs.run-fresh }}+ run-verify: ${{ steps.paths.outputs.run-verify }}+ steps:+ - name: Checkout (full history — the path gate needs a diff base)+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ fetch-depth: 0+ persist-credentials: false++ - name: Pick OS matrix+ id: pick+ shell: bash+ run: |+ if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.include_macos }}" = "true" ]; then+ echo 'os-matrix=["ubuntu-latest","macos-latest"]' >> "$GITHUB_OUTPUT"+ echo "macOS leg INCLUDED (manual dispatch)."+ else+ echo 'os-matrix=["ubuntu-latest"]' >> "$GITHUB_OUTPUT"+ echo "macOS leg SKIPPED (cheap push/PR run). Dispatch manually to include it."+ fi++ - name: Per-job path gates+ id: paths+ shell: bash+ run: |+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then+ echo "run-fresh=true" >> "$GITHUB_OUTPUT"+ echo "run-verify=true" >> "$GITHUB_OUTPUT"+ echo "Manual dispatch — both smokes RUN."+ exit 0+ fi+ base="${{ github.event.pull_request.base.sha }}"+ if [ -z "$base" ]; then+ base="${{ github.event.before }}"+ fi+ # An all-zero "before" means a branch's first push or a rewritten+ # history; treat it as no base at all.+ case "$base" in+ ""|*[!0]*) : ;;+ *) base="" ;;+ esac+ if [ -z "$base" ] || ! git cat-file -e "$base^{commit}" 2>/dev/null; then+ # checkout fetches the event's ref only, so origin/main may not exist+ # locally yet — same fetch ci.yml's privacy-gate job does.+ git fetch --no-tags origin main:refs/remotes/origin/main 2>/dev/null || true+ base="$(git merge-base HEAD refs/remotes/origin/main 2>/dev/null || echo "")"+ fi+ if [ -z "$base" ]; then+ echo "run-fresh=true" >> "$GITHUB_OUTPUT"+ echo "run-verify=true" >> "$GITHUB_OUTPUT"+ echo "No usable diff base — both smokes RUN (fail open)."+ exit 0+ fi+ changed="$(git diff --name-only "$base" HEAD)"+ echo "----- changed files since $base -----"+ echo "$changed"+ echo "-------------------------------------"+ if echo "$changed" | grep -qE '^(install/installer\.py|install/install\.sh|pyproject\.toml|requirements\.txt|jarvis/__main__\.py|jarvis/setup/prefetch\.py|jarvis/setup/model_report\.py|jarvis/speech/wake_model_fetch\.py|\.github/workflows/installer-smoke\.yml)$'; then+ echo "run-fresh=true" >> "$GITHUB_OUTPUT"+ echo "fresh-install smoke RUNS."+ else+ echo "run-fresh=false" >> "$GITHUB_OUTPUT"+ echo "fresh-install smoke SKIPPED."+ fi+ if echo "$changed" | grep -qE '^(install/install-verify\.(sh|ps1)|install/TRUST_ROOT\.md|install/install\.(sh|ps1)|install/installer\.py|\.github/workflows/sign-installer\.yml|\.github/workflows/installer-smoke\.yml)$'; then+ echo "run-verify=true" >> "$GITHUB_OUTPUT"+ echo "verify-release smoke RUNS."+ else+ echo "run-verify=false" >> "$GITHUB_OUTPUT"+ echo "verify-release smoke SKIPPED."+ fi++ # Prove the RAW installer path a real downloader runs, end to end, then boot+ # the headless server and confirm it actually answers on its real admin port.+ fresh-install:+ name: fresh install (${{ matrix.os }})+ needs: changes+ if: needs.changes.outputs.run-fresh == 'true'+ strategy:+ fail-fast: false # we want to see ALL OS legs, not just the first red one+ matrix:+ os: ${{ fromJSON(needs.changes.outputs.os-matrix) }}+ runs-on: ${{ matrix.os }}+ timeout-minutes: 30++ steps:+ - name: Checkout+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ persist-credentials: false++ - name: Set up Python 3.11+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0+ with:+ python-version: "3.11"++ - name: Run the REAL installer end-to-end (runner-appropriate profile)+ shell: bash+ run: |+ set -euo pipefail+ # Reproduce exactly what install.sh does after the git clone: a venv,+ # the bootstrap deps, then hand off to installer.py. Ordinary Linux+ # pushes prove the headless/base floor. A manually-requested macOS leg+ # proves the advertised desktop [full] profile AND its complete model+ # prefetch; running that leg headless used to leave this exact install+ # contract untested. --no-launch keeps the runner from spawning a server+ # we don't tear down here (a dedicated step below boots + probes it).+ python -m venv .venv+ . .venv/bin/activate+ python -m pip install --upgrade pip+ python -m pip install rich packaging+ if [ "${{ matrix.os }}" = "macos-latest" ]; then+ python install/installer.py --with-desktop --no-launch | tee install.log+ else+ python install/installer.py --headless --no-launch | tee install.log+ fi+ # The installer must never prompt: fail if anything interactive leaked in.+ if grep -Eiq "input\(|\? \[y/n\]|press enter" install.log; then+ echo "installer output contains an interactive prompt marker"; exit 8+ fi++ - name: Import smoke (the package loads on a fresh machine)+ shell: bash+ run: |+ set -euo pipefail+ . .venv/bin/activate+ python -c "import jarvis; print('import OK ->', jarvis.__file__)"++ - name: Boot the headless server + health probe on the REAL admin port+ shell: bash+ run: |+ set -uo pipefail+ . .venv/bin/activate+ # Ask the launcher for the port it will actually bind (no jarvis.toml on+ # a fresh checkout → the packaged default), so this can never drift the+ # way the installer's launch hint did.+ PORT=$(python -c "from jarvis.ui.web.launcher import _fast_admin_port; print(_fast_admin_port())")+ echo "expected admin port: $PORT"+ python -m jarvis.ui.web.launcher --headless > boot.log 2>&1 &+ BOOTPID=$!+ set +e+ python - "$PORT" <<'PYEOF'+ import sys, time, http.client+ port = int(sys.argv[1])+ for i in range(80): # up to ~120 s+ try:+ c = http.client.HTTPConnection("127.0.0.1", port, timeout=2)+ c.request("GET", "/")+ r = c.getresponse(); r.read()+ # 503 = fast-boot bootstrap still holding the request while the+ # full app warms up — keep polling until the real app takes over.+ if r.status == 503 and i < 79:+ time.sleep(1.5); continue+ print(f"server UP: HTTP {r.status} after ~{i * 1.5:.0f}s")+ sys.exit(0)+ except Exception:+ time.sleep(1.5)+ print("server NEVER answered on the admin port within ~120 s")+ sys.exit(7)+ PYEOF+ RC=$?+ set -e+ echo "----- boot.log (last 40 lines) -----"+ tail -40 boot.log || true+ if [ "$RC" -ne 0 ]; then+ kill "$BOOTPID" 2>/dev/null || true+ exit $RC+ fi++ # ---- First-boot onboarding contract (the desktop gate's API) ----+ # 1) The state must answer 200 FAST (served by the fast-boot path even+ # while warming) and report completed=false on a fresh install.+ # 2) Completing it must persist durably in the same store the real+ # app reads.+ set +e+ python - "$PORT" <<'PYEOF'+ import sys, time, json, http.client+ port = int(sys.argv[1])++ def req(method, path, headers=None):+ c = http.client.HTTPConnection("127.0.0.1", port, timeout=2)+ c.request(method, path, headers=headers or {})+ r = c.getresponse()+ return r.status, r.read()++ deadline = time.time() + 15+ state = None+ while time.time() < deadline:+ try:+ status, body = req("GET", "/api/onboarding/state")+ if status == 200:+ state = json.loads(body)+ break+ except Exception:+ pass+ time.sleep(0.5)+ assert state is not None, "onboarding state did not answer within 15 s of boot"+ assert state["completed"] is False, f"fresh install must be incomplete: {state}"++ # Completing onboarding may schedule a desktop restart, so the route+ # demands the same-origin Origin header a real browser click sends+ # (lifecycle_guard.require_interactive_desktop_action) — a headless+ # POST without one is refused with 403 by design.+ status, _ = req(+ "POST",+ "/api/onboarding/complete",+ headers={"Origin": f"http://127.0.0.1:{port}"},+ )+ assert status == 200, f"complete failed: {status}"+ status, body = req("GET", "/api/onboarding/state")+ assert json.loads(body)["completed"] is True, "completed did not persist"+ print("onboarding contract OK")+ sys.exit(0)+ PYEOF+ RC=$?+ set -e+ kill "$BOOTPID" 2>/dev/null || true+ if [ "$RC" -ne 0 ]; then+ echo "----- boot.log (last 40 lines) -----"+ tail -40 boot.log || true+ exit $RC+ fi++ # ---- Restart leg: onboarding must NOT re-arm on a second boot ----+ sleep 2+ python -m jarvis.ui.web.launcher --headless > boot2.log 2>&1 &+ BOOTPID2=$!+ set +e+ python - "$PORT" <<'PYEOF'+ import sys, time, json, http.client+ port = int(sys.argv[1])+ for _ in range(30):+ try:+ c = http.client.HTTPConnection("127.0.0.1", port, timeout=2)+ c.request("GET", "/api/onboarding/state")+ r = c.getresponse()+ if r.status == 200:+ assert json.loads(r.read())["completed"] is True, \+ "onboarding re-armed after restart!"+ print("restart contract OK"); sys.exit(0)+ except AssertionError:+ raise+ except Exception:+ pass+ time.sleep(1)+ print("second boot never answered the onboarding state")+ sys.exit(7)+ PYEOF+ RC=$?+ set -e+ if [ "$RC" -ne 0 ]; then+ echo "----- boot2.log (last 40 lines) -----"+ tail -40 boot2.log || true+ fi+ kill "$BOOTPID2" 2>/dev/null || true+ exit $RC++ # Continuous proof that the verifying installer wrapper still works end-to-end+ # against the latest signed release: resolve the tag, confirm the signed+ # assets are attached, then run the RELEASED install-verify.sh (not the+ # in-repo copy — that is the actual wire format a user runs) in+ # --dry-run --no-wizard --no-launch mode. Skips gracefully when no signed+ # release exists yet, which is the state on a bootstrapping commit.+ verify-release:+ name: verify signed release wrapper+ needs: changes+ if: needs.changes.outputs.run-verify == 'true'+ runs-on: ubuntu-latest+ timeout-minutes: 10++ steps:+ - name: Checkout (just for install-verify.sh reference)+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ with:+ fetch-depth: 1+ persist-credentials: false++ - name: Resolve target tag+ id: tag+ run: |+ set -euo pipefail+ INPUT_TAG="${{ github.event.inputs.tag }}"+ if [ -n "$INPUT_TAG" ]; then+ echo "tag=$INPUT_TAG" >> "$GITHUB_OUTPUT"+ echo "Using manually-provided tag: $INPUT_TAG"+ exit 0+ fi+ # Resolve the latest published release. The /latest API+ # returns 404 if there are no releases yet — we treat that+ # as a "skip" condition, not a failure.+ HTTP=$(curl -s -o /tmp/resp.json -w "%{http_code}" \+ -H "Accept: application/vnd.github+json" \+ -H "X-GitHub-Api-Version: 2022-11-28" \+ "https://api.github.com/repos/${{ github.repository }}/releases/latest")+ if [ "$HTTP" = "404" ]; then+ echo "tag=" >> "$GITHUB_OUTPUT"+ echo "No releases yet — smoke will skip gracefully."+ exit 0+ fi+ if [ "$HTTP" != "200" ]; then+ echo "::error::unexpected HTTP $HTTP from GitHub API"+ cat /tmp/resp.json+ exit 1+ fi+ TAG=$(python3 -c "import json; print(json.load(open('/tmp/resp.json'))['tag_name'])")+ echo "tag=$TAG" >> "$GITHUB_OUTPUT"+ echo "Latest release tag: $TAG"++ - name: Skip when no signed release exists+ if: steps.tag.outputs.tag == ''+ run: |+ echo "::notice::No signed release exists yet; smoke test is a no-op."+ echo "This is expected on the bootstrapping commit that adds the signing workflow."+ echo "Once the first v*.*.* tag is pushed and signed, this smoke will run for real."++ - name: Confirm signed assets exist on the release+ if: steps.tag.outputs.tag != ''+ run: |+ set -euo pipefail+ TAG="${{ steps.tag.outputs.tag }}"+ REL_BASE="https://github.com/${{ github.repository }}/releases/download/${TAG}"+ for f in install-verify.sh install.sh install.sh.sig install.sh.pem install.sh.bundle; do+ if ! curl -fsSL -I -o /dev/null "${REL_BASE}/${f}"; then+ echo "::error::missing asset on release $TAG: ${f}"+ echo "Did the sign-installer.yml workflow run to completion?"+ exit 1+ fi+ done+ echo "All signed assets present on release $TAG."++ - name: Run install-verify.sh end-to-end (dry-run, no-wizard, no-launch)+ if: steps.tag.outputs.tag != ''+ env:+ JARVIS_INSTALL_TAG: ${{ steps.tag.outputs.tag }}+ JARVIS_INSTALL_DIR: /tmp/jarvis-smoke-install+ run: |+ set -euo pipefail+ REL_BASE="https://github.com/${{ github.repository }}/releases/download/${JARVIS_INSTALL_TAG}"+ # Download the released install-verify.sh (NOT the in-repo copy)+ # — this is the actual wire-format the user runs.+ curl -fsSL "${REL_BASE}/install-verify.sh" -o /tmp/install-verify.sh+ chmod +x /tmp/install-verify.sh+ echo "----- install-verify.sh first 20 lines -----"+ head -20 /tmp/install-verify.sh+ echo "--------------------------------------------"+ # The verifier honours JARVIS_INSTALL_TAG (set above) so we exercise+ # the exact release we resolved.+ bash /tmp/install-verify.sh --dry-run --no-wizard --no-launchdiff --git a/.github/workflows/realtime-reliability.yml b/.github/workflows/realtime-reliability.ymldeleted file mode 100644index 73aba72096..0000000000--- a/.github/workflows/realtime-reliability.yml+++ /dev/null@@ -1,134 +0,0 @@-# Realtime's small, blocking cross-platform contract. It is separate from the-# monolithic CI matrix so macOS can run this focused suite on every change-# without multiplying the hour-long full-suite cost.-#-# No job here owns a microphone, speaker, desktop session, or provider secret.-# Physical microphone/acoustic-echo behavior, device hot-plug, and macOS TCC-# prompts remain explicit human release sign-offs; a headless runner must never-# turn their absence into a fake green result.--name: Realtime reliability--on:- push:- branches:- - main- - "wip/cross-platform-cloud-first-20260529"- tags:- - "v*"- pull_request:- workflow_dispatch:- inputs:- run_contract_soak:- description: "Run the extended synthetic orchestration soak (not release evidence)."- type: boolean- default: true--concurrency:- group: realtime-reliability-${{ github.workflow }}-${{ github.ref }}- cancel-in-progress: true--permissions:- contents: read--jobs:- provider-contract:- name: provider contract (${{ matrix.os }})- strategy:- fail-fast: false- matrix:- os:- - ubuntu-latest- - windows-latest- - macos-latest- runs-on: ${{ matrix.os }}- timeout-minutes: 25-- steps:- - name: Checkout- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2- with:- persist-credentials: false-- - name: Set up Python 3.11- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0- with:- python-version: "3.11"-- - name: Install portable base and focused test runner- shell: bash- run: |- python -m pip install --upgrade pip- python -m pip install -e .- python -m pip install pytest pytest-asyncio-- - name: Blocking provider-neutral realtime contract- run: >-- python -m pytest- tests/contract/test_realtime_provider_contract.py- tests/contract/test_realtime_reliability_gate.py- -q -p no:cacheprovider-- python-slim-no-audio:- name: python:3.11-slim (no PortAudio)- runs-on: ubuntu-latest- container: python:3.11-slim- timeout-minutes: 25-- steps:- - name: Checkout- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2- with:- persist-credentials: false-- - name: Install base without system audio libraries- run: |- python -m pip install --upgrade pip- python -m pip install -e .- python -m pip install pytest pytest-asyncio-- - name: Prove the container really has no usable PortAudio- run: |- python - <<'PY'- try:- import sounddevice # noqa: F401- except Exception as exc:- print(f"NO_PORTAUDIO: {type(exc).__name__}: {exc}")- else:- raise SystemExit("python:3.11-slim unexpectedly loaded PortAudio")- PY-- - name: Blocking headless realtime degradation contract- run: >-- python -m pytest- tests/contract/test_realtime_provider_contract.py- tests/contract/test_realtime_reliability_gate.py- -q -p no:cacheprovider-- extended-contract-soak:- name: extended contract soak (not release evidence)- # This synthetic orchestration proof must never green-light a tag. A real- # release still needs same-SHA target measurements and manual acoustic- # sign-off, neither of which a headless GitHub runner can produce.- if: github.event_name == 'workflow_dispatch' && inputs.run_contract_soak- runs-on: ubuntu-latest- timeout-minutes: 25-- steps:- - name: Checkout- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2- with:- persist-credentials: false-- - name: Set up Python 3.11- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0- with:- python-version: "3.11"-- - name: Install portable base- run: |- python -m pip install --upgrade pip- python -m pip install -e .-- - name: Run provider-neutral orchestration soak- run: python scripts/realtime_reliability_gate.py --contract-soakdiff --git a/.github/workflows/slsa-provenance.yml b/.github/workflows/slsa-provenance.ymldeleted file mode 100644index 31aa4d6896..0000000000--- a/.github/workflows/slsa-provenance.yml+++ /dev/null@@ -1,179 +0,0 @@-# SLSA L3 provenance generation — Wave 3.-#-# STATUS: STANDALONE — workflow_dispatch only.-#-# Wave 3 SA-5 integration consolidated provenance generation into-# sign-installer.yml's `provenance` job (it calls the same-# slsa-github-generator reusable workflow at the same 40-char SHA pin,-# but with `base64-subjects` sourced from the cross-runner-verified-# JSON via the cross-runner-hash workflow_call gate).-#-# Running this workflow ALSO on tag push would produce a DUPLICATE-# provenance file with the same name and lose the-# cross-runner-agreement provenance binding — so the `push: tags`-# trigger has been removed. This file is preserved for manual-# `workflow_dispatch` use (e.g. re-issuing provenance for a-# previously-signed release) and for documentation of the-# pin/permissions contract that sign-installer.yml mirrors.-#-# What this workflow defines:-# 1. The exact slsa-github-generator reusable workflow pin (40-char-# commit SHA, NOT a tag — see CVE-2025-30066, March 2025, the-# `tj-actions/changed-files` lesson).-# 2. The `permissions:` block the reusable workflow demands at L3.-# 3. The input shape: a base64-encoded `subjects` list mapping each-# install/* artifact to its SHA-256, computed by a preceding job-# (the matrix-hash job from cross-runner-hash.yml.tmpl).-# 4. Release-upload settings: provenance is attached to the GitHub-# release for the tag.-#-# What SA-2 must wire in when activating this:-# - Job dependency: `needs: [cross-runner-hash, build-subjects]`.-# - The `base64-subjects` input is produced by `build-subjects` after-# the cross-runner-hash check has succeeded.-# - The provenance asset goes into the same GitHub Release as the-# Wave 1 + Wave 2 signatures (softprops/action-gh-release step in-# sign-installer.yml, already pinned).-# - The verifier (install-verify.sh) needs an axis-3 check using-# slsa-verifier — that is SA-3's brief.-#-# Pinned slsa-github-generator commit:-# f7dd8c54c2067bafc12ca7a55595d5ee9b75204a-# -> resolves to v2.1.0 (released 2025-02-24).-# -> verified via: `gh api repos/slsa-framework/slsa-github-generator/git/ref/tags/v2.1.0`-# -> next bump requires re-running the four-step audit in-# wave3-reproducibility-protocol.md §6.--name: SLSA L3 provenance (standalone — manual dispatch only)--on:- # Tag-push trigger removed in Wave 3 SA-5 integration to prevent a- # duplicate generator run alongside sign-installer.yml's `provenance`- # job. Use sign-installer.yml for tag-cut provenance; use this file- # only via manual workflow_dispatch for re-issuance.- workflow_dispatch: {}--# The slsa-github-generator reusable workflow REQUIRES these-# permissions on the caller. id-token=write is the L3 secret--# protection contract (the OIDC token is minted in the isolated-# generator job, never exposed to user-controlled steps).-permissions:- id-token: write # OIDC for Sigstore Fulcio (mandatory for L3 keyless)- contents: write # to upload the .intoto.jsonl provenance to the release- actions: read # to read the workflow definition into the provenance subject--jobs:- # --------------------------------------------------------------------- # Job 1: build-subjects- #- # Computes SHA-256 of the five install/* artifacts and emits a- # base64-encoded subjects manifest that the generator job consumes.- # This job is the binding between the cross-runner-hash matrix- # (which proves three OS images agree) and the SLSA provenance- # (which signs the hashes the matrix agreed on).- #- # SA-2 must add `needs: cross-runner-hash` here so this job only- # runs after the matrix has confirmed agreement. The placeholder- # `needs:` line is commented out below.- # --------------------------------------------------------------------- build-subjects:- runs-on: ubuntu-latest- # needs: cross-runner-hash # SA-2 uncomments after wiring the matrix job in- outputs:- base64-subjects: ${{ steps.compute.outputs.base64-subjects }}- steps:- - name: Checkout tag (read-only)- # pin: actions/[email protected] — pinned by 40-char SHA.- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683- with:- fetch-depth: 1- persist-credentials: false-- - name: Compute SHA-256 subjects manifest- id: compute- shell: bash- run: |- set -euo pipefail- cd install- # sha256sum emits 'SHA256 NAME' which is the format the- # generator wants. We base64-encode the whole manifest so- # the reusable workflow's `base64-subjects` input can- # consume it without quoting headaches.- MANIFEST=$(sha256sum install.sh install.ps1 installer.py install-verify.sh install-verify.ps1)- echo "----- subjects manifest (sha256sum format) -----"- echo "$MANIFEST"- echo "------------------------------------------------"- B64=$(printf '%s\n' "$MANIFEST" | base64 -w0)- echo "base64-subjects=$B64" >> "$GITHUB_OUTPUT"-- # --------------------------------------------------------------------- # Job 2: provenance- #- # Calls the slsa-github-generator reusable workflow at the pinned- # 40-char commit SHA. This runs in an ISOLATED job (architectural- # property of the reusable workflow — see SLSA v1.0 L3 build-isolation- # requirement, wave3-reproducibility-protocol.md §5.1) and mints a- # signed in-toto v1.0 provenance document that:- # - subject: the five install/* artifacts + their SHA-256s- # - builder: github.com/slsa-framework/slsa-github-generator at SHA- # - invocation: this workflow file at this tag's commit SHA- # - signed by: a Fulcio cert bound to this caller's OIDC identity- #- # The reusable workflow uploads the provenance file- # `<repo>-<tag>.intoto.jsonl` to the GitHub Release if- # upload-assets: true.- # --------------------------------------------------------------------- provenance:- needs: build-subjects- permissions:- id-token: write- contents: write- actions: read- # NOTE: pinned by 40-char commit SHA, NOT by @v2.1.0.- # The tag would resolve today — but tags are mutable and the- # tj-actions/changed-files (CVE-2025-30066, March 2025) precedent- # is exactly why this line MUST be a SHA. See- # docs/supply-chain/wave3-reproducibility-protocol.md §6 for the- # rotation procedure.- # Pin via tag @v2.1.0 (SHA: f7dd8c54c2067bafc12ca7a55595d5ee9b75204a, 2025-02-24).- # slsa-github-generator's generate-builder.sh rejects @<40-char-SHA>- # refs — see PIN POLICY EXCEPTION block in sign-installer.yml.- uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]- with:- base64-subjects: ${{ needs.build-subjects.outputs.base64-subjects }}- # Upload the .intoto.jsonl to the GitHub Release for the tag.- # The verifier (install-verify.sh, modified by SA-3) downloads- # this and runs `slsa-verifier verify-artifact ...` against it.- upload-assets: true- # Default provenance filename: `<first-subject>.intoto.jsonl`.- # We pin to a stable name so install-verify.sh can hardcode it.- provenance-name: "personal-jarvis.intoto.jsonl"- # `compile-generator: false` (default) — use the pre-compiled- # binary from the release. Compiling from source on the runner- # is L4-territory and not required for L3.--# ---------------------------------------------------------------------# Integration notes for SA-2 (cross-reference comments in-# sign-installer.yml when this template lands as .yml):-#-# 1. The signing job in sign-installer.yml currently runs unconditionally-# on tag push. After Wave 3 activation, it must `needs: [cross-runner-hash, provenance]`-# so the signed artifacts cannot be released without both the-# cross-runner agreement AND the SLSA L3 provenance attestation.-#-# 2. The release-upload step in sign-installer.yml must add-# `personal-jarvis.intoto.jsonl` and-# `personal-jarvis.intoto.jsonl.sig` to its `files:`-# list — the slsa-github-generator places those in the workflow's-# artifacts; download them via actions/download-artifact (pinned-# by SHA in this template if SA-2 ports the pattern).-#-# 3. SA-3 modifies install-verify.sh to add the axis-3 check:-# slsa-verifier verify-artifact \-# --provenance-path personal-jarvis.intoto.jsonl \-# --source-uri github.com/PersonalJarvis/PersonalJarvis \-# --source-tag "$TAG" \-# install.sh install.ps1 installer.py install-verify.sh install-verify.ps1-# The slsa-verifier binary download must itself be SHA-pinned in-# the verifier script (mirror the pattern used for cosign).-# --------------------------------------------------------------------diff --git a/.github/workflows/verify-installer-smoke.yml b/.github/workflows/verify-installer-smoke.ymldeleted file mode 100644index 9008452700..0000000000--- a/.github/workflows/verify-installer-smoke.yml+++ /dev/null@@ -1,135 +0,0 @@-# Continuous proof that the verifying installer wrapper still works end-to-end-# against the latest signed release.-#-# Triggers:-# - Every push to main-# - Every PR targeting main that changes install/, .github/workflows/, or this file-# - Manual dispatch (so we can verify a specific tag)-#-# Behaviour:-# 1. Run on a fresh ubuntu-latest container.-# 2. Resolve the latest release tag (or use the manually-provided one).-# 3. Skip gracefully if no signed release exists yet (first-time setup).-# 4. Otherwise run install-verify.sh against it in --dry-run --no-wizard --no-launch mode.-# The fact that this completes proves the entire signing → publishing →-# verifying chain is wired correctly.--name: Smoke-test verifying installer--on:- push:- branches: [ main ]- paths:- - 'install/install-verify.sh'- - 'install/install-verify.ps1'- - 'install/TRUST_ROOT.md'- - 'install/install.sh'- - 'install/install.ps1'- - 'install/installer.py'- - '.github/workflows/sign-installer.yml'- - '.github/workflows/verify-installer-smoke.yml'- pull_request:- branches: [ main ]- paths:- - 'install/install-verify.sh'- - 'install/install-verify.ps1'- - 'install/TRUST_ROOT.md'- - 'install/install.sh'- - 'install/install.ps1'- - 'install/installer.py'- - '.github/workflows/sign-installer.yml'- - '.github/workflows/verify-installer-smoke.yml'- workflow_dispatch:- inputs:- tag:- description: 'Release tag to verify against (default: latest)'- required: false- default: ''--permissions:- contents: read--jobs:- smoke:- runs-on: ubuntu-latest- timeout-minutes: 10-- steps:- - name: Checkout (just for install-verify.sh reference)- # actions/checkout v4.2.2 — pinned by commit SHA.- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683- with:- fetch-depth: 1- persist-credentials: false-- - name: Resolve target tag- id: tag- run: |- set -euo pipefail- INPUT_TAG="${{ github.event.inputs.tag }}"- if [ -n "$INPUT_TAG" ]; then- echo "tag=$INPUT_TAG" >> "$GITHUB_OUTPUT"- echo "Using manually-provided tag: $INPUT_TAG"- exit 0- fi- # Resolve the latest published release. The /latest API- # returns 404 if there are no releases yet — we treat that- # as a "skip" condition, not a failure.- HTTP=$(curl -s -o /tmp/resp.json -w "%{http_code}" \- -H "Accept: application/vnd.github+json" \- -H "X-GitHub-Api-Version: 2022-11-28" \- "https://api.github.com/repos/${{ github.repository }}/releases/latest")- if [ "$HTTP" = "404" ]; then- echo "tag=" >> "$GITHUB_OUTPUT"- echo "No releases yet — smoke will skip gracefully."- exit 0- fi- if [ "$HTTP" != "200" ]; then- echo "::error::unexpected HTTP $HTTP from GitHub API"- cat /tmp/resp.json- exit 1- fi- TAG=$(python3 -c "import json; print(json.load(open('/tmp/resp.json'))['tag_name'])")- echo "tag=$TAG" >> "$GITHUB_OUTPUT"- echo "Latest release tag: $TAG"-- - name: Skip when no signed release exists- if: steps.tag.outputs.tag == ''- run: |- echo "::notice::No signed release exists yet; smoke test is a no-op."- echo "This is expected on the bootstrapping commit that adds the signing workflow."- echo "Once the first v*.*.* tag is pushed and signed, this smoke will run for real."-- - name: Confirm signed assets exist on the release- if: steps.tag.outputs.tag != ''- run: |- set -euo pipefail- TAG="${{ steps.tag.outputs.tag }}"- REL_BASE="https://github.com/${{ github.repository }}/releases/download/${TAG}"- for f in install-verify.sh install.sh install.sh.sig install.sh.pem install.sh.bundle; do- if ! curl -fsSL -I -o /dev/null "${REL_BASE}/${f}"; then- echo "::error::missing asset on release $TAG: ${f}"- echo "Did the sign-installer.yml workflow run to completion?"- exit 1- fi- done- echo "All signed assets present on release $TAG."-- - name: Run install-verify.sh end-to-end (dry-run, no-wizard, no-launch)- if: steps.tag.outputs.tag != ''- env:- JARVIS_INSTALL_TAG: ${{ steps.tag.outputs.tag }}- JARVIS_INSTALL_DIR: /tmp/jarvis-smoke-install- run: |- set -euo pipefail- REL_BASE="https://github.com/${{ github.repository }}/releases/download/${JARVIS_INSTALL_TAG}"- # Download the released install-verify.sh (NOT the in-repo copy)- # — this is the actual wire-format the user runs.- curl -fsSL "${REL_BASE}/install-verify.sh" -o /tmp/install-verify.sh- chmod +x /tmp/install-verify.sh- echo "----- install-verify.sh first 20 lines -----"- head -20 /tmp/install-verify.sh- echo "--------------------------------------------"- # The verifier honours JARVIS_INSTALL_TAG (set above) so we exercise- # the exact release we resolved.- bash /tmp/install-verify.sh --dry-run --no-wizard --no-launchdiff --git a/docs/supply-chain/threat-model.md b/docs/supply-chain/threat-model.mdindex dbb3b67c53..1aba5b23fb 100644--- a/docs/supply-chain/threat-model.md+++ b/docs/supply-chain/threat-model.md@@ -68,7 +68,7 @@ Each scenario follows: **pre-condition → action → blast radius → pre-Wave-- **Action.** Next workflow run pulls the new commit. Malicious entrypoint exfiltrates `GITHUB_TOKEN`, mints a new release with attacker-crafted `install.sh` + a cosign signature *that legitimately came from our OIDC identity* (because the malicious step runs *inside our trusted workflow*).- **Blast radius.** Catastrophic. The cosign signature is genuine — `cosign verify-blob` succeeds; the installer-verifier wrapper accepts and runs the malicious payload.- **Pre-Wave-1 mitigation.** **None.** No workflow ever signed any artifact.-- **Wave-1 mitigation.** **Every Action in `.github/workflows/sign-installer.yml` and `verify-installer-smoke.yml` is pinned by commit SHA, not by tag.** Maintainer must consciously bump SHAs and accept that the new commit's source has been audited. This is the *direct* lesson from the March 2025 `tj-actions/changed-files` incident (CVE-2025-30066).+- **Wave-1 mitigation.** **Every Action in `.github/workflows/sign-installer.yml` and `installer-smoke.yml` is pinned by commit SHA, not by tag.** Maintainer must consciously bump SHAs and accept that the new commit's source has been audited. This is the *direct* lesson from the March 2025 `tj-actions/changed-files` incident (CVE-2025-30066).- **Residual gap.** SHA pinning prevents *future* tag movement but not malicious commits *at the time of initial pinning*. Wave 2 mitigation: subscribe to `dependabot` + manual review of pinned-SHA bumps + comparison against the GitHub Verified-by-author signature on each commit.### Scenario C — xz-utils-style long-game maintainer compromise (T5)@@ -576,10 +576,14 @@ offline-ceremony signing steps and before the GitHub Release uploadstep, consumes the base64-encoded `sha256sum` manifest of the five`install/*` artifacts as `base64-subjects`, and uploads`personal-jarvis.intoto.jsonl` (and its Sigstore signature) to the-Release with `upload-assets: true`. The standalone tag-triggered-`slsa-provenance.yml` (renamed from the `.tmpl` template in the same-commit) remains in place as a defense in depth and as the integration-target for SA-3 once the `cross-runner-hash.yml` matrix gate lands.+Release with `upload-assets: true`. This job in `sign-installer.yml`+is the ONLY provenance producer. The standalone `slsa-provenance.yml`+(renamed from the `.tmpl` template) first lost its tag trigger, because+running it alongside produced a duplicate provenance file under the same+name and broke the cross-runner-agreement binding; it was then deleted+outright on 2026-08-20, since the generator pin, the `permissions:`+block, and the `base64-subjects` contract it documented all live in+`sign-installer.yml` verbatim.## 9. Wave 4 — distribution via package managers + post-quantum migration (FOUNDATION COMPLETE, full integration pending in follow-up sub-agents)diff --git a/install/TRUST_ROOT.md b/install/TRUST_ROOT.mdindex f74c2c9953..dede847974 100644--- a/install/TRUST_ROOT.md+++ b/install/TRUST_ROOT.md@@ -756,7 +756,7 @@ Implementation:auto-merge); supply-chain pinning discipline requires manual SHA +hash validation before merging.- **Branch protection** on `main`: required status checks (sign-installer,- cross-runner-hash, verify-installer-smoke), required signed commits,+ cross-runner-hash, installer-smoke), required signed commits,no force-push, linear history required. Status documented in`docs/supply-chain/wave5-audit-fixes-validation.md`. Any field thatfails because of GitHub-plan restrictions is documented honestly.diff --git a/tests/unit/install/test_installer_flow.py b/tests/unit/install/test_installer_flow.pyindex 028a8627aa..0ca3f07bfa 100644--- a/tests/unit/install/test_installer_flow.py+++ b/tests/unit/install/test_installer_flow.py@@ -120,7 +120,7 @@ def test_headless_prefetch_keeps_only_configured_wake_language(capsys) -> None:def test_macos_fresh_install_ci_exercises_advertised_full_profile() -> None:- workflow = (REPO / ".github" / "workflows" / "fresh-install-smoke.yml").read_text(+ workflow = (REPO / ".github" / "workflows" / "installer-smoke.yml").read_text(encoding="utf-8")assert 'if [ "${{ matrix.os }}" = "macos-latest" ]; then' in workflow