Artifact e9ca679a987c14ef474d0292a298a88feb28cfd4a0c9e4027c9055195a8f0bcf:
- File
docs/phases.md
— part of check-in
[2d73c831f4]
at
2026-11-16 18:00:10
on branch trunk
— An accepted upstream update can be undone, and merges use the recorded base
suit upstream NAME undo reverses the last accept by a new check-in on trunk. Every file that accept changed goes back to what it was, the record upstreams/NAME goes back to the check-in accepted before (or is removed), and the upstream is waiting for review again. History is not rewritten. A file edited on trunk since the accept is a conflict: the command lists it and changes nothing. Undo twice walks back two accepts. An undo is never followed by an automatic accept.
The merge base for an upstream is now the branch check-in the record names, or trunk's first check-in when there is no record, and no longer what the library infers from ancestry. The dry run, the merge and suit's own check for deleted files all use that one base. Because of it:
- the same update can be accepted again after an undo, and gives exactly the files it gave before; - a newer take accepted after an undo brings all of its content, not only its difference from the undone one; - after accept --mine, a later update that leaves the settled lines alone merges cleanly, where it could conflict again before. One that changes them again is a conflict, as it should be.
A take no longer mistakes a file an undo brought back for one of the owner's own. The settle writer restores a file's mode as well as its bytes.
Left: a record edited by hand to name a check-in that is not on the branch makes accept fall back to the library's common ancestor.
159 new store cases, among them the undo story both ways, undo across two machines, and undo in the fault sweep.
1473 unit checks, 620 shell cases, 1153 store cases (was 994), 846 placement cases and 378 project cases, under clang, under gcc 16, with no user name set, and under a strict umask, in one run of make gate (44 minutes). 100% coverage in all 26 source files. One existing line changed: the fault sweep's list gained undo. (user: dmestas, size: 3963) [annotate] [blame] [check-ins using]
Phases
Each phase ends with a proof. All four scopes and both limits are in the config format from the first day and are switched on in this order.
| # | Phase | Done when |
|---|---|---|
| 1 | Skeleton and the speed test: the build, the config parser and its fuzzer, the no-change compare, suit bench |
The budget test passes under load. |
| 2 | Store: open a wardrobe, keep a working copy, update it file by file, go back | The store is byte-identical to a Fossil checkout, an update never leaves a half-written file, and suit back restores the previous state. |
| 3 | User scope: links and the ledger for Claude Code, Codex and pi in a scratch home folder. plan, status, off. |
One edit to the instruction file shows in every harness, a real file is never replaced, and off leaves the folder as it found it. |
| 4 | Limits and Project personal: machine names, project discovery, the ignore block, worktrees, the winning order, joined instructions, why |
A personal skill for a project appears in it and its worktrees, in no other project and in no git status, and a clash with a committed file is reported and left alone. |
| 5 | Content: import the sx vault, hand-made skills, agents and commands. Join the instruction files after review. | The scratch home folder matches today's, minus duplicates. |
| 6 | Cut over: snapshot the real folders, apply, remove the other installers | Done after the full asset list has been reviewed. The only destructive phase. |
| 7 | The hourly pass: suit install, the timer, checking in edits, recording per machine, push and pull, repair, the status line |
An edit to a linked skill on one machine reaches another with no command run, and a conflicting edit leaves no markers in a live file. |
| 8 | Upstreams, needs and slots: fetching pinned archives, upstream branches, merge, the review gate, the status line slot, the hook dispatcher | A local fix survives an upstream update, a conflicting update waits for review, and a hook limited to one machine runs there and nowhere else. |
| 9 | Enterprise and publishing to Project shared | An Enterprise asset beats a User one of the same name, and a teammate's edit to a published file is reported and not overwritten. |
| 10 | Linux and suit upgrade |
The Linux build passes the same tests. |
State
| # | State |
|---|---|
| 1, 2, 3, 4 | Built. Proven on macOS and on Linux under gcc sanitizers and Fil-C. |
| 7 | Part built. Proven on both: the lint, the hourly check-in, held deletions, the attention file. Built: sync over file:// and http://, suit clone, suit tend for every wardrobe, the failing-sync line. Built (7c-2): suit install and uninstall (the run and tend timers on macOS and Linux) and suit status --line; proven with a fake loader in a scratch home, the Linux files only as text on this Mac. Not started: https://, recording. |
| 8 | Part built (8a): needs. suit needs, suit need, and the need items in the attention file. Proven in a scratch home. Built (8b): the hook dispatcher suit-run hook EVENT, hook slots, suit hooks. Built (8c-1): upstreams taken from a folder, suit upstream NAME take\|diff\|accept\|undo and suit upstreams (the branch, the review gate, the merge into trunk, and undo, a new check-in that reverses the newest accept, after which the update can be accepted again, since each merge is made against the check-in the record names; upstreams.md). Not started: fetching an upstream (8c-2), waiting on HTTPS; the other slots. |
| Stacking | Built: placing takes every wardrobe under the store, merged into one set (decisions.md, 2026-11-15). It unblocks phase 5, which imports content into a public and a private wardrobe. |
| 5, 6, 9 | Not started. |
| 10 | The Linux build already passes the same tests on every push. suit upgrade is not started. |
Phase 7 was started before 5 and 6 so that the cut-over lands on a tool that already keeps itself in sync.