Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
b726e8b
refactor: centralize cross-platform storage paths
brxs Aug 8, 2026
201abb2
feat(engine): support integer output formats
brxs Aug 8, 2026
5ddc7d7
refactor: supervise backend process trees
brxs Aug 8, 2026
18ac34c
fix: close installer spawn cancellation race
brxs Aug 8, 2026
6c45122
Add cross-platform CI and fail-closed releases
brxs Aug 8, 2026
8377d83
fix: harden runtime installation and process supervision
brxs Aug 8, 2026
448b529
test: use native venv layouts in SA3 fixtures
brxs Aug 8, 2026
9f34f54
test: locate SA3 artifacts beside native venv Python
brxs Aug 8, 2026
2bb98dc
feat: add PyTorch MRT2 runtime
brxs Aug 8, 2026
4bac3a5
feat: add portable Stable Audio TFLite adapter
brxs Aug 8, 2026
46c530a
fix: make song test temp paths Windows-safe
brxs Aug 8, 2026
6ae795a
fix: satisfy current Rust framing lint
brxs Aug 8, 2026
ee83b43
Merge hardened SA3 installer into portable backend
brxs Aug 8, 2026
e4c8258
Merge branch 'codex/107-integration' into codex/111-sa3-tflite
brxs Aug 8, 2026
1e2b936
fix: make SA3 contract tests portable
brxs Aug 8, 2026
effd655
fix: gate Unix-only process helpers
brxs Aug 8, 2026
f333e7c
Merge production MRT2 PyTorch backend
brxs Aug 8, 2026
1cfbd74
fix: gate Unix-only process helpers
brxs Aug 8, 2026
30fa678
Merge branch 'codex/111-sa3-tflite' into codex/107-managed-runtime-in…
brxs Aug 8, 2026
3f72755
fix: serialize shared MRT2 worker switching
brxs Aug 8, 2026
8d21b33
Merge portable SA3 TFLite backend for IPC hardening
brxs Aug 8, 2026
01e3bfe
Harden local inference IPC and cancellation
brxs Aug 9, 2026
941065d
Merge portable SA3 TFLite backend
brxs Aug 9, 2026
2214d96
fix: preserve hashed runtime lock bytes
brxs Aug 8, 2026
97a8bfa
docs: add model asset compliance inventory
brxs Aug 8, 2026
8024780
spike: add PyTorch MRT2 validation harness
brxs Aug 8, 2026
2c562d5
feat: add verified portable runtime delivery
brxs Aug 9, 2026
80fc608
Merge branch 'codex/107-integration' into codex/107-managed-runtime-i…
brxs Aug 9, 2026
6eef7bd
fix: expose and recover audio stream health
brxs Aug 9, 2026
20217fb
feat: add gated Windows SA3 CUDA foundation
brxs Aug 8, 2026
1d7c4c0
fix: authenticate and preempt CUDA worker jobs
brxs Aug 8, 2026
f0cc78e
fix: close managed runtime validation gaps
brxs Aug 9, 2026
edcaaac
Merge branch 'codex/107-integration' into codex/107-managed-runtime-f…
brxs Aug 9, 2026
277285c
Merge branch 'codex/107-local-ipc-hardening' into codex/107-managed-r…
brxs Aug 9, 2026
a8ed573
docs: inventory gated SA3 CUDA models
brxs Aug 9, 2026
277bc27
style: satisfy portable Python checks
brxs Aug 9, 2026
1ff07a0
feat: add bounded MRT2 render worker protocol
brxs Aug 9, 2026
5223456
fix: verify managed runtime candidates
brxs Aug 9, 2026
8dbff65
fix: harden MRT2 render protocol contract
brxs Aug 9, 2026
456ba1e
test: lock render end identity contract
brxs Aug 9, 2026
af915fe
feat: orchestrate managed native generation services
brxs Aug 9, 2026
3a76a6f
feat: route native generation by model family
brxs Aug 9, 2026
8b61ddc
Merge MRT2 render worker protocol
brxs Aug 9, 2026
340a71f
test: align gateway with finalized render protocol
brxs Aug 9, 2026
8730021
fix: retain native supervisors through promotion
brxs Aug 9, 2026
1aedb8f
fix: retain SA3 supervisor on readiness error
brxs Aug 9, 2026
bd10f8e
test: type promoted SA3 fetch mock
brxs Aug 9, 2026
e7c4c3d
test: qualify managed runtime on Windows
brxs Aug 9, 2026
490994a
fix: retain requested audio routes for recovery
brxs Aug 9, 2026
925a3df
fix: scope Unix-only downloader tests
brxs Aug 9, 2026
1b81902
fix: swap combined audio rings atomically
brxs Aug 9, 2026
2d483ea
fix: synchronize media browser controls with rows
brxs Aug 9, 2026
5cbe842
fix: probe Windows GPU lease owners safely
brxs Aug 9, 2026
7fdbb32
fix: acquire MRT2 GPU lease before CUDA load
brxs Aug 9, 2026
dbb54b1
fix: scope Unix-only shared sidecar test helper
brxs Aug 9, 2026
298ec51
fix: order overlapping library refreshes
brxs Aug 9, 2026
14396d0
docs: record SA3 CUDA broker qualification no-go
brxs Aug 9, 2026
e929946
Merge GPU broker safety foundation
brxs Aug 9, 2026
1cf39a0
feat: add Linux AppImage shipping foundation
brxs Aug 8, 2026
b8857e9
test: keep AppImage layout checks portable
brxs Aug 8, 2026
f4586a0
fix: verify safe AppImage desktop symlinks
brxs Aug 8, 2026
f5efe22
feat: add Windows shipping pipeline
brxs Aug 8, 2026
f33a3f1
fix: scope Windows data purge to disclosed root
brxs Aug 8, 2026
32e502f
test: require exact unsigned signature rejection
brxs Aug 8, 2026
cfa45f0
fix: clear Windows install preference on explicit purge
brxs Aug 8, 2026
d85a4e3
fix: harden Windows data-root ownership
brxs Aug 9, 2026
3220e8e
fix: clear expected unsigned verification failure
brxs Aug 9, 2026
fd85753
test: enforce exact three-platform release union
brxs Aug 9, 2026
6611220
fix: accept empty Windows data directories safely
brxs Aug 9, 2026
98f171a
test: trace hosted Windows installer aborts
brxs Aug 9, 2026
006fad2
test: disambiguate Windows marker failures
brxs Aug 9, 2026
72d0ef7
fix: validate Windows marker through held handle
brxs Aug 9, 2026
260a3c9
test: reject NUL-extended Windows markers
brxs Aug 9, 2026
e58e136
fix: surface unattended Windows downgrade refusal
brxs Aug 9, 2026
3e0aa9b
fix: compare Windows downgrade versions independently
brxs Aug 9, 2026
24e3fba
fix: close Windows unattended install bypasses
brxs Aug 9, 2026
0bfa619
test: harden Windows lifecycle acceptance
brxs Aug 9, 2026
fc92696
test: make Windows version evidence deterministic
brxs Aug 9, 2026
059d55b
fix: use string equality for Windows version evidence
brxs Aug 9, 2026
5858b17
fix: preserve per-service runtime shipping policy
brxs Aug 9, 2026
7db18f3
fix: close release review boundary gaps
brxs Aug 9, 2026
00904e6
fix: require canonical AppImage desktop launcher
brxs Aug 9, 2026
7407697
Merge reviewed audio recovery
brxs Aug 9, 2026
04a5537
Merge reviewed cross-platform shipping foundation
brxs Aug 9, 2026
57db80c
fix: terminate unsafe Windows purge requests
brxs Aug 9, 2026
3502579
test: observe Windows uninstaller worker exits
brxs Aug 9, 2026
fad7eb6
test: observe NSIS worker exit codes
brxs Aug 9, 2026
fc4cc00
ci: cover managed runtime safety contracts
brxs Aug 9, 2026
01ccaca
Fix cross-platform GPU liveness tests
brxs Aug 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
backend/spike_corpus/*.wav filter=lfs diff=lfs merge=lfs -text

# Managed runtimes hash these exact UTF-8 bytes. Checkout conversion would
# otherwise make a release built on Windows disagree with the signed/pinned
# manifest digests while preserving semantically identical text.
backend/runtime-locks/*.txt text eol=lf
scripts/sa3-requirements.lock text eol=lf
scripts/sa3-tflite-requirements.lock text eol=lf
mrt2-pytorch-pin.json text eol=lf
mrt2-pytorch-wheels.json text eol=lf
sa3-pin.json text eol=lf
sa3-tflite-pin.json text eol=lf
sa3-tflite-wheels.json text eol=lf
11 changes: 11 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
/justfile @protocol-works/engineering
/scripts/create-release.sh @protocol-works/engineering
/scripts/build-macos-release.sh @protocol-works/engineering
/scripts/build-linux-appimage.sh @protocol-works/engineering
/scripts/assert-windows-release-rejects-unsigned.ps1 @protocol-works/engineering
/scripts/build-windows-installer.ps1 @protocol-works/engineering
/scripts/freeze-sidecar.sh @protocol-works/engineering
/scripts/release_artifact.py @protocol-works/engineering
/scripts/sign-windows.ps1 @protocol-works/engineering
/scripts/test-windows-installer.ps1 @protocol-works/engineering
/scripts/verify-windows-release-install.ps1 @protocol-works/engineering
/scripts/verify-windows-signatures.ps1 @protocol-works/engineering
/scripts/verify_linux_appimage.py @protocol-works/engineering
/src-tauri/entitlements.plist @protocol-works/engineering
/src-tauri/tauri*.conf.json @protocol-works/engineering
/src-tauri/windows/English.nsh @protocol-works/engineering
/src-tauri/windows/installer-hooks.nsh @protocol-works/engineering
344 changes: 344 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,344 @@
name: CI

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
windows-managed-runtime:
name: Managed runtime qualification (Windows)
runs-on: windows-2025
timeout-minutes: 90

steps:
- name: Check out source and test corpus
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
lfs: true
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.13"

- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
cache-dependency-path: frontend/package-lock.json

- name: Build frontend assets for native shell
working-directory: frontend
run: npm ci && npm run build

- name: Set up Rust
run: rustup toolchain install stable --profile minimal --no-self-update

- name: Test managed runtime workspace
working-directory: src-tauri
run: cargo test --locked --workspace --features managed-runtime

- name: Lint managed runtime workspace
working-directory: src-tauri
run: cargo clippy --locked --workspace --all-targets --features managed-runtime -- -D warnings

- name: Build managed runtime release
working-directory: src-tauri
run: cargo build --locked --workspace --release --features managed-runtime

shared:
name: Shared checks (${{ matrix.name }})
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- name: macOS
runner: macos-15
- name: Ubuntu
runner: ubuntu-24.04
- name: Windows
runner: windows-2025

steps:
- name: Check out source and test corpus
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
lfs: true
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.13"

- name: Install locked Python environment tool
run: python -m pip install uv==0.11.7

- name: Test release artifact contract
run: python -m unittest discover -s scripts/tests -v

- name: Check release tooling formatting
run: >-
uv run --project backend --frozen --only-group ci ruff format --check
scripts/release_artifact.py scripts/verify_linux_appimage.py
scripts/tests/test_release_artifact.py
scripts/tests/test_verify_linux_appimage.py
scripts/tests/test_windows_packaging.py

- name: Lint release tooling
run: >-
uv run --project backend --frozen --only-group ci ruff check
scripts/release_artifact.py scripts/verify_linux_appimage.py
scripts/tests/test_release_artifact.py
scripts/tests/test_verify_linux_appimage.py
scripts/tests/test_windows_packaging.py

- name: Check portable Python formatting
working-directory: backend
run: uv run --frozen --only-group ci ruff format --check .

- name: Lint portable Python
working-directory: backend
run: uv run --frozen --only-group ci ruff check .

- name: Test portable Python services
working-directory: backend
run: >-
uv run --frozen --only-group ci python -m pytest
tests/test_loras.py
tests/test_worker.py
tests/test_sidecar.py
tests/test_controller.py
tests/test_frozen.py

# Most DeckEngine behavior is model-independent. The excluded tests cross
# the Magenta/MLX import boundary and remain in the local full suite and
# the signed macOS release runtime check.
- name: Test portable Python deck behavior
working-directory: backend
run: >-
uv run --frozen --only-group ci python -m pytest tests/test_engine.py
-k "not constructor_uses_reference_sampling_defaults
and not embed_sample
and not sample_key_never_hits_the_text_embedder
and not sample_cache
and not failed_embed_does_not_evict"

# SA3 uses a copied Python interpreter and fake CLI; no runtime, weights,
# accelerator, shell, or network is involved. The selected model-manager
# nodes exercise only SA3 readiness. Its Magenta discovery/download nodes
# remain behind the backend-specific runtime gate.
- name: Test model-free Python runtime contracts
working-directory: backend
run: >-
uv run --frozen --only-group ci python -m pytest
tests/test_sa3.py
tests/test_sa3_audio.py
tests/test_sa3_manifest.py
tests/test_gpu_broker.py
tests/test_mrt2_pytorch.py
tests/test_mrt2_runtime.py
tests/test_mrt2_runtime_locks.py
tests/test_render_sidecar.py
tests/test_runtime_paths.py
tests/test_sa3_cuda.py
tests/test_sa3_cuda_pins.py
tests/test_sa3_cuda_worker.py
tests/test_models.py::test_readiness_classifies_a_checkout
tests/test_models.py::test_readiness_missing_when_no_checkout

- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
cache-dependency-path: frontend/package-lock.json

- name: Install frontend dependencies
working-directory: frontend
run: npm ci

- name: Lint frontend
working-directory: frontend
run: npm run lint

- name: Type-check frontend
working-directory: frontend
run: npx tsc -b

- name: Test frontend
working-directory: frontend
run: npm test

- name: Build frontend assets for native shell
working-directory: frontend
run: npm run build

- name: Install Ubuntu native build dependencies
if: runner.os == 'Linux'
run: >-
sudo apt-get update && sudo apt-get install --yes
build-essential
libasound2-dev
libayatana-appindicator3-dev
libgtk-3-dev
libssl-dev
libudev-dev
libwebkit2gtk-4.1-dev
libxdo-dev
librsvg2-dev

- name: Set up Rust
run: rustup toolchain install stable --profile minimal --no-self-update

- name: Test Rust workspace
run: cargo test --locked --workspace --manifest-path src-tauri/Cargo.toml

- name: Lint Rust workspace
run: >-
cargo clippy --locked --workspace --all-targets
--manifest-path src-tauri/Cargo.toml -- -D warnings

- name: Install pinned Tauri packaging CLI
if: runner.os == 'Windows'
run: cargo install tauri-cli --version '=2.11.2' --locked

- name: Build older unsigned Windows installer
if: runner.os == 'Windows'
id: windows_older
shell: pwsh
run: ./scripts/build-windows-installer.ps1 -ReleaseTag v2026.08.1 -UnsignedDevelopment

- name: Build newer unsigned Windows installer
if: runner.os == 'Windows'
id: windows_newer
shell: pwsh
run: ./scripts/build-windows-installer.ps1 -ReleaseTag v2026.08.2 -UnsignedDevelopment

- name: Prove release verification rejects unsigned artifacts
if: runner.os == 'Windows'
shell: pwsh
run: >-
./scripts/assert-windows-release-rejects-unsigned.ps1
-Path '${{ steps.windows_newer.outputs.installer }}'

- name: Test Windows installer lifecycle
if: runner.os == 'Windows'
shell: pwsh
run: >-
./scripts/test-windows-installer.ps1
-OlderInstaller '${{ steps.windows_older.outputs.installer }}'
-NewerInstaller '${{ steps.windows_newer.outputs.installer }}'
-OlderVersion '${{ steps.windows_older.outputs.version }}'
-NewerVersion '${{ steps.windows_newer.outputs.version }}'

- name: Upload unsigned Windows development installer
if: runner.os == 'Windows'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: windows-x64-unsigned-development
path: ${{ steps.windows_newer.outputs.installer }}
if-no-files-found: error
retention-days: 7

linux_appimage:
name: Linux AppImage contract (Ubuntu 22.04)
runs-on: ubuntu-22.04
timeout-minutes: 90

steps:
- name: Check out source and test corpus
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
lfs: true
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
cache-dependency-path: frontend/package-lock.json

- name: Install pinned native build dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install --yes \
binutils \
build-essential \
libasound2-dev \
libayatana-appindicator3-dev \
libfuse2 \
libgtk-3-dev \
libssl-dev \
libudev-dev \
libwebkit2gtk-4.1-dev \
libxdo-dev \
librsvg2-dev \
xvfb
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
cargo install tauri-cli --version '=2.11.2' --locked
npm ci --prefix frontend

- name: Build and audit AppImage
env:
LSDJ_LINUX_AUDIT_PATH: ${{ runner.temp }}/linux-package-audit.json
shell: bash
run: scripts/build-linux-appimage.sh

- name: Smoke AppImage with spaces, Unicode, and isolated XDG roots
shell: bash
run: |
set -euo pipefail
shopt -s nullglob
APPIMAGES=(src-tauri/target/release/bundle/appimage/*.AppImage)
[[ "${#APPIMAGES[@]}" -eq 1 ]]

PROFILE="$RUNNER_TEMP/DJ Name 音楽"
export HOME="$PROFILE/home"
export XDG_CONFIG_HOME="$PROFILE/config 空間"
export XDG_DATA_HOME="$PROFILE/data 音楽"
export XDG_CACHE_HOME="$PROFILE/cache 音楽"
export XDG_RUNTIME_DIR="$RUNNER_TEMP/xdg-runtime"
mkdir -p \
"$HOME" \
"$XDG_CONFIG_HOME" \
"$XDG_DATA_HOME" \
"$XDG_CACHE_HOME" \
"$XDG_RUNTIME_DIR"
chmod 700 "$XDG_RUNTIME_DIR"

set +e
APPIMAGE_EXTRACT_AND_RUN=1 timeout --signal=TERM --kill-after=5s 15s \
xvfb-run --auto-servernum "${APPIMAGES[0]}"
STATUS=$?
set -e
[[ "$STATUS" -eq 0 || "$STATUS" -eq 124 || "$STATUS" -eq 143 ]]
test -d "$XDG_CONFIG_HOME/lsdj"
test -d "$XDG_DATA_HOME/lsdj"
test -d "$XDG_CACHE_HOME/lsdj"

- name: Upload package audit evidence
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: linux-package-audit
path: ${{ runner.temp }}/linux-package-audit.json
if-no-files-found: error
retention-days: 14
Loading
Loading