Repository navigation
fix(setup): report failed user service installs - #699
vladimirrott merged 3 commits into
Conversation
vladimirrott
left a comment
There was a problem hiding this comment.
Reviewed at db7b9ddc.
Danny, thank you. You closed both halves of #665, and you put the binary check ahead of every write: with no sysknife-daemon beside sysknife, the wizard now writes no unit and calls no systemctl.
I drove the real wizard (index.js --claude --no-binary --daemon-mode=user --no-prompts) in a container with stub systemctl and loginctl on PATH, at db7b9ddc and on main:
| Scenario | main | this PR |
|---|---|---|
enable --now fails |
Setup complete, exit 0 |
Setup incomplete: 1 step left, exit 3 |
daemon-reload fails |
Setup complete, exit 0 |
2 steps left, exit 3 |
| no daemon binary | unit pointing at a missing file, exit 0 | no unit, exit 3 |
| everything succeeds | exit 0 | exit 0 |
The setup suite passes in full offline (136 tests), on your head and on a trial merge with current main. I reverted install-daemon.js to main and all five of your tests failed. Then I broke one branch at a time: a start failure reported as installed, a reload failure falling through to enable, the X_OK check removed, the binary check refusing everything, the runner left out of systemctl(). Each one turned at least one of your tests red.
Nothing blocks. Merging.
Two optional notes, for a follow-up if you want them:
index.jshas a headline forsystem,noneandskip. A user service that failed to start falls back to "The daemon is not installed yet.", even though the unit exists. Auserentry such as "The user service was written but did not start." would tell the reader what happened.setup-contract.test.mjspins exit 3 at the entry point forsystem,skipandnone. A fourth case with{ mode: 'user', daemonInstalled: false }would pin your fix there too.
You have now walked every failure path of the user-mode install, which is more than most people who run it. If you look after Linux machines anywhere that matters to you, I would like to hear how SysKnife holds up there. npx sysknife-setup gets you started, and the read-only side (sysknife doctor, sysknife history, sysknife audit verify) changes nothing on the host.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The middle digit moves because `sysknife-setup` now exits 3 and writes no unit when `sysknife-daemon` is missing, where it used to print "Setup complete" and exit 0 (#699). docs/release.md counts a run that used to succeed and now fails as a compatibility break. Also in this release: fuzz targets for the daemon's trust boundary, `make install DESTDIR=`, LICENSE in every published package, required DCO sign-off, the crates.io token off the command line, SECURITY.md response times and supported versions, an assurance case, a VEX document, and Dependabot on every lockfile. Signed-off-by: Vladimir Rotariu <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Closes #665
Summary
Validation
node --test packages/setup/tests/user-daemon-mode.test.mjs— 4 passed, 1 skipped (Windows cannot check POSIX execute bits).python scripts/check_evidence_claims.py— passed.git diff --check— passed.npm test --prefix packages/setupwas attempted on Windows; the full suite hits POSIX-specific behavior and path assumptions.db7b9ddpassed all 11 checks, including the Linux Rust and frontend CI jobs, both CodeQL analyses, and the setup package tests.Assisted by OpenAI Codex (GPT-6).