Artifact 6eb6349a1d145b6f8937adbc6d5bb5c5ba6e73d2567c2434bb4f0b925edb8f88:
- File
docs/decisions.md
— part of check-in
[3f905be4f2]
at
2026-11-12 21:17:36
on branch trunk
— Every branch of suit's own code is tested, and the gates that keep it so
make cover fails unless every function, line, region and branch in src/ is run by a test. Every system call goes through a wrapper in platform.c that a test build can make fail, so failed-call branches are tested too. The release binary carries none of that code, and a test checks it.
Also: ensure() for invariants, a wider warning set as errors, the clang static analyzer, a second fuzz target for the stamp reader, a replay binary for saved fuzz inputs, a release build that the speed budget now measures, and make ci for the forge's Linux runner: the suite under gcc's sanitizers, then under a pinned Fil-C.
210 unit checks and 214 shell cases. The no-change run measured 0.56 to 0.60 ms over an empty program with the release build.
The Fil-C run and the Linux build have not been run yet. They run first on the forge's runner.
Decisions recorded: the wardrobe is two repositories, libfossil is used through its C API with suit's own file writer, and where each gate runs. (user: dmestas, size: 5342) [annotate] [blame] [check-ins using]
Decisions
Settled on 2026-11-12. Each has a short reason. A change to one of these gets its own dated entry below the table, with what changed and why.
| Question | Decision | Why |
|---|---|---|
| Language | C23, one binary | No runtime to install. The compiler on macOS builds it today. |
| Dependencies | None to install. SQLite, libfossil, zlib and TLS are compiled in. | Version control inside the tool is worth more than the smallest binary. |
| TLS | OpenSSL first, behind an interface of connect, read, write, close | A client written from the RFCs can replace it later without touching the rest. |
| Version control | Fossil, through libfossil's C API. Remote on zeitforge. Worked on with zit. | Merge keeps a local edit through an upstream update. Tested. |
| Name | suit for the tool, wardrobe for the repository | Reuses the first version's name, content and design record. |
| Harnesses | Described as data in the wardrobe. No harness code in suit. | Every other tool has a fixed list of harnesses. |
| Anything a harness must do itself | A need: a prompt its own agent follows, with a test | Keeps suit ignorant of harness formats. |
| Scopes | Enterprise, User, Project shared, Project personal, with machine and harness limits | See vocabulary.md. |
| Editing | In place, in the store. Suit checks edits in and syncs them hourly. | Editing where you find it is what people and agents already do. |
| Files a harness rewrites | Recorded into the wardrobe when they change, per machine | The harness stays in charge and there is still history. |
| Status lines and hooks | In the wardrobe. Registered once to a slot, then changed by linking. suit hook dispatches hooks. |
One registration, no later edits to a harness's settings. |
| Upstream updates | Wait for review by default. trust = auto per upstream. |
A skill is instructions to an agent, so a change from elsewhere is untrusted input. |
| When suit runs | A timer, every minute. Heavy work hourly, in a detached child. | Nothing installed in a harness. No agent waits on it. |
| Speed | The no-change run costs at most 1 ms more than an empty program built the same way, writes nothing and opens no database. The build fails otherwise. | Starting a process costs about 6 ms under load, so the budget is relative. |
| First harnesses | Claude Code, Codex, pi | Proven in a scratch home folder before any real folder is touched. |
| One binary or two | One | A 3 MB binary starts about 1 ms slower than a 33 KB one. Not worth a second program. |
2026-11-12: the speed baseline is an empty program, not /usr/bin/true
The speed budget was measured against /usr/bin/true with a limit of 1 ms.
It is now measured against build/empty, a program whose main returns 0,
built with the same compiler and flags as suit, with a limit of 1 ms.
/usr/bin/true is still printed, for information only. Reason: a system
binary starts 0.6 to 1.5 ms faster than any binary we build on macOS (a
byte-for-byte copy of /usr/bin/true is already 0.4 to 1.0 ms slower than
the original), so the old baseline measured macOS and not suit. The test
compares within the same round and takes the median of the per-round
differences, because run-to-run noise at this machine's load is large.
Measured in phase 1: 0.92 ms quiet and 0.94 ms loaded over the empty program (0.65 to 0.76 ms in earlier runs). About 0.28 ms of that is binding 47 libc symbols at launch, so the cost grows with what is linked in. The one-binary decision is to be re-measured in phase 2, when SQLite, libfossil, zlib and TLS are linked. If the no-change run then exceeds 1 ms, the fix is a small front program for the timer and the hook dispatcher, not a looser budget.
2026-11-12: the wardrobe is two repositories
Your config is split into a public wardrobe (skills, agents, commands, outfits) and a private one (instructions, files recorded from each machine, anything personal). The lint that rejects token-shaped values does not catch account ids, names or local paths, which the instruction file and recorded settings contain. Wardrobes already stack, so this adds no mechanism.
2026-11-12: libfossil is used through its C API, with suit's own file writer
Pinned to trunk check-in f2983dcd78, with SQLite 3.55.0. Three facts from reading libfossil's source decided this:
- libfossil writes working-copy files in place: it truncates, then writes. A reader could see an empty or half-written file. Suit installs its own storage through fsl_cx_ckout_fs() and writes beside the file, then renames. Only the C API offers that.
- An update merges into a file that has local edits and writes conflict markers into it. Suit therefore checks local edits in first, runs the update as a dry run, and applies it only when the dry run reports no conflict.
- HTTPS is compiled in only with OpenSSL, and no test in libfossil's tree exercises it. A clone from zeitforge over HTTPS worked by hand. HTTPS under Fil-C is untested and is a named risk for the sync phase.
2026-11-12: where each gate runs
The forge's Linux runner has gcc and no clang. On every push it runs the
suite under gcc's ASan and UBSan and then under Fil-C (make ci).
Coverage, static analysis, live fuzzing and the speed budget need clang
and run on the development machine before a check-in (make all).