Four fixes about information being thrown away at exactly the moment you need it.
apply_changes printed 4,100 lines for a 2-line edit. The diff's line matcher built an LCS table
capped at 4M cells, about 2000 by 2000 lines. Two 2-line edits 2042 lines apart in a 4024-line
Cargo.lock exceeded it, and the fallback was "one big replace": a single hunk @@ -358,2049 +358,2049 @@
showing every untouched line between the edits as removed and re-added. Now a region over the cap is
split on lines that occur exactly once on each side (kept in order by a longest increasing
subsequence, the same device patience diff uses) and each gap is matched the same way, so the same edit
prints two 7-line hunks in a file of any size. Python's difflib already did this; it is the Rust and
C++ diff that needed it.
A failed does_not_contain postcondition said "still contains forbidden text". The check is a
plain substring test over the whole file, docstrings included, so a guard that matched the caller's own
documentation looked identical to an edit that left bad code in, and got retried blind. It now reports
the line number and the line.
A timed-out command returned nothing. run_bash, run_powershell and run_python discarded the
output on timeout and returned only "Command timed out after N seconds". For a watcher, a build, a
test suite that hangs, the last lines are the entire explanation. You now get the output, snipped and
binary-guarded like any other, above the timeout message.
A web prompt stopped a run 25 seconds after you closed the tab. The lease counted time while a
browser was attached, so a prompt left open for over 30 minutes expired soon after detach, skipping its
per-minute notices. Attached time no longer counts, ask_user_question uses the lease like confirm and
sudo do (it used a bare wait() and hung forever with no browser), and the viewer counter is under a
lock because each SSE stream is its own request thread.