Merge branch 'master' into android-bundled-face-models

This commit is contained in:
2026-08-27 20:22:42 +02:00
64 changed files with 8205 additions and 1907 deletions
+27 -13
View File
@@ -13,7 +13,7 @@ chose, which accumulated because no single commit was responsible for it. The di
when deciding what to touch. A TD entry is load-bearing until its "done when" is met; an entry here
is not defending anything.
It is also not a bug list. Everything below compiles, passes 2,007 tests and ships.
It is also not a bug list. Everything below compiles, passes 2,042 tests and ships.
---
@@ -42,13 +42,13 @@ done | sort -rn
|---|---|
| Rust across 19 crates | ~112,000 lines; ~78,000 after comments and blanks |
| Comment density | 28% overall, 20–34% per crate |
| Test functions | 2,007, plus 17 integration test files |
| Test functions | 2,042, plus 21 integration test files |
| `.unwrap()` in production code | **3** — one in `dr-gpu`, two in `dr-ingest` |
| `.unwrap()` in test code | ~1,500, which is where it belongs |
| `unsafe` blocks | 6 |
| `TRACES` tags / orphan tags | 732 / 0 |
| `TRACES` tags / orphan tags | 793 / 0 |
| Resolved dependencies | 826 |
| Largest function | `dr-ui::run` — 1,813 lines |
| Largest function | `dr-ui::run` — 1,855 lines |
| `AppWindow` members | 282 properties + 190 callbacks |
CI gates on `cargo fmt --check`, `cargo clippy --workspace --all-targets -- -D warnings`,
@@ -68,7 +68,7 @@ Six things a contributor might plausibly want to add. Each grade was checked aga
| A neighbourhood operation<br>*dehaze, a sharpener* | Rust in `dr-pipeline/src/ops/` implementing `Operation` + `DetailStage`, plus a stub YAML declaring `rust:` and `order:`. | **Moderate** |
| A parameter widget<br>*a colour wheel* | A `WidgetKind` variant, `develop::supported()`, the panel model, a Slint component. | **Moderate** |
| A second sync backend<br>*S3, WebDAV, a local folder* | `RemoteBackend` is the easy half. Seven UI files construct `NextcloudBackend` directly and ten signatures take it concretely — see [CH-2](#ch-2). | **Hard** |
| Anything with its own UI | `app.slint`'s root component, a ~1,000-line `wire()`, and `run()` at 1,813 lines — see [CH-1](#ch-1). | **Hard** |
| Anything with its own UI | `app.slint`'s root component, a ~1,000-line `wire()`, and `run()` at 1,855 lines — see [CH-1](#ch-1). | **Hard** |
The top half of that table is the good half, and it is very good. The bottom half is one problem
wearing two hats: **`dr-ui` has no seams, so every UI feature lands in the same three files.**
@@ -115,7 +115,7 @@ functions, and `run()`.
| Function | Lines |
|---|---|
| `lib.rs::run` | 1,813 |
| `lib.rs::run` | 1,855 |
| `library_ui::wire` | 998 |
| `collections_ui::wire` | 964 |
| `identity_ui::wire` | 478 |
@@ -137,7 +137,7 @@ days since, the numbers that document itself used have moved:
| Its measure | 2026-08-09 | 2026-08-27 |
|---|---|---|
| `run()` | 500 lines | **1,813** |
| `run()` | 500 lines | **1,855** |
| `library_ui` distinct window properties | 24 | **54** |
| `lib.rs` distinct window properties | 23 | **52** |
| `collections_ui` | 9 | 11 |
@@ -156,7 +156,7 @@ multiplies the conjunctions rather than adding to them.
None of this is difficult work. It is simply work that every feature must now do, in files every
other feature is also editing — which is why two contributors working in parallel conflict by
construction, and why a newcomer must read a 1,813-line startup sequence with real ordering
construction, and why a newcomer must read a 1,855-line startup sequence with real ordering
constraints before safely inserting a line into it.
### What to do
@@ -219,6 +219,18 @@ fake, which today it is not.
**Done when:** `NextcloudBackend` is named in at most one file in `ui/`, and a stub backend can be
substituted in a test without touching the UI.
**Done**, with one half deliberately left. `ui/dr-ui/src/remote.rs` is now the only file in the
interface that names a connector; the ten worker functions take `&dyn RemoteBackend` and will accept
a stub. Every method the UI ever called on a backend — `get`, `put`, `list`, `delete`, `create_dir`,
`move_to` — was already on the trait, so nothing had to be added to it.
What remains is **credentials**. `AppCredentials` is an app password obtained through Login Flow v2,
which is a Nextcloud protocol rather than a general notion of how one authenticates to a remote, and
seven files still name it. Abstracting it needs a decision about what an account *is* across
backends — an OAuth token, a bucket key pair and an app password have no useful common shape — and
making that decision before a second backend exists would produce a confident wrong answer. It is a
design problem rather than a mechanical one, and it should wait for the backend that forces it.
---
## <a id="ch-3"></a>CH-3 — There is no path in for a contributor who is not already here
@@ -342,11 +354,13 @@ It measures structure, discipline and coupling. It does **not** assess runtime c
shader behaviour, security posture, or whether any tagged requirement is actually implemented —
[CH-4](#ch-4) is precisely the observation that the last of those is unmeasured.
Line counts and function sizes are proxies. `run()` being 1,813 lines is a real problem because
every feature must edit it, not because 1,813 is a bad number; `build.rs::emit_node` at 558 lines is
Line counts and function sizes are proxies. `run()` being 1,855 lines is a real problem because
every feature must edit it, not because 1,855 is a bad number; `build.rs::emit_node` at 558 lines is
not a problem at all. Where a figure appears above, the sentence around it says which of the two it
is.
The audit was performed against the working tree at branch `android-bundled-face-models` on
2026-08-27, which had five modified files in `ui/dr-ui/` uncommitted at the time. Those changes were
included in the counts.
The audit was first measured against `origin/master` at `d4a34ef`, then re-measured after
`android-bundled-face-models` merged in: `run()` moved from 1,810 lines to 1,855, and the whole-
library face sweep added its fetching path to `library.rs`. The seam grades are unchanged by that
merge — the work went into the seams that already existed rather than cutting new ones, which is
itself the pressure CH-1 describes.