forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on bcb4dc5db29b96be7e6ace4ff2f41d65016df705

2026-11-10

2026-11-06

Merge branch 'worktree-agent-a4f0429ef5db9d836'Ahmet Kaan Gümüş · c327308
Merge branch 'worktree-agent-a4f0429ef5db9d836'

# Conflicts:
#	MCP.md
#	crates/mcp/src/tools/project.rs

2026-10-26

💄 UI pass: proxies off by default, picture-only fullscreen, hover submenus, level in the volume sliderAhmet Kaan Gümüş · f178286
💄 UI pass: proxies off by default, picture-only fullscreen, hover submenus, level in the volume slider

- Proxies: "Make them on import" now defaults to off (pref file and fresh
  sessions); the switches say "proxies" so a search finds them.
- Fullscreen: a button at the transport's right end; fullscreen draws only
  the picture and the transport band; Escape leaves it.
- Context menu: Clip label and Fit are hover submenus like Adjust and
  Compound; moving between two ▸ rows switches the open submenu. A
  right-click inside a selection makes the clicked clip the anchor, so
  Equalizer no longer refuses on a linked video half; Alt+4 on a video
  clip opens the EQ on its linked audio.
- Volume: the live output level rides inside the slider's fill instead of
  as separate bars beside it.
- Hover hints: label and key chips share one centre line, even padding;
  undo steps read as verbs ("Undo Enable/disable clip"), clearer wording.
- Resize while playing: the picture restart waits until the size has held
  still for 200 ms instead of reseeking every 8 px.
- Ripple trim of a start edge no longer trips the lane's overlap check.
- Tests: no longer pinned to one ffmpeg's exact bitrates/offsets; the
  .edith probe test writes its own project; overflow fixes in test helpers.

2026-10-23

🚚 edith moves to git.tahinli.comAhmet Kaan Gümüş · b02f499
🚚 edith moves to git.tahinli.com

The working tree as of 2026-10-23, as one commit on top of the last one
here. It carries the work up to that date plus the test-slimming work:
integration tests merged into one binary per crate, nextest config,
doctest = false, debug line tables only, perf tests behind --ignored,
and faster generators, reverse, undo, subtitle-export, hevc, stabilise
and hear tests.

2026-09-30

🐛 fix(test): the window guard's walk skipped no dot-directory, so a scratch clone spoke for the treeAhmet Kaan Gümüş · 308fc77
🐛 fix(test): the window guard's walk skipped no dot-directory, so a scratch clone spoke for the tree

`every_window_write_outside_set_window_is_named` walks the workspace root and
skipped only `target`, `.git` and `vendor`. This root also holds `.delta/` -- a
gitignored scratch area of clones and worktrees left by delta/A-B tooling -- and
the walk descended into it, so the guard was RED on main for ten window writes
inside a checkout nobody edits, with every reported path under
`.delta/worktrees/rfykqt93k1f7/`.

The noise was the smaller half. The same stale clone was also being counted
toward the coverage floor, so a foreign tree was propping up the assertion that
exists to prove the walk reaches real source -- the guard could read a file or
two of ours and still pass on the strength of a stranger's lines.

Skipping every dot-directory rather than naming `.delta`: a dot-dir is by
convention not part of the tree we make claims about, and the next scratch dir a
tool drops here is then skipped by the same rule.

Red before, green after, with `.delta` still on disk. Non-vacuity checked both
ways: a real `s.out_us` write injected into `crates/engine/src/sweep.rs` turns
the guard red on that path, and the file was restored byte-identically
(sha256 36d00f17d595dedfaa0d087ab924e7117698e0527d48ac22fdd904cfffc1af91). The
walk still reaches `crates/app` and now reads 86 files / 79,129 lines, which is
what the floor's own comment already claimed.
🔀 merge(edithloader): the .edith door bounds the caption window, band gain and transform positionAhmet Kaan Gümüş · 2c809fd
🔀 merge(edithloader): the .edith door bounds the caption window, band gain and transform position

# Conflicts:
#	crates/engine/src/project.rs
fix(engine): close the last two gaps in the window guard, and admit the restAhmet Kaan Gümüş · 04265e9
fix(engine): close the last two gaps in the window guard, and admit the rest

Two coverage gaps closed, one class documented as unmatchable, and a
third failure of this same guard found in the act of closing them.

**A `let` hid a struct literal.** The literal branch skipped any line
starting with `let `, so `let out_us = s.out_us;` was correctly a read
while `let tail = SubClip { in_us: cut, out_us: s.out_us, ..s };` -- a
plausible composer shape, and the shape `sub_clear` and `sub_open_room`
were written in before `set_window` existed -- went through green. The
exclusion is now per-occurrence and keyed on what FOLLOWS the name: `=`
is a local binding, `:` or `,` is a field. A tuple pattern
(`let (a, b) = ..`) is separated from a struct literal by the paren
rather than by the `let`, since the same comma means opposite things in
each.

**The walk skipped a file that never spelled the type.** Its filter was
`text.contains("SubClip")`, which is a name-based guess about which
files can reach the type -- the same mistake the hardcoded pair of file
names was, wearing a derived hat. A glob import and an alias defeat it
exactly as they defeated the list. The filter is gone: the walk now
opens EVERY `.rs` under `crates/` that is not test code, 86 files and
~77,600 lines, and the coverage floor moved with it (141 files and
~116,000 before `/tests/` and `mod tests` are cut).

**And the guard was silently asserting nothing.** While retuning that
floor, a clumsy edit deleted the `found.is_empty()` assertion -- the one
the whole test exists for. For a moment the test reported green while
`found` held a real offender, which is the fourth version of this guard
failing in the one way that looks exactly like success. Found by
instrumenting the walk rather than by reading the diff, which is the
only reason it was found at all. The assertion is back, with a comment
saying that if you retune anything here, check that line still exists.

**The unmatchable class, documented rather than chased.** `*a = *b;`,
`*a = other;`, `std::mem::swap(a, b)`, `a.clone_from(b)` and a macro
like `bump!(s.out_us, by)` all write a caption's window and none of them
spell the field name, so a field matcher returns nothing for all of
them. That is a property of the approach, not an oversight: a helper
that writes the field directly IS caught, and it is specifically the
whole-struct and macro forms that pass. The doc comment now names this
class FIRST, as the most likely route a real composer would take, ahead
of a rename of the fields, a writer inside a test, and a file outside
`crates/`. The five forms are pinned in a test asserted to be MISSED, so
the day one starts matching the test asks which side of the line moved
and the residual-risk list cannot quietly grow a claim the matcher has
not earned.

Guard verification, all from the tip, all red:

- the verifier's one-token `s.out_us += by(s.end(), to);` -> project.rs:5869
- a `let`-bound struct literal in place of `set_window` in `sub_open_room` -> project.rs:5807
- `regroup`'s two lines back to raw assignments -> project.rs:3491-3492
- a composer smuggled into `sweep.rs`, a third module -> sweep.rs:67
- a new module reaching the type by glob import and alias, never spelling it -> zz_glob_alias.rs:4
- clean -> green

`the_window_write_matcher_catches_the_ways_a_composer_hides` now pins
eight forms that must be caught (the five above plus `<<=`, a write
through an indirect `&mut`, and the shorthand), five reads that must not
fire, and five field-less forms asserted to be missed.

No production code changed: this is the `#[cfg(test)]` module only, and
all eight composers still route through `set_window`.
fix(engine): make the window guard match how a composer actually writesAhmet Kaan Gümüş · edc51b5
fix(engine): make the window guard match how a composer actually writes

The guard was certifying a claim it could not see. `s.out_us +=
by(s.end(), to);` is a ONE-TOKEN change from the real line, it left
`every_window_write_goes_through_set_window` green, and a grouped
caption's year-deep sibling really did end up 25,919,974,080,030us wide
-- 288,000,000us past the ceiling, which `open_project` then refused. A
guard that certifies a claim it cannot see is worse than a guard that
says what it is, so this fixes the matching and relabels the claim.

The old matcher knew four literal patterns: `.in_us = `, `.out_us = `,
`in_us:`, `out_us:`. It now knows:

- **every assignment operator**, not just `=` -- `+=`, `-=`, `*=`, `/=`,
  `%=`, `^=`, `&=`, `|=`, `<<=`, `>>=`. `==` and `<=` are excluded, and
  the first version of the new matcher got that wrong too: it counted
  `s.out_us <= s.in_us` as a write, which would have flagged every
  never-empty check in the file.
- **struct-literal fields and the shorthand form** (`out_us,`), not just
  `field: value`.
- **writes through a `&mut` the field access is indirect from**
  (`let x: &mut SubClip = q; (*x).in_us = 5;`), by skipping the `let`
  exclusion for the assignment forms and keeping it for the literal
  forms, so `let out_us = s.out_us;` is still not a write.
- **every module in the workspace that can NAME `SubClip`**, found by
  walking `crates/` rather than by hardcoding `project.rs` and
  `edith.rs`. The two-file version was silently certifying a claim about
  `crates/app` it had never opened; the walk now asserts it reached the
  app, and it flags the two `timeline_edit.rs` palette-row sites that
  feed `place_sub` as named allowlist entries rather than as files it
  does not read.

And it is labelled what it is: a **heuristic guard**, with the residual
risk written down -- a write through a helper taking `&mut SubClip` in a
form the matcher cannot see, a macro-mediated write, a `.rs` the walk
does not reach, a writer hidden inside a test, and above all a RENAME of
the fields, which would silence the matcher entirely while it stayed
green. Two tests hold that line:

- `the_window_write_matcher_catches_the_ways_a_composer_hides` pins six
  hiding forms, the verifier's `+=` among them, AND five reads that must
  not fire -- so the list above cannot be padded with reads to stay
  green.
- `every_window_write_outside_set_window_is_named` walks the tree and
  asserts a coverage floor, because the first two versions of this guard
  were vacuous: cutting at the first `#[cfg(test)]` read 160 lines of a
  10,800-line file, and cutting at the last landed inside the guard's
  own test module. A guard that reads nothing is worse than no guard
  because it reads as one, so the floor is asserted rather than assumed.

Both proved by mutation, from the tip:

- the verifier's one-token `s.out_us += by(s.end(), to);` -> the guard
  reds AND the grouped sibling reaches 25,919,974,080,030us;
- a composer smuggled into a THIRD module (`sweep.rs`, which the old
  two-file guard never opened) -> the guard reds by file and line;
- `regroup`'s two lines moved back to raw assignments -> reds;
- clean -> green.

**Why the compiler is still the better answer, and why it was not taken
here.** Making `in_us`/`out_us` private to this module would turn every
outside write into a compile error, which no one-token edit can defeat
-- that is what "let the compiler be the proof" would buy. Priced: 74
`SubClip` construction sites workspace-wide, 31 of them in this crate's
own integration tests, plus a public constructor to replace them, and it
reaches `crates/app`'s `timeline_math.rs` and `player/timeline_edit.rs`,
which other lanes own. That is a refactor of a door's public shape
rather than a bound, and the wrong size for a bug-hunt lane sharing a
machine with three siblings. The invariant itself is already structural
in the code -- all eight composers call `set_window` -- so what this
guard adds is the tripwire for the ninth, not the invariant.
fix(engine): make the caption-window bound structural, not per-armAhmet Kaan Gümüş · eb3f571
fix(engine): make the caption-window bound structural, not per-arm

Three rounds of review each found one more composer a per-arm check had
missed, and the third is the one that ends the sequence: the fix is not
another arm, it is the invariant's shape.

`grow_window` was not, in fact, the single writer of a window.

**A rejoin SUMS two legal halves.** `Project::regroup` keeps the left
half's `in_us` and takes the right half's `out_us` -- and `sub_joinable`
has just established that the halves are consecutive in the *source*,
so the joined width is the sum of two widths that each passed their own
door. Neither half is illegal; the whole is. Two 20-day windows and one
undo-a-split keystroke gave 40 days, which `save_project` wrote and
`open_project` refused. My sweep had disposed of this as "takes the
neighbour's own out_us" -- true, and beside the point: the ceiling bounds
a SUBTRACTION, not its operands.

**A head drag grows the width too.** The ceiling bounds a difference, so
falling `in_us` makes the window wider exactly as growing `out_us`
does. The Start arms clamped `in_us` from above (`in_us <= out_us - 1`),
which says nothing at all about the ceiling: a caption a year into its
source, dragged back 200 days, was 200 days wide with `out_us` never
moving.

So the bound is now one function every writer routes through:

    set_window(&mut SubClip, in_us, out_us)
    // 0 <= in_us < out_us  &&  out_us - in_us <= MAX_WINDOW_US

and `grow_window` is gone -- it was a helper around one arm, which is
what made the other arms look exempt. Everything goes through
`set_window` now: `trim_sub` both edges, `write_sub_edge` both edges,
`regroup`'s join, and the four halves `sub_clear` and `sub_open_room`
build. The doors still REFUSE on entry (parse, `with_subs`, `place_sub`)
and `set_window` still CLAMPS on composition, because that asymmetry is
the point: a door sees a value nobody was mid-gesture on, a composer is
an edit a person is watching happen.

**The closed set is now proved, not argued.** Reasoning about arms does
not scale to an unknown number of them, so
`project::tests::every_window_write_goes_through_set_window` reads both
files and fails if `in_us`/`out_us` is written anywhere outside
`set_window` and the parser's two door lines. It is deliberately a
source scan rather than a `debug_assert!`, because a `debug_assert!`
only fires on a path some test happens to walk.

That scan was vacuous the first two times and the test says so:
cutting at the first `#[cfg(test)]` scanned 160 lines of a 10,800-line
file (a smuggled writer in `write_sub_edge` sailed through), and
cutting at the last one landed inside the scan's own test module. It now
cuts at the test module and asserts how many lines it read, because a
guard that reads nothing is worse than no guard -- it reads as one.

**The ceiling's stated reason was wrong and is now right.** I had claimed
`window_at` needed the ceiling below 2^53 for f64 exactness. It does not:
it is pure i64 with a `saturating_mul`, so the f64 argument never
applied. The real arithmetic: `window_us() * into` with `into` up to
4.29e9 saturates for any window above `i64::MAX / u32::MAX` = 2.1e9us
(~35 minutes), so 30 days is 1200x past the point where the proportion
stops being exact -- which is the actual precision cost, and the reason
this is not "unlimited". f64 exactness IS the right argument for
`sub_lane_cues`'s cue mapping, where 30 days is ~3.5 orders inside
2^53. Nothing else derives anything from a window, so a wider value
costs no memory: the ceiling is a claim about meaning, not resource.

Witnesses, each with its own mutation:

- `a_rejoin_of_two_legal_windows_stays_inside_the_ceiling` -- two 20-day
  halves, one rejoin. Un-routed: "the rejoin summed two 1296000000000us
  windows into 3456000000000us, past the 2592000000000us ceiling".
- `a_head_drag_no_further_than_the_ceiling` -- a year-deep caption, one
  head drag to the offered room. Start arm reverted to a raw `in_us`
  assignment: "gave a 3000030000000us window".
- `every_window_write_goes_through_set_window` -- passes clean; fails on
  a smuggled writer in `write_sub_edge`, on on a smuggled writer in
  `edith.rs`, and on `regroup`'s two lines moved out of `set_window`.
- Loosening `set_window` itself (dropping the ceiling clamp) reds all
  four caption witnesses at once, which is the property a per-arm fix
  does not have.

UX note, recorded as the verifier found it and left unchanged: a drag
that reaches the ceiling stops silently. That is consistent with every
other trim wall here -- `trim_to` drops the snap cue, `commit_trim`
toasts only on `Err` -- so the ceiling behaves like a wall, not like an
error.
🔀 merge(decode): EXIF orientation is shown, and a decode failure says why it stoppedAhmet Kaan Gümüş · a72b5b1
🔀 merge(decode): EXIF orientation is shown, and a decode failure says why it stopped

# Conflicts:
#	crates/app/src/tests/media.rs
docs(demux): name the dropped display height as a design gap, not an oversightAhmet Kaan Gümüş · 25cd3de
docs(demux): name the dropped display height as a design gap, not an oversight

`PixelAspect::stated_size` reads a unit-0 pair's display height, checks it for
the degenerate claim, and then does not use it -- a 1920x803 scope is drawn
1920x1080, because this engine's model moves the width only.

That is correct today and I want it written down rather than left looking like
a bug, because it stops being correct the moment any path starts honouring a
stated display height: the height half is being discarded deliberately, and the
reason it is safe to discard (`VideoMeta::height` is the coded height
everywhere, and every consumer reads the aspect as width-only) is exactly what
such a change would remove.

Documentation only; no behaviour change.
fix(demux): a unit-3 DAR is judged by its raster too, not by its termsAhmet Kaan Gümüş · 8773473
fix(demux): a unit-3 DAR is judged by its raster too, not by its terms

Second verification was right, and this is the same defect one match arm below
the unit-0 fix: the unit-3 arm multiplied the DAR by the coded size and then
judged the *derived* pair by the reduced-term bound, which is the rule unit 0
was just fixed for and unit 3 was left under.

A DAR has to be brought onto the coded frame to become a pixel ratio, and that
multiplies by the coded size, so what reduces afterwards carries the sizes. A
239:100 scope -- 2.39:1 -- derives 2151:1600 over a 1920x1080 coded track and
the same over 3840x2160, both past the 1024 bound, while over 1440x1080 it
derives 717:400 and passes. So the bound read the same ratio three different
ways depending only on the frame it sat on, and refused the two frames a
scope is most likely to arrive on.

Measured, not inferred. `PixelAspect::stated_ratio` now takes the DAR against
the coded frame unreduced and refuses only the degenerate case, so
`width_factor` multiplies the coded width by it and bounds the raster with
`MAX_DISPLAY_WIDTH` -- a bound on the picture rather than on the digits of a
derivation. The pair itself is the engine's own model, unchanged, so every
sane picture reads exactly as it did before.

Witnesses, with the expected widths measured by running BASE 0c9d76c over the
same fixtures rather than recomputed by me:
  - 239:100 over 1920x1080 coded -> 2582 (base 2582)
  - 239:100 over 3840x2160 coded -> 5162 (base 5162)
  - 239:100 over  720x576  coded -> 1376 (base 1376)
RED before this change, reproduced on the same fixtures: the first two opened
square at the coded size; only 720x576, which reduces to 239:125 and so passes
the bound, stretched. Non-vacuity proven by mutating the arm back through
`stated()` and watching the test go red.

While matching base I also found and reverted a regression of my own: I had
written the even-grid rounding as `next_multiple_of(2)`, which rounds UP,
where the original `(x | 1) & !1` rounds DOWN. That would have silently moved
every existing anamorphic picture by two columns (3840x2160 at 239:100 scales
to 5163 and has always displayed 5162, not 5164). Restored to the original
rounding, and the three expected widths above pin it.

`a_hostile_sar_pair_is_still_refused_by_the_term_bound` holds the other half:
the unit-4 SAR pair IS a ratio, so chosen bytes are still refused there, and a
real 4:3 -- reduced or not -- is still read. The bound was moved off the arms
it cannot judge, not dropped.
fix(engine): clamp a caption window on GROWTH, and raise the ceilingAhmet Kaan Gümüş · f23dd8f
fix(engine): clamp a caption window on GROWTH, and raise the ceiling

A ceiling is only half an invariant. Every door -- the parse,
`with_subs`, `place_sub` -- sees a window on the way IN, so on its own it
left two holes, both of which cost a user their saved work.

**The app could write a file it refused to open.** `trim_sub`'s End arm
GROWS `out_us`, and it grew past the ceiling: a caption trimmed out to
the room the engine itself offered reached 25 hours, `save_project`
wrote `sub 1 0 3240000 0 0 90039000000`, and `open_project` refused
that file with "past the 86400000000us a caption can hold". The trim is
committed and undo does not survive a restart, so there is no in-app way
back -- the editor wrote work it then could not reopen. The `saturating_add`
that killed the overflow panic did not keep the value inside the bound.

**The ceiling was below real use.** A caption's window is a window into
SOURCE media, so its width is the length of the recording it was cut
from, and that is not bounded by a day. A 25-hour conference stream or a
lecture archive measures its own palette row in tens of hours, so the
ceiling refused the user's own media back at them, at `place_sub`, with
nothing placed. "A window this wide is a number nobody meant" holds for
i64::MAX; it does not hold for a long recording.

So:

- `MAX_WINDOW_US` is 30 days, and the reason is arithmetic rather than
  editorial. `SubClip::window_at`'s proportion cut saturates rather than
  wrapping, so the ceiling is about PRECISION: f64 holds an integer
  exactly to 2^53, and 30 days is 2.6e12 -- nine orders of magnitude
  inside it, so the cut is exact rather than merely finite. It is 3.5e6x
  below i64::MAX, and exact in `sub_lane_cues`'s cue mapping for the same
  reason. No real recording reaches it; a typed number does not survive it.

- `grow_window` is the growth law, and is now the single function that may
  write `out_us`. `trim_sub`'s End arm and the group-follow
  `write_sub_edge` both go through it. Growth CLAMPS and entry REFUSES,
  and the asymmetry is the point: a trim is a continuous gesture whose
  every intermediate frame the user sees, so clamping is a drag that
  stops -- exactly like the frame walls `trim_sub` already applies. A
  value arriving from a file or a foreign caller is not mid-gesture, so
  it is named and refused rather than quietly changed.

- `trim_sub_room` is walled by the same number. A front-end asks it to
  draw the drag and then trims to whatever it is told, so an engine that
  offers a trim its own `trim_sub` would clamp is a drag that snaps back
  at the end of the gesture. The room and the trim now agree by
  construction.

Witnesses, each with its own mutation (saveload.rs):

- `a_trim_grown_to_the_offered_room_saves_and_reopens` -- 40-day track,
  trim to the offered room, save, reopen. Clamp removed: "gave a
  2592027000000us window, past the 2592000000000us ceiling".
- `a_group_trim_carries_its_sibling_no_further_than_the_ceiling` --
  `follow_group` SKIPS the dragged member, so a primary-trim-only fix
  misses this entirely: the route is a sibling on a second lane, placed
  20 days into the track so the same delta overshoots. Clamp removed:
  "the group carried the sibling to a 25919974080030us window" -- 10x the
  ceiling.
- `a_caption_over_a_day_of_track_places_and_round_trips` -- a 25-hour
  track placed exactly as `Player::sub_of_track` builds it. Ceiling
  lowered to a day: refused at `place_sub`, nothing placed.

Swept every other writer of `in_us`/`out_us`, all now inside the bound:

- `sub_clear` (both halves) and `sub_open_room` (both halves): the values
  are `window_at` results, which `SubClip::window_at` already clamps into
  the window -- a split cannot widen what it splits.
- `Project::close_gaps`-style join: takes the neighbour's own `out_us`.
- `trim_sub` Start and `write_sub_edge` Start: `in_us` is clamped to
  `out_us - 1`, which is below the ceiling.
- `app`'s `trimmed_sub`: moves `frames` only, never a clock.
- `Project::sub_lane_cues`: reads the window, writes nothing.
🔀 merge(gain): monitoring owns the gain and re-arms the deviceAhmet Kaan Gümüş · 8c1aee4
🔀 merge(gain): monitoring owns the gain and re-arms the device

# Conflicts:
#	crates/app/src/tests/mod.rs
docs(engine): MAX_RESOLUTION is 8K UHD, and a DCI master is refused by nameAhmet Kaan Gümüş · e62406e
docs(engine): MAX_RESOLUTION is 8K UHD, and a DCI master is refused by name

Verification was right that my comment called 7680 "the 8K ceiling", which
reads as though an 8192-wide master were covered. It is not: 7680 is 8K UHD
(7680x4320), and 8K DCI is 8192 wide. An 8192-wide ProRes 4444 XQ master
opened before this lane and is now refused by name, because the bound is now
asked of a container header and not only of a keystroke and a `.edith` line.

`MAX_RESOLUTION` stays 7680 rather than being raised to 8192: `is_resolution`
gates those two doors at 7680 as well, and widening the ceiling on every path
to accommodate a container is a wider decision than a header fix should make
on its own. A caller that needs DCI width raises it deliberately, on all four
doors at once.

So the behaviour change is a tested claim rather than a surprise:
`the_resolution_bound_admits_uhd_and_refuses_dci_width_by_name` patches a
copy of `assets/test_baseline.mp4` to 7680 wide (opens, read as stated) and
to 8192 wide (refused by `UnsupportedDisplaySize`, message naming 8192). Both
patches are the two u16 dimension fields of the visual sample entry, so the
file length and every offset in it are unchanged.