Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

update

Jareerd00def72229c
diff --git a/AUDIT-2026-09-23-QUICK.md b/audit/AUDIT-2026-09-23-QUICK.md
similarity index 100%
rename from AUDIT-2026-09-23-QUICK.md
rename to audit/AUDIT-2026-09-23-QUICK.md
diff --git a/AUDIT-2026-09-23.md b/audit/AUDIT-2026-09-23.md
similarity index 100%
rename from AUDIT-2026-09-23.md
rename to audit/AUDIT-2026-09-23.md
diff --git a/audit/AUDIT-2026-09-28.md b/audit/AUDIT-2026-09-28.md
new file mode 100644
index 00000000..b6ab1d80
--- /dev/null
+++ b/audit/AUDIT-2026-09-28.md
@@ -0,0 +1,549 @@
+# Concat audit, 28 September 2026
+
+Where the codebase stands five days after the 23 September audit, on the day
+0.2.5 shipped. Same method, same seven scales, same reviewers' split, and
+every one of the 24 findings from last time re-verified against today's
+tree. Every finding names a file and a line. The sibling
+`AUDIT-2026-09-28-QUICK.md` is this audit as a one-screen scorecard.
+
+**How it was done.** Nine reviewers each read one part of the tree in full
+(core and project; media; render and effects; export and host; the window's
+Rust; the Slint UI; the API, server and CLI; speech, vision, text, Android
+and the model manifest; tests, CI, build, docs and release), re-verified the
+23 September findings assigned to them, scored their part and reported new
+findings with locations. The headline items were re-checked by hand against
+the code before they went in here. Line counts, test counts and the unsafe,
+unwrap and panic tallies come from the tree; `cargo fmt --check`,
+`cargo clippy --workspace --all-targets`, `cargo test --workspace` and
+`cargo run -p concat-perf --release -- --check` were run on this machine
+(Apple Silicon, macOS 26). The app itself was not launched.
+
+**Status of this document.** Written the same morning. The core/project,
+export/host and API/server/CLI reviews are in and folded in below; the
+media, render/effects, window, Slint, models and CI/docs reviews were still
+running when this was written, so those crates' scores are marked
+*provisional* (carried from 23 September, adjusted only where a hand check
+justified it), and the test and perf results are marked where they were
+still pending. Each of those sections is replaced as its review lands.
+
+**Scale.** 0 to 10. 8 and up means "keep doing this"; 5 to 7 means "works,
+with known debt"; 4 and under means "will bite at the next order of
+magnitude, or already bites".
+
+---
+
+## 1. The numbers
+
+### 1.1 Size, tests and hygiene per crate
+
+Deltas are against the 23 September table. The unwrap column gives the total
+and, in brackets, the count outside test modules.
+
+| Crate | Rust lines | Δ | Slint / WGSL | Tests (files) | `unsafe` | `unwrap`/`expect` (non-test) | `panic!` family |
+|---|---:|---:|---:|---:|---:|---:|---:|
+| concat (window) | 19 564 | +3 506 | 27 346 slint | 59 (14) | 1 | 29 (5) | 1 |
+| concat-host | 11 540 | +2 813 | | 76 (17) | 1 | 227 (2) | 15 |
+| concat-project | 9 192 | −719 | | 98 (1) | 0 | 310 (11) | 14 |
+| concat-media | 9 041 | +1 003 | | 86 (11) | 37 | 188 (42) | 5 |
+| concat-render | 8 044 | +3 171 | shaders inline in `gpu.rs` | 85 (6) | 1 | 87 (8) | 4 |
+| concat-effects | 7 090 | +2 426 | 1 744 wgsl | 69 (9) | 0 | 129 (10) | 2 |
+| concat-export | 3 498 | +212 | | 27 (3) | 0 | 23 (0) | 0 |
+| concat-speech | 3 094 | +7 | | 19 (3) | 3 | 23 (2) | 0 |
+| concat-core | 2 829 | +138 | | 47 (7) | 0 | 24 (4) | 2 |
+| concat-vision | 2 760 | 0 | | 31 (8) | 0 | 22 (2) | 0 |
+| concat-api | 2 350 | +357 | | 21 (2) | 0 | 23 (0) | 8 |
+| concat-server | 1 376 | +193 | | 12 (4) | 0 | 30 (5) | 2 |
+| concat-text | 1 240 | +139 | | 15 (1) | 0 | 36 (1) | 1 |
+| concat-perf | 1 092 | +288 | | 2 (1) | 0 | 34 (34) | 0 |
+| concat-cli | 514 | +65 | | 3 (1) | 0 | 2 (2) | 0 |
+| concat-android | 335 | 0 | | 0 (0) | 10 | 9 (9) | 2 |
+| **Total** | **~83 600** | **+12 600** | **~29 100** | **650 (88)** | **53** | **~1 200 (137)** | **56** |
+
+The tree grew by an eighth in five days and lost weight in the right
+places: concat-project shed its 800-line preset-animation module, and
+concat-effects shed 59 format 1 picture packages (WGSL lines fell from
+2 205 to 1 744 while the crate's Rust grew by half for the format 2
+contract, multi-pass and probes). concat-render doubled: the CPU compositor
+became a test oracle and the GPU one took on linear light, HDR, scopes and
+the texture cache. The window's Rust grew by a fifth, most of it in
+`studio.rs`, which is now 9 461 lines (7 484 on the 23rd).
+
+Outside test modules the workspace holds 137 `unwrap`/`expect` calls, 34 of
+them in the perf harness and 42 in concat-media's FFI, and 13 `panic!`
+family calls, 7 of which are `unreachable!` routing arms in concat-project.
+
+Other facts: 123 effect packages (98 on format 2 with WGSL: 21 effects,
+57 looks, 20 transitions; 25 audio packages still on FFmpeg chains, by
+design); 14 locale files, every one at 969 lines with 0 missing and 0 stale
+keys per `scripts/locales.py --check`; 730 commits since 25 August, 143 of
+them since the last audit (810 files, +41 000 / −34 000 lines; 136 by the
+maintainer, 5 from four outside contributors through three merged PRs);
+29 release tags, latest `v0.2.5`, released today; largest files
+`concat/src/studio.rs` 9 461, `concat-project/src/lib.rs` 3 791 (3 755 of
+them tests), `concat-render/src/gpu.rs` 3 599, `concat-export/src/lib.rs`
+2 672, `concat-effects/src/shader.rs` 2 406; largest Slint files
+`workspace/media-pane.slint` 2 156 and `inspector/clip-inspector.slint` 1 954.
+
+### 1.2 The checks, run today
+
+| Check | Result |
+|---|---|
+| `cargo fmt --all -- --check` | 0 files would change (8 on the 23rd) |
+| `cargo clippy --workspace --all-targets` | 0 warnings |
+| `cargo test --workspace --no-fail-fast` | *running when this was written; see the QUICK file's Today's checks row, updated when it finished* |
+| `cargo run -p concat-perf --release -- --check` | *pending the test run* |
+| CI on `main` | green at head (`b78ee56`, CI and Nix both pass) |
+
+**`main` is green.** The last 12 runs on `main` are 7 successes, 3
+failures and 2 cancellations. The three failures were this morning's
+commits between 10:12 and 11:02 UTC (the roadmap move, the export-device
+fix, the Version page); `d1d3265` fixed the Windows build and every run
+since passes. CI now runs `cargo fmt --check` (`ci.yml:93`), clippy with
+`-D warnings` (`ci.yml:108`), the quick perf scenarios against their budgets
+(`ci.yml:120`), the engine on wasm32 (`ci.yml:134`) and a macOS 15 plus
+Windows 2022 matrix (`ci.yml:162-168`), and the release job needs the check
+and engine jobs (`release.yml:67`). Four of the seven CI items on the 23rd
+are done.
+
+---
+
+## 2. Scorecard for the whole app
+
+| Aspect | 23 Sept | Today | One line |
+|---|:---:|:---:|---|
+| Code quality | 7 | 7 | Clippy-clean under `-D warnings`, fmt-clean, typed errors; `studio.rs` grew 2 000 lines and `ExportClip` has 40 fields. |
+| Design architecture | 7 | 8 | One compositor, `FramePlan` draws transitions for monitor and export alike, the device is lent to the export, the API and window share one register and one export slot. |
+| Design philosophy | 6 | 7 | Rules that were stated and not held on the 23rd now hold: a corrupt document is an error, one clamp pass, digests mandatory, packages trialled. "Writes only under roots" and "dropped in one place" are still half true. |
+| Maintainability | 6 | 6 | The CPU path, 59 packages and the preset catalogue are gone; `studio.rs` at 9 461 lines and `gpu.rs` at 3 599 pull the other way. |
+| User likeability | 7 | 7 | HDR end to end, scopes, colour wheels and curves, a phone shell, self-update, any font; accessibility is still two properties. |
+| Performance | 5 | 6 | Every picture on the GPU in half floats, a texture cache, ping-pong passes, 4K HLG five times faster; the export loop is still one thread with a readback per frame. |
+| Scalability | 4 | 5 | Transport limits, bounded LUT and pool caches, a swept proxy folder; one Hub thread, a file descriptor leaked per API connection, four cache folders never swept. |
+| Security | 4 | 5 | Every model verified and pinned, a canonicalising roots check, constant-time tokens; the default root is the home folder, and the self-update trusts a digest published beside the package. |
+| Testing | 6 | 7 | 650 tests; the end-to-end suite pins pixels for crop, flips, fades, wipes and HDR; session refusal tests; 98 packages hold probes. |
+| Documentation | 7 | 7 | A hand-written CHANGELOG and a current ARCHITECTURE; developer docs moved off the repo; two §7 claims overstate the code. |
+| CI and release | 4 | 6 | fmt, clippy, perf and wasm gates, a desktop matrix, release gated on CI, a `SHA256SUMS` file; nothing is signed and three runs went red today. |
+
+---
+
+## 3. Scores per crate
+
+Columns: code quality, maintainability, scalability, performance,
+architecture, design philosophy, security, testing. A dash means the scale
+does not apply. Arrows are against 23 September. Rows marked *prov.* carry
+the 23 September score adjusted only by today's hand checks; their reviews
+were still running.
+
+| Crate | CQ | Maint | Scale | Perf | Arch | Phil | Sec | Test | Note |
+|---|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|---|
+| concat-core | 8 | 8 | 6 | 6 | 8 | 8 | – | 7 | Held. Still no dependencies; `Depth`, `Signal` and `Stage` landed cleanly; linear `clip_on_track_at` and dead `Project` unchanged. |
+| concat-project | 8 ↑ | 7 ↑ | 6 ↑ | 6 ↑ | 7 | 7 ↑ | – | 7 | `clips_where`, one `tidy_touched` after every command, HDR flip as an editor-level diff; the frame has no ceiling, snapshots clone the bin. |
+| concat-media *prov.* | 7 | 7 | 5 | 6 | 8 | 8 ↑ | – | – | `catch_unwind` round jobs and a `start_of(stream)` subtraction exist; the copy count per frame awaits the review. |
+| concat-render *prov.* | 7 | 5 | 6 ↑ | 7 ↑ | 8 ↑ | 7 ↑ | – | – | One compositor with the CPU one as oracle; Darken and Lighten fixed; trial and error scopes exist; `gpu.rs` doubled. |
+| concat-effects *prov.* | 8 | 8 | 6 | 8 ↑ | 8 ↑ | 8 ↑ | – | – | Format 2 contract, multi-pass, probes on every picture package; `[[replaces]]` drops keys (finding 7). |
+| concat-export | 6 | 4 | 6 | 5 | 8 ↑ | 7 | 6 | 7 | Device lent in, plan shared with the monitor; 2 672-line `lib.rs`, 40-field `ExportClip`, 12 side tables, serial loop. |
+| concat-host | 7 ↑ | 6 | 5 | 6 | 6 ↑ | 6 | 4 | 6 | Corrupt documents refused with tests, `SingleFlight`, sweeps; the update trust chain, unswept reverse and enhance copies. |
+| concat (Rust) *prov.* | 7 | 5 | 5 | 6 ↑ | 6 | 7 ↑ | – | – | A project epoch exists and three panes use it; `refresh_art` is one comparison on the hot path; `studio.rs` 9 461 lines. |
+| concat (Slint) *prov.* | 7 | 6 | – | – | 7 | 7 | – | – | 27 346 lines; still two `accessible-*` properties, five ⌘ glyphs, `ui/demo/` still imported. |
+| concat-api | 8 | 8 | 5 | – | 8 | 7 ↓ | 6 ↑ | 7 | A real roots check and bounded sizes; four write fields checked, the home folder the default root, open-then-save unchecked. |
+| concat-server | 7 | 8 | 5 ↑ | – | 8 | 8 ↓ | 6 ↑ | 7 | Line, seat, outbox and pre-auth limits; fd leak per connection, seats counted before auth, no `catch_unwind` on the Hub. |
+| concat-cli | 7 | 8 | – | – | 7 | 7 | 6 | 3 | Held; `serve` still parks forever; the token can come from `CONCAT_API_TOKEN`. |
+| concat-speech *prov.* | 7 | 5 | 6 | 7 | 5 | 7 | – | – | Only the window depends on it still. |
+| concat-vision *prov.* | 8 | 7 | 5 | 6 | 9 | 8 | – | – | Unchanged since the 23rd (0 lines of churn). |
+| concat-text *prov.* | 8 | 8 | 5 | 5 ↑ | 9 | 8 | – | – | Now on `fontdb`; the per-render copy awaits the review. |
+| concat-android *prov.* | 8 | 7 | – | – | – | – | – | – | Unchanged; still no tests. |
+
+---
+
+## 4. Scores per feature
+
+Status: **done**, **partial** (works with a known gap), **thin** (present,
+weak). New rows since the 23rd are marked ★.
+
+| Feature | Where | Status | 23 Sept | Today | Why |
+|---|---|---|:-:|:-:|---|
+| Launcher, new project, recents | `ui/start.slint` | done | 8 | 8 | Eleven frame rates plus typed ones, NTSC as exact fractions end to end; a picked folder shows on Windows. |
+| Import, bin, drag and drop | `ui/workspace/media-pane.slint` | done | 8 | 8 | |
+| Timeline editing | `ui/timeline/`, `panes/timeline.rs` | done | 8 | 8 | Trim-follow (#194), Rotate, Freeze/Reverse/Mirror behind one mark. |
+| Undo and redo | `concat-project/src/editor.rs` | done | 8 | 8 | Sharing survives ripple now; every snapshot still clones the bin (finding 12). |
+| Transitions | `concat-render/src/plan.rs`, `transitions.rs` | done | 6 | 8 | Fades and wipes drawn by the plan in monitor and export alike, pinned by pixel in the E2E suite; packaged ones whole on the GPU. |
+| Effects and filters | `concat-effects/packages/` | done | 7 | 8 | 98 GPU packages in linear light with probes; the CPU chains are gone; retired ids open with a notice. `[[replaces]]` drops keys (finding 7). |
+| ★ Colour and HDR | `model.rs` `color_space`, `gpu.rs`, `encode.rs` | done | – | 7 | A timeline colour, deep decode, HDR HEVC/AV1 export with PQ metadata, HDR proxies; the monitor is tone-mapped until phase 4; pre-0.2.5 imports keep SDR proxies (finding 8). |
+| ★ Scopes | `concat-render/src/scopes.rs`, `scopes-pane.slint` | done | – | 7 | Waveform, parade, vectorscope, histogram counted on the GPU; provisional until the render review. |
+| ★ Colour grading | `packages/concat.color-wheels`, `curves`, `grading.slint` | done | – | 7 | Wheels keyable, curves not; widgets pointer-only (UI review pending). |
+| Titles and text | `concat-text`, `concat-host/src/titles.rs` | done | 7 | 7 | Any font on the machine or imported; a missing font falls back silently (finding 14). |
+| Keyframes, animations | `concat-project/src/model.rs` | done | 7 | 7 | Rotation keys wrap on purpose; preset animations were removed and old documents are not told (finding 5). |
+| Crop, transform, blend, masks | `concat-render/src/plan.rs` | done | 6 | 7 | Darken and Lighten fixed on both paths; crop and flips in the plan and pinned by pixel. |
+| Cutout, smart brush | `concat-vision/src/segment.rs` | done | 7 | 7 | Unchanged. |
+| Enhance | `concat-host/src/enhance.rs` | thin | 6 | 6 | One model on every platform; copies land in `cache/` and are deleted by Clear cache (finding 4). |
+| Auto-captions | `ui/dialogs/captions.slint` | done | 7 | 7 | Whether every result checks the project epoch awaits the window review. |
+| Text-to-speech | `concat-speech/src/tts.rs` | done | 7 | 7 | CoreML on every Mac with a CPU fallback; downloads now verified. |
+| Templates | `concat-host/src/templates.rs` | done | 7 | 7 | `delete` fenced by canonical prefix; the `[[replaces]]` pass is skipped for templates. |
+| LUT import | `concat-effects/src/cube.rs`, `looks.rs` | done | 7 | 8 | BOM and Resolve range (#208), tables in float, ACEScct in log. |
+| Custom and community packages | `concat-effects/src/catalogue.rs` | done | 5 | 7 | Trialled on the GPU at install with a timeout; error scopes at draw; multi-pass real. |
+| Proxies | `concat-host/src/proxy.rs` | partial | 4 | 5 | Swept at project open; HDR proxies; still no UI. |
+| Export | `ui/dialogs/export.slint`, `concat-export` | done | 7 | 7 | Draws on the window's device; CBR fixed; HDR row; still one thread, one readback per frame. |
+| Playback and audio | `concat-host/src/playback.rs` | partial | 6 | 6 | Audio cache bounded to 2 GB; a speed-curved clip is still up to 400 decodes; the mixer scans every clip per sample. |
+| Hardware decode | `concat-media/src/hardware.rs` | done | 7 | 7 | Per-stream CPU-or-chip choice; on by default on Windows and Android; still not zero-copy. |
+| Remote API | `concat-api`, `concat-server` | partial | 6 | 6 | Roots, limits and a shared register; the root is the home folder, fds leak, the embedded API opens a second GPU device. |
+| ★ Self-update | `concat-host/src/updates.rs` | done | – | 5 | Drafts and pre-releases filtered, tag validated, file names checked, no auto-check at start; digest from the same release, no signature, quarantine stripped, downgrade unconfirmed (findings 1, 10). |
+| ★ Phone shell | `ui/phone/`, `platform::phone` | partial | – | 6 | An editor of its own on Android and iOS, testable on a desk with `CONCAT_PHONE=1`; no phone build in CI on push. |
+| Relink missing media | `ui/dialogs/relink.slint` | done | 8 | 8 | |
+| Themes and accent colours | `ui/theme/` | done | 8 | 8 | |
+| Languages | `concat/locales/` | done | 6 | 8 | 14 locales, all complete (969 keys each, 0 missing), keyed by ids; RTL awaits the UI review. |
+| Accessibility | the whole UI | thin | 2 | 2 | Two `accessible-*` properties in 27 346 lines. |
+
+---
+
+## 5. The 23 September findings, re-verified
+
+Nine of the 24 are closed, ten are partly closed, two are open, and three
+await a review still running. Of the six criticals, four are closed and two
+are partly closed.
+
+| # | Finding (23 Sept) | Status | Evidence today |
+|:-:|---|:-:|---|
+| 1 | Corrupt document opens empty, next save overwrites it | **closed** | `read_document` returns `Ok(None)` only for `NotFound` and `Err` for a parse failure (`concat-host/src/projects.rs:213-222`); `Session::open` returns it and refuses a newer version too (`session.rs:73-100`); tests `session.rs:341-369`. |
+| 2 | Panicking scheduler job wedges the scheduler | **closed** | `catch_unwind(AssertUnwindSafe(job))` at `concat-media/src/prefetch.rs:363`; the counter path awaits the media review. |
+| 3 | Worker results land in whichever project is open | partial | `host::project_epoch()` captured at spawn and checked by `on_ui_in_project` (`concat/src/studio.rs:5136, 5372, 5461`); 3 of 11 pane files reference it; whether every worker path does awaits the window review. |
+| 4 | API writes any path, sizes unbounded | partial | Roots check refuses `..`, canonicalises the deepest existing ancestor and compares component-wise (`concat-api/src/lib.rs:243-275, 910-929`); `MAX_SIDE` 8192, `MAX_CRF` 63, `MAX_RATE` 240; line cap 4 MiB, auth line 4 KiB, 10 s pre-auth, 64 seats, 256-line outbox (`concat-server/src/json.rs`). Left: the home folder as the root, unconfined with no `HOME`, open-then-save, socket mode (findings 2, 3). |
+| 5 | Window and Remote page are two engines on one folder | **closed** | `OpenProjects` register claimed on every open path (`concat-api/src/lib.rs:99-142, 410-416`), the window claims `Holder::Window` (`studio.rs:6098, 6195, 6239`), one `Arc<SingleFlight>` export slot (`concat-host/src/export.rs:129-132`). Per process only; the embedded API still opens its own GPU device (finding 6). |
+| 6 | Model downloads unverified and unpinned | **closed** | 23 of 23 manifest rows carry a 64-hex `sha256`, 0 at `resolve/main`, 18 pinned to a commit; `verify` refuses an empty digest (`concat-host/src/models.rs:295-301`, test 472-485). |
+| 7 | Hostile package not really refused | **closed** | `Catalogue::install_with` at `studio.rs:6447` trials every user package on the GPU (`concat-host/src/preview.rs:120` → `trial_at`); pipelines are built inside `push_error_scope` (`gpu.rs:1820`). The loop and binding checks await the render review. |
+| 8 | Undo's sharing defeated by every ripple | **closed** | `Timeline::clips_where` copies only the picked clips (`concat-project/src/model.rs:1972-1980`); `clips_mut` is gone; used by ripple trim, freeze, ripple delete and fill slot (`commands/clips.rs:239, 459, 584, 651`, `media.rs:113`). A `ptr_eq` test covers ripple delete only (`lib.rs:1316-1353`). |
+| 9 | Stream start time ignored | **closed** | `start_of(stream)` (`concat-media/src/ffi.rs:164`) and `Decoder::starting_at` (`decode.rs:146`); the pool's use awaits the media review. |
+| 10 | Darken and Lighten wrong at partial opacity | **closed** | `min`/`max(colour, ground) · α` premultiplied (`concat-render/src/gpu.rs:152-160`), the oracle the same (`reference.rs:189`). |
+| 11 | Art scan on every pointer event; full publish 30×/s | partial | `refresh_art` still runs after every callback (`concat/src/lib.rs:117, 420, 1185`) but is one comparison unless the document, the screen or the pending set changed (`studio.rs:8397-8403`). The publish rate awaits the window review. |
+| 12 | `main` red; CI Linux-only until a tag | **closed** | fmt, clippy `-D warnings`, quick perf, wasm32, macOS and Windows matrix in `ci.yml:93-168`; release needs CI (`release.yml:67`); `main` green at head. Parity on the Linux runner awaits the CI review. |
+| 13 | Clamps in four places | partial | `tidy_touched` runs `Clip::tidy` over every clip a command wrote (`concat-project/src/editor.rs:170-197`) and on load (`doc.rs:275`). The speed range still has 3 definitions and 2 literal copies (`model.rs:1076`, `concat-core/src/retime.rs:27`, `concat-media/src/audio.rs:35`, `studio.rs:3980`, `concat-host/src/cutout.rs:178`); `properties.rs:156-159` is a stale comment. |
+| 14 | E2E suite checks timing, not looks | partial | `colour_at_point` (`concat-host/tests/export.rs:358`) pins crop and flips (753), fades and wipes (887), HLG to HDR and SDR (979, 1036), export on a lent device (701), reverse (1862), hardware decode (1788). Effects, keys, transform, blend and titles await the tests review. |
+| 15 | Caches with no bound | partial | `cache/proxy` swept at open (`proxy.rs:166-186`), audio cache 2 GB (`playback.rs:62-64`), titles 400 PNGs (`titles.rs:355-380`), GPU pool 512 MB / 1024 textures. Still unswept: `cache/art`, peaks, reverse and enhance copies (`media.rs:337-364`; finding 4). |
+| 16 | Per-frame copies; treat graph rebuilt per frame | pending | The treat chains went with the CPU path; the decode copies await the media review. |
+| 17 | Hub does heavy work in line; fan-out under a mutex | partial | Fan-out clones the list and gRPC uses `try_send` (`hub.rs:54-66`, `grpc.rs:70-76`). The Hub still composites previews, paints titles, probes and copies templates on its one thread (finding 9). |
+| 18 | ONNX Runtime linked twice | pending | Awaits the models review; two HTTP stacks are linked (ureq 2 with rustls, ureq 3 with native-tls through `ort-sys`). |
+| 19 | Speech only reachable from the window | **open** | Only `concat` depends on `concat-speech`; 21 verbs, none for speech, enhance, proxies, packages, cache or jobs; the API's export hard-codes VBR (`concat-api/src/lib.rs:568-569`), so the CBR fix of #104 is the window's alone. |
+| 20 | Title rasteriser copies the font per render | pending | `concat-text` is on `fontdb` now (`lib.rs:198`); the copy awaits the models review. |
+| 21 | Stale UI facts | partial | "Flip horizontally" gone with the shortcuts section; README says 14 languages; the window minimum is 320×480 on a phone (`app.slint:92-93`). ⌘ still appears in 5 places; lane colours await the UI review. |
+| 22 | Dead `ui/demo/` still imported | **open** | `ui/demo/editor-chrome.slint` and `effects-panel.slint` remain, imported by `app.slint`, `editor.slint` and `workspace/config-pane.slint`. |
+| 23 | Stale docs | partial | ARCHITECTURE §8 no longer states a count; `test/` is gone; `src/README.md:114` still says `mobile.yml` runs on every pull request; §7's "writes only under its roots" holds for four fields of nine verbs. |
+| 24 | Small hygiene | partial | fmt clean. Still: dead `core::Project` (`concat-core/src/timeline.rs:487-504`), `Path::exists` in the wasm crate (`model.rs:1900-1910`), the CLI's `serve` parks forever and leaves its socket (`concat-cli/src/main.rs:247-249`). |
+
+---
+
+## 6. New findings, by severity
+
+No new critical. Each carries a location and whether the reviewer read the
+whole path **(verified)** or reasoned from part of it.
+
+### High
+
+1. **The self-update trusts a digest published beside the package, with no
+ signature, and takes Gatekeeper out of the loop.** (verified) The release
+ list comes from `api.github.com` (`concat-host/src/updates.rs:45`), the
+ package URL and its SHA-256 from `manifest.json` in the same GitHub
+ release (`updates.rs:340-383`), written by `scripts/models.py
+ release-manifest` in the release job (`.github/workflows/release.yml:100-108`)
+ with `contents: write`. The check at `updates.rs:430` proves only that
+ the bytes match what the release says they are: whoever can write the
+ release (a leaked token, a compromised maintainer account, the release
+ action) replaces the package and its digest together, and every person
+ who presses Install runs it. On macOS the swapped bundle then has its
+ quarantine stripped (`updates.rs:539-541`); the Windows installer is
+ unsigned (no `signtool` in `build-app.yml`; Inno with
+ `PrivilegesRequired=lowest`, `assets/windows/concat.iss:59`); the macOS
+ bundle is notarised only when the secrets are set (`build-app.yml:463-498`).
+ The input hygiene around it is good: drafts and pre-releases filtered,
+ the tag validated before it enters a URL, a file name with a folder
+ refused, no check at start (only when the page opens). A compiled-in
+ public key and a signed manifest would close this.
+
+2. **From the window's Remote page a token holder can truncate
+ `~/.ssh/authorized_keys`.** (verified) `Config::roots` empty means the
+ home folder (`concat-server/src/lib.rs:80-86, 145-149`), and the Remote
+ page passes no roots (`concat/src/panes/settings.rs:561-565`).
+ `preview.frame` with `output: "~/.ssh/authorized_keys"` (or `~/.zshrc`,
+ a keychain, an autostart entry) passes `writable` (`concat-api/src/lib.rs:648`),
+ then `create_dir_all` and `File::create` truncate it and fill it with
+ PNG bytes (`lib.rs:950-964`); `export.run` does the same for anything
+ FFmpeg can name a container for. Not code execution, but silent
+ destruction of credentials and shell profiles by anyone with the token.
+ Two neighbours: with neither `HOME` nor `USERPROFILE` set the root list
+ is empty and `writable` treats empty as unconfined (`lib.rs:244`), the
+ opposite of the comment at `concat-server/src/lib.rs:79`; and
+ `project.open` takes any readable folder, after which `project.save`
+ and the mask cache write into it (`lib.rs:454-456, 576-580`), so an
+ existing project on a shared volume can be rewritten from the socket.
+
+3. **Every JSON connection leaks a file descriptor, and unauthenticated
+ callers hold the seats.** (verified) `json.rs:106-122` (TCP) and
+ `161-177` (Unix) clone the stream into a closure pushed onto
+ `connections`; nothing removes it when the connection ends (`json.rs:135`
+ shuts the socket, the clone stays) and the list is drained only in
+ `Server::shut` (`concat-server/src/lib.rs:284-288`). Any local process,
+ token or not, that connects and disconnects 256 times exhausts the
+ editor's descriptors: no media opens, no export writes, `accept` spins
+ on `continue` (`json.rs:100`). A well-behaved script that connects per
+ request leaks the same way. Separately, `Seat::take` runs before the
+ handshake (`json.rs:102, 157`), so 64 idle connects refuse the token
+ holder with `busy` for each 10 s window, renewably.
+
+4. **Clear cache deletes the media behind reversed and enhanced clips, and
+ those copies are never swept.** (verified for reverse) The reversed copy
+ lands in `project/cache/reverse-<hash>-<start>-<dur>.mp4`
+ (`concat-host/src/reverse.rs:71-93`) and `adopt_reversed` makes it the
+ clip's media through `ReplaceClipMedia` (`concat/src/studio.rs:5495-5520`).
+ `projects::clear_cache` removes the whole `cache/` folder
+ (`projects.rs:330-339`), from Settings (`studio.rs:6202-6216`), so a
+ reversed clip is missing media at the next open; the original import is
+ untouched but the clip no longer points at it. Enhance copies are named
+ into the cache the same way (`enhance.rs:57-76`). A new file is written
+ for every different trim (the key holds start and duration), at CRF 16,
+ and nothing sweeps them; `proxy::sweep` touches only `cache/proxy/*.mp4`.
+ Processed media belongs under `media/`, or the sweep and Clear cache
+ have to know what a clip points at.
+
+5. **0.2.4 documents with reversed clips or preset animations open silently
+ changed.** (verified) `Clip` lost `reverse` and the four `animation_*`
+ fields, `animation.rs` (800 lines) and `SetClipAnimation` went, and
+ `MIGRATIONS` is still two steps (`concat-project/src/doc.rs:62-71`).
+ `Session::open` surfaces nothing; the retired-effects path gets a
+ notice, this does not, and CHANGELOG's "Changes to note" does not say
+ it. A 0.2.4 project with a reversed shot opens, previews and exports
+ forward with no message; the flag rides in `extra` and is written back
+ forever (only a menu arm still reads `"reverse"`).
+
+### Medium
+
+6. **The Remote page's embedded API still opens a second GPU device inside
+ the window.** (verified path; the crash itself is #202's) `Api::new`
+ builds `Monitor::new()` (`concat-api/src/lib.rs:179`), and an
+ `export.run` goes `ExportJob::run` → `export::run` → `run_on(request,
+ None, …)` (`concat-host/src/export.rs:89-95`) → `best_compositor()` →
+ `WgpuCompositor::new()` (`concat-export/src/lib.rs:1094-1130`); previews
+ use the static `headless()` device. The window's own export and cards
+ use `monitor.sibling()` (`concat/src/panes/export.rs:353`,
+ `studio.rs:6393`). So a remote export or preview on the NVIDIA laptop of
+ #202 takes the road the fix closed. The CLI and a headless API rightly
+ use their own device or fail with `NO_RENDERER`.
+
+7. **`[[replaces]]` upgrades drop keyframes, are silent, and skip user
+ packages and templates.** (verified) `Editor::upgrade_links` rewrites
+ links before any edit and outside undo (`concat-project/src/editor.rs:89-107`);
+ `Session::open` ignores its `bool` (`session.rs:104-105`): no dirty flag,
+ no notice. `Package::replacing` returns `keys: BTreeMap::new()`
+ (`concat-effects/src/catalogue.rs:585-591`, admitted at 553-556). An
+ animated Green Screen opens as a constant Chroma Key; the file is
+ intact until the next save, then the old link and its keys are gone.
+ Only `Catalogue::builtin()` is consulted, so a user package's
+ `[[replaces]]` never fires; `templates.rs:323` builds an editor without
+ the pass. No test covers `upgrade_links`.
+
+8. **HDR proxies are not regenerated for media imported before 0.2.5.**
+ (verified in the open path) The HDR flag in the proxy name comes from
+ `item.color_space.is_hdr()` (`studio.rs:6123, 2481`, `proxy.rs:72-74`),
+ and `MediaItem::color_space` is absent from a document written before it
+ existed and reads SDR (`model.rs:171-176`). For an HDR file imported
+ under 0.2.4 the old SDR proxy is kept by the sweep, still adopted, and no
+ HDR proxy is queued; no re-probe of existing media was found. CHANGELOG
+ says the tone-mapped proxies "are made again".
+
+9. **The Hub does heavy work in line, and a panic in any verb leaves a
+ zombie server.** (verified) `hub.rs:83-87` has no `catch_unwind`; a
+ panic in `dispatch` ends the API thread and every later call returns
+ "the server is shutting down" while the listeners keep accepting and
+ the Remote page says it is listening. The one thread still composites
+ previews, paints titles, runs every `media.probe` and copies template
+ files (`concat-api/src/lib.rs:326, 465, 485, 632, 689`,
+ `templates.rs:368`). Also: a subscriber whose 256-line outbox fills is
+ dropped on the first `false` with no signal (`hub.rs:58-66`,
+ `json.rs:319-324`); progress goes out every 15 frames, so a client that
+ reads nothing for about a minute never sees `export.done`.
+
+10. **Downgrade is one click with no gate.** (verified) The list keeps
+ every stable release from 0.2.5 (`updates.rs:141-143`) and Install runs
+ the chosen one (`settings.rs:447-497`, `ui/dialogs/settings.slint:1090-1105`)
+ with no "older than this build" check. An older release refuses a
+ document only when `DOCUMENT_VERSION` was bumped; a newer document at
+ the same version opens with its features silently absent.
+
+11. **The model has no ceiling on frame size or rate.** (verified for the
+ model) `SetTimelineVideo` accepts any positive value
+ (`commands/timelines.rs:54-57`, `model.rs:1789-1791`); the ceilings live
+ in the window (`FRAME_SIDES 16..8192`, `studio.rs:243-246`) and the API
+ (`MAX_SIDE`). A hand-edited document with `"width": 100000` opens; the
+ compositor's texture limit is 8192 (`concat/src/gpu.rs:89`). §6's
+ "clamps live in `Clip::tidy`" has no counterpart for the timeline's
+ frame.
+
+12. **Every undo snapshot deep-copies the bin.** (path verified) `editor.rs:141`
+ clones the project; `Project.media: Vec<MediaItem>` is not behind `Arc`
+ (`model.rs:1812-1813`); `Batch` clones again per nesting level
+ (`commands/mod.rs:994`). 200 snapshots of a 2 000-item bin is 400 000
+ `MediaItem` copies, against the module doc's "a snapshot copies
+ pointers" (`editor.rs:6-10`).
+
+13. **The export is still one thread, and playback's two old costs
+ remain.** (verified) Decode → composite with a GPU readback →
+ `write_frame` on one thread (`concat-export/src/lib.rs:1204-1330`);
+ `ExportClip` has 40 public fields and `BuiltTimeline` 12 side tables
+ (`resolve.rs:88-118`). `audio_pieces` still cuts a curved clip into up
+ to 400 pieces, each its own decode (`lib.rs:1005-1007`,
+ `studio.rs:2124-2136`); the mixer loops every clip per output sample
+ (`playback.rs:1032-1055`).
+
+### Low
+
+14. **A document names its font by absolute path into the app's own
+ folder** (`CustomFont { family, path }`, `model.rs:1797-1806`, installed
+ to `config/fonts/`, `concat/src/presets.rs:317-331`). On another machine
+ `Fonts::add_file` fails silently (`titles.rs:211-214`) and the title is
+ drawn in a fallback face with no notice, unlike missing media. No
+ traversal: install uses `file_name()` and the document path is only read.
+
+15. **Small correctness in concat-project.** `has_non_finite` misses the
+ three `TextStyle` fields added since the 23rd (`commands/mod.rs:878-889`
+ vs `model.rs:885-892`), so a NaN is not refused, only replaced by tidy;
+ `SetClipKey` and `AddCutoutStroke` can record an undo step that changes
+ nothing (`properties.rs:169-173, 136-139`); `follow_first_hdr` flips a
+ timeline back to HLG after the person set it to SDR, removed the HDR
+ clip and dropped one again (`editor.rs:238`); `VideoSettings`,
+ `TextStyle` and six other structs have no `extra` map, so an unknown
+ field inside `video` or `text` is dropped on round trip and an unknown
+ `colorSpace` reads SDR (`model.rs:1056-1059, 1717-1735`); `to_document`
+ stamps `"concat": "0.1.0"` (`doc.rs:317`).
+
+16. **Small hygiene in the server and CLI.** The Unix socket is created at
+ the umask's mode (`concat-server/src/lib.rs:196`); `connections()`
+ over-counts hung-up callers; `export.progress.stage` is documented as
+ "video", "audio", "mux" (`message.rs:591`) and emitted as "rendering",
+ "mixing audio", "muxing" (`concat-export/src/lib.rs:909, 914, 1333`);
+ `project.create`'s `video` is unbounded (`lib.rs:386-393`).
+
+17. **Small hygiene in the host.** `updates::installed_as()` runs `rpm -q`
+ synchronously on the UI thread once per run (`settings.rs:796-797`,
+ `updates.rs:248-267`); export temporaries are predictable siblings of
+ the output with no exclusivity (`lib.rs:887-888`); two TLS stacks are
+ linked (ureq 2 with rustls and webpki roots, so a TLS-inspecting proxy
+ breaks updates and model downloads; ureq 3 with native-tls through
+ `ort-sys`).
+
+18. **Carried from the 23rd.** Five ⌘ glyphs in the UI; `ui/demo/` still
+ imported; `core::Project` dead; `Path::exists` in the wasm crate; the
+ speed range in five places; `src/README.md:114` on `mobile.yml`.
+
+---
+
+## 7. What is good, and should stay that way
+
+- **The layering, still.** Every arrow points one way; FFmpeg is only in
+ concat-media; the CPU compositor is a test oracle and nothing else.
+- **`Session::open`'s three-way split** (none, corrupt, newer) with two
+ refusal tests (`session.rs:73-100, 341-369`). The critical of the 23rd,
+ closed with a test that pins it.
+- **`clips_where` + `tidy_touched`.** Sharing preserved by construction and
+ one clamp function used both on load and after every command
+ (`model.rs:1972`, `editor.rs:170`).
+- **`follow_first_hdr` as an editor-level diff.** One undo step for free,
+ correct through `Batch`, gesture folding, undo and redo, with a test that
+ undo takes the clip and the colour back together (`lib.rs:144-192`).
+- **Mandatory digests with pinned upstreams**, one `download`/`verify` pair
+ shared by models and the updater (`models.rs:201-310`).
+- **The updater's input hygiene.** Drafts and pre-releases filtered, the tag
+ validated before it becomes a URL, a file name with a folder refused,
+ cancel and timeouts everywhere, and a fallback to "open the package" when
+ the swap cannot be done (`updates.rs:119-161, 361-368, 483-511`).
+- **`Api::writable` + `resolved`.** Refuse `..`, canonicalise the deepest
+ existing ancestor, compare component-wise, with a test that walks a
+ not-yet-existing folder (`concat-api/src/lib.rs:243-275, 910-929, 1384-1435`).
+- **`OpenProjects`** as a shared, cheap-to-clone register with
+ claim-or-name-the-holder semantics and release in `Drop`.
+- **`SingleFlight`.** One slot per long job, released on drop even through
+ a panic, cancel reaches only the running job (`jobs.rs:18-111`).
+- **The lent compositor**, the adapter named in the log at the first frame,
+ and an end-to-end test that exports on a sibling device
+ (`concat-export/src/lib.rs:1129-1140`, `tests/export.rs:701`).
+- **Reverse's two-pass, bounded-memory design** and partial-then-rename
+ landing (`reverse.rs:63-65, 167-177, 219-291`).
+- **The tolerant `wire` readers**, per-struct `extra` maps and the
+ `WRITER_OWNED` list: a hand-edited file degrades instead of failing.
+- **One contract, two transports**, a constant-time token with the test
+ that pins its promise, and `version.capabilities` extended by the server
+ with what is actually listening.
+- **A hand-written CHANGELOG** grouped by where the person notices the
+ change, and CI that gates on fmt, clippy, perf and wasm on every push.
+
+---
+
+## 8. Where we stand
+
+The 23 September audit ended with seven recommended steps. Five days later:
+
+| Step (23 Sept) | Landed |
+|---|---|
+| 1. Correctness trio (open, scheduler, epoch) | open and scheduler yes; epoch exists, coverage to confirm |
+| 2. Server limits, root allowlist, shared exporter | yes, with the home folder as the root and two holes (findings 2, 3) |
+| 3. Fill every digest, pin, refuse empty | yes, in full |
+| 4. Trial at install, error scopes, source-hash keys | trial and error scopes yes; key scheme to confirm |
+| 5. `clips_where`, one clamp pass, `start_time`, Darken/Lighten | all four, with the speed range still copied |
+| 6. Art refresh on change, sweeps, graph caching | art yes; proxy swept; art, peaks, reverse, enhance not |
+| 7. CI matrix, perf gate, release on CI, docs | matrix, perf and release yes; parity and docs partly |
+
+And on top of that list, the HDR plan's phases 0 to 3 shipped: one GPU
+compositor in linear light, format 2 packages with probes and multi-pass,
+HDR in and out, scopes, and the retirement of the old effects. That is the
+week's real story: the picture pipeline is now one thing, and the audit's
+render and effects findings of the 23rd (CPU kernels for 147 shaders,
+unbounded GPU memory, chains never pixel-compared) are gone with the code
+that carried them.
+
+What the week bought in debt is of two kinds. The first is the feature
+that shipped fastest: the self-update is well built at every step except
+the one that matters, the trust root, and it should not sit in a release
+for long without a signature. The second is the seam between old and new:
+pre-0.2.5 documents with reversed or animated clips, pre-0.2.5 HDR imports,
+and `[[replaces]]` links with keys all open changed and say nothing. Both
+are cheap next to what was paid this week.
+
+**Recommended order.** Each line is a day or a few, and each closes a
+finding above.
+
+1. Sign the update manifest with a key compiled into the app and refuse an
+ unsigned one; keep the quarantine bit; confirm a downgrade; sign the
+ Windows installer and notarise every macOS build. (1, 10)
+2. Remote page defaults: root the API at the project and export folders,
+ not the home folder; refuse to start with no root; check `writable` in
+ `project.open` or `save`; count seats after auth; drop the connection
+ clone when it ends; `catch_unwind` round the Hub's dispatch; hand the
+ embedded API the window's device through `sibling()`. (2, 3, 6, 9)
+3. Processed media out of `cache/`: put reverse and enhance copies under
+ `media/` (or teach Clear cache and the sweep what clips point at); sweep
+ `cache/art` and peaks; re-probe pre-0.2.5 media for its signal at open.
+ (4, 8)
+4. Tell the person: a migration step for `reverse` and the animations
+ (turn the flag into the new Reverse, or name the clips in the open
+ notice); surface `upgrade_links` and carry the keys; run it for
+ templates and user packages. (5, 7)
+5. Finish the 23 September list: an epoch check on every worker path; a
+ `tidy` for the timeline's frame; one speed range; the CLI's socket;
+ `ui/demo/`; the five ⌘ glyphs; the `mobile.yml` sentence. (11, 15, 18)
+6. Pipeline the export (decode, composite, encode on three threads) and
+ give the mixer an index; `Arc` the bin in snapshots. (12, 13)
+7. Speech, enhance, proxies and CBR as API verbs, so "three ways in" holds
+ for everything the window does. (19 of the 23rd)
+
+After those, phase 4 of the HDR plan (a true HDR preview), then phase 5
+(zero-copy hardware frames, hardware encoders) in the plan's order.
+
+---
+
+## 9. Caveats
+
+Scores are judgements over code, calibrated against the 23 September scores
+but not measured against users or another editor. Rows marked *provisional*
+in §3 and the three findings marked *pending* in §5 rest on hand checks of
+the specific lines named, not on a full read; they are replaced as those
+reviews land. The test and perf results were still running when this was
+written and are reported in the QUICK file's checks table as soon as they
+finished. Findings marked (verified) were read end to end by the reviewer
+and the headline ones re-read by hand; the rest rest on one reviewer's
+reading and a line number you can open. The app was not launched: "user
+likeability" is judged from what the UI code does, not from users.