Artifact 596eb55249cfbe537163e54a53c84ce9b5107a9205eed95b2090d7431197106e:
- File
README.md
— part of check-in
[27d847f693]
at
2026-11-18 16:19:19
on branch trunk
— suit syncs and clones over https
suit sync, suit clone and suit tend now work with https:// remotes. http:// and file:// keep libfossil's built-in channel.
libfossil is the private byot build 2f20f44ba4 in place of trunk f2983dcd78, approved while suit is being proven; only libfossil.c and libfossil.h differ from trunk's files. Its stream channel does all of the HTTP: request headers, Content-Length, chunked and close-delimited replies (the last only after a clean close), the reply-size limit and the timeout. suit supplies the transport: src/tls.c, over non-blocking TCP and BearSSL 0.6, now vendored.
- TLS 1.2 only, ECDHE key exchange, AES-GCM or ChaCha20-Poly1305. A server offering only TLS 1.3, RSA key exchange or CBC is refused. - The chain is verified against trust anchors and the host name against the certificate. Anchors come from the system's PEM bundle read at run time (SSL_CERT_FILE, then the usual macOS and Linux paths), or from a per-wardrobe CA file set with --ca, which replaces the bundle. No roots are compiled in and there is no way to trust anything. - A certificate file must be a regular file owned by the user or root, writable by no one else, in a folder that passes the same check; --ca refuses a symlink, and a FIFO is refused at once. - Redirects are refused, never followed, and the message names the new address. No proxy support. - Nothing is sent before the handshake has verified. The login goes out only as libfossil's login card. Commands that read the sync secret turn core files off first. - Every connect, read, write and name lookup waits in poll with a 30 s idle limit, and a whole command stops after 10 minutes. getaddrinfo has no deadline, so it runs in a forked child that is killed and reaped. - BearSSL makes no system call of its own: it is built without its own randomness or clock, and suit seeds it and gives it the time through its fault wrappers. - Exit 18 now means the secure connection failed (handshake, certificate, host name). 17 stays the network and 19 a refused login.
A per-wardrobe CA file is kept in cafiles in suit's home folder, one NAME PATH line each. suit-run is built without the network code and is unchanged at 35496 bytes; the speed budget passes. Release suit went from 2291288 to 2490024 bytes.
An independent security review found no critical or high issues. Its one medium finding, a CA file trusted without checking its owner, mode or type, is fixed here, as are its low ones: separate storage for each set of anchors, core files off, and the release check now covering every test-only switch.
Checked against a real server: an anonymous clone of this repository over https from its forge, 8.4 s, verified with stock fossil.
A new suite, test/https.sh, with 170 cases, runs local servers with test certificates made at test time, including servers that misbehave on purpose. It prints skip lines where openssl or nc is missing. A new fuzz target covers the bundle reader.
3788 unit checks (was 3669), 625 shell cases, 1153 store cases, 985 placement cases, 378 project cases, 236 usage cases, 288 curate cases, 376 curate-apply cases and 170 https cases, under clang, under gcc 16, with no user name set, and under a strict umask, in one run of make gate (76 minutes, on a loaded machine). 100% coverage in all 34 source files. Three store cases that expected "cannot use https yet" now expect the refusal for a missing certificate bundle. (user: dmestas, size: 7002) [annotate] [blame] [check-ins using]
# suit Suit makes the folders your AI harnesses read mirror your version-controlled repositories, the wardrobes (one or several, merged into one set). It is written in C23, with nothing to install beside it. It runs on a timer and contains no code for any particular harness. This is a rewrite. The first version, a TypeScript tool, is archived in `~/projects/suit-v0-archive` and on GitHub under danmestas. ## Status Built and proven on macOS and on Linux, under gcc with ASan and UBSan and under Fil-C: the build, the config parser, the no-change compare and the speed test; the store; the User scope (`plan`, `apply`, `status`, `off`, `run`) for Claude Code, Codex and pi; the machine limit; the Project personal scope, your own assets linked inside each project that has the key and hidden from git by that project's own exclude file; `suit why`; the lint in front of every check-in; and the hourly check-in of edits. Syncing a wardrobe with a remote works over `file://`, `http://` and `https://`. Not built yet: `suit install` and the timer, importing content, fetching an upstream over HTTPS, the Enterprise and Project shared scopes. [docs/phases.md](docs/phases.md) has the state of each phase. The plan and the decisions behind it are in `docs/`: - [docs/vocabulary.md](docs/vocabulary.md): the fourteen words, frozen. - [docs/decisions.md](docs/decisions.md): what is settled, and why. - [docs/evidence.md](docs/evidence.md): the measurements the plan rests on. - [docs/phases.md](docs/phases.md): the build order, each phase with its proof. - [docs/harnesses.md](docs/harnesses.md): the three harness stanzas, how to add one, the live test. ## Build C23, libc only. The platform-specific calls are all in `src/platform.c`. Output goes in `build/`. The gates and what each proves are in [docs/quality.md](docs/quality.md). ``` make # dev build: build/dev/suit, ASan, UBSan, fault injection make release # build/release/suit and suit-run: -O2 -flto, stripped, no test code make check # unit and shell tests and fuzz replay, under ASan and UBSan make cover # fails unless src/ is 100% covered make analyze # clang static analyzer, fails on any report make check-budget # the speed test on suit-run, quiet then loaded make fuzz # every fuzz target, 30 seconds each make corpus # fold the grown fuzz corpus into test/corpus (not a gate) make filc # tests under Fil-C (Linux only; tools/filc-docker.sh on macOS) make live # real harnesses through the local proxy; not part of all or ci make ci # what the Linux runner runs: check with system cc, then filc make all # every gate in that order, stopping at the first failure make clean # remove build/ ``` `make check-budget` needs `~/.claude/bin/loadgen` for the loaded run. `make cover`, `analyze` and `fuzz` use clang from `/opt/homebrew/opt/llvm` when it is there, and clang from `PATH` otherwise. `suit-run` is the program a timer starts: the no-change compare alone, which replaces itself with `suit run` when something differs. `suit run` applies the change and exits 0. SQLite, libfossil and zlib are vendored in `vendor/` and compiled into `suit`; nothing is linked but the C library. Commands: `suit plan` prints what `apply` would do and changes nothing; `suit apply` links every asset the User scope wears into each harness's folders, and every asset a `[wear personal KEY]` section wears into each project with that key, and records it in the ledger; `suit status` shows the store version, links per scope (for a project, per project), clashes, missing links, what was skipped, which machine-limited sections, user or personal, did not apply and which personal sections match no project, and whether the timers are installed; `suit why NAME` lists every place that supplies one asset for the current folder and which one is in effect; `suit off` removes every link suit still owns, and the block it keeps in a project's exclude file, and empties the ledger; `suit hooks` lists the programs linked at each hook event, and `suit-run hook EVENT` runs them (see [docs/hooks.md](docs/hooks.md)); `suit needs` says which needs are done and `suit need HARNESS NAME` prints one's prompt (see [docs/needs.md](docs/needs.md)); `suit run` applies when the stamp says something changed; `suit machine [NAME]` shows or sets this machine's name, which `[wear user machine=NAME]` sections match. `suit roots`, `suit projects scan` and `suit project set` find your projects and give each its key; see [docs/projects.md](docs/projects.md). Suit never replaces or removes what it did not make: a real file, a real folder or someone else's link at a destination is a clash, reported and left alone. Also: `suit check FILE`, `suit compare` (the no-change compare, exit 10 and the changed paths when something differs), `suit stamp PATH...`, `suit store open|status|update|repair NAME`, `suit lint NAME`, `suit commit NAME -m TEXT [--confirm-deletions]`, `suit tend [NAME]` (the hourly check-in of one wardrobe, or of every wardrobe, then a scan of the session records; see [docs/store.md](docs/store.md)), `suit back NAME`, `suit usage scan` and `suit usage [--since DAYS] [--kind KIND] [--harness NAME] [--project KEY] [--tsv]` (how often each skill, agent and command was invoked, from the session records a harness keeps; see [docs/usage.md](docs/usage.md)), `suit curate [--since DAYS] [--out FILE]` (one local HTML page that shows every skill, agent and command beside its use, with keep, limit and retire choices and a text file of them; it applies nothing; see [docs/curate.md](docs/curate.md)), `suit curate apply FILE [--yes]` (reads that file, shows what each choice changes in the wardrobes' `suit.conf` files and, with `--yes`, edits them and checks each in; the next `suit run` places the result; see [docs/curate.md](docs/curate.md)), `suit remote NAME [URL|--none]`, `suit login NAME USER`, `suit logout NAME`, `suit sync NAME` (see [docs/store.md](docs/store.md)), `suit clone NAME URL` (a wardrobe from a remote onto this machine), `suit upstream NAME take FOLDER`, `suit upstream NAME diff`, `suit upstream NAME accept [--theirs PATH] [--mine PATH]...`, `suit upstream NAME undo` and `suit upstreams` (an upstream's files, taken from a folder, reviewed, merged into trunk, and an accept reversed by a new check-in; see [docs/upstreams.md](docs/upstreams.md)), `suit install [--print]` and `suit uninstall` (the two timers that run suit by itself; see [docs/install.md](docs/install.md)), `suit status --line` (one line for a status bar), `suit bench [-n N] [-e EMPTY] [-t MICROSECONDS] [-m KIB]`. The config format is in [docs/conf-format.md](docs/conf-format.md). ## License BSD 2-Clause; see [LICENSE](LICENSE). The vendored code keeps its own terms: libfossil is BSD 2-Clause, SQLite is public domain and zlib is under the zlib license. Their license files and origins are in [vendor/README.md](vendor/README.md).