Skip to content

0.3.3 - 2026-11-14

Choose a tag to compare

@github-actions github-actions released this 14 Nov 17:05

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 serve reports moves: "partial" in summary and moves when the
    block list filled up and later moves may be missing; it said found.
    Clients must tolerate moves values they do not know. The VS Code
    extension shows partial and reads an unknown value as found when blocks are listed.
  • The --mem a refusal advises is at least twice the --mem that was
    refused, in the CLI, rift serve and 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.
  • --stats names a --mem to 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 --mem and
    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_THREADS can make the shared pool smaller. The cores and
    RAYON_NUM_THREADS now change only the speed. The reserve kept out of the budget is 48 KiB plus 12 KiB
    per thread that --mem allows, so it no longer grows with the cores.
    Below 8 MiB, machines with more cores than MiB of --mem run 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, --summary of them needs
    285K instead of 369K. --summary of 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 no Binary files differ message.
  • Key mode's output order depends on the files and --mem only. 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
    or RAYON_NUM_THREADS. It uses no more than 8 threads on any machine.
  • Key mode runs at most 64 passes. A --mem under 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 --mem at least about twice as large; following it
    reaches one that works in a few reruns.
  • Key mode keeps 48 KiB of --mem out 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-mcp renders 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, --summary listed moved blocks
    that the full diff under the same --mem said it had not searched.
    Where the full diff runs, --summary now looks for moves exactly when
    it does; below the full diff's smallest --mem it 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 --summary counted
    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 --mem and 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-moves can 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, --summary and --stats could 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 serve set aside refine workers' buffers for
    as many workers as half of the free refine half holds, at most 8 (4
    for a session of rift serve or rift-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 --mem values 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 --mem has 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 serve reports a segment whose refinement ended approximate as
    approx in segments pages, also when no hunk was 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 open right after closing a
    scanning session can answer busy until the scan has stopped, and
    that the client retries.
  • A not_ready error on a failed session says "session 1 failed; open
    the files again" instead of asking the client to wait for it.
  • rift serve answered busy to an open that needed a ready session's
    room while the notifier happened to hold that session for a look. The
    open now waits up to 250 ms for the notifier to let go, and never
    evicts a session whose memory it cannot free.
  • rift serve could send progress or session_state for a session
    after it had answered that session's close. The notifier now lists
    the live sessions under the lock close answers under.
  • rift serve could send a scan's last progress notification short of
    its total and then session_state ready, when the scan ended between
    the two reads. The notifier reads the state first.
  • rift serve under a small --max-total-mem no longer advertises a
    default_mem or max_session_mem above what its sessions can hold.
    Every open used to answer busy forever; one that asks for more than
    the total now gets too_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-diff prints * Unmerged path <path> and exits 0 when git
    passes the path alone, instead of exiting 2 and stopping git diff
    with status 128.
  • rift git-diff quotes paths in --- and +++ lines and in
    diff --git headers the way git does (tab, newline, quote, backslash
    or non-ASCII byte), and a name with a space gets git's trailing tab, so
    patch and git apply read the headers.
  • The plain rift a b diff 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-diff leaves out the index line when git gave no hash for a
    side, so patch no 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 --mem to 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 16M runs on several threads again. The number of
    threads now grows with --mem instead 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
    --mem while 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
    a rift serve or rift-mcp client asking for every segment of a
    large diff could add tens of megabytes.
  • Session::excerpt on a session from Sessions::get returns
    Error::NoResponsePool instead 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 serve opens its sessions with Sessions::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 | sh

Download 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/rift

You 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

rift-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 | sh

Download 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/rift

You 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