The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
updates
Jareercf25b42f184b
diff --git a/ARCHITECTURE-TODO.md b/ARCHITECTURE-TODO.mddeleted file mode 100644index f19a34f6..00000000--- a/ARCHITECTURE-TODO.md+++ /dev/null@@ -1,41 +0,0 @@-# Architecture: left for later--What the 16 September architecture proposal ticked off with a note that-part of it waits. The proposal itself is gone; `ARCHITECTURE.md` describes-the tree as it is, and this is the list of what it does not yet do. Each-item names where the seam is, so the next person starts at the file and-not at the history.--- [ ] **GPU-texture pooling of cached frames.** The source-frame cache- (`concat-host/src/pool.rs`) hands out CPU frames; a frame that goes to the- wgpu compositor is uploaded again each time it is drawn. Pool the textures- beside the frames now that both compositors read one `FramePlan`.-- [ ] **Zero-copy hardware decode.** VideoToolbox frames- (`concat-media/src/hardware.rs`) are copied out to system memory and back- up to the GPU. An IOSurface handed straight to wgpu skips both copies; the- seam is the decoder's output frame and the compositor's texture upload.-- [ ] **Crop, flips and transition fades filled by the export.** `FramePlan`- carries all three, the parity tests fill them, and the compositors honour- them - but the export path still bakes them into the decoder's filter- chain (`concat-export/src/resolve.rs`, `concat-media` filter graph). Fill- the plan from the export and take them out of the chain.-- [ ] **Timeline drawing at 2 ms.** Clips are virtualised- (`TimelinePane::published_span`), but filmstrips and waveforms are still- one image and one path per clip; the design is one texture per track per- zoom level. The Slint repaint itself has not been measured- (`SLINT_DEBUG_PERFORMANCE` needs the window), so the target is not yet- shown either way.-- [ ] **OS-native restoration behind Enhance.** Enhance runs restoration- models through `concat-vision/src/runtime.rs` on every platform. macOS 26- and iOS 26 carry a super-resolution scaler, frame interpolation and motion- blur in VideoToolbox (`VTFrameProcessor`; Rust bindings in- `objc2-video-toolbox`), and Windows App SDK carries a video- super-resolution API. Both belong behind the same enhanced-copy job as a- fast path chosen per platform, never as a second feature; the seam is the- job's per-frame step.-- [ ] **Shader passes at a size of their own.** A `[[wgsl.pass]]` declares- `size` over `WIDTH` and `HEIGHT` (`concat-effects/src/manifest.rs`), but- `run_passes` (`concat-render/src/gpu.rs`) claims every target at the- source's size and ignores it. Honouring it is what a GPU upscaler package- (FSR 1.0, Anime4K, both MIT with WGSL ports) needs to write a larger- picture than it reads.diff --git a/ARCHITECTURE.md b/ARCHITECTURE.mdindex 1cfab7b4..52cbb407 100644--- a/ARCHITECTURE.md+++ b/ARCHITECTURE.md@@ -306,9 +306,31 @@ with; the window's Remote page shows it.into the decoder's chain, not through the plan.- `ExportClip` remains the CLI and API wire type and the title rasteriser'soutput.-- Cached frames are uploaded to the GPU per composite; keeping them as- textures in the pool is the follow-up now that both compositors read a plan.+- Cached frames are uploaded to the GPU again unless they were drawn in the+ previous composite (`WgpuCompositor::upload` reuses a texture by frame id);+ a source-texture cache with its own budget, so a scrub back over cached+ ground skips the upload too, is the follow-up now that both compositors+ read a plan. The frame pool is `concat-media/src/pool.rs`.- Zero-copy hardware frames (IOSurface into wgpu) are not done; a hardware- frame is transferred to memory first.-- Filmstrips are one image per clip; one texture per track per zoom level is- not done, and the Slint repaint itself is not measured headless.+ frame is transferred to memory first, and the libavfilter stage between+ the download and the upload (rotation, fit, crop, colour range, RGBA) would+ have to move to the GPU with it.+- The preview resolves transitions with fades off, so fade-black, fade-white+ and the wipes are absent from the monitor until they come through the plan.+- Filmstrips are one image per media item drawn as up to 120 tile images per+ clip, and waveforms one path per clip drawn twice; one texture per track+ per zoom level is not done, and the Slint repaint itself is not measured+ (`SLINT_DEBUG_PERFORMANCE` needs the window).+- Enhance runs one restoration model (`concat-vision/src/enhance.rs`) through+ ONNX Runtime on every platform. The OS scalers (VideoToolbox's+ `VTFrameProcessor` on macOS 26 and iOS 26, the Windows App SDK's video+ super-resolution) belong behind the same enhanced-copy job as a per-platform+ fast path at its per-frame step (`concat-host/src/enhance.rs`, the+ `enhancer.enhance` call), never as a second feature. Frame interpolation+ does not fit that step: it changes the frame count and the encoder's rate.+- A package's `[[wgsl.pass]]` list (`target`, `size` over `WIDTH` and+ `HEIGHT`; `concat-effects/src/manifest.rs`) is parsed and never read:+ `run_passes` (`concat-render/src/gpu.rs`) runs one pass per applied effect+ at the source's size, with no named intermediates. Wiring it up is what a+ GPU upscaler package (FSR 1.0, Anime4K, both MIT with WGSL ports) needs to+ write a larger picture than it reads.diff --git a/AUDIT-2026-09-23-QUICK.md b/AUDIT-2026-09-23-QUICK.mdnew file mode 100644index 00000000..c5bb97b5--- /dev/null+++ b/AUDIT-2026-09-23-QUICK.md@@ -0,0 +1,129 @@+# Concat audit, 23 Sep 2026 — the quick version++Same audit as `AUDIT-2026-09-23.md`, one screen. Each bar has 10 slots:+🟢 filled = good, ⚪ empty = missing. Severity: 🔴 critical · 🟠 high · 🟡 medium · ⚪ low.++## 🎯 Verdict++**Structure: done. Guarantees: not yet.** The 16 Sep plan landed in full. What is left is rules the docs promise and the code does not hold yet: bounds, checks, one-place enforcement. Cheaper to fix than what came before.++## 📊 The whole app++| Aspect | Bar | Score |+|---|---|:-:|+| 🧹 Code quality | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 |+| 🏛️ Architecture | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 |+| 🧭 Design philosophy | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 6 |+| 🔧 Maintainability | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 6 |+| 😊 User likeability | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 |+| ⚡ Performance | 🟢🟢🟢🟢🟢⚪⚪⚪⚪⚪ | 5 |+| 📈 Scalability | 🟢🟢🟢🟢⚪⚪⚪⚪⚪⚪ | 4 |+| 🔐 Security | 🟢🟢🟢🟢⚪⚪⚪⚪⚪⚪ | 4 |+| 🧪 Testing | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 6 |+| 📚 Docs | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 |+| 🤖 CI and release | 🟢🟢🟢🟢⚪⚪⚪⚪⚪⚪ | 4 |++## 🧱 Per crate (average of its six scales)++| Crate | Bar | Avg | One thing |+|---|---|:-:|---|+| concat-core | 🟢🟢🟢🟢🟢🟢🟢🟢⚪⚪ | 7.3 | 🟢 no deps, rational time · ⚪ linear clip lookup |+| concat-vision | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7.2 | 🟢 ORT fully wrapped · ⚪ serial batch-1 |+| concat-effects | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7.2 | 🟢 strict manifests · ⚪ no host-version or licence field |+| concat-text | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7.0 | 🟢 zero engine deps · ⚪ copies the font per render |+| concat-api | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7.6 | 🟢 every verb JSON, docs match · 🔴 any path, any size |+| concat-server | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7.2 | 🟢 constant-time token · 🔴 no limits at all |+| concat-media | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 6.7 | 🟢 unsafe is sound · 🔴 a panicking job wedges the scheduler |+| concat-project | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 6.0 | 🟢 commands only · 🟠 ripple copies every clip |+| concat-speech | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 6.2 | 🟢 whisper on Metal · 🔴 downloads unverified |+| concat-export | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 5.8 | 🟢 one composite path · ⚪ 2 403-line lib.rs |+| concat-host | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 5.7 | 🟢 small modules · 🔴 corrupt doc opens empty |+| concat (Rust) | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 5.7 | 🟢 panes + echo-and-commit · 🔴 results land in the wrong project |+| concat (Slint) | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 6.8 | 🟢 one Modal pattern · ⚪ accessibility 2/10 |+| concat-render | 🟢🟢🟢🟢🟢⚪⚪⚪⚪⚪ | 5.3 | 🟢 FramePlan · 🟠 7 CPU kernels for 147 shaders |++## 🎛️ Per feature++| Feature | Bar | Score | State |+|---|---|:-:|---|+| Launcher | 🟢🟢🟢🟢🟢🟢🟢🟢⚪⚪ | 8 | ✅ |+| Import and bin | 🟢🟢🟢🟢🟢🟢🟢🟢⚪⚪ | 8 | ✅ |+| Timeline editing | 🟢🟢🟢🟢🟢🟢🟢🟢⚪⚪ | 8 | ✅ |+| Undo / redo | 🟢🟢🟢🟢🟢🟢🟢🟢⚪⚪ | 8 | ✅ sharing lost on ripple |+| Relink | 🟢🟢🟢🟢🟢🟢🟢🟢⚪⚪ | 8 | ✅ |+| Themes | 🟢🟢🟢🟢🟢🟢🟢🟢⚪⚪ | 8 | ✅ |+| Effects and filters | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 | ⚠️ CPU path never pixel-compared |+| Titles | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 | ✅ CPU-heavy |+| Keyframes | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 | ✅ |+| Cutout | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 | ✅ |+| Captions | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 | ✅ |+| Text-to-speech | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 | ✅ |+| Templates | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 | ✅ |+| LUTs | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 | ✅ |+| Export | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 | ✅ serial loop |+| Hardware decode | 🟢🟢🟢🟢🟢🟢🟢⚪⚪⚪ | 7 | ✅ not zero-copy |+| Transitions | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 6 | ⚠️ fades and wipes missing from preview |+| Crop, blend, masks | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 6 | ⚠️ Darken/Lighten wrong at partial opacity |+| Enhance | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 6 | ⚠️ one model, no native path |+| Playback and audio | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 6 | ⚠️ 400 decodes per speed-curved clip |+| Remote API | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 6 | ⚠️ unsafe defaults, window not a client |+| Languages | 🟢🟢🟢🟢🟢🟢⚪⚪⚪⚪ | 6 | ⚠️ 13 of 14 at ~71 %, no RTL |+| Custom packages | 🟢🟢🟢🟢🟢⚪⚪⚪⚪⚪ | 5 | ⚠️ trial never runs, multi-pass unwired |+| Proxies | 🟢🟢🟢🟢⚪⚪⚪⚪⚪⚪ | 4 | ❌ no UI, never swept |+| Accessibility | 🟢🟢⚪⚪⚪⚪⚪⚪⚪⚪ | 2 | ❌ two accessible-* properties |++## 🚨 Top findings++| # | Sev | What | Where |+|:-:|:-:|---|---|+| 0 | 🔴 | **`main` is red**: CI fails at fmt (8 files), 6 tests fail underneath | `ci.yml`, §1.2 of the full report |+| 1 | 🔴 | Corrupt project opens empty, next save overwrites it | `concat-host/src/session.rs:95` |+| 2 | 🔴 | Panicking scheduler job wedges the scheduler for good | `concat-media/src/prefetch.rs:355` |+| 3 | 🔴 | Worker results land in whichever project is open | `concat/src/studio.rs:5376` |+| 4 | 🔴 | API writes any path; input sizes and line lengths unbounded | `concat-api/src/lib.rs:499,707` · `concat-server/src/json.rs:117` |+| 5 | 🔴 | Window and Remote page are two engines on one folder | `concat/src/panes/settings.rs:403` |+| 6 | 🔴 | 20 of 23 model downloads have no digest; 18 URLs unpinned | `models/manifest.toml` |+| 7 | 🟠 | Hostile-package trial never runs; loop check trivial; no error scope | `concat-render/src/gpu.rs:850,1091` |+| 8 | 🟠 | Ripple, freeze, fill-slot deep-copy every clip into undo | `concat-project/src/model.rs:1966` |+| 9 | 🟠 | Stream start time ignored (MTS files offset) | `concat-media/src/decode.rs:743` |+| 10 | 🟠 | Darken / Lighten maths wrong at partial opacity | `concat-render/src/compositor.rs:258` |+| 11 | 🟠 | Art scan on every pointer event; full publish 30×/s | `concat/src/lib.rs:373` |+| 12 | 🟠 | CI is Linux-only until a tag; perf gate never runs; parity skips | `.github/workflows/ci.yml` |+| 13 | 🟡 | Clamps in four places, they disagree | `concat-project/src/commands/properties.rs:28` |+| 14 | 🟡 | E2E suite checks timing, not looks | `concat-host/tests/export.rs:915` |+| 15 | 🟡 | Caches with no bound: proxy, artwork, pinned frames, GPU passes | `proxy.rs`, `prefetch.rs:243`, `gpu.rs:1453` |+| 16 | 🟡 | 3–5 copies per frame; filter graph rebuilt per treated frame | `decode.rs:934`, `treat.rs:85` |+| 17 | 🟡 | Hub thread does heavy work in line; gRPC fan-out under a mutex | `hub.rs:52,71` |+| 18 | 🟡 | ONNX Runtime likely linked twice; pinned to an rc | `src/Cargo.toml:41` |+| 19 | 🟡 | Speech only reachable from the window | `crates/concat/Cargo.toml` |+| 20 | 🟡 | Titles copy the whole font per render | `concat-text/src/lib.rs:268` |+| 21 | ⚪ | Wrong H shortcut, ⌘ on every OS, "twelve" languages, dark colours in light theme | `settings.slint:671`, `tray.slint:127` |+| 22 | ⚪ | Dead `ui/demo/` still imported | `app.slint:21` |+| 23 | ⚪ | Stale docs: 429 tests (544), crate map, §7 diagram, mobile.yml, CONTRIBUTING | `ARCHITECTURE.md:276` |+| 24 | ⚪ | 8 files unformatted; dead `core::Project`; disk IO in a wasm crate | `timeline.rs:500`, `model.rs:1896` |++## 🧾 Today's checks++| Check | Result |+|---|---|+| fmt | ⚠️ 8 files would change |+| clippy | ✅ 0 warnings |+| tests | ❌ 537 passed, **6 failed**, 1 ignored (3 window, 2 render transitions, 1 Chatterbox) |+| perf --check | ✅ 14 of 14 within budget (GPU composite 3.2 ms, export 115 fps, hardware decode 326 fps) |++## 🗺️ Do next, in order++0. 🔴 **Make `main` green** — `cargo fmt --all`, then fix the 6 failing tests (5 are today's commits, 1 is locale coverage).+1. 🔴 **Correctness trio** — not-found vs parse error in `Session::open`; `catch_unwind` around scheduler jobs; a session epoch on worker results.+2. 🔴 **Server limits + root allowlist** — line cap, pre-auth timeout, connection cap, bounded outbox and sizes; share the window's exporter and sessions.+3. 🔴 **Verify every model** — fill the digests, pin to commits, reject empty digests in release, generate the tables from the manifest.+4. 🟠 **Refuse hostile packages for real** — trial at install, error scopes, binding-type check, pipelines keyed by source hash.+5. 🟠 **Document maths** — `clips_where` in place of `clips_mut`; one clamp pass; `start_time`; fix Darken and Lighten.+6. 🟡 **Stop the per-event work** — art refresh on change only; targeted publish; cache treat graphs; `av_frame_ref`; sweep proxy and artwork.+7. 🟡 **CI** — macOS and Windows check; lavapipe with parity required; `perf --check`; release depends on CI; fix the stale docs.++Then the ARCHITECTURE §10 list in its order: plan filled by the export → source textures pooled → zero-copy → one texture per track → native Enhance → multi-pass packages.++## ✅ Keep++Layering · `FramePlan` · commands-only document with Arc undo · hardware decode fallback · package load hygiene · JSON API contract and its docs · pane pattern · model staging and licences · tests that check behaviour.diff --git a/AUDIT-2026-09-23.md b/AUDIT-2026-09-23.mdnew file mode 100644index 00000000..5bf7b32c--- /dev/null+++ b/AUDIT-2026-09-23.md@@ -0,0 +1,467 @@+# Concat audit, 23 September 2026++Where the codebase stands one week after the 16 September proposal landed.+Every crate, every feature and the engineering process were read and scored+on the same seven scales, plus security, testing and documentation where they+turned out to matter. Every finding names a file and a line. The sibling+`AUDIT-2026-09-23-QUICK.md` is the same audit as a one-screen scorecard.++**How it was done.** Nine reviewers each read one part of the tree in full+(the crates, the window's Rust, the Slint UI, the API and transports, the+model crates, and the tests, CI, build and docs), scored it and reported+findings with locations. The headline findings were then re-verified 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: "user+likeability" is judged from what the UI code does, not from users.++**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++| Crate | Rust lines | Slint / WGSL | Tests (files) | `unsafe` | `unwrap`/`expect` | `panic!` family |+|---|---:|---:|---:|---:|---:|---:|+| concat (window) | 16 058 | 23 636 slint | 40 (11) | 1 | 15 | 1 |+| concat-project | 9 911 | | 100 (3) | 0 | 312 | 12 |+| concat-host | 8 727 | | 53 (14) | 1 | 152 | 12 |+| concat-media | 8 038 | | 79 (11) | 30 | 148 | 2 |+| concat-render | 4 873 | | 62 (6) | 1 | 39 | 3 |+| concat-effects | 4 664 | 2 205 wgsl | 46 (7) | 0 | 76 | 2 |+| concat-export | 3 286 | | 25 (3) | 0 | 17 | 0 |+| concat-speech | 3 087 | | 19 (3) | 3 | 23 | 0 |+| concat-vision | 2 760 | | 31 (8) | 0 | 22 | 0 |+| concat-core | 2 691 | | 45 (7) | 0 | 22 | 2 |+| concat-api | 1 993 | | 18 (2) | 0 | 19 | 8 |+| concat-server | 1 183 | | 10 (4) | 0 | 27 | 2 |+| concat-text | 1 101 | | 11 (1) | 0 | 28 | 1 |+| concat-perf | 804 | | 2 (1) | 0 | 32 | 0 |+| concat-cli | 449 | | 3 (1) | 0 | 2 | 0 |+| concat-android | 335 | | 0 (0) | 10 | 9 | 2 |+| **Total** | **~71 000** | **~25 800** | **544 (82)** | **46** | **~940** | **47** |++The unwrap and expect counts include test code (concat-project's 312 are+nearly all in its 3 692-line test module). Outside tests, every crate but the+window and the host is close to panic-free, and every `unsafe` block in+concat-media carries a SAFETY note and was found sound.++Other facts: 173 effect packages (147 with WGSL, 20 transitions, 25 audio);+14 locale files; 606 commits since 25 August, 451 of them this month; 26+release tags, latest `v0.2.3`; largest files `concat/src/studio.rs` 7 484,+`concat-export/src/lib.rs` 2 403, `concat-render/src/gpu.rs` 1 794,+`concat-media/src/decode.rs` 1 603; largest Slint files+`workspace/media-pane.slint` 2 303 and `inspector/clip-inspector.slint` 2 131.++### 1.2 The checks, run today++| Check | Result |+|---|---|+| `cargo fmt --all -- --check` | 8 files would change |+| `cargo clippy --workspace --all-targets` | 0 warnings |+| `cargo test --workspace --no-fail-fast` | 537 passed, 6 failed, 1 ignored |+| `cargo run -p concat-perf --release -- --check` | 14 of 14 scenarios within budget |++**`main` is red.** The last four CI runs on `main` failed at the+`cargo fmt --check` step, so CI has not run the test suite for today's+commits. Run locally, six tests fail, five of them in files changed today:++| Test | Crate | What it says |+|---|---|---|+| `transitions::tests::a_slide_arrives_from_the_far_side` | concat-render | "the outgoing picture dropped away": red where blue was expected (`transitions.rs:546`) |+| `transitions::tests::every_shape_runs_from_one_picture_to_the_other` | concat-render | `smoothleft` at progress 1 is a blend, not the incoming picture (`transitions.rs:436`) |+| `chatterbox::tests::the_text_is_normalised_the_way_resemble_does_it` | concat-speech | a double space survives after a comma (`chatterbox.rs:1100`) |+| `panes::settings::listen_tests::a_missing_or_bad_half_gets_the_default` | concat | `"192.168.1.9:"` keeps its trailing colon as the host (`settings.rs:753`) |+| `format::tests::zooming_in_reveals_the_fine_buckets_and_never_loses_a_peak` | concat | every column carries the spike, not one (`format.rs:448`) |+| `i18n::tests::every_shipped_locale_parses_names_itself_and_keys_off_the_inventory` | concat | 13 locales lack about 290 of the 1 015 keys (`i18n.rs:254`) |++The first five look like today's work outrunning its tests; the last is a+rule (every locale covers the inventory) the locale files have not met since+the inventory grew. The end-to-end export suite, the parity fixtures and the+migration tests all pass.++**The perf table**, release build, every scenario inside its budget:++| Scenario | Measured | Budget |+|---|---:|---:|+| plan one frame of 200 clips on 4 tracks | 0.53 µs | ≤ 200 µs |+| 200 clip additions and 200 undos | 0.41 ms | ≤ 150 ms |+| ripple delete of 200 clips out of 400 | 0.14 ms | ≤ 20 ms |+| save and open a 200-clip document | 1.49 ms | ≤ 60 ms |+| choose the visible clips of 200 for one publish | 0.20 µs | ≤ 50 µs |+| read an hour's waveform across 2048 columns | 4.33 µs | ≤ 2000 µs |+| decode 1080p h264 in software | 1 637 fps | ≥ 120 |+| decode 1080p h264 on the hardware (VideoToolbox) | 326 fps | ≥ 120 |+| scrub forward over 90 frames, cold | 0.81 ms/frame | ≤ 25 |+| scrub back over covered ground | 0.24 µs/frame | ≤ 200 |+| decodes when an effect knob is turned | 0 | ≤ 0 |+| compose 1080p, 3 layers, sepia, CPU | 54.7 ms | ≤ 400 |+| compose 1080p, 3 layers, sepia, GPU | 3.19 ms | ≤ 25 |+| export a 4 s 720p cut of two overlapping clips | 115 fps | ≥ 30 |++Two readings worth keeping in mind: hardware decode is five times slower+than software here, because the frame is downloaded and converted on the CPU+after the chip decodes it (finding 16 and ARCHITECTURE §10), and the CPU+composite is seventeen times the GPU one, which is what a machine without a+GPU, and any export whose device dies mid-run, will see.++---++## 2. Scorecard for the whole app++| Aspect | Score | One line |+|---|:---:|---|+| Code quality | 7 | Clippy-clean, typed errors, sound and documented `unsafe`; long functions and copied blocks pull it down. |+| Design architecture | 7 | The crate layering holds and FFmpeg and ONNX Runtime are contained; the window bypasses `Session` and the API, and chains bypass `FramePlan`. |+| Design philosophy | 6 | The ideas are clear and written down. Several are stated and not enforced: one clamp place, hostile packages refused, publish by diff, stale results dropped in one place. |+| Maintainability | 6 | Excellent comments and one shape per pane; four files over 1 800 lines and model tables kept in five places. |+| User likeability | 7 | A broad CapCut-class feature set with real polish; accessibility is near zero and a few UX facts are stale. |+| Performance | 5 | The planner and undo are microseconds; the per-frame copies, the UI's per-event art scan and the serial export loop are not. |+| Scalability | 4 | Linear clip lookups, undo that copies every clip on a ripple, caches with no bound, one server thread, unbounded socket input. |+| Security | 4 | The token is done right. A token holder can write any path; input sizes are unbounded; 20 of 23 model downloads have no digest. |+| Testing | 6 | 544 behaviour tests and a real end-to-end suite; it checks timing, not looks, and the GPU parity suite silently skips in CI. |+| Documentation | 7 | Substantial and well written, with a handful of stale claims. |+| CI and release | 4 | `main` is red at the fmt step; Linux only until a tag; the perf gate the docs describe does not run. |++---++## 3. Scores per crate++Columns: code quality, maintainability, scalability, performance,+architecture, design philosophy. A dash means the scale does not apply.++| Crate | CQ | Maint | Scale | Perf | Arch | Phil | Note |+|---|:-:|:-:|:-:|:-:|:-:|:-:|---|+| concat-core | 8 | 8 | 6 | 6 | 8 | 8 | No deps, rational everywhere; linear `clip_on_track_at`, gcd on every add. |+| concat-project | 7 | 6 | 5 | 5 | 7 | 6 | Commands are the one way to write; clamps live in four places; ripple copies every clip. |+| concat-media | 7 | 7 | 5 | 6 | 8 | 7 | Unsafe is sound; 3 to 5 copies per frame; scheduler cannot survive a panicking job. |+| concat-render | 7 | 5 | 4 | 5 | 6 | 5 | `FramePlan` is excellent; 7 CPU kernels for 147 shaders; GPU memory unbounded at 8K. |+| concat-effects | 8 | 8 | 6 | 7 | 7 | 7 | Strict manifests and a shared WGSL prelude; format lacks host version, capabilities, licence. |+| concat-export | 6 | 4 | 6 | 5 | 7 | 7 | One composite path for export and preview; a 2 403-line lib.rs and 12 side tables per clip. |+| concat-host | 6 | 6 | 5 | 6 | 5 | 6 | Small clear modules; `Session::open` swallows parse errors; proxy and artwork caches never swept. |+| concat (Rust) | 7 | 5 | 5 | 5 | 6 | 6 | Panes and echo-and-commit are sound; 67 callbacks skip the `Msg` loop; art scan per event. |+| concat (Slint) | 7 | 6 | – | – | 7 | 7 | One `Modal` pattern and one token file; accessibility 2, i18n 6. |+| concat-api | 8 | 8 | 5 | – | 8 | 9 | Every verb JSON, docs match; security 3: any path, any size. |+| concat-server | 7 | 8 | 4 | – | 8 | 9 | Constant-time token, loopback default; no limits, one Hub thread; security 5. |+| concat-cli | 7 | 8 | – | – | 7 | – | `serve` parks forever, so a Unix socket file is left behind. |+| concat-android | 8 | 7 | – | – | – | – | Justified `unsafe`; no tests. |+| concat-speech | 7 | 5 | 6 | 7 | 5 | 7 | Whisper on Metal; models listed in five places; only the window can reach it; security 3. |+| concat-vision | 8 | 7 | 5 | 6 | 9 | 8 | ORT fully wrapped; batch-1 serial inference under one lock; security 6. |+| concat-text | 8 | 8 | 5 | 4 | 9 | 8 | No engine deps; copies the whole font file per render, draws on a frame-sized canvas. |++---++## 4. Scores per feature++Status: **done**, **partial** (works with a known gap), **thin** (present, weak).++| Feature | Where | Status | Score | Why |+|---|---|---|:-:|---|+| Launcher, new project, recents | `ui/start.slint` | done | 8 | Three shapes by width; the one screen with a phone layout. |+| Import, bin, drag and drop | `ui/workspace/media-pane.slint` | done | 8 | Filters, sort, probe on a worker. |+| Timeline editing | `ui/timeline/`, `panes/timeline.rs` | done | 8 | Split, ripple, snap, several timelines, virtualised clips. |+| Undo and redo | `concat-project/src/editor.rs` | done | 8 | Arc-shared snapshots, gestures as one step; sharing lost on ripple (finding 8). |+| Transitions | `concat-export/src/lib.rs:467` | partial | 6 | Fades and wipes baked into chains; absent from the preview. |+| Effects and filters | `concat-effects/packages/` | partial | 7 | 173 packages; CPU export renders them through FFmpeg chains never pixel-compared with the WGSL. |+| Titles and text | `concat-text` | done | 7 | Correct; CPU-heavy per animated frame. |+| Keyframes, animations | `concat-project/src/model.rs:1573` | done | 7 | Keys survive split, trim and merge; offset and rotation keys unclamped. |+| Crop, transform, blend, masks | `concat-render/src/plan.rs` | partial | 6 | Darken and Lighten wrong at partial opacity on both paths (finding 10). |+| Cutout, smart brush | `concat-vision/src/segment.rs` | done | 7 | Compiled-in fallback model; serial batch-1 inference. |+| Enhance | `concat-host/src/enhance.rs` | thin | 6 | One Real-ESRGAN model on every platform; native scalers not used. |+| Auto-captions | `ui/dialogs/captions.slint` | done | 7 | Whisper on Metal, with progress; results can land in the wrong project (finding 3). |+| Text-to-speech, voice from a sample | `concat-speech/src/tts.rs` | done | 7 | Kokoro, Pocket, Chatterbox; downloads unverified (finding 6). |+| Templates | `concat-host/src/templates.rs` | done | 7 | |+| LUT import | `concat-effects/src/cube.rs` | done | 7 | Tables over 65 a side refused. |+| Custom and community packages | `concat-effects/src/catalogue.rs` | thin | 5 | Multi-pass parsed and never run; the trial never runs before enabling (finding 7). |+| Proxies | `concat-host/src/proxy.rs` | thin | 4 | No UI, no sweep of `cache/proxy`. |+| Export | `ui/dialogs/export.slint`, `concat-export` | done | 7 | Quality tiers, 10-bit, CBR and VBR; serial loop; one social preset. |+| Playback and audio | `concat-host/src/playback.rs` | partial | 6 | A speed-curved clip becomes up to 400 decodes; the mixer scans every clip per sample. |+| Hardware decode | `concat-media/src/hardware.rs` | done | 7 | Sound, falls back once; frames still round-trip through memory. |+| Remote API | `concat-api`, `concat-server` | partial | 6 | Clean contract; unsafe defaults (finding 4); the window does not use it (finding 5). |+| Relink missing media | `ui/dialogs/relink.slint` | done | 8 | |+| Themes and accent colours | `ui/theme/` | done | 8 | Two lane colours hard-coded to dark. |+| Languages | `concat/locales/` | partial | 6 | 14 files, 13 at about 71 % of the 1 015 keys; Persian ships without right-to-left. |+| Accessibility | the whole UI | thin | 2 | Two `accessible-*` properties in 23 636 lines; 12 px base type. |++---++## 5. Findings, by severity++Each carries the location and, where I re-verified it by hand, **(verified)**.++### Critical++1. **A corrupt document opens as an empty project, and the next save+ overwrites it.** (verified) `Session::open` matches `Err(_)` from+ `projects::read_document` and builds an empty editor+ (`concat-host/src/session.rs:95`); that function returns the same `Err` for+ "file not found" and for a JSON parse failure (`projects.rs:211-215`). The+ comment nine lines above says a corrupt document is an error. Saves are+ atomic with fsync (`projects.rs:168-190`), so the window is narrow: a power+ cut, a sync tool or an external edit. When it happens it is silent data+ loss.++2. **A panicking scheduler job wedges the scheduler.** (verified)+ `prefetch.rs:355` runs `job()` with no unwind guard. A panic skips the+ decrements at 357-363, `running` never drops, `drain` waits forever+ (`prefetch.rs:307`) and background lanes stay blocked once the counters sit+ at their limit. Failed thread spawns are also ignored (`prefetch.rs:194`).++3. **Worker results land in whichever project is open.** `Studio::handle`+ (`concat/src/studio.rs:5376-5429`) checks no project identity, and+ `close_project` (`studio.rs:5308`) does not reset the export, captions or+ speech panes. A probe, a caption run or a speech job started in project A+ delivers into project B (`panes/media_bin.rs:153`, `panes/captions.rs:132`,+ `panes/speech.rs:339`). ARCHITECTURE §5 claims the opposite.++4. **The API lets a token holder write anywhere and send anything.**+ (verified) `preview.frame` creates folders and truncates any path+ (`concat-api/src/lib.rs:707-714`); `export.run`, `project.create` and+ `template.instantiate` take any path. Width and height are only checked+ for zero (`lib.rs:499-502`), so 65535×65535 asks for 17 GB on the Hub+ thread. The JSON transport reads lines of unbounded length before+ authentication, spawns two threads per connection with no cap and no+ timeout, and queues output in an unbounded channel+ (`concat-server/src/json.rs:63,117,193`). The token itself is right:+ 128 bits, constant-time compare, required on loopback.++5. **The window and the Remote page are two engines on one folder.**+ (verified) Settings › Remote starts `Server::start(config, Api::new)`+ (`concat/src/panes/settings.rs:403`): its own session registry and its own+ exporter. An edit from either side is overwritten by whoever saves last,+ and "one export at a time" no longer holds across the two.+ `Api::exporter()` exists for sharing and nothing calls it. The §7 diagram+ showing the window over the API is wrong.++6. **Model downloads are unverified and unpinned.** (verified) 20 of 23 rows+ in `models/manifest.toml` have an empty `sha256`; `verify` accepts an empty+ digest (`concat-host/src/models.rs:289-291`); 18 upstream URLs point at+ `resolve/main`. The source list includes a mirror and a user-set base URL+ (`models.rs:149-180`), and a dropped transfer resumes with a Range request+ against the *next* source (`models.rs:216-219`), relying on the digest to+ catch a splice.++### High++7. **A hostile package is not really refused.** (verified that `trial` has+ no production caller) `WgpuCompositor::trial` is only called from tests.+ The loop check asks only whether a `break` token exists+ (`concat-effects/src/shader.rs:507-549`); binding types are never checked;+ validation uses `Capabilities::all()` (`shader.rs:614`). A pipeline that+ fails to build does so outside any error scope (`gpu.rs:1091`), which in+ wgpu is a panic.++8. **Undo's structural sharing is defeated by every ripple.** (verified)+ `clips_mut()` calls `Arc::make_mut` on every clip before the caller filters+ (`concat-project/src/model.rs:1966`); ripple trim, ripple delete, freeze+ and fill-slot use it (`commands/clips.rs:245,468,596,653`,+ `commands/media.rs:105`). The only sharing test covers `UpdateClip`.++9. **The stream's start time is ignored.** (verified: no reference in the+ crate) Timestamps are used raw (`decode.rs:743`) and turned straight into+ frame indexes (`pool.rs:364`). MTS and other camera files that start at a+ non-zero time will be offset in the pool, the paced export and the+ duration clamp. Inferred from the code, not reproduced.++10. **Darken and Lighten are wrong at partial opacity, on both paths.**+ (verified) Both compute `min(colour·α, ground)`+ (`compositor.rs:258-259`, `gpu.rs:421-430`): a white Darken layer at 30 %+ turns a mid-grey ground dark. Parity cannot catch it because both agree.++11. **The UI thread scans every media item on every pointer event.**+ (verified) The `handler!` macro calls `refresh_art()` after each callback+ (`concat/src/lib.rs:373`), including the lanes' hover and drag stream.+ That loops over all media calling `proxy::ensure` (two `stat` calls each,+ `studio.rs:2010-2030`) and decodes cached JPEGs synchronously. Separately,+ playback runs a full `publish_chrome` about 30 times a second+ (`host.rs:197`, `studio.rs:1905`), rebuilding every bin row, both menus and+ the recents list each time.++12. **`main` is red, and CI never compiles macOS or Windows until a tag.**+ Today's four CI runs on `main` fail at `cargo fmt --check` (8 files),+ which hides six failing tests behind it (§1.2). `build-app.yml` is+ `workflow_call` only; `ci.yml` runs on `ubuntu-latest`; `release.yml`+ does not require CI to pass. The GPU parity suite returns early with no+ adapter (`gpu/tests.rs:20-23`) and the runner installs none, so the+ parity row in ARCHITECTURE §8 is enforced only on developers' machines.+ No workflow runs `concat-perf --check`; 9 of its 13 scenarios never run+ in CI.++### Medium++13. **Clamps live in four places and disagree.** Commands re-implement+ `Clip::tidy` (`commands/properties.rs:28-37,340-355`); `TextStyle::tidy`+ runs only on load (`model.rs:1418`); the minimum transition length is+ applied only in tidy; `SetClipKey` leaves offset and rotation unclamped+ (`properties.rs:198`). A document can change on save and reopen. The+ speed range is written three times (`model.rs:1090`,+ `concat-core/src/retime.rs:27`, `concat-media/src/audio.rs:35`).++14. **The end-to-end suite checks timing, not looks.** It samples the centre+ pixel and maps colour to a source second (`tests/export.rs:305-323`),+ which proves cuts, trims, speed and reverse. Transitions, effects, keys,+ transform, crop, blend, fades, titles and adjustment layers assert only+ length and sound (`export.rs:915-1064`).++15. **Caches with no bound.** `cache/proxy` and artwork are never swept+ (`proxy.rs:16` says otherwise; `media.rs:323`); frames pinned by the+ prefetcher are neither deduplicated nor capped and `Monitor::prefetch`+ keeps adding while paused (`prefetch.rs:243,266`, `preview.rs:255`); the+ 8 warm readers each decode with every core (`pool.rs:531`,+ `decode.rs:651`) outside the byte budget; on the GPU, `run_passes` claims a+ fresh full-size target per pass (`gpu.rs:1453`, about 133 MB each at 8K)+ and the LUT and reveal caches are never evicted (`gpu.rs:198-201`).++16. **Per-frame copies and graph rebuilds.** Every paced frame is deep-copied+ before filtering (`decode.rs:934,944,994`), then filtered, then copied row+ by row into a `Frame` (`decode.rs:873`); a hardware frame adds a download.+ On the monitor path every treated frame builds, parses and validates a+ fresh filter graph (`treat.rs:85-126`).++17. **The Hub thread does heavy work in line, and event fan-out holds a+ mutex.** Preview decode and composite, probes and title painting run on+ the one thread that serves every caller (`hub.rs:71`, `lib.rs:505,396`).+ The gRPC subscriber does a `blocking_send` into a channel of 64 while the+ subscribers mutex is held (`grpc.rs:70-74`, `hub.rs:52`): one slow client+ stalls the export thread.++18. **ONNX Runtime is probably linked twice** (sherpa-onnx's static copy plus+ `ort` 2.0.0-rc.13 through vision and Chatterbox), and CoreML is registered+ with default options and an aspect-dependent input shape+ (`concat-vision/src/runtime.rs:141`, `segment.rs:115`). Needs profiling.++19. **Speech is reachable only from the window.** Only `concat` depends on+ `concat-speech`, so captions and TTS have no API, CLI or server verb;+ "three ways in" does not hold for them. Also missing verbs: enhance,+ proxies, package install, cache clear, a jobs list, CBR export.++20. **The title rasteriser copies the whole font file per render** and draws+ on a frame-sized canvas it then un-premultiplies pixel by pixel+ (`concat-text/src/lib.rs:268-279,529-539`). With a CJK `.ttc` that is tens+ of megabytes per animated frame.++### Low++21. **UI facts that are wrong or stale.** Settings says H is "Flip+ horizontally" (`ui/dialogs/settings.slint:671`) while H is the pan tool+ (`app.slint:418`); it lists 3 of about 27 bindings. Tooltips show ⌘ on+ every platform (`ui/timeline/tray.slint:127,134`). README says twelve+ languages; there are 14 files. Two lane colours ignore the theme+ (`lanes.slint:792,835`). The window minimum is 900×560 while Android is+ listed as supported.++22. **Dead Slint still imported.** `ui/demo/` (495 lines) is unreachable, yet+ `EffectData` is imported from it by `app.slint:21`, `editor.slint:4` and+ `workspace/config-pane.slint:9`.++23. **Stale docs.** ARCHITECTURE §8 says 429 tests in 75 files (544 in 82);+ §1's crate map omits speech → media; §7's diagram puts the window over the+ API; `src/README.md:115` says `mobile.yml` runs on push (it does not);+ `release.yml:13` describes archives the build does not ship;+ `CONTRIBUTING.md:43` calls `test/` fixtures (it is Python prototypes).+ Newcomer setup omits ONNX Runtime, libclang, ALSA and GTK.++24. **Small hygiene.** 8 files fail `cargo fmt --check`. `core::Project`+ (`timeline.rs:500`) is dead. `missing_media` does disk IO inside a crate+ that must build for wasm (`model.rs:1896`). The CLI's `serve` parks+ forever and never removes its Unix socket (`concat-cli/src/main.rs:226`).+ `lib.rs:23` in the window uses `slint::private_unstable_api`. Pipelines+ are keyed by `id@version`, so a WGSL edit without a version bump keeps the+ stale pipeline (`shader.rs:417`).++---++## 6. What is good, and should stay that way++- **The layering.** Every arrow points one way. FFmpeg is only in+ concat-media; ONNX Runtime is only behind `concat-vision/src/runtime.rs`;+ concat-core has no dependencies and builds for wasm.+- **`FramePlan`.** Geometry and shading are computed once for both+ compositors (`plan.rs:140-416`), so placement and weighting cannot drift.+- **The document.** Commands are the only write path; snapshots share through+ Arc; gestures fold into one step; no-ops record nothing; batches are+ all-or-nothing; unknown fields survive a round trip; migrations are a table.+- **Hardware decode.** Reference-counted device, `get_format` fallback, a+ failed download reopens in software and seeks back to the exact frame,+ with tests that the frame count and timing match.+- **Package hygiene at load.** `deny_unknown_fields`, every chain rendered at+ its defaults, minimum and maximum, an FFmpeg filter allowlist, LUT paths+ held to the folder, the `concat.` namespace reserved.+- **The API contract.** Every verb is JSON named `area.verb`; gRPC wraps the+ same JSON; the docs match the code on every method spot-checked.+- **The window's pane pattern.** State + `Msg` + `update` + `data`, with the+ pane taken out during `update`; the monitor keeps one request in flight and+ builds its texture on the event loop on purpose.+- **Model fetching.** `.part` files, staging, rename into place, a+ compiled-in fallback cutout model, licences recorded for every model.+- **Tests that check behaviour.** Synthetic media coloured by source second;+ SSIM parity; migration tests against v1 documents; token handshake tests+ over TCP and gRPC.++---++## 7. Where we stand++The 16 September proposal had eleven steps. All eleven landed on `main`+within the week: the bug-fix pass, structural-sharing undo, `Clip::blank` and+`Clip::tidy`, `resolve.rs`, the tolerant reader with migrations, keys that+stay on their instant, ten panes behind one `Msg` loop, the source cache and+scheduler, `FramePlan` with parity, hardware decode, timeline virtualisation+and the loopback token. The tree is now the shape the proposal drew.++What that week did not buy is enforcement. Almost every serious finding here+is a stated rule the code does not yet hold: a corrupt document is an error+(it is not), a hostile package is refused (it is not tried), clamps live in+one place (four), stale results are dropped in one place (nowhere), publish+by diff (rows are rebuilt), one engine handle (two). The debt has moved from+structure to bounds and guarantees, which is the right direction, and is+cheaper to pay.++**Recommended order.** Each line is a day or a few, and each closes a+finding above.++1. Correctness trio: `Session::open` distinguishes not-found from parse+ error; `catch_unwind` with a counter guard around scheduler jobs; a+ session epoch captured in `spawn` and checked in `deliver`. (1, 2, 3)+2. Server limits and a root allowlist: line length cap, pre-auth timeout,+ connection cap, bounded outbox, bounded preview and export sizes,+ canonical-path check against configured roots. Hand the Remote server the+ window's exporter and sessions. (4, 5)+3. Fill every `sha256`, pin upstreams to commits, reject an empty digest in+ release builds, generate the five model tables from the manifest. (6)+4. Run `trial` at install at a realistic size, wrap pipeline creation in an+ error scope that disables the package, check binding types, key pipelines+ by source hash. (7)+5. `clips_where(pred)` in place of `clips_mut`, with `ptr_eq` tests for+ ripple and freeze; one clamp pass after every command; subtract+ `start_time` in one place; fix Darken and Lighten as+ `mix(ground, min(colour, ground), α)`. (8, 9, 10, 13)+6. Art refresh only on revision change; targeted publish from `deliver`;+ cache treat graphs by spec and size; `av_frame_ref` instead of deep+ clone; sweep proxy and artwork. (11, 15, 16)+7. CI: macOS and Windows `cargo check` plus engine tests; lavapipe on Linux+ with parity required; `concat-perf --check` as a step; release depends on+ CI. Fix the stale docs in the same pass. (12, 23)++After those, the architectural follow-ups in ARCHITECTURE §10 stay in their+order: the plan filled by the export, source textures pooled, zero-copy+hardware frames, one texture per track, native scalers behind Enhance,+multi-pass packages.++---++## 8. Caveats++Scores are judgements over code, calibrated across reviewers but not+measured against users or against another editor. Performance findings are+from reading hot paths plus the perf table; the window's repaint was not+measured. The OS-side claims in §10 of ARCHITECTURE (macOS 26 scalers, the+Windows super-resolution API) were not checked. Findings marked (verified)+were re-read by hand; the rest rest on one reviewer's reading and a line+number you can open.