Repository navigation
0.3.3 - 2026-11-14
Release Notes
Changed
- Files with a few very long lines (e.g. 16 lines of 64 MiB) can diff
up to ~12% slower than 0.3.2; 0.3.2 was faster there only because its
checkpoints depended on the thread count. Byte-position checkpoints
are planned for 0.4. rift servereportsmoves: "partial"insummaryandmoveswhen the
block list filled up and later moves may be missing; it saidfound.
Clients must toleratemovesvalues they do not know. The VS Code
extension showspartialand reads an unknown value asfoundwhen blocks are listed.- The
--mema refusal advises is at least twice the--memthat was
refused, in the CLI,rift serveand the MCP server, so following it
reaches a working budget in a few reruns instead of many small steps
(a nokey 4 MiB pair from 64K took 20 refusals, now 5). It can
overshoot the real need by up to a factor of two. --statsnames a--memto try (twice the one used) next to the
segments that came out approximate for lack of budget. On the shuffled
16 MiB and nokey 4 MiB pairs, every budget in 32K steps from 10300K to 11800K that
showed such segments is clear at the figure named.- Documented that a full diff needs about 10.3 MiB (
--mem 10475K)
whatever the files hold, in--help, the man page and the memory
guide. - Documented that a moved block is an exact copy that may be partly
aligned: lines the diff aligned with another copy print as context. - Just above the full diff's smallest
--mem, more regions can come out
approximate than in 0.3.2, and the diff can skip moved blocks 0.3.2
listed: the block list is now set aside for one block per seed before
the workers, with or without--no-moves. On the pairs measured this
ended within 1.2 MiB of the smallest--mem(0.45 MiB on a shuffled
pair, 1.13 MiB on a nokey pair); from there up the output matched
0.3.2. - The output is identical on any machine for the same
--memand
input. A run sizes its work for one thread per MiB of--mem, from 1
to 8, in each of the scan, the refinement and the shared pool, and
starts no more threads than the machine has cores;
RAYON_NUM_THREADScan make the shared pool smaller. The cores and
RAYON_NUM_THREADSnow change only the speed. The reserve kept out of the budget is 48 KiB plus 12 KiB
per thread that--memallows, so it no longer grows with the cores.
Below 8 MiB, machines with more cores than MiB of--memrun fewer
threads than before. On more than 8 cores, the diff and--summary
run at most 8 scan threads, 8 refine workers and 8 threads in the
shared pool. - Refusal points moved with the reserve. Measured on an Apple M1 with 8
cores, where the reserve at 8 MiB and up is unchanged: the full diff
of two one-line files still needs 10475K,--summaryof them needs
285K instead of 369K.--summaryof a generated 1 GiB SQL pair needs
1874K instead of 3020K: a scan cut into many chunks no longer runs out
of room for checkpoints. On a machine with fewer cores the reserve at
8 MiB and up grows by 12 KiB per missing core, so the same full diff
needs up to 84K more than in 0.3.2 (10391K to 10475K on one core). - Documented that Rift does not detect binary files: NUL bytes are
printed in the diff and there is noBinary files differmessage. - Key mode's output order depends on the files and
--memonly. The
same pair under the same limit prints the same bytes on every run, on
any machine and any number of threads. The order at a given--mem
can differ from 0.3.1's where key mode used several threads; the set
of lines is the same. - Key mode runs one shard per MiB of the refine half, from 1 to 8, on a
thread pool of its own with one thread per shard, at most one per core
orRAYON_NUM_THREADS. It uses no more than 8 threads on any machine. - Key mode runs at most 64 passes. A
--memunder which the files
would take more, counted from the records read so far, is refused with
a budget error instead of rereading both files hundreds of times. The
error names a--memat least about twice as large; following it
reaches one that works in a few reruns. - Key mode keeps 48 KiB of
--memout of the budget, without the 12 KiB
per pool thread: it no longer starts the shared pool, and holds its
own pool's heap, 16 KiB per shard, in the budget.
Fixed
- A gap whose two sides share no line, reached after 32 nested anchor
levels, is replaced exactly instead of being marked approximate. rift-mcprenders a cached hunk without copying its edit script, so a
call no longer raises the heap by the size of the script.- An error that names a path longer than 256 bytes shows its first and
last 120 bytes, so a command line of 200 KB no longer prints back whole.
The command line is still outside the budget. - A seek hint at the end of a file without a final newline no longer
makes a read of an earlier line return the wrong bytes. No caller
passed such a hint. - Near the full diff's smallest
--mem,--summarylisted moved blocks
that the full diff under the same--memsaid it had not searched.
Where the full diff runs,--summarynow looks for moves exactly when
it does; below the full diff's smallest--memit still lists moves
when the search fits. Within a few tens of KiB above that point the
full diff can now skip moves that 0.3.2 listed, since the block list is
reserved for one block per seed before the search. - Two moved blocks could share lines of B, and
--summarycounted
those lines twice. A block that starts inside another's B range now
loses the shared lines, and is dropped when fewer than 3 remain. - Looking for moved blocks could change the diff: the block list took
its room from the refine half before the scheduler, so a region could
be approximate for one reason with the search and another without it.
The list's room is now sized from--memand the seeds alone and set
aside before the workers, with or without--no-moves. So a region
that 0.3.2 refined exactly under--no-movescan now come out
approximate near the same--mem, as it does with the search on. - A move search whose list filled up dropped every block and reported
moved not searched, the budget is too small. It now keeps the
blocks found so far and says the list is full and later moves are not
listed. The list holds about one block per 512 bytes of--mem. - The full diff,
--summaryand--statscould print different, equally
valid output under different thread counts: each thread of the pool
took 12 KiB from the budget, which moved the stratum or the point where
a region came out approximate (300 000 equal lines with one changed, at
--mem 192000K: 11 lines with one thread, 600 000 lines with 64). - The full diff and
rift serveset aside refine workers' buffers for
as many workers as half of the free refine half holds, at most 8 (4
for a session ofrift serveorrift-mcp, which starts at most 4),
however many start. The scheduler's share used to shrink with each
worker, so a machine with more cores could mark a region approximate
where one with fewer cores printed it exactly. Machines with more than
8 cores start at most 8 refine workers. - The line index's size no longer depends on the scan's chunk size,
which followed the core count. Near some--memvalues a few bytes of
difference picked another stratum, so two machines printed different,
equally valid diffs. The index now keeps one checkpoint per multiple
of its interval, so two checkpoints can be up to twice the interval
apart. - Key mode: a duplicate key could be dropped without an error under a
tight--mem; it is now always an error. With no room left to list
the duplicate, 0.3.2 and earlier skipped the second record and could
report the key as removed or changed. Such a run now ends in a budget
error whose--memhas room to list the key, and a rerun there names
the duplicate. - Key mode names duplicate keys instead of refusing the budget once a
pass has met them. A refusal can still come first when the duplicates
lie in a part of the hash range no pass has reached; following its
advice reaches the duplicate-key error. rift servereports a segment whose refinement ended approximate as
approxinsegmentspages, also when nohunkwas asked for it.
Before, a page showed only the map's status, so a client that re-read
pages after refinement never saw the mark.- A scan cancelled just as its reading ends no longer runs the move
search, which reads both files again, before it stops. - The protocol document says that an
openright after closing a
scanning session can answerbusyuntil the scan has stopped, and
that the client retries. - A
not_readyerror on a failed session says "session 1 failed; open
the files again" instead of asking the client to wait for it. rift serveansweredbusyto anopenthat needed a ready session's
room while the notifier happened to hold that session for a look. The
opennow waits up to 250 ms for the notifier to let go, and never
evicts a session whose memory it cannot free.rift servecould sendprogressorsession_statefor a session
after it had answered that session'sclose. The notifier now lists
the live sessions under the lockcloseanswers under.rift servecould send a scan's lastprogressnotification short of
its total and thensession_stateready, when the scan ended between
the two reads. The notifier reads the state first.rift serveunder a small--max-total-memno longer advertises a
default_memormax_session_memabove what its sessions can hold.
Everyopenused to answerbusyforever; one that asks for more than
the total now getstoo_large. The server refuses to start when its
limits leave a session less than 11 MiB, the least that runs even a
one-line pair.rift git-diffprints* Unmerged path <path>and exits 0 when git
passes the path alone, instead of exiting 2 and stoppinggit diff
with status 128.rift git-diffquotes paths in---and+++lines and in
diff --githeaders the way git does (tab, newline, quote, backslash
or non-ASCII byte), and a name with a space gets git's trailing tab, so
patchandgit applyread the headers.- The plain
rift a bdiff names files as GNU diff 3.10 does: a name
with a space, control character,"or\is wrapped in double quotes
with C escapes, bytes above 0x7f included as octal ("caf\303\251").
This is GNU diff 3.10 on x86_64; on aarch64 that build prints those
bytes raw. DEL stays raw. Before it printed every name raw. rift git-diffleaves out theindexline when git gave no hash for a
side, sopatchno longer reads a work tree file as deleted.- Key mode's line order no longer changes between runs once it uses
several threads. - Key mode no longer refuses budgets between ones that work:
COPY
dumps with many tables failed at 5M to 10M with a budget error, and
inputs with records of hundreds of KB or keys of tens of KB failed at
budgets where a smaller one worked. - Every key-mode budget error names a
--memto rerun with, about twice
the one refused or more, so following it takes a few reruns. Before,
some errors named none, and others named a limit 1 KiB higher that
failed again. - A key-mode error prints the same text on every run and thread count.
- Key mode ignores a UTF-8 byte order mark before a CSV header, and
NDJSON lines of only spaces or tabs, as it ignores blank lines. - After a pass stopped on too many suspect keys, key mode could count
the previous pass's suspects instead of its own and report hash
collisions instead of a duplicate key. - Key mode at
--mem 16Mruns on several threads again. The number of
threads now grows with--meminstead of jumping from one at a refine
half of 8 MiB. On the 128 MiB shuffled CSV pair it takes 1.09 s instead
of 2.21 s in 0.3.1. - A large segment made of one repeated line no longer takes heap past
--memwhile it is resampled. Two million copies of one line against
two million and one took 154 MB of heap at--mem 12M; they now take
3.8 MB. - Asking for a hunk no longer takes heap outside
--mem. Each segment
a front end asked for and was not yet refined held about 20 bytes, so
arift serveorrift-mcpclient asking for every segment of a
large diff could add tens of megabytes. Session::excerpton a session fromSessions::getreturns
Error::NoResponsePoolinstead of taking bytes from the diff's refine
half after the scheduler was sized from it, which could leave a
refinement waiting for them forever. Nothing in Rift made that call;
rift serveopens its sessions withSessions::open, which has a
response pool.- A finished refinement keeps its bytes reserved until the hunk cache
holds it. Another worker could take them in between, and the heap
could pass the refine half by up to the size of one job.
rift-diff 0.3.3
Install rift-diff 0.3.3
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rubtsov-stan/rift/releases/download/v0.3.3/rift-diff-installer.sh | shDownload rift-diff 0.3.3
| File | Platform | Checksum |
|---|---|---|
| rift-diff-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| rift-diff-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| rift-diff-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
| rift-diff-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo rubtsov-stan/riftYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation> --repo rubtsov-stan/riftrift-mcp 0.3.3
Install rift-mcp 0.3.3
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rubtsov-stan/rift/releases/download/v0.3.3/rift-mcp-installer.sh | shDownload rift-mcp 0.3.3
| File | Platform | Checksum |
|---|---|---|
| rift-mcp-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| rift-mcp-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| rift-mcp-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
| rift-mcp-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo rubtsov-stan/riftYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation> --repo rubtsov-stan/rift