Skip to content
suit Check-in [fe29cebc6a]
Login

Check-in [fe29cebc6a]

Overview
Comment:Phase 7b-1: a wardrobe syncs with a remote, over file:// and http://

suit remote sets, shows or clears a wardrobe's remote address. An address that carries a user name or password is refused. suit login reads a secret from standard input into a credentials file of mode 0600, and suit refuses to use that file if anyone else can read it. The secret is never printed, never put in an error message or another file, and is wiped from memory after each use.

suit sync pulls, brings the working copy forward with the safe update, and pushes. When both sides have new check-ins it tries a merge as a dry run. A clean merge is checked in and pushed. A conflicting one changes no file, is pushed as a fork so nothing is lost, and is written to the attention file. No conflict marker is ever written to a live file. With local changes in the working copy the pull is kept and nothing else happens.

suit tend now continues into a sync after its check-in.

Three limits of libfossil, each handled here: its merge drops a file the other side deleted, so suit finds those itself and treats a delete against an edit as a conflict; a merge that changes no file cannot be checked in, so the files are put back and the fork stays open; and a file:// remote is reached through the stock fossil program, which must be on the path. http:// uses libfossil's own socket code and starts no other program.

An https:// address is accepted and stored, and syncing it says this build cannot use https yet. There is no clone command yet.

Also: LICENSE (BSD 2-Clause, the same as libfossil), a license section and current status in the README, and a state table in docs/phases.md.

1204 unit checks, 227 shell cases, 555 store cases, 612 placement cases and 378 project cases, under clang, under gcc 16, with no user name set, and under a strict umask. 100% coverage in all 22 source files. Seven fuzz targets. No suite has fewer cases than at the last check-in.

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fe29cebc6a6c3adc4ddd11217e2f395c3415f8d4322be9cc7a15f6f26905a4c9
User & Date: dmestas on 2026-11-13 20:38:51.035
Other Links: manifest | tags
Context
2026-11-14
00:48
Phase 7c-1: a wardrobe can be cloned onto a second machine, and one call tends them all

suit clone NAME URL makes a wardrobe on this machine from a remote. It clones into a temporary file, renames it into place, opens the store at the tip of trunk and records the remote last. A failure at any step removes what it made: no partial repository file, no store folder, no remotes line. A name already in use is refused with exit 20 and nothing is overwritten. A login saved beforehand is used, so a private wardrobe can be cloned.

suit tend with no name tends every wardrobe in name order. One wardrobe's failure does not stop the others; the exit code is the highest any of them returned, with one line for each that did not end clean.

After three failed syncs in a row the attention file names the wardrobe and the host. A sync that reaches the remote clears the count and the line.

A limit: libfossil's clone builds its own context, so fault injection cannot reach the system calls made inside the clone. The tests cover every step suit takes around it, and a bad remote covers a failure inside it.

One existing case changed: tend-usage expected suit tend with no name to be an error, which is now the behaviour above. It tests suit tend with two names instead.

1204 unit checks, 227 shell cases, 669 store cases, 612 placement cases and 378 project cases, under clang, under gcc 16, with no user name set, and under a strict umask. 100% coverage in all 22 source files. No suite has fewer cases than at the last check-in. check-in: 0c65a50c7f user: dmestas tags: trunk

2026-11-13
20:38
Phase 7b-1: a wardrobe syncs with a remote, over file:// and http://

suit remote sets, shows or clears a wardrobe's remote address. An address that carries a user name or password is refused. suit login reads a secret from standard input into a credentials file of mode 0600, and suit refuses to use that file if anyone else can read it. The secret is never printed, never put in an error message or another file, and is wiped from memory after each use.

suit sync pulls, brings the working copy forward with the safe update, and pushes. When both sides have new check-ins it tries a merge as a dry run. A clean merge is checked in and pushed. A conflicting one changes no file, is pushed as a fork so nothing is lost, and is written to the attention file. No conflict marker is ever written to a live file. With local changes in the working copy the pull is kept and nothing else happens.

suit tend now continues into a sync after its check-in.

Three limits of libfossil, each handled here: its merge drops a file the other side deleted, so suit finds those itself and treats a delete against an edit as a conflict; a merge that changes no file cannot be checked in, so the files are put back and the fork stays open; and a file:// remote is reached through the stock fossil program, which must be on the path. http:// uses libfossil's own socket code and starts no other program.

An https:// address is accepted and stored, and syncing it says this build cannot use https yet. There is no clone command yet.

Also: LICENSE (BSD 2-Clause, the same as libfossil), a license section and current status in the README, and a state table in docs/phases.md.

1204 unit checks, 227 shell cases, 555 store cases, 612 placement cases and 378 project cases, under clang, under gcc 16, with no user name set, and under a strict umask. 100% coverage in all 22 source files. Seven fuzz targets. No suite has fewer cases than at the last check-in. check-in: fe29cebc6a user: dmestas tags: trunk

12:54
Phase 7a: a lint guards every check-in, and edits made in place are checked in

suit lint and suit commit refuse a change that holds a token-shaped value, tool-attribution text, a symlink, or a skill folder with no header. A suit.lint file in the wardrobe can exempt a path or forbid an extra phrase. The lint never changes a file.

suit tend is the hourly entry point. For now it checks in edits made in the store, after the lint. A change that deletes more than five files and more than a fifth of the wardrobe is held until it is confirmed. Anything that needs a person is written to an attention file, which suit status shows under 'needs you'.

A symlink refusal now comes from the lint and exits 3, where it exited 16 before.

Also fixed, found by the forge's runner: a file suit rewrote came back with default permissions, keeping only its executable bit. On the runner a project's local exclude file went from rw-rw---- to rw-r----- across apply and off. A rewritten file now keeps exactly the permissions it had. Tests rewrite files of four different modes under two different defaults, so the development machine catches it too. Three tests that restored a folder to a fixed mode now put back only the bits they took away.

1204 unit checks, 227 shell cases, 323 store cases, 612 placement cases and 378 project cases, under clang, under gcc 16, with no user name set, and under a strict umask. 100% coverage in all 21 source files. No suite has fewer cases than at the last check-in. check-in: 6516a0e4da user: dmestas tags: trunk

Changes
Added LICENSE version [9ec539eb3e].
Added src/remote.c version [0b1c6fb557].
Added src/remote.h version [7082741499].