DIVERGENCES - every known way the Rust kissmount and kissback differ from the C ones

The rule (kissback roadmap, compatibility rule 2): option names, exit codes
and message wording match the C build; deliberate changes are listed and
documented, never incidental. This is that list for 0.20.10, measured against
the C build from 0.9.1 (277b815) to 0.9.2 (8050f6b), whose behaviour 0.10.0
reproduced and 0.11.0 to 0.20.10 keep - 0.11.0 adding S3 (0a), 0.12.0
encryption (0b) and the prune fix (0c), 0.12.1 listdates oldest first (0d),
0.12.2 the record of an encrypted directory's plain backups (0e), 0.12.3
-mode compare (0f), 0.13.0 retention and the shrink guard (0g), 0.13.1 four
fixes the C build does not have (0h to 0k), 0.14.0 -mode copy (0l), 0.15.0
packed backup directories (0m), 0.15.1 fixes to reading parts of S3 objects
(0a), to copy targets (0l) and to packed keys (0m), 0.16.0 the kissback-mac
(0n), 0.17.0 the kissback-mac-dated (0o), 0.18.0 the kissback-refs (0p),
0.19.0 the repack index checks (0q), 0.19.1 three fixes to them and 0.19.2
a fourth (0q), and 0.20.0 the refusal of plain text into an encrypted
packed directory and -encrypted (0m), tar naming a stored file it cannot
read (0r) and kissmount's -o allow_other checking modes (0s), and 0.20.1
the backup walk reaching each entry through its directory (0t) and two
fixes to S3 listings (0a), and 0.20.2 restore making every entry through
its directory (0u) and messages escaping what came from outside (0v), and
0.20.3 a compressed stored file decoded no further than its record (0w),
and 0.20.4 a packed directory's indexes bounded and read only as used (0x)
and a restore going on past a name too long for its filesystem (0y), and
0.20.5 -mode repack refusing the last pack number there is (0z), and
0.20.6 a backup finding a pack gone from a packed directory (0aa), and
0.20.8 a backup with no name left past the year 9999 stopping (0ab), the
manifest cache used only in a directory of this user's (0ac), credentials
and passphrase only from a file of this user's or root's (0ad) and a local
backup directory reached through descriptors and pinned (0ae), and 0.20.9
that directory on a filesystem without owners or modes (0ae), and 0.20.10 a
backup into a bucket writing no key twice and deleting none it did not make
(0af) - on aarch64 and x86_64, 11 October to 3 December 2026.

ON PURPOSE
  0. The version number. This build is 0.20.10 where the C build it matches is
     0.9.2, so that `kissback -version` - which a fleet rollout asks over ssh -
     tells a Rust machine from a C one. The banner is otherwise the C build's,
     word for word.
  0a. S3 (phase 3, 12 October 2026): -s3source, -s3target, -s3credentials
     and -s3timeout, and kissmount's --s3target, --s3credentials and
     --s3timeout, which the C build does not have - its answer to each is
     "unknown argument". kissback's usage lists them in four lines of its
     own (clidiff.sh sets exactly those aside); man/kissback.7 and
     man/kissmount.7 document them between `.\" S3 begin` and `.\" S3 end`
     lines (versioncheck.sh sets exactly those aside). A backup made with
     -s3source is an ordinary /VERSION 6 one, which the C build reads; an S3
     backup directory is a local one's files under keys, plus kissback.lock
     while a backup or prune holds it (the local lock is flock(2), which S3
     has no counterpart of). Compact refuses -s3target. Harnesses: s3source,
     s3target, s3write, and each again virtual-host-style (s3sourcevh,
     s3targetvh, s3writevh) - as AWS, which a *.amazonaws.com host is taken
     for, is spoken to; the credentials line may choose the style, or name
     a credential process for temporary keys (harness: s3token).
     A read of part of an object that is not answered with that part (206
     from its byte; a server or proxy that ignores Range) fails, named
     (24 October 2026): 0.11.0 to 0.15.0 took the object's start for it - a
     resumed -s3source GET stored it, checksummed, kissmount served it.
     -s3source leaves out a key holding a NUL byte, named and counted, exit
     1 (0.20.1, audit 2 November 2026): the listing is
     percent-encoded, so %00 arrives as a NUL, and 0.11.0 to 0.20.0 wrote
     it into the manifest, which then read back cut at it - restore and
     check refused the whole backup as corrupt while the backup said exit 0.
     A listing holding a key from outside the prefix asked for (a server
     ignoring ?prefix=) is refused, whole, by every mode: every reader cut
     the prefix's length off what it was given, one shorter than it ended
     the run in a panic, and prune aborted every unfinished upload it was
     given - another set's backup in flight among them. Harness: s3source
     (case 4), s3write (case 6).
  0b. Encryption (phase 4, 12 October 2026): -passphrasefile, and
     kissmount's --passphrasefile, which the C build does not have. A backup
     directory with a kissback.key.age is encrypted: its stored files and
     manifests are age files named .age, and its manifests say /VERSION 7,
     which the C build refuses as newer than it understands - but it never
     gets that far, since it neither lists a <date>.lst.age nor counts a
     .age stored file as part of the layout (its prune leaves them alone,
     as "not part of the backup layout"). Backups that are not encrypted are
     still written as /VERSION 6. The usage line is set aside by clidiff.sh
     with the -s3 ones; the man pages document it between `.\" Rust begin`
     and `.\" Rust end` lines, which versioncheck.sh sets aside as it does
     the S3 ones. Every mode reads kissback.key.age first, before anything
     else touches the backup directory - one more open(2), stat or request
     per run, with no encryption in use. Harness: encrypt.
  0c. prune reads every manifest it keeps BEFORE it removes the manifests of
     the backups it is removing. C, and this build until phase 4, removed
     those first and read the rest after, so a manifest it could not read
     stopped the sweep with "nothing has been removed" - true of the stored
     files, while the removed backups' manifests were already gone, and with
     a damaged newest manifest that was every backup there was. Output is
     the same when every manifest reads. Harness: encrypt (case 6).
  0d. listdates prints the backups oldest first: the names sorted as bytes,
     which for the fixed-width UTC dates kissback writes is their order in
     time, a plain and an encrypted backup alike. C, and this build up to
     0.12.0, printed them in the order the directory listed them - no order
     at all on ZFS, btrfs or tmpfs, and alphabetical only from S3, which
     lists keys sorted. The names are held until the listing is whole and
     printed together, so a listing cut short now prints none of them where
     C printed those it had read before saying so; the exit code was 1
     either way. The same names, one per line, otherwise. Documented
     between `.\" Rust begin` and `.\" Rust end` in man/kissback.7.
     Harness: listnames (case 8).
  0e. In an encrypted directory a plain manifest is read only when
     kissback.plain.age - the name and SHA-256 of each plain backup the
     directory held when it was encrypted, encrypted to its key - names it
     and it still hashes to what was recorded; any other is left out of
     every mode and of kissmount, said, and the run exits 1, and prune and
     compact refuse while one is there. 0.12.0 and 0.12.1 read any plain
     manifest there as genuine, so whoever could write where the backups are
     kept could plant a backup that restore wrote out at exit 0. The first
     encrypted backup writes the record; -mode trustplain makes it for a
     directory 0.12.0 or 0.12.1 encrypted, and is the Rust line's own: its
     name in the usage's mode and -date lines and in the "-date more than
     once" refusal is set aside by clidiff.sh. trustplain does not record a
     plain manifest naming an encrypted (.age) stored file, which no plain
     backup does. The version line says what a manifest holds, not whether
     it is encrypted - the name (.lst.age) and the key say that - so a plain
     manifest saying /VERSION 7 is read like any other. Documented between
     `.\" Rust begin` and `.\" Rust end`. Harness: plaintrust. Since 0.16.0
     the record is kissback.trust.age (0n), and kissback.plain.age is read
     only by trustplain.
  0f. -mode compare (0.12.3, 14 October 2026): a backup set
     beside the source it was taken from - -localdir, or a bucket with
     -s3source - walked as backup walks it, with the compared backup's own
     /EXCLUDE patterns and /CROSSED boundaries, storing nothing. The listing
     by default; -sha256check also hashes every source file. An entry whose
     ctime is not older than the backup has changed since it and is said
     without making the exit 1; any other difference is a finding and does.
     Exit 2 when nothing could be compared. The C build has no such mode: its
     answer is "unknown mode for -mode". So -sha256check and -s3source each belong to
     two modes here, and the refusal of -sha256check names both; the usage's
     mode and -sha256check lines name compare, and the -s3source line, set
     aside already, does too. clidiff.sh sets those aside. Documented between
     `.\" Rust begin` and `.\" Rust end`. Harness: compare.
  0g. Retention and the shrink guard (0.13.0, phase 5, 15 October 2026): prune's
     -keepdays and -keepmonthly, and backup's -shrinkguard, which the C build
     does not have - its answer to each is "unknown argument". A backup kept
     by either rule, or by -keeplast beside them, stays; with either rule the
     newest backup always stays. -shrinkguard (default 50) makes a backup
     whose source has lost more than that share of its entries since the
     previous backup exit 1, with a warning naming the counts - the backup is written in full - where the C build exits 0;
     a run given an exclude pattern the previous backup did not have is not
     measured.
     No format change. The usage lists the three in lines of their own,
     which clidiff.sh sets aside; documented between `.\" Rust begin` and
     `.\" Rust end`. Harness: retention.
  0h. restore's second pass, which gives each directory its recorded mode
     and times deepest first (0.13.1, 16 October 2026), applies them
     only to the directories the first pass made or kept. C, and this build
     until then, re-read every DIR record and asked lstat(2), which follows
     every part of the path but the last: a DIR record the first pass had
     refused - under a symbolic link the manifest restored, or an orphan -
     gave a directory already there OUTSIDE the tree the recorded mode (777,
     say) and times, the refusal printed just before it notwithstanding. As
     root, any directory: /etc, /root/.ssh. Output and exit code are the
     same; only what the refused record reached differs. Harness: namesafety
     (case T, dirmode and orphandir), which the C build fails.
  0i. prune's sweep leaves alone a dated directory with no manifest that is
     newer than the newest backup there was when the run began (0.13.1, 16
     October 2026): what a backup in flight looks like,
     and the lock, flock(2), sees only the runs on the machine that holds
     the directory - not a client's backup arriving over sftp, nor another
     machine's. C, and this build until then, swept it: the live backup then
     put its manifest in naming deleted files, both runs exiting 0. Each such
     directory is named ("left alone until a later backup is complete") and
     listdates notes them; their files are swept once a later backup
     completes, so a killed backup is reclaimed one run later than C does,
     and prune's output differs there. With no dated backup at all the sweep
     is C's. kissback.swept records only what was swept. man/kissback.7:
     CONCURRENT RUNS, between Rust fences. Harnesses: racelock (case 8, a
     real sftp backup frozen mid-run) and prune (case 1).
  0j. kissmount serves an HLINK record only when the FILE record it names
     stands EARLIER in the manifest (0.13.1, 16 October 2026), as
     check, restore and tar require. C, and this build
     until then, looked the target up by name in no order, so a link placed
     before its file - a damaged manifest; the walk never writes one - was
     served while the other three refused it, and the mount's one warning
     was about the FILE record ("recorded with inode ..."). Now it is named
     as the others name it ("hard link target is not stored as an earlier
     file") and reads back EIO, as any link the mount cannot resolve does.
     Harness: dupname (case 8, "later", mounted), which the C build fails.
  0k. backup leaves out a symbolic link whose readlink(2) fails after its
     lstat(2) said it was one (0.13.1, 16 October 2026) - removed, or
     replaced, on a live tree - with "could not be read (readlink: ...) and
     is NOT included in the backup", and exits 1 with the backup written, as
     it answers a failed stat, an unopenable file or directory, and a file
     that changes size. C, and this build until then, ended the run there:
     no manifest, the night's stored files named by nothing, and only
     "<name>: No such file or directory" said. Harness: statskip (case 11,
     faultlib's new KB_FAIL_READLINK_MARK), which the C build fails.
  0l. -mode copy and -copyto (0.14.0, 16 October 2026), which the C
     build does not have - its answers are "unknown mode for -mode" and
     "unknown argument". copy makes a second backup directory hold the
     backups of a local one, byte for byte: each backup the target lacks,
     its stored files copied unchanged and checked against their records on
     the way, its manifest last. The target is named with -copyto (local),
     -s3target or the sftp options, which for this mode name the target
     while -backupdir names the source. No format change: what it writes is
     what backup wrote, and the C build reads a copy of a plain backup
     directory as it reads the original. The usage lists -copyto in a line
     of its own and copy in the mode line, which clidiff.sh sets aside;
     documented between `.\" Rust begin` and `.\" Rust end`. Harness: copy.
     A target that is another backup directory - a manifest both have that
     differs in length, or the newest of them in its bytes, or a stored file
     of another length under a name a backup there uses - is refused (24
     October 2026): 0.14.0 and 0.15.0 took such a backup for there and
     replaced such a stored file, damaging the target's backup. And copy
     gives the source a kissback.id and the target kissback.copyof, the
     same random id; a target that is another directory's copy is refused.
     The C build, and the other modes, leave both files alone.
  0m. Packed backup directories (0.15.0, 18 October 2026): -pack and
     -cachedir for backup into a bucket, and -mode repack, which the C build
     does not have - its answers are "unknown argument" and "unknown mode
     for -mode". With -pack a run's stored files go up in ustar archives
     (<date>/pack-NNNN.tar, up to 4 GiB) with an index (<date>/index.zst)
     and a list of the dated directories its manifest uses (<date>.refs),
     the manifest unchanged and last; kissback.layout marks the prefix. The
     members are named as stored files are, so the prefix downloaded and
     untarred is an ordinary backup directory, which the C build reads as it
     reads any (a plain one). listdates, check, restore, tar, compare,
     prune and kissmount read a packed prefix in place; repack rewrites its
     packs; copy into it is refused, and trustplain (0n) records an older
     one's manifests. The newest manifest is
     cached under -cachedir. In an encrypted packed prefix, backup runs
     without -passphrasefile, encrypting to kissback.recipient as a run with
     the passphrase pinned it in the cache; prune needs no passphrase there.
     Where a public key is pinned, a prefix whose kissback.key.age is gone
     is refused, with the passphrase or without: 0.15.0 backed up into it
     in plain text without, and made a new key with (24 October 2026).
     And where none is pinned - a machine whose cache is lost, another
     -cachedir, another spelling of the URL - a prefix without its key that
     still holds kissback.recipient or kissback.trust.age is refused the
     same way: with the key and every encrypted manifest hidden, 0.19.2 and
     older backed up into it in plain text, exit 0 (audit 1 November 2026).
     -encrypted (backup, any target) refuses a backup that would store
     anything unencrypted, whatever the backup directory says - the anchor
     for a machine that backs up keyless, should every sign of the key be
     removed; the C build has no such option.
     prune of any bucket that keeps versions says "hidden" where it said
     "reclaimed". The usage lists -pack, -cachedir and -encrypted in lines of their own,
     repack in the mode line and the -dryrun line, and the -dryrun refusal
     names it - all of which clidiff.sh sets aside; documented between
     `.\" Rust begin` and `.\" Rust end`. Harnesses: pack, packread,
     packprune, packkeys.
  0n. The kissback-mac (0.16.0, 25 October 2026). age lets anyone with a
     directory's public key encrypt to it, and a packed one keeps that key
     in the bucket: 0.12.0 to 0.15.1 read an encrypted manifest planted so
     as genuine, and restore wrote out what it named at exit 0. Every
     manifest kissback writes into an encrypted directory, and its record,
     now carries a "-> kissback-mac" stanza: HMAC-SHA256 of the file key
     under a key HKDF-derived from the identity's secret (on a machine that
     backs up without the passphrase, the copy the run with it pinned in the
     cache as `mackey`). age and older kissback pass over it, so 0.12.0 to
     0.15.1 still read what 0.16.0 writes. One whose kissback-mac the key did
     not make is refused; one with none is read only when kissback.trust.age
     names it with its SHA-256 - the record of the plain backups from before
     encryption and of the encrypted manifests kissback 0.15.1 and older
     wrote, itself refused without its kissback-mac - and any other is left
     out of every mode and the mount, said, exit 1. So a directory 0.15.1 or
     older encrypted reads nothing it wrote until -mode trustplain records
     it, once: of the plain backups it takes only those kissback.plain.age
     names, and it now works on a packed prefix. A run without the
     passphrase whose cache has no `mackey` (pinned by 0.15.1) is refused,
     nothing written, until a run with it. copy carries kissback.trust.age.
     kissmount verifies every stored file of an encrypted directory at open,
     as --verify does, given or not: a stored file encrypted to the public
     key is anyone's to put there, and without the check the mount served
     it (restore always hashes; tar without -tarverify stops after it).
     prune of a packed prefix keeps a kept backup's own dated directory
     whatever its <date>.refs says: the lists are plain text, and one with
     that directory left out had the sweep take the backup's own packs.
     The C build has no encryption. Documented between `.\" Rust begin` and
     `.\" Rust end`. Harness: forge (plaintrust follows the record's name).
  0o. The kissback-mac-dated (0.17.0, 27 October 2026). The kissback-mac binds
     a manifest to the key, not to its name: a genuine manifest copied under
     another date read as the backup of that date, and prune's rules counted
     it in place of the one that was and deleted that one, exit 0 - in a
     packed directory without opening a manifest at all, so a manifest
     merely planted there did the same. Every manifest kissback writes now
     carries a "-> kissback-mac-dated DATE TAG" stanza too (HMAC-SHA256 under
     the same key of the type, the date its name carries and the file key),
     beside the kissback-mac, which 0.16.0 requires and reads alone. A
     manifest under a dated name is read only when its date is that one;
     under a label, whatever its date. One with only the kissback-mac (0.16.0)
     is read only when the record names it: -mode trustplain, where
     kissback.trust.age is there, records those in kissback.trust2.age -
     written once, read with the first, never there without it - leaving out,
     in a bucket, one stored more than a day after its date or before it.
     prune checks every encrypted manifest's header (a 4 KiB ranged read)
     before its rules count a backup, and changes nothing while one is not
     the backup its name says; so prune of a packed encrypted directory needs
     -passphrasefile now. listdates leaves such a manifest out, exit 1. copy
     carries kissback.trust2.age. A manifest moved by hand to another date is
     refused as a copy. Documented between the Rust markers. Harness: forge
     (cases 9 and 10, from fixtures/forge016.tar.gz, which 0.16.0 made), and
     packkeys, plaintrust follow it.
  0p. The kissback-refs (0.18.0, 28 October 2026). A packed backup's
     reference list is plain text in the bucket, and prune goes by it: one
     rewritten to leave out a dated directory the backup shares with older
     ones had prune delete that directory while the backup was kept, exit 0
     (audit 28 Oct 2026). A packed backup's manifest now carries the list's
     SHA-256 in its header, "-> kissback-refs SHA" - covered by the header's
     MAC, which the kissback-mac-dated stanza binds to the key; 0.16.0 and
     0.17.0 pass over it - and prune of an encrypted packed directory goes by
     a kept backup's list only when it hashes to that, and otherwise changes
     nothing, exit 1. The lists 0.17.0 and older wrote: -mode trustplain
     checks each against its manifest, read whole, and records those that
     agree in kissback.refs.age, written once, of the record's form; prune
     refuses while a kept backup's list is unrecorded. copy carries it. Also:
     -mode trustplain makes no kissback.trust.age where a backup carries a
     kissback-mac - 0.16.0 and later write it as they encrypt, so it was
     removed, and made again it would take whatever was put there since; the
     modes that leave a backup out for it say to put it back - and its first
     record in a bucket leaves out a manifest stored more than a day after its
     date, as the second does. Documented between the Rust markers. Harness:
     forge (case 11, from fixtures/forge017.tar.gz, which 0.17.0 made; case
     10), plaintrust follows it.
  0q. Repack checks the index (0.19.0, 29 October 2026). Repack went by each
     dated directory's index, plain zstd in the bucket: a pack no line named
     was deleted, and nothing checked that a stored file a backup names was
     in the index at all. One rewritten - its lines dropped, or pointed at a
     pack that is not there - had repack delete the only pack holding a kept
     backup's file, exit 0, -dryrun saying it too (audit 29 Oct 2026). Now
     every directory is planned and checked before any changes: each stored
     file a backup names must be in its index, in a pack that is listed, and
     within it; each pack that goes - whole, or rewritten - is read by its own
     tar headers first, and a member a backup names may be in it only where
     the index places it there (and this run moves it out) or where the index
     places it in another pack whose tar header at that offset names it.
     Otherwise exit 1, the stored file said, nothing changed. No format
     change: every index already in a bucket is checked the same way.
     0.19.1 (audit 29 Oct 2026, second pass): a line could name what is not
     a stored file - a pack, the index itself - as a stored file of its own
     no backup names, and repack deleted it, exit 0; now every line must
     name a stored file (NNNNNN/NNN.dat...), or exit 1, the line said,
     nothing changed; and a pack is pack-NNNN.tar with four ASCII digits.
     A member a backup names found in a pack that goes, placed by the index
     elsewhere, was taken to be there by the tar header there (and by
     nothing when that pack was being rewritten): a pack written with the
     same headers and other bytes had the real one deleted. Now the bytes
     at both places are compared. And a pack whose live members were all
     empty files stored as they were (-compression 0, no encryption) was
     deleted whole, as all dead by bytes, and those files lost from the
     backups, exit 0 - since 0.15.0; now a pack is dead by its members.
     0.19.2 (audit 29 Oct 2026, third pass): what was checked was not what
     was done. The members a rewrite moves were read by a second read of
     the index, after every directory was planned, checked for nothing but
     fitting their packs: an index rewritten between the two reads had
     other bytes moved and the pack deleted, exit 0. Now the index is read
     once and a member is moved from where the checked plan placed it; and
     every read of a pack - its tar headers, the bytes compared, the members
     moved - is of the version the plan listed (If-Match): one replaced
     since stops the run, exit 1, before the new index replaces the old.
     Documented between the Rust markers. Harness: packprune (cases 8, 10).
  0r. -mode tar names a stored file it cannot read (0.20.0, audit 1
     November 2026). Without -tarverify a member's header goes out before
     its stored file is read, so a stored file that runs out or will not
     decode part way stops the run. The C build, and this one through
     0.19.2, then said "the archive could not be written and is incomplete":
     no entry named, and the archive - which was being written fine - blamed.
     Now "<entry>: the stored file cannot be read (stored as <file>); the
     archive is incomplete", as -tarverify, restore and the sha256 mismatch
     beside it name theirs; exit 1 as before. A write that fails, or a reader
     that closes the pipe, is said as before. Harness: test.sh
     (run_damaged_blob, local and sftp).
  0s. kissmount -o allow_other brings default_permissions with it (0.20.0,
     audit 1 November 2026). Without it the kernel checks no file mode on a
     FUSE mount and leaves it to the server, and neither kissmount checked:
     a backup mounted -o allow_other by root served every file to every
     user, a 0600 root file read by nobody, in the C build and in this one
     through 0.19.2. Now the recorded mode, owner and group are checked, as
     for the files themselves; umask=, fmask=, dmask=, uid= and gid= still
     replace them. The help line says "as the files' modes allow". Harness:
     mountopts (case 4).
  0t. The backup walk reaches every entry through its directory (0.20.1,
     audit 2 November 2026). An entry swapped for a symlink between
     the scan and the read has been refused since the C build (O_NOFOLLOW and
     an fstat, toctou cases 1-7), but that guards the last component of the
     path only: the walk stat'ed, opened and read every entry BY PATH, so a
     directory swapped for a symlink once it had been listed sent the rest of
     its listing through the link - stat and open agreeing, both having gone
     there - and another tree's files were stored under its names, exit 0,
     no message, in the C build and in this one through 0.20.0. Now each
     entry is fstatat()ed, readlinkat()ed and openat()ed in the directory the
     walk holds open, the directories below it included; -localdir itself is
     still opened by name, and may be a symlink as before. Messages name the
     full path as before. Harness: toctou (case 9).
  0u. Restore makes every entry through the directory it goes in (0.20.2,
     audit 5 November 2026). The first pass gives each directory to its
     recorded owner as soon as it is made, and then made what goes inside it
     BY PATH, with an lstat() of every directory above as the check
     (noancestorsymlink) and O_NOFOLLOW on the last component only. The owner
     swapping the directory for a symlink between the two sent root's open,
     unlink, link, chown and chmod through it: files made outside the tree
     owned by that user, and under -overwrite a root file outside written over
     and given to them - C and this build through 0.20.1. Now -localdir is
     opened once (following a link, as before) and every directory below it
     with O_NOFOLLOW from the one above; entries are made with mkdirat,
     openat (O_EXCL as well now), symlinkat, mknodat and linkat, removed with
     unlinkat and given owner, mode and times through their own descriptor or
     the *at calls with AT_SYMLINK_NOFOLLOW; the second pass reopens each
     directory the same way. A file -overwrite finds already correct is given
     its owner, mode and times through the descriptor it was hashed through,
     not by name. A link above an entry is reported as before, same message
     and count. A fifo, device node or symbolic link the run made is opened
     with O_PATH, checked to be what was made (type, device number, link
     target, and one name only - a hard link to a node of the same type has
     two; audit 7 November 2026) and given owner, mode and times
     through that descriptor
     (AT_EMPTY_PATH; a kernel without fchmodat2 gets chmod of
     /proc/self/fd/N); by name, a hard link to another file put in its place
     was given them. One that is no longer what was made is named ("changed
     while the restore was running"), counted with the collisions and left
     alone. -localdir's own owner, mode and times go on the descriptor
     opened at the start. Harness: toctou (case 10, both modes; case 11, a
     fifo, a link and a kept directory swapped for a hard link, and a fifo
     for a hard link to another fifo), test.sh
     restore-meta-fd (no mode or owner set by a name at all).
  0v. A name in a message is escaped (0.20.2, audit 5 November 2026). C
     prints every name, path, key, manifest line and server reply in a
     message as it stands, so a file named "x<newline>warning: anything"
     made a backup print a second line saying whatever its owner wanted -
     into the log and the mail a script greps - and one holding an escape
     sequence sent it to the reader's terminal. Every piece of a message
     that came from outside, and the SIGUSR1 status line, is now written as
     `ls -b` writes it: \n, \t, \r, \\ and \ooo for the other control
     bytes and DEL, for a C1 control written in UTF-8 (U+0080 to U+009F)
     and for a lone byte 0x80 to 0x9F. Text in UTF-8, and a name in another
     encoding, goes as it is. The program's own text is not touched, and
     nothing but messages is: manifests, restored names, tar and kissmount
     keep every name as it is. So a message differs from C's only when it
     names something holding a control or a backslash; clidiff is
     unchanged, realdiff would differ on a tree with such names. The S3 key
     holding a NUL that 0a leaves out is named with it as \000 (0.20.1
     wrote \0, by hand, for that one message). Harness: msgescape.sh,
     s3source (case 4); report.rs unit tests.
  0w. A compressed stored file is decoded to its recorded length and no
     further (0.20.3, audit 7 November 2026). C decodes every .xz and .zst stored
     file to the end of its stream and compares length and hash only after
     that, so a few KiB put in a plain backup directory in a stored file's
     place - a stream of 64 MiB of zeros, or of any amount - filled the
     restore's target, streamed into a tar archive or kept a check busy for
     hours before it was found out. The decoder now stops one byte past the
     record, and every reader says "the stored file is not the recorded
     length" (restore leaves that file out and restores the rest, tar ends
     the archive incomplete, check counts it, kissmount gives EIO): the
     record or the stored file is wrong, and which is not known. A stored
     file kissback or C wrote never decodes past its record: the compressor
     read at most that many bytes. This reverses one exception: restore
     wrote a compressed file whose hash matched whatever length its record
     gave (sizeclaim.sh case 5), and now refuses it - the hash is known only
     at the end, which is what decoding to the end was for. Check holds
     nothing it did not measure against later entries naming the same
     stored file (sizeclaim.sh case 5b). And the xz decoder takes at most 512 MiB
     (C: no limit), so a planted header cannot ask for a 1.5 GiB dictionary;
     preset 9, the most kissback writes, decodes in about 65 MiB. Harness:
     decodecap.sh (restore, check, tar; xz and zstd; under ulimit -f);
     compress.rs unit tests.
  0x. A packed directory's index is decompressed to 1 GiB and no further
     (0.20.4, audit 8 November 2026). No C counterpart: packed directories are the
     Rust build's. Only the compressed object was bounded, and readers load
     every index under the prefix, so a few hundred KiB put in a new dated
     directory by anyone able to write there ended every restore and check
     of the prefix out of memory. Past the cap it is "not an index kissback
     wrote": a reader says so and its stored files are missing, repack exits
     1 with nothing changed. A backup whose index would pass the cap fails
     rather than leave what no reader takes; the largest on the fleet is
     255 MiB. An index is read no further than its first line that is not
     its dated directory and a stored file's name: an entry costs some 184
     bytes, so a line's minimum of 36 bytes is what holds the memory an
     index can take near that of a genuine one at the cap. Harness:
     packread.sh case 4, packprune.sh case 8, under ulimit -v; pack.rs unit
     tests. An index is read only when something a manifest names is looked
     up in its directory: every one under the prefix was read at the first
     look and each member kept, so that many indexes in dated directories
     no backup uses, each within those limits, still ran a restore out of
     memory - some 463 bytes kept for half a byte uploaded, when a pack of
     one byte stood beside them.
  0y. A restore leaves out an entry whose name the filesystem it is restored
     to cannot hold, named and counted, and carries on, exit 1 (0.20.4, audit
     8 November 2026). The C build ends the run there. It matters since
     -s3source (0.11.0): S3 takes a key of 1024 bytes in one part, the
     object is stored like any other, and backup and check say exit 0; the
     restore then ended at that entry with all that sorts after it
     unrestored and no directory given its mode and times. A name that
     long is left in the backup on purpose, not refused: -mode tar writes
     it out and other filesystems hold it (namesafety.sh: the limit on a
     name is PATH_MAX, not NAME_MAX). What the filesystem answers decides,
     through the lookup restore already makes, so a FUSE or remote
     filesystem that only refuses at create still ends the run. Harness:
     nametoolong.sh, s3source.sh case 4b.
  0z. -mode repack refuses an index that names the last pack number there
     is, as it refuses any past 9999 (0.20.5, audit 9 November 2026). The
     next pack number was worked out in 32 bits: 4294967295 plus one was 0,
     past the limit, and the new pack replaced pack-0000 and was deleted as
     the pack it replaced, exit 0, the backup gone, from one line added to a
     plain index. Harness: packprune.sh case 8.
  0aa. A backup into a packed directory looks each stored file it would reuse
     up in its directory's index, and in the pack that names it, as a restore
     does (0.20.6, audit 9 November 2026). It asked only whether the index was
     there: a pack lost from the bucket was reused at exit 0 by that backup and
     every one after it, its files never stored again and restored by none,
     where an unpacked directory stores them again and exits 1. One index read
     per dated directory a backup names, per run. Harness: pack.sh case 11.
  0ab. A backup or compact whose name would fall past the year 9999 and whose
     fallback, the epoch, is taken stops there, exit 1 (0.20.8, audit 13
     November 2026). The C build tried the next second, which clamps to the
     same name, for ever: after a backup named 99991231235959 the second run
     after it never ended, and into a bucket it sent requests without pause
     while holding the lock that every later run and prune is refused by.
     Harness: manifestversion.sh case 6b.
  0ac. The manifest cache of a packed backup (-cachedir, 0m) uses its
     directory per backup directory only when it is a directory, not a
     symbolic link, owned by the user kissback runs as and not writable by
     others, and reaches everything in it through that directory; its "size
     etag" file is 0600 like the rest (0.20.8, audit 13 November 2026). A
     -cachedir another user could write to let them plant a symbolic link at
     that name, and the next backup removed every file where it pointed, exit
     0; or own the directory, and choose the pins and the manifest the next
     run compares against. A cache not used is said, and the run goes on as
     without one. The C build has no cache. Harness: packkeys.sh case 10.
  0ad. -s3credentials and -passphrasefile are read only from a regular file
     that belongs to the user kissback runs as or to root, opened without
     waiting on a FIFO; a credential process (0a) is run only when named by
     its full path and a regular file of that user's or root's that group and
     others cannot change (0.20.8, audit 13 November 2026). Only the mode was
     asked: a credentials file of another user's, 0600, named a program
     kissback ran as root, and a FIFO at either path hung the run. The C
     build has neither option. Harness: s3token.sh case 6, encrypt.sh case 3.
  0ae. A backup into a local backup directory makes its dated directory, the
     numbered ones and every stored file through descriptors it holds
     (mkdirat, openat with O_CREAT|O_EXCL|O_NOFOLLOW), commits its manifest
     through the backup directory it opened, reads the previous manifest
     through it without following a link, and before committing asks whether
     the dated directory is still at its name: if not, it says so and exits
     1. A backup directory, or the one holding it, of another user's is
     warned about (0.20.8, audit 13 November 2026). The C build makes all of
     it by path: whoever could rename the dated directory mid-run could point
     the next stored file at any file, and the backup wrote into it, exit 0 -
     on the fleet, server01's own nightly backup, its sets in directories the
     clients' sftp account owned. Compact makes and fills its dated directory
     the same way and asks the same before committing; copy makes a local
     target's directories one at a time without following a link and its
     stored files in them new; prune's kissback.swept and a key written to
     the directory go through it by descriptor. And every mode that locks a
     local backup directory pins it: each descent from its path checks it is
     still the directory locked, and stops, saying so - the C build resolved
     the path again at every step, so a backup directory swapped mid-prune
     had another directory swept by this one's references. A directory the
     run has just made that does not show this user as owner and no group or
     other access is refused, and removed when empty; on a filesystem that
     keeps no owners or modes (FAT, exFAT, NTFS, SMB/CIFS, NFS, FUSE, 9p, by
     fstatfs) that test is set aside with one warning per run - 0.20.8
     refused every backup onto a vfat mount as a replaced directory (audit
     14 November 2026). Harness: backuprace.sh (cases 1-4 backup, 5 prune,
     6 FAT).
  0af. A backup into a bucket (0a) puts the keys of its own new dated
     directory only if absent - its stored files, packs, index and refs, as
     the lock and the manifest already were - so a retry after a reply lost on
     the way meets its own object and stores no second version of it; and a
     stored file it drops (its source unreadable, or its close failing once
     stored) is deleted only when the run made it an object, and in a packed
     directory not at all: a member is no object, and what no backup names is
     prune's and repack's (0.20.10, audit 3 December 2026). Before, the retry
     wrote the key again and a dropped member was DELETEd though it never was
     an object: on a versioned bucket a second version, or a delete marker,
     under the machine's key - what a key that tampers with backups leaves,
     and what the fleet's tamper audit alerts on. Repack's index, which
     replaces the dated directory's, and copy are as before. Harness: pack.sh
     cases 12-13.

GONE WITH fuser - kissmount speaks the FUSE protocol itself since phase 4
(kissmount/src/fuse.rs), and the two things the fuser crate forced are as the
C build has them. Kept under their numbers so references stay right.
  1. readdir's d_type: DT_UNKNOWN (0) for every entry and d_ino
     FUSE_UNKNOWN_INO, as C sends them; tools stat(2) each name, as over a C
     mount. Until phase 4 the entry's own type, which fuser could not leave
     out.
  2. /proc/mounts: "kissmount <mountpoint> fuse.kissmount
     ro,nosuid,nodev,relatime,user_id=0,group_id=0", as C's. Until phase 4
     the type was "fuse": fuser's mount(2) left out the subtype.
  -  Node ids: each entry is a node of its own, its attributes carrying the
     manifest's inode number, as libfuse with use_ino has it; lookups are
     answered with libfuse's one-second lifetimes. Until phase 4 fuser took
     the inode number for the node id, and every lookup was followed by a
     getattr to put the manifest's back.

NOT IMPLEMENTED
  3. libfuse options. All that libfuse 3.18 takes through the C build's
     fuse_main() are taken here too, and do the same - checked option for
     option against the C build, 60 of them, by mountopts.sh: umask, fmask
     and dmask (each REPLACING the permissions, dmask before fmask before
     umask, as libfuse's set_stat()), uid, gid, the entry, attribute and
     negative timeouts, fsname and subtype (source and type as libfuse makes
     them), the kernel flags, blksize, blkdev and the SELinux contexts
     (passed to the kernel, which refuses them alike), auto_unmount (through
     fusermount3, which unmounts when the server dies), max_threads; and
     clone_fd, max_idle_threads, auto_cache, no_rofd_flush, noforget,
     remember, ac_attr_timeout, io_uring and its depth, user=, which change
     nothing for a read-only filesystem served as this one is. Options
     libfuse 3.18 does not know - its 2.x ones (hard_remove, readdir_ino,
     direct_io, nopath, intr, large_read, nonempty...) and relatime, lazytime
     - get libfuse's "fuse: unknown option(s)" and exit 3, as from C; a value
     that does not parse, libfuse's "fuse: invalid parameter in option", exit
     1 or 3 as C. Two are refused by name with exit 3 ("this build does not
     implement the libfuse option(s) ..."): modules= (the stacking modules,
     loaded from shared objects; the C build hangs on subdir) and max_read=
     (which the C build accepts and then fails at INIT with libfuse's own
     error, exit 8). Until phase 4 every one of the options above but
     allow_other, allow_root, default_permissions and the kernel flags was
     refused that way.
  4. -d and -o debug run in the foreground, as in C, and print a protocol
     trace in libfuse's form - "unique: N, opcode: NAME (n), nodeid: N,
     insize: N, pid: N" and each reply's outcome - but not every line
     libfuse adds (the operation's own lines, its version).

WORDING THAT CANNOT MATCH
  5. --version: the banner is the C build's but for the number (see 0);
     after it C prints libfuse's three lines and Rust prints fusermount3's own
     version line and "FUSE library: none - kissmount speaks the kernel
     protocol itself".
  6. --help: the kissmount part is identical but for its own options (S3,
     -passphrasefile); the "FUSE options" part is libfuse 3.18's but for
     modules= and the subdir and iconv modules' own options.
  7. A mount(2) that fails after the command line parsed: "fuse: mount failed:
     <strerror>", exit 4. libfuse's own wording for that case was not
     captured; the exit status is libfuse's.

RUST DEFAULTS, ACCEPTED
  8. Out of memory: Rust aborts ("memory allocation of N bytes failed",
     SIGABRT) where C prints "out of memory" and exits 1. Accepted in the
     roadmap's Rust-defaults table; a mount that cannot allocate its index has
     nothing to serve either way.
  9. Two things pass through UTF-8 lossily: the -o option list (an option
     that is not UTF-8 is unknown to both builds, but its bytes in the
     "unknown option" message may differ) and the program name, which becomes
     the mount's source and subtype. Names, paths, manifests and messages are
     bytes throughout.

BEHAVIOUR KEPT ON PURPOSE, WITH A DIFFERENT MECHANISM
  -  "init ok" is held back when stdout is not a terminal and written at exit,
     because that is when C's stdio buffer reaches a log file - and a
     daemonized mount never prints it, as in C.
  -  SIGINT, SIGTERM, SIGHUP unmount and exit 8, as libfuse does; a signal the
     parent left ignored stays ignored. Measured against C: identical for all
     three, including a background job's SIGINT. No harness covers this.
  -  The worker pool is a fixed 10 threads (-s: one); libfuse starts threads
     on demand up to 10.
  -  The orphan report keeps the directory NAMES in its sets where C keeps
     64-bit FNV hashes of them; the answers differ only on a hash collision,
     where C could take one directory for another.
  -  Messages the C build prints a line at a time (the exclude and crossing
     notes, the missing-info-line message) are written in one write(2). The
     bytes are the same.

KISSBACK
  -  Every set kissback keeps of names - repeated names, directories seen,
     orphaned and unknown ones, hard-link targets, the symbolic links a
     restore has reported - holds the NAMES where C holds 64-bit hashes of
     them. As for the mount: the answers differ only on a hash collision.
  -  check reports HLINK records whose target is not an earlier FILE in
     manifest order. C walks its khash, whose order is its table's, so with
     more than one such record the lines can come in another order; the
     lines themselves and the count are the same.
  -  None of the kissback modes is handed to C any more: the phase 2
     fallback was removed at slice 6. Every manifest, stored file, archive
     and message compared so far is byte-identical with C's; see PHASE2.

FOUND IN PORTING, AND FIXED ON THE RUST SIDE
  -  check and prune took a name or info line's last byte off and THEN cut it
     at its first NUL; C cuts at the NUL (strlen) and then takes the byte
     before it off. A damaged manifest with a NUL inside a line was read as
     a different name by each. reader::cchop() is C's order, with a unit test
     against libc's strlen.

HARNESS NOTES
  -  fieldrange counts one assertion that greps kissmount.c beside the
     binary under test. There is no kissmount.c beside the Rust binary, so
     the harness says so and runs one assertion short, which it then reports
     as SHORT. The check it makes - "both of the mount's loaders test the
     owner" - has no meaning for a build with one loader.
  -  No harness checks the exit status after a signal; see above for the
     comparison made by hand.
