Skip to content
suit Check-in [7ecc8d52ea]
Login

Check-in [7ecc8d52ea]

Overview
Comment:Phase 7c-2: suit install sets up the two timers, and status has a one-line form

suit install writes two timers and loads them: one starts suit-run every minute, the other starts suit tend every hour. On macOS they are launchd user agents in ~/Library/LaunchAgents; on Linux, systemd user units. Each file is written with exactly mode 0644 whatever the umask. Running install again with nothing changed writes nothing and loads nothing. suit install --print shows the files and changes nothing. suit uninstall unloads the timers and removes exactly its own files. Neither touches a file that is not one of suit's own names.

Two timers stand in place of the planned single timer with a detached hourly child: the minute run stays inside its speed budget, and each job can be seen and stopped by itself.

The loader (launchctl or systemctl) is started by absolute path, never through a shell. Its path and the platform can be overridden only in the test builds; a test checks the release binary holds neither name.

suit status --line prints one short line for a status bar: suit ok, how many things need you, or not installed. Plain suit status says whether the timers are installed.

Known gaps. If the loader fails, the files stay in place and a second install says already installed without trying to load again; that needs a retry and a line in the attention file. The Linux units are checked as text and as loader arguments on macOS; systemd itself has not run them.

Found by the local gate before this check-in: an analyzer report, tests that needed a user name, and timer files written with the wrong mode under a strict umask.

1269 unit checks, 428 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 23 source files. No suite has fewer cases than at the last check-in.

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7ecc8d52eaf57ac6eb552781068ba831c8d44ec73fa09b6dd7b86092757f7a6f
User & Date: dmestas on 2026-11-14 06:52:19.609
Other Links: manifest | tags
Context
2026-11-14
10:41
The test gate runs in half an hour, not eighty minutes, and loses nothing

make check now runs the unit program and the four shell suites side by side, each to its own log, then prints them in the fixed order and fails if any failed. JOBS=1 gives the old one-after-another order, and a machine with fewer than four cores gets it by default. In test/store.sh the two sync fault sweeps and the clone fault loop run one worker per fault, each with its own remote and machines under a private folder of the same depth, so the same code paths run as before.

Measured on a loaded machine: make check 847 s to 276 s, make cover to 83 s, the whole four-run gate to 30 minutes.

Nothing was removed, renamed, skipped or made to assert less. The list of case names is identical before and after, the counts are unchanged, and coverage is still 100% in 23 files. No product code changed.

Two new targets. make quick SUITE=NAME runs one suite three ways: as it is, with no user name set, and under a strict umask; it is the first thing to run after touching a suite. make gate runs the whole local gate as one command.

One test fixed. a-link-already-gone-is-dropped-quietly looked for the bare text s1 in the ledger, which the scratch folder's random name can contain, so it failed about once in a few hundred runs. It now looks for the link's full path, and requires both no output and the path gone, where before any output at all let it pass.

1269 unit checks, 428 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. check-in: c3280ef4fa user: dmestas tags: trunk

06:52
Phase 7c-2: suit install sets up the two timers, and status has a one-line form

suit install writes two timers and loads them: one starts suit-run every minute, the other starts suit tend every hour. On macOS they are launchd user agents in ~/Library/LaunchAgents; on Linux, systemd user units. Each file is written with exactly mode 0644 whatever the umask. Running install again with nothing changed writes nothing and loads nothing. suit install --print shows the files and changes nothing. suit uninstall unloads the timers and removes exactly its own files. Neither touches a file that is not one of suit's own names.

Two timers stand in place of the planned single timer with a detached hourly child: the minute run stays inside its speed budget, and each job can be seen and stopped by itself.

The loader (launchctl or systemctl) is started by absolute path, never through a shell. Its path and the platform can be overridden only in the test builds; a test checks the release binary holds neither name.

suit status --line prints one short line for a status bar: suit ok, how many things need you, or not installed. Plain suit status says whether the timers are installed.

Known gaps. If the loader fails, the files stay in place and a second install says already installed without trying to load again; that needs a retry and a line in the attention file. The Linux units are checked as text and as loader arguments on macOS; systemd itself has not run them.

Found by the local gate before this check-in: an analyzer report, tests that needed a user name, and timer files written with the wrong mode under a strict umask.

1269 unit checks, 428 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 23 source files. No suite has fewer cases than at the last check-in. check-in: 7ecc8d52ea user: dmestas tags: trunk

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

Changes
Added docs/install.md version [75b852b23e].
Added src/install.c version [6d32815bfa].
Added src/install.h version [0d09665ae6].