Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
d6baa6d
NEW - Updater: Add compact macOS updates
BurntToasters Oct 25, 2026
a07a5a8
changes and fixes
BurntToasters Oct 28, 2026
31f75ec
Codebase: Migrate toolchain to Node.js 26.13.0 LTS.
BurntToasters Oct 30, 2026
f6e8d5a
bumped pinned rust version to 1.99.1
BurntToasters Nov 4, 2026
a362b9d
Toolchain: Build Flatpak with the pinned Rust toolchain.
BurntToasters Nov 6, 2026
f47b617
Toolchain: Derive Rust pin from rust-toolchain.toml
BurntToasters Nov 6, 2026
0dd30e3
Toolchain: Derive Rust pin from rust-toolchain.toml
BurntToasters Nov 6, 2026
010d9fa
Toolchain: Reject --print combined with a rustup action.
BurntToasters Nov 6, 2026
6f244bd
changes
BurntToasters Nov 7, 2026
698f3fb
Repo: Remove committed PowerShell module analysis caches.
BurntToasters Nov 7, 2026
b93b9e0
Docs: Bring 5.1 changelog, roadmap, and architecture in line with the…
BurntToasters Nov 7, 2026
064d010
Network: Drain rejected proxy clients so macOS does not reset the 503.
BurntToasters Nov 7, 2026
0e49a77
Build: Regenerate macOS capability schema for resolve_download_options.
BurntToasters Nov 7, 2026
2e46ad0
E2E: Run every WebdriverIO pass before failing the gate.
BurntToasters Nov 7, 2026
ca980d7
E2E: Stub the compact updater target and cover its legacy fallback.
BurntToasters Nov 7, 2026
1648f86
E2E: Wait for the Reset All bridge call instead of a fixed delay.
BurntToasters Nov 7, 2026
8581241
UI: Resolve the effective options preview without a saved folder.
BurntToasters Nov 7, 2026
5ebf98a
Build: Apply rustfmt and drop the removed u2 script from the update t…
BurntToasters Nov 7, 2026
8b173f2
UI: Move focus into a prompt as soon as it opens.
BurntToasters Nov 7, 2026
d610b2d
E2E: Hold DNS probe lookups so resolver saturation is proven determin…
BurntToasters Nov 7, 2026
a92d469
E2E: Keep the background-mode page rendering while its window is cove…
BurntToasters Nov 7, 2026
4a32bc4
Release: Check E2E proof against the full-suite inventory with v5-fix…
BurntToasters Nov 7, 2026
6c813b6
Settings: Take startup fallback defaults from get_default_settings.
BurntToasters Nov 7, 2026
d379e7a
Formats: Build format option labels in the backend.
BurntToasters Nov 7, 2026
1c0151f
Downloads: Let the backend alone resolve preset and option precedence.
BurntToasters Nov 7, 2026
6ede5c9
IPC: Type the remaining command payloads that took serde_json::Value.
BurntToasters Nov 7, 2026
c5a6ecb
UI: Keep activity focus, show queue action errors on the row, and ver…
BurntToasters Nov 7, 2026
4194abf
UI: Show download readiness beside the button, wrap long content, and…
BurntToasters Nov 7, 2026
a5abfa5
Docs: Add 5.1 changelog entries for backend option resolution and UI …
BurntToasters Nov 7, 2026
580d89c
E2E: Reload once in the readiness spec so the ui-polish area pass sta…
BurntToasters Nov 7, 2026
ecc423b
E2E: Name suite files by feature instead of audit round, and add the …
BurntToasters Nov 7, 2026
40349d1
E2E: Split the gate script into manifest, fixtures, and runner modules.
BurntToasters Nov 7, 2026
ea599e1
Network: Wake the proxy relay on cancellation and DNS replies instead…
BurntToasters Nov 7, 2026
4cbdcd3
NEW - Updater: Move update orchestration to Rust
BurntToasters Nov 7, 2026
90420b6
Updater: Fix the generation scenario and move compact routing checks …
BurntToasters Nov 7, 2026
170cfe3
Updater: Cover stale check results and unsaved channels with engine E…
BurntToasters Nov 7, 2026
0e3e0ad
Docs: Describe the Rust update engine and the event-driven proxy relay.
BurntToasters Nov 7, 2026
644efd9
E2E: Expect the renderer updater install-error observation.
BurntToasters Nov 7, 2026
a9710fa
E2E: Record informational native alerts instead of opening them in E2…
BurntToasters Nov 7, 2026
7835c3e
Build: Keep the generated capability schemas in their production form.
BurntToasters Nov 7, 2026
7ea439a
Settings: Save only the settings the window changed.
BurntToasters Nov 7, 2026
fbd0c36
Presets: Resolve Apply through a preset-only backend command instead …
BurntToasters Nov 7, 2026
68d346c
Updater: Cover the remaining engine guards with E2E scenarios.
BurntToasters Nov 7, 2026
b5c7ae2
Downloader: Move conversion and publication into child modules.
BurntToasters Nov 7, 2026
054d3ca
E2E: Reload the readiness spec with a deferred page reload, not brows…
BurntToasters Nov 7, 2026
9e60f97
Queue: Extract pasted queue links in the backend.
BurntToasters Nov 7, 2026
899ccd2
Docs: Record the macOS full-gate evidence and defer B7 and B6 to 5.1.x.
BurntToasters Nov 8, 2026
b63d32f
Update AGENTS.md
BurntToasters Nov 8, 2026
adddaaf
Update AGENTS.md
BurntToasters Nov 8, 2026
17d0dea
Renderer: Replace window.rosiModules with ES module imports.
BurntToasters Nov 8, 2026
5d664bd
Queue: Make the coordinator thread the only owner of queue state.
BurntToasters Nov 8, 2026
a4df210
Updater: Run the pre-install flush in the E2E install probe and cover…
BurntToasters Nov 8, 2026
c7b6ed0
Tooling: Add dependency major-version report.
BurntToasters Nov 8, 2026
d34131d
Downloader: Give the download session one owner thread.
BurntToasters Nov 8, 2026
a4a86b2
Renderer: Replace the window.api global with an api module.
BurntToasters Nov 8, 2026
a7aad52
Release: Convert macOS DMGs to ULMO before signing and upload.
BurntToasters Nov 8, 2026
0b935ae
Release: Build the Linux AppImage with zstd SquashFS and check it.
BurntToasters Nov 8, 2026
042b0c3
Docs: Record the FFmpeg size decision and the ffprobe removal study.
BurntToasters Nov 8, 2026
5c9fa8c
Merge branch 'next-5.1.0' of https://github.com/BurntToasters/ROSI in…
BurntToasters Nov 8, 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
45 changes: 38 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ permissions:
contents: read

env:
NODE_VERSION: "24.16.0"
NPM_VERSION: "12.0.2"
RUST_VERSION: "1.98.1"
NODE_VERSION: "26.13.0"
NPM_VERSION: "12.2.1"
CARGO_AUDIT_VERSION: "0.22.2"

jobs:
Expand Down Expand Up @@ -74,9 +73,17 @@ jobs:
cache: npm
- name: Install latest npm 12
run: npm install --global npm@${{ env.NPM_VERSION }} --ignore-scripts --min-release-age=3
- name: Read pinned Rust toolchain
id: rust-toolchain
shell: bash
run: |
set -euo pipefail
channel="$(node scripts/rust-toolchain.mjs)"
test -n "$channel"
echo "channel=$channel" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
with:
toolchain: ${{ env.RUST_VERSION }}
toolchain: ${{ steps.rust-toolchain.outputs.channel }}
components: rustfmt, clippy
- name: Install Linux dependencies
run: |
Expand Down Expand Up @@ -127,9 +134,17 @@ jobs:
cache: npm
- name: Install latest npm 12
run: npm install --global npm@${{ env.NPM_VERSION }} --ignore-scripts --min-release-age=3
- name: Read pinned Rust toolchain
id: rust-toolchain
shell: bash
run: |
set -euo pipefail
channel="$(node scripts/rust-toolchain.mjs)"
test -n "$channel"
echo "channel=$channel" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
with:
toolchain: ${{ env.RUST_VERSION }}
toolchain: ${{ steps.rust-toolchain.outputs.channel }}
components: clippy
- run: npm ci --ignore-scripts
# On windows-latest gpg ships only in Git for Windows (usr\bin), which is
Expand Down Expand Up @@ -222,9 +237,17 @@ jobs:
cache: npm
- name: Install latest npm 12
run: npm install --global npm@${{ env.NPM_VERSION }} --ignore-scripts --min-release-age=3
- name: Read pinned Rust toolchain
id: rust-toolchain
shell: bash
run: |
set -euo pipefail
channel="$(node scripts/rust-toolchain.mjs)"
test -n "$channel"
echo "channel=$channel" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
with:
toolchain: ${{ env.RUST_VERSION }}
toolchain: ${{ steps.rust-toolchain.outputs.channel }}
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
Expand Down Expand Up @@ -269,9 +292,17 @@ jobs:
cache: npm
- name: Install latest npm 12
run: npm install --global npm@${{ env.NPM_VERSION }} --ignore-scripts --min-release-age=3
- name: Read pinned Rust toolchain
id: rust-toolchain
shell: bash
run: |
set -euo pipefail
channel="$(node scripts/rust-toolchain.mjs)"
test -n "$channel"
echo "channel=$channel" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
with:
toolchain: ${{ env.RUST_VERSION }}
toolchain: ${{ steps.rust-toolchain.outputs.channel }}
- run: npm ci --ignore-scripts
- run: node scripts/npm-audit-signatures.cjs
- name: npm audit - production
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ytdlp-watch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ permissions:
contents: read

env:
NODE_VERSION: "24.16.0"
NODE_VERSION: "26.13.0"
NPM_VERSION: "12.2.1"

jobs:
watch:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ assets/.ytdlp-download-*.tmp

# E2E run artifacts (kept locally as verification evidence)
e2e/artifacts/

# Windows VM PowerShell module analysis caches (accidentally committed; never tracked)
Microsoft/
**/Microsoft/Windows/PowerShell/
5 changes: 4 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Critical Information - Do not modify
# Critical Information - Do not modify this section, other sections below may be modified

- NEVER write unit tests after you write code.
- Highly prefer E2E tests as the sole testing mechanism. Use them to verify complex features work. At the end of E2E tests, produce a verifiable and repeatable artifact.
- If you must test a system in isolation, FIRST write all the ways it could fail, THEN write the code.
- Do not add agents as co-authors to commits.

# ROSI
54 changes: 43 additions & 11 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,31 @@ split into focused modules:
| `validation.rs` | Security boundary: URL safety (no private/loopback hosts), path allow-lists, IPC payloads |
| `settings.rs` | Settings model, lenient migration/sanitization, import/export |
| `legacy.rs` | First-launch import of ROSI 4 data from `<config dir>/rosi` |
| `downloader.rs` | Single active download session: yt-dlp, optional FFmpeg conversion, cancellation |
| `queue.rs` | Persistent queue (`download-queue.json` + backup) and its sequential runner |
| `downloader.rs` | Single active download session: yt-dlp, optional FFmpeg conversion, cancellation. The session is owned by one thread (`downloader/session_owner.rs`) that runs its tasks in order; callers wait on replies, and the owner never waits on processes or the coordinator. Child modules `downloader/conversion.rs` (FFmpeg runs) and `downloader/publication.rs` (output installs, captions) |
| `queue.rs` | Persistent queue (`download-queue.json` + backup), its writer, and its sequential runner. The queue state is owned by the coordinator thread, not held in a global lock |
| `coordinator.rs` | Single owner of queue state, queue transitions, and session results: one thread applies each change in arrival order, publishes revisioned queue snapshots, and answers reads over reply channels |
| `command_builders.rs` | yt-dlp / FFmpeg argument builders and codec probing |
| `progress.rs` | yt-dlp JSON / FFmpeg `-progress` parsing, phase and queue weighting, throttling |
| `media_info.rs` | Format listing (`-F`) and metadata previews |
| `activity.rs`, `stats.rs` | Persisted download activity and lifetime statistics |
| `sidecars.rs` | Sidecar location and effective FFmpeg resolution |
| `process_util.rs` | Scrubbed environment, process groups, tree termination, bounded output capture |
| `platform.rs` | Platform queries, beta updater target, OS handoffs (open URL, reveal, notify) |
| `updater.rs` | Update engine: one state thread owns channel and target selection (per-arch zstd feeds with a universal fallback, Rosetta to native `aarch64`), check/download/install generations, single-flight download and install, and the Flatpak feed-only rule; emits `updater-status` and `updater-progress` |
| `window.rs` | Splash, deferred main-window reveal, close flow (confirm, settings flush), restart |
| `app_menu.rs` | Native macOS menu |
| `app_state.rs` | Process-wide handles: app handle, resolved user directories, background event sink |
| `constants.rs` | Limits and allow-lists shared by validation, settings, and the downloader |
| `deno.rs` | Deno runtime detection and optional install for yt-dlp's JavaScript extractors |
| `download_options.rs` | Shared option precedence, validation, and snapshots for manual and queued downloads and the effective-options preview |
| `ffmpeg_guard.rs` | Per-operation FFmpeg/ffprobe launchers that restrict yt-dlp to local inputs |
| `fs_util.rs` | Atomic, private file writes and bounded reads for persisted JSON state |
| `gpu.rs` | Hardware encoder detection by probing FFmpeg (cached for five minutes) |
| `ip_policy.rs` | Shared destination rules for IP literals, used by URL pre-checks and the outbound proxy |
| `ipc.rs` | `{ ok, data } \| { ok: false, error }` envelopes shared with the frontend |
| `logging.rs` | Rolling local diagnostics log (`logs/rosi.log`) |
| `network_security.rs` | Per-operation outbound proxy that pins each destination to a vetted IP, optionally reached through the user's upstream HTTP proxy |
| `network_security_async.rs` | Tokio implementation of the proxy's listener and client tasks (256 active, 128 pending); DNS stays in `network_security.rs`'s resolver pool |
| `staging.rs` | Startup sweep of stale ROSI scratch entries in the download folder (no symlink following) |
| `types.rs` | Shared data model, serialized as camelCase to match the v4 bridge shapes |

Expand All @@ -64,19 +68,20 @@ normal loaders validate everything, and the result is recorded in
argument and result types from `generated/ipc-types.ts`. It is the only place
that calls `invoke()`; `src/tests/commands.contract.test.ts` checks its names
against `src-tauri/build.rs` and the main window capability.
- `tauri-bridge.ts` implements the renderer API (`window.api`) on top of
`commands.ts` and Tauri events. `window.api` stays the seam that the vitest
DOM tests and the E2E specs drive.
- `updater.ts` wraps `@tauri-apps/plugin-updater`. Stable checks use the default
`latest-{target}-{arch}.json` endpoints; beta checks pass the
`{os}-beta-{arch}-{installer}` target from `get_beta_updater_target`.
- `main.ts` is the entry point. It imports the bridge first, then the renderer
- `api.ts` exports the renderer API object `api` on top of `commands.ts` and
Tauri events. Callers import it and call `api.method(...)` at call time. The
vitest DOM tests mock this module. The E2E hook exposes the same object as
`window.__ROSI_E2E__.api` in E2E builds only.
- `engine/updater-ui.ts` draws update state. It calls the updater commands in
`commands.ts` and renders the `updater-status` and `updater-progress` events;
it makes no update decisions. The webview has no updater plugin permissions.
- `main.ts` is the entry point. It imports `api.ts` first, then the renderer
modules, then `rosiEngine.ts`. After the renderer reports startup readiness it
calls `mark_main_window_ready`, which lets the backend close the splash.
- `rosiEngine.ts` is the renderer controller's startup: it loads settings,
looks up the DOM, and calls the `engine/bind/*` functions in order, which bind
each feature's controls and the backend events. It calls the same `window.api` contract the v4 Electron preload
exposed, which `tauri-bridge.ts` implements.
each feature's controls and the backend events. It uses the same API contract
the v4 Electron preload exposed, which `api.ts` implements.
- `engine/*` are ES modules split out of the controller by feature:
`settings-store.ts` (settings state and serialized saves), `settings-view.ts`,
`queue-controller.ts`, `manual-download.ts`, `preview-controller.ts`,
Expand Down Expand Up @@ -111,6 +116,32 @@ builds. The release pipeline (`scripts/run-release.js`, `release-session.js`,
The vendored `src-tauri/vendor/tauri-plugin-updater` carries install-safety
patches, documented in `src-tauri/vendor/tauri-plugin-updater/PATCHES.md`.

### Compact macOS updates

Fresh installs use the universal DMG/ZIP. In-app updates on macOS download a
per-arch `ROSI-{aarch64,x86_64}.app.tar.zst` instead of the universal
`ROSI.app.tar.gz` (141.5 MB to about 60 MB):

- `release:mac:continue` also runs `tauri build --target {aarch64,x86_64}-apple-darwin --bundles app`.
`scripts/pack-macos-updater-zst.js` then repacks each per-arch `.app.tar.gz` with
`zstd --long=27` and signs the result (`tauri signer sign --app-version`). The long
window dedupes `rosi-ffmpeg` against `rosi-ffprobe`. The tar bytes are unchanged, so
the bundle signature and staple survive.
- `scripts/gpg-sign.js` publishes them under `latest-darwin[-beta]-{arch}-app-zst.json`
and never collects the per-arch builds' arch-less `.app.tar.gz`.
- Packaged macOS apps ask for that target (`get_compact_updater_target`). If the
compact feed is missing they fall back to the universal feed, which stays published
for clients older than 5.1.0. An x86_64 process running under Rosetta 2 requests
`darwin[-beta]-aarch64-app-zst` so it updates directly to native Apple Silicon execution.
- Staged updates are verified prior to installation: the vendored updater validates that
the extracted executable and sidecars match the host architecture before live bundle
replacement or backup retirement.
- `rosi-yt-dlp` is upstream's universal2 binary and already compressed, so about
36 MB of every update is yt-dlp.

Failure modes: `e2e/updater-zst.failure-modes.md`. Check: `npm run test:e2e:updater-zst`
(report in `e2e/artifacts/updater-zst-report.json`).

### macOS entitlements for sidecars (planned, not implemented)

Today `src-tauri/entitlements.plist` grants `disable-library-validation` and
Expand Down Expand Up @@ -150,6 +181,7 @@ Ordered plan (confirm each Tauri step with a dry run before changing the pipelin
insert steps 2 to 5 into `scripts/release-session.js` or `run-release.js`
between `tauri build` and checksum/GPG signing in `scripts/gpg-sign.js`.
7. Regenerated artifacts to re-check before publish: the `.app`, `.app.tar.gz`,
the per-arch bundles and their `.app.tar.zst` (repack after re-signing),
`.sig`, the `latest-*.json` manifests, the DMG, the ZIP, checksums, and
GPG signatures. `verify-release-draft.js` must pass on the final set.

Expand Down
Loading
Loading