Artifact 1aeb531cacc90e33ad757881c78a56a0b6d75d8d4e441606a4f232f756ce0dac:
A symlink anywhere in the checkout permanently wedged `commit`. `extras.zig` classifies a symlink as an extra (B-extras-9), and the recursive `add DIR` / `addremove` paths reuse that sweep as their add set without re-applying the kind test that explicit `zit add sym.txt` and `commit` both apply. The recursive path therefore TRACKED exactly what the direct path REFUSED: after `zit add .`, every subsequent `zit commit` died with "cannot commit 'sym.txt': not a regular file", `zit status` called an on-disk file missing, and the only way out (`zit rm sym.txt`) was named nowhere. `add .` is the documented whole-tree workflow, so any repo containing a symlink was stuck.
WHAT CHANGED
Consistent refusal: 0.1.0 does not version symlinks, on every path.
1. `extras.Extras` entries widen from a bare path to `Entry{path, is_symlink}`. The sweep already lstat-classified every entry (`resolveKind`); the verdict now rides out on the entry instead of being re-derived by callers. That is the point of the shape: `add` and `addremove` do NOT re-stat swept items, so the two paths cannot drift from the deep module's classification again — which is the mechanism of this bug. Ordering is unchanged (sort is by `path`; `is_symlink` never participates), and every postcondition assert is preserved.
2. The five `items()` consumers split by role. `extras` and `clean` ignore the tag — enumerating verbs do not judge, and a symlink stays a listable, deletable extra. `add`'s directory sweep and `addremove`'s insert loop filter on it.
3. `classifyPath`'s catch-all `else => .not_regular` splits: `.sym_link` gets its own `Outcome` and the wording `symlink (not versioned in 0.1.0)`; a fifo/socket/device keeps "not a regular file". Those are not the same refusal and must not read as one. The wording is one shared const so the explicit refusal and the recursive skip notice cannot diverge.
4. `commit`'s `Capture.not_regular` carries whether the entry was a symlink, and `commitNotRegular` renders the recovery for that case: "run 'zit rm PATH' to stop tracking it". This is how repos already wedged by a pre-fix `add .` get out; there is no migration code and none is needed.
REPORTING DECISION (stated, not implied)
`add` prints each skip to stderr, alongside its existing already-tracked notice: add's contract is per-argument feedback. `addremove` withholds symlinks SILENTLY. Its report is a two-channel ADDED/REMOVED ledger of state transitions, and a skipped symlink is a non-transition; growing a third notice channel there would change the shape of a report other tooling reads. `zit extras` is the verb that shows the symlink is still present and untracked.
`status` needed no change: post-fix the symlink is simply untracked.
TESTS
Five e2e regressions, marker `// REGRESSION B3:`: the breakdown doc's repro chain verbatim (init/add ./commit/status/extras); an `addremove` variant with symlinks sorting BOTH before and after the regular file the sweep also yields, so a filter that latched off the previous item's kind fails one of the two; explicit `add sym.txt` refusing with the symlink wording and tracking nothing; the wedge-recovery chain (pre-tracked symlink -> commit names `zit rm` -> rm -> commit succeeds -> status clean); and a `clean --dry-run` contract-partner guard that was green before the fix and stays green through it, proving clean still lists a symlink as an extra after the `Extras` type change. A unit assertion in `extras.zig` pins the tag itself, and `commitNotRegular`'s renderer test covers both branches.
Two pre-existing e2e expectations changed, both because they encoded the bug or its wording:
- `cli addremove B-addremove-2` asserted the ADDED set was byte-identical to `zit extras`, symlink included. That identity IS the defect. It now asserts the add set is the extras set MINUS symlinks, and additionally that the symlink remains an extra. - `cli add B-add-5` asserted the fifo-generic wording for a named symlink. It now asserts the symlink-specific wording.
Four `commit` invocations inside the new B3 tests use `runCommitEnv` with an explicit user rather than bare `runZit`; the isolated e2e environment has no resolvable author, which is a harness requirement, not a behavior change.
TEST EVIDENCE
In this worktree at the committed tree: `zig fmt --check .`, `zig build`, `zig build test`, `zig build e2e` (417 tests) and `zig build dst` each exit 0 — full battery, no filtering. Pre-fix the four B3 repro tests failed and the `clean --dry-run` guard passed, as designed.
No borrowed technique: the entry-tag shape is original to this change. No performance claim is made. by dmestas on 2026-07-19 15:07:32.
C add/addremove/commit:\srefuse\ssymlinks\sconsistently\s(blocker\sB3)\n\nA\ssymlink\sanywhere\sin\sthe\scheckout\spermanently\swedged\s`commit`.\s`extras.zig`\nclassifies\sa\ssymlink\sas\san\sextra\s(B-extras-9),\sand\sthe\srecursive\s`add\sDIR`\s/\n`addremove`\spaths\sreuse\sthat\ssweep\sas\stheir\sadd\sset\swithout\sre-applying\sthe\nkind\stest\sthat\sexplicit\s`zit\sadd\ssym.txt`\sand\s`commit`\sboth\sapply.\sThe\nrecursive\spath\stherefore\sTRACKED\sexactly\swhat\sthe\sdirect\spath\sREFUSED:\safter\n`zit\sadd\s.`,\severy\ssubsequent\s`zit\scommit`\sdied\swith\s"cannot\scommit\n'sym.txt':\snot\sa\sregular\sfile",\s`zit\sstatus`\scalled\san\son-disk\sfile\smissing,\nand\sthe\sonly\sway\sout\s(`zit\srm\ssym.txt`)\swas\snamed\snowhere.\s`add\s.`\sis\sthe\ndocumented\swhole-tree\sworkflow,\sso\sany\srepo\scontaining\sa\ssymlink\swas\sstuck.\n\nWHAT\sCHANGED\n\nConsistent\srefusal:\s0.1.0\sdoes\snot\sversion\ssymlinks,\son\severy\spath.\n\n1.\s`extras.Extras`\sentries\swiden\sfrom\sa\sbare\spath\sto\s`Entry{path,\sis_symlink}`.\n\s\s\sThe\ssweep\salready\slstat-classified\severy\sentry\s(`resolveKind`);\sthe\sverdict\n\s\s\snow\srides\sout\son\sthe\sentry\sinstead\sof\sbeing\sre-derived\sby\scallers.\sThat\sis\n\s\s\sthe\spoint\sof\sthe\sshape:\s`add`\sand\s`addremove`\sdo\sNOT\sre-stat\sswept\sitems,\n\s\s\sso\sthe\stwo\spaths\scannot\sdrift\sfrom\sthe\sdeep\smodule's\sclassification\sagain\s—\n\s\s\swhich\sis\sthe\smechanism\sof\sthis\sbug.\sOrdering\sis\sunchanged\s(sort\sis\sby\n\s\s\s`path`;\s`is_symlink`\snever\sparticipates),\sand\severy\spostcondition\sassert\sis\n\s\s\spreserved.\n\n2.\sThe\sfive\s`items()`\sconsumers\ssplit\sby\srole.\s`extras`\sand\s`clean`\signore\sthe\n\s\s\stag\s—\senumerating\sverbs\sdo\snot\sjudge,\sand\sa\ssymlink\sstays\sa\slistable,\n\s\s\sdeletable\sextra.\s`add`'s\sdirectory\ssweep\sand\s`addremove`'s\sinsert\sloop\n\s\s\sfilter\son\sit.\n\n3.\s`classifyPath`'s\scatch-all\s`else\s=>\s.not_regular`\ssplits:\s`.sym_link`\sgets\n\s\s\sits\sown\s`Outcome`\sand\sthe\swording\s`symlink\s(not\sversioned\sin\s0.1.0)`;\sa\n\s\s\sfifo/socket/device\skeeps\s"not\sa\sregular\sfile".\sThose\sare\snot\sthe\ssame\n\s\s\srefusal\sand\smust\snot\sread\sas\sone.\sThe\swording\sis\sone\sshared\sconst\sso\sthe\n\s\s\sexplicit\srefusal\sand\sthe\srecursive\sskip\snotice\scannot\sdiverge.\n\n4.\s`commit`'s\s`Capture.not_regular`\scarries\swhether\sthe\sentry\swas\sa\ssymlink,\n\s\s\sand\s`commitNotRegular`\srenders\sthe\srecovery\sfor\sthat\scase:\s"run\s'zit\srm\n\s\s\sPATH'\sto\sstop\stracking\sit".\sThis\sis\show\srepos\salready\swedged\sby\sa\spre-fix\n\s\s\s`add\s.`\sget\sout;\sthere\sis\sno\smigration\scode\sand\snone\sis\sneeded.\n\nREPORTING\sDECISION\s(stated,\snot\simplied)\n\n`add`\sprints\seach\sskip\sto\sstderr,\salongside\sits\sexisting\salready-tracked\nnotice:\sadd's\scontract\sis\sper-argument\sfeedback.\s`addremove`\swithholds\nsymlinks\sSILENTLY.\sIts\sreport\sis\sa\stwo-channel\sADDED/REMOVED\sledger\sof\sstate\ntransitions,\sand\sa\sskipped\ssymlink\sis\sa\snon-transition;\sgrowing\sa\sthird\snotice\nchannel\sthere\swould\schange\sthe\sshape\sof\sa\sreport\sother\stooling\sreads.\s`zit\nextras`\sis\sthe\sverb\sthat\sshows\sthe\ssymlink\sis\sstill\spresent\sand\suntracked.\n\n`status`\sneeded\sno\schange:\spost-fix\sthe\ssymlink\sis\ssimply\suntracked.\n\nTESTS\n\nFive\se2e\sregressions,\smarker\s`//\sREGRESSION\sB3:`:\sthe\sbreakdown\sdoc's\srepro\nchain\sverbatim\s(init/add\s./commit/status/extras);\san\s`addremove`\svariant\swith\nsymlinks\ssorting\sBOTH\sbefore\sand\safter\sthe\sregular\sfile\sthe\ssweep\salso\syields,\nso\sa\sfilter\sthat\slatched\soff\sthe\sprevious\sitem's\skind\sfails\sone\sof\sthe\stwo;\nexplicit\s`add\ssym.txt`\srefusing\swith\sthe\ssymlink\swording\sand\stracking\snothing;\nthe\swedge-recovery\schain\s(pre-tracked\ssymlink\s->\scommit\snames\s`zit\srm`\s->\srm\s->\ncommit\ssucceeds\s->\sstatus\sclean);\sand\sa\s`clean\s--dry-run`\scontract-partner\nguard\sthat\swas\sgreen\sbefore\sthe\sfix\sand\sstays\sgreen\sthrough\sit,\sproving\sclean\nstill\slists\sa\ssymlink\sas\san\sextra\safter\sthe\s`Extras`\stype\schange.\sA\sunit\nassertion\sin\s`extras.zig`\spins\sthe\stag\sitself,\sand\s`commitNotRegular`'s\nrenderer\stest\scovers\sboth\sbranches.\n\nTwo\spre-existing\se2e\sexpectations\schanged,\sboth\sbecause\sthey\sencoded\sthe\sbug\nor\sits\swording:\n\n-\s`cli\saddremove\sB-addremove-2`\sasserted\sthe\sADDED\sset\swas\sbyte-identical\sto\n\s\s`zit\sextras`,\ssymlink\sincluded.\sThat\sidentity\sIS\sthe\sdefect.\sIt\snow\sasserts\n\s\sthe\sadd\sset\sis\sthe\sextras\sset\sMINUS\ssymlinks,\sand\sadditionally\sthat\sthe\n\s\ssymlink\sremains\san\sextra.\n-\s`cli\sadd\sB-add-5`\sasserted\sthe\sfifo-generic\swording\sfor\sa\snamed\ssymlink.\sIt\n\s\snow\sasserts\sthe\ssymlink-specific\swording.\n\nFour\s`commit`\sinvocations\sinside\sthe\snew\sB3\stests\suse\s`runCommitEnv`\swith\san\nexplicit\suser\srather\sthan\sbare\s`runZit`;\sthe\sisolated\se2e\senvironment\shas\sno\nresolvable\sauthor,\swhich\sis\sa\sharness\srequirement,\snot\sa\sbehavior\schange.\n\nTEST\sEVIDENCE\n\nIn\sthis\sworktree\sat\sthe\scommitted\stree:\s`zig\sfmt\s--check\s.`,\s`zig\sbuild`,\n`zig\sbuild\stest`,\s`zig\sbuild\se2e`\s(417\stests)\sand\s`zig\sbuild\sdst`\seach\sexit\s0\n—\sfull\sbattery,\sno\sfiltering.\sPre-fix\sthe\sfour\sB3\srepro\stests\sfailed\sand\sthe\n`clean\s--dry-run`\sguard\spassed,\sas\sdesigned.\n\nNo\sborrowed\stechnique:\sthe\sentry-tag\sshape\sis\soriginal\sto\sthis\schange.\sNo\nperformance\sclaim\sis\smade.\n
D 2026-07-19T15:07:32.886
F .fossil-settings/ignore-glob 3580f973d7097226f91a27c7b61ec13d9d07880d95549f9b90ce86da5d867a23
F .github/workflows/ci.yml 6d343370ac09cc6826509b7c22e045fd7c8b2272504ced464c382a24588d0878
F LICENSE 702ae7ff835a2a971dae11c5cae039803bf394b77a6d8ec9f18693e449eaaf26
F README.md 62e1f936cc2ea0e33d717539bdffd6126a639843069bd6256359f2b15cb06232
F build.zig 43c12a0eaffed3817646b3021862ee1add3b8536a85b531b7cf55319c3b0e95e
F build.zig.zon 0eade544d4d7fc5a620348c6f29cc9219ff8c6d6377a05e756ca89860a524781
F docs/rfcs/draft-fossil-artifact-format-00.txt a6d542a5effeb41d0ea1e916058ccdc0a5819787f167ef1ebad7814f5680e7ad
F docs/rfcs/draft-fossil-delta-format-00.txt d8025d6d75322e33887c3334a4b9cc729960028b3c994ed01e5a474e4b388fd2
F docs/rfcs/draft-fossil-repo-state-00.txt fd413bcb28001a8a07009ca0c769cfe666394ba79dd4f14a6461f2b592049595
F docs/rfcs/draft-fossil-sync-protocol-00.txt aa55791464a54ef4b651df8780ba5c46e95c723c7997d09a5b727fef658f920a
F scripts/mirror-export.sh cc1130129e3c320cb9c1c5a05f505e45ece23d6bb3e0228da8e7ffe97bd5612b x
F src/annotate.zig 0a6b6728099e63c84681d1e5228ebb45fafb55d65df1720358247fd6e6532c63
F src/artifact.zig c630afd9fbbcfaccd7b823105b4d05db1dc85b6af03080a6d58635ed064672ca
F src/artifact_fuzz.zig 8bb359ddfe790818e109a1dd7ac0c1b5cec1a8fdc556f37e73504cdb7f933e17
F src/artifact_test.zig da999476660f7e6e1f50ed9da5c30f1c83d6b358e2cfcd265c6932959c85bdd1
F src/bisect.zig 7bfc45d3e0e339017826941463cc4e9118892d2898fbcd319e6e6ca85c4d3301
F src/checkout.zig ac48e76f22c8065f70d2a827ae00ffb99887af80950a93c1a3451a9a1ad0f403
F src/ci_test.zig 98f79b658d4840ba4807a79b5cc697cd1417015b2fc6521d6b21ba283310cf86
F src/cli.zig ae2ec7787850f9969ba32c4d0453e5eb1359eefe25f1cc2b252ecd95735840f6
F src/container.zig cef1028531f2763f94248b761c8779a1884e44bb854b8c45617494e3ead40e61
F src/container_test.zig a013652b1ed181161d3ad8fc9d8f052f7c27b61e129662632ceaf8cf189445ec
F src/delta.zig e8f3a6297d47549aea146222732ccf514c39688414f0a74ba396ac91066686f3
F src/delta_fuzz.zig 9e0d8dbb8c82ca0ba1a80974c076e74e4f37072b21a10812efd5539875904719
F src/delta_test.zig b18d97e117dce8fbcc05bff6f6954effdb946bab6d36337efbe5ef64d10646a0
F src/dst.zig 7a2e9e522066e5e052090da4b175f8fa5ea51452d30c019b5f46079034fd2f79
F src/e2e.zig ea7df33b9352a9d98bb0dcb27f207cc44b42f8f48bd83d704647527583647cf9
F src/extras.zig d7b6ec8caa95993ce01c4ed9ddd0cda327db823bdbde4e27dff4966591be25f5
F src/fuzz_tests.zig 1074473ceb2aba56872e79607ecd4eb19f07be0d2c6c749e19a02ee2db8570d9
F src/logstore.zig a26e7b006f335b0bbb9bb41ac702ea42fab1c5b4ce9b13c7d25a89c84197aed0
F src/logstore_benchmark.zig e245474e1cc4f10617866f718aab3958f13b256c609b3e5fd562f500668388c0
F src/logstore_fuzz.zig 67b7bda806397f92c3b07c94854d9fafca56710090071a1c1c8ec94d137408f8
F src/logstore_test.zig a9baaee2cf009c988832d3632f52a1eeabf36afd52c891315f7673ce28442533
F src/main.zig af0a7b673d0dccaa146aa71172ee7f4c544dc80bb26841f62262cae5b0427e09
F src/managed.zig 81ccc2d6321fe3dff91f653305ae4e73bea0b3fae7db2ab2f0cf168d9518d601
F src/merge3.zig 7fc52445688751bb8af30462549650660bcdbadabef54d892b6505d628248d0b
F src/merge3_fuzz.zig 83dcd4d9f2f9c208baa15e79ceeea80a0ebf47456a9b045f6d1c1efe3a927582
F src/pack.zig 0ea96cb540b3f43f6ff8ce95a3044ce939879bc6f9bf0eb82b26aab4089009c7
F src/packaging_test.zig b802ada92f1ade1b62e3d1cfc36549c9b8d05be5430bd33d440bc93d7cd3600f
F src/repocache.zig aae232a6b1b86e27c5242c0ee17ce9f2544299d99cf4936d8c2c9000e3166884
F src/repoimage.zig 7d2dc2f3c145e10e2d9ba6997705fd61a0cc0aedde8e171c253163d1279ccdd5
F src/repository.zig 79ffa239b0a37eea0b3161040f045d6ca8c656331c29925f078ac87213a12476
F src/repository_test.zig 17bdf4c7042f846f928570a47821035f936238f70f3d61d8d2ea3729d5f58868
F src/repostate.zig b4944efab53752f12da2871b2bc46251dbdacd4fcba27e38c61c4fe4d40d1df1
F src/repostate_test.zig e5699688b0f43b7480ed5d89f11585c2f61114bbe3ec9dae5061741f37b37e7a
F src/repoview.zig ec2958e1e8fd955c761d240ab80c3b3f62e3473991713c25ed5a603df984e403
F src/rfc_vectors/artifact_a1_1_sha1_manifest.txt 82d8fc78b3fbf85efe80cb05e79db40c910bf0551e55b728c6f9c2ca7a42ddb6
F src/rfc_vectors/artifact_a1_2_sha3_technote.txt 832e850f83aab2e2a754aa97591109f7f05fb41e4126c7e71c88a59d6d17e55d
F src/rfc_vectors/artifact_a3_rcard_manifest.txt 47e412ef211f095e93275fadf527909e581eef42357d8437fc7e299bfc3e62a7
F src/rfc_vectors/sync_a1_round1_reply.txt 638813029b10f81303b88859279afb17095d7c779c993f4267870909acabbeb9
F src/rfc_vectors/sync_a1_round2_file_cards.txt 4fa397741f7521cc4181d5d6b04dc143187f57602384eaa688552115ecda27c2
F src/rfc_vectors/sync_a1_round2_reply.txt af956808190c79b37a384041690c36b78845b471d6c6c01d1cced6e3ee92e6b1
F src/rfc_vectors/sync_a2_reply.txt aa130a127cde210f793c7842960083c765e0ffc7b673374fabc8f0edfe03d763
F src/root.zig c0e74897f57db81c0e4ce57bb992f4fbf52139234317ca00698a2af0c1c1c9b3
F src/serve.zig a072735c12410c63d1d5ace84d7ddf30b84639848ba420207e2432e5b7dcbc27
F src/serve_fuzz.zig 3c39ea768ffa37599e2cc00c588f053870766ab91500aceb0d844a4322174687
F src/sim/faulty_file.zig 8e8a0325d0e987d1dd306588f910af5302e6456561eefae92c73c424fc1a9c94
F src/sim/gen.zig 0e237af570a73bc78e9a717a8ea59867611deb2348287765826ea4ff1942528b
F src/sim/net.zig 8fb057012ce0a33f67c928cd696bc2761fea8ba4012b2daa33871b2ba5dfe772
F src/sim/oracle.zig 04b81d9472a0529d9e9d030779304c3d6c930f4db20b800ae3f9cbc5c178969a
F src/sim/storage_sweep.zig 5472d632347079fb5c7e7ae300b46c6e8202b91202b1c51b181dd3c7bab8a306
F src/sim/sync_gen.zig 238d46942915b5c0e989dfc738b5927b5228468ea123e6f17b6fb593aa5cbf6e
F src/sim/sync_sweep.zig 5458a84be08823d2d0fc9464665f1c3f3f26563185dc9ae24cf73259faa5d40e
F src/smoke.zig d3aecf12565618a6b678eeff534230c88dbe5a02486beafcdbdf1eac9b258292
F src/storage.zig 512205eb629d5af8d50ad336f1ef49f53b455abd52ee2f9b56d20893cafad39f
F src/storage_benchmark.zig 871f00fef1a34a0b2ee7b9656a217a0cf52949fdd710b642a44dc6bf12d6866e
F src/sync.zig b04119b2679887c6705ed4831899ca1911ca20afe0bac865022ac8b7ad879194
F src/sync_benchmark.zig 9a4542401c880750ff6565a2ca9f1d116341d1c5af704ef4a05c2732eeec8849
F src/sync_driver.zig 722ed498ea6b76900661a085d4257e51f6416d43ac1185e8ac15140de265f67e
F src/sync_driver_test.zig b50450d2938fc60aa90cd9067fc45141a965b63dc2194f42d5109919e380d7df
F src/sync_fuzz.zig 3f419ec3e3c0b4ecf99376e46d111c4fae9826d08f9968e649ffdf84d10f9e61
F src/sync_test.zig b47b05d3defeef61a02c9c9817b66288c48430713737c946734dba151bb17e7e
F src/transport.zig 4652b2ab7f43ccd8af5ca6ef7604f8e7cd28353450b1ec90d206b881308f8b5f
F src/transport_fuzz.zig adc4ea5e22f821d868ffa57e3aafd42834f358b26d4b317cd6dbe8c76c6f733b
F src/undo.zig 2e213cbe02118e37b11554620b285deae5dbf5b4d8009ae6dc229b84375b7591
F src/update.zig 0103da3d0ea12ce5710fd4268f432a52a0fb07ea7cb2ebe14af6e52395eb598c
F src/update_test.zig c06e5fb6da0b1b7aa055fb2398bd03844e0dbec67ed97905135db1dffb8a2a14
F src/warmread_benchmark.zig 9421986d49deff3f720e491fb6d1c7162dc9322f4e67dd14198820c3992dc02a
P bdb49cc5ca43a6417de28de5fb026f2c184b5fb3ce8631b8ca00e271b5bc48e6
R 2a2b52d4fc720377587e988f210883c7
U dmestas
Z 3b4b70898c8afebeb4588bfd250b9c6e