Artifact 3fab80aa46f74340f281172b890c5e502da306be13c8ad7ae7e1cb9de3c1ca3c:
- File
vendor/README.md
— part of check-in
[2f274ce15b]
at
2026-11-12 22:28:09
on branch trunk
— Phase 2: the store, a working copy that is never half written
The store is a working copy of a wardrobe, kept through libfossil's C API with suit's own file writer: every file is written beside itself and renamed, so a reader sees the old file or the new one.
suit store open, status and update, suit commit and suit back. An update refuses when there are local changes, runs as a dry run first, and changes nothing if any file would conflict.
Proven here: the store is byte-identical to fossil's own checkout of a 600-file wardrobe at each version; a reader hashing files during a slowed update saw only old or new contents; an update that fails at any call leaves the old bytes and no temporary file. 100% of functions, lines, regions and branches in all ten source files.
Vendored, unedited: libfossil trunk f2983dcd78, SQLite 3.55.0, zlib 1.3.1. The release binary links only the system library.
Speed: with everything linked, suit costs 0.82 ms over an empty program quiet and up to 1.38 ms under load, which is over budget. The timer's entry point is now suit-run, a 35 KB program built from the no-change path alone, at 0.40 ms quiet and about 0.5 ms loaded. It runs suit only when something changed. The budget test is on suit-run.
Known limits, recorded in docs/decisions.md: libfossil's checkout writes symlinks as regular files, so wardrobes may not hold them; suit back undoes an update and not a check-in; and a store left half updated by a double failure has no repair command yet.
Not yet run: Fil-C and the Linux build of this phase. (user: dmestas, size: 3915) [annotate] [blame] [check-ins using]
Vendored code
Replace to update, never edit. These files are copied as they came, and every file is listed here with its origin, version and SHA-256. Vendored code is compiled with warnings off, is outside the 100% coverage rule, and is built and run under ASan, UBSan and Fil-C with the rest (docs/quality.md).
vendor/libfossil: libfossil and SQLite
Origin: the amalgamation of libfossil trunk check-in
f2983dcd7863368ed6b238957c7fccf4f1de5176 (2026-11-11), with the SQLite 3.55.0 it
is built against, made in a clean checkout of that check-in with
./configure && make. Copied from
/Users/dmestas/libfossil-writeup/suit-builds/libfossil-trunk-f2983dcd78/.
libfossil is BSD-2-Clause (LICENSE); SQLite is public domain.
Built with -DHAVE_LIBFOSSIL_CONFIG_H -DWITHOUT_ICONV, no TLS, and
-DSQLITE_OMIT_LOAD_EXTENSION so nothing links -ldl. SQLite keeps its
default threadsafe mode, because libfossil calls its mutex functions. Linux
builds add -lm -lpthread. libfossil-config.h enables only standard POSIX features
(stat, lstat, opendir, pipe, clock_gettime, compress) and
_DEFAULT_SOURCE, _XOPEN_SOURCE=700, which macOS and Linux both provide.
| File | SHA-256 |
|---|---|
| LICENSE | ae23801a01e330aa53496e078db35dc3db774230df1a92438bdb9beead2a2639 |
| libfossil-config.h | c2e5e67bc8dab750f8fe617dac5cbccffb319ab1974344d8c516aec36b7f0306 |
| libfossil.c | edacd1cee55a94feda898e218923f889e4b7ee7dd543042dd84b5e7475ac2713 |
| libfossil.h | 4c0b2304324c94e3f3963a20522180a1c61fca1e9f1f343ba830f2418a96df4d |
| sqlite3.c | 44246eb1b8775c7f4e7f5a07768f183023a2097c7e83f99fc3ea73a193497ab4 |
| sqlite3.h | 62d0f214570423c321bb845f4f3e70d23f50fa24872d327ca0722a0a096310b3 |
vendor/zlib: zlib 1.3.1
Origin: https://zlib.net/fossils/zlib-1.3.1.tar.gz, SHA-256
9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23.
Only the compression and inflate sources and headers the library needs are
kept (no gzip file functions, no inflateBack; gzguts.h stays because zutil.c includes it). zlib license in LICENSE.
It is compiled into the binary; nothing links -lz.
| File | SHA-256 |
|---|---|
| LICENSE | 845efc77857d485d91fb3e0b884aaa929368c717ae8186b66fe1ed2495753243 |
| adler32.c | 9cd1443a24ff2a3053961695bd432035c58347386a420d3388232376ebabe211 |
| compress.c | 86f802c16a965e7a28737e3730b4e576c5ba40981753967e3e30916f4dc1b4b1 |
| crc32.c | 8fd16f0a7714d51c89c2eb37eb98ec15e8a4dc57ba343e7b7398b19144039fda |
| crc32.h | 9a2223575183ac2ee8a247f20bf3ac066e8bd0140369556bdbdffc777435749e |
| deflate.c | 3b956337350f94c34987750f785587ef33d9c89ceaebb7c2afb189c956360cbe |
| deflate.h | 48baf016326d8d5e3e32ac8153cc7e22f854b8e6834830b167b998a7fb1e7989 |
| gzguts.h | 716fa648aca1bb06c219d7b97ad4846d8479206143bc39557bfd8283f5783e04 |
| inffast.c | e6ef64ce5dc0a4cd5c7ad08ceeb2b2a698b8447f6bd156057caeb2edab68c0cb |
| inffast.h | 05cc5dc9ff1da7b8b52a4bd8bda0d8a5c236a2f39efe84b941516ea13857e6c5 |
| inffixed.h | 237ba710f090e432b62ebf963bee8b302867e9691406b2d3f8ee89ee7bfef9b0 |
| inflate.c | 34c998ce0037c0537c04b03b276f680b945f9b2c9d1e01b287605bd6879f7fd2 |
| inflate.h | e8d4a51b07694bf48cb91979c19974cf6a5ab0b8a09d26ec0d14df349230673e |
| inftrees.c | 5d4f335221d2dc76f17abd2577d92c2d7baf68fa6d7f23373b360830493d1563 |
| inftrees.h | 0a0fcaf2ae2fae57426bdc06637270e9bba974f35202cadbdba479d946e6409d |
| trees.c | f63c68c16c05fcd196050529d1a0e7657960e4136b9987d90a6ac3e58a964b0f |
| trees.h | bb0a9d3ca88ee00c81adb7c636e73b97085f6ef1b52d6d58edbe2b6dc3adeb4d |
| uncompr.c | 04dca5e31b3b8a17d1806426f66f0c539f4184d657e149d40be07070c6227b52 |
| zconf.h | f5134250a67d57459234b63858f0d9d3ef8dcc48e9e1028d3f4fdcf6eae677ae |
| zlib.h | 8a5579af72ea4f427ff00a4150f0ccb3fc5c1e4379f726e101133b1ab9fc600c |
| zutil.c | 8ced40d8c88588811edd2bdb35b7439983d5e1f8e9e32b8a3b244731f3c317b7 |
| zutil.h | dddb2dc7a1dc339ecf2c8e089b366f08bb731c0839c7110240d17ce731bb4fea |