Skip to content

feat(ports): systemd user unit service manager on Linux - #861

Merged
V3RON merged 14 commits into
task/831from
task/832
Oct 22, 2026
Merged

V3RON merged 14 commits into
task/831from
task/832

Conversation

@V3RON

@V3RON V3RON commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Closes #832

Status

Implement: done (Tests line green), audit done Review: passed (round 2) Hardware: n/a Gate: waiting for the stack
Next: stack gate

Done when

  • pnpm test:changed passes (src/ports/service-manager.test.ts adapter test, src/cli/index.test.ts Linux install test and win32 usage error) with the Tests line, and simlock daemon install and uninstall a LaunchAgent on macOS, and starts go through it #830's Tests lines still pass, except its linux usage-error case (win32 stays a usage error).
  • (website reference/cli.mdx, worker/running-the-daemon.mdx) docs/CLI.md documents the Linux unit path, the keys, the hint, linger and what the last logout does without it.

Assumptions

  • Assumption: the unit's Description= — simlock <role> daemon, so a gateway unit does not claim to be a worker; the spec shows simlock worker daemon.
  • Assumption: docs/CLI.md and docs/EVENTS.md do not exist — the website pages under website/src/content/docs/ and docs/internal/EVENTS.md stand in, as in The daemon stops cleanly on SIGTERM, and a start beside a running daemon exits 0 #829 to daemon status shows the service, and doctor reports a broken one #831.
  • Assumption: a failed daemon-reload in uninstall — the unit file is restored, so the failure table's "unit file left in place" holds for both uninstall calls and a retry still finds it.
  • Assumption: when the login name cannot be read (a uid with no passwd entry), the linger hint prints loginctl enable-linger <user> and install still exits 0; the name is read only for that hint.

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 1 fixed, 1 notes. Claims review: 1 blocking, 1 fixed, 0 notes.
Rounds: 2. Tokens: 14.3M.
Runs: 10. Cost USD: 3.75. Agent seconds: 1936.
Assessment: complete

Written by an agent.

@V3RON
V3RON added this pull request to stack #843 October 22, 2026 06:26
@V3RON

V3RON commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: b4dbe38
Round 2: 34a1002

Runs: 10. Cost USD: 3.75. Agent seconds: 1936.
Tokens input 316, output 94376, cache read 7744825, cache write 532831.
- build implementer: claude-sonnet-5-5 511 s $0.8636
- audit implementer: claude-sonnet-5-5 432 s $0.4136
- review 1 reviewer: claude-sonnet-5-5 345 s $0.2641
- review 1 spec: claude-sonnet-5-5 33 s $0.1896
- review 1 code both: claude-opus-5-5 242 s $1.1607
- review 1 claims: claude-sonnet-5-5 45 s $0.2034
- fix 1 implementer: claude-sonnet-5-5 118 s $0.1945
- review 2 reviewer: claude-sonnet-5-5 129 s $0.1511
- review 2 reviewer code: claude-opus-5-5 64 s $0.2374
- review 2 reviewer claims: claude-sonnet-5-5 17 s $0.072
Finding outcomes: {"duplicate":1,"fixed":2,"nonblocking":1}. Classes: {"cli.mdx shows launchd output only for Linux-shared commands":1,"documentation: claim must match behaviour":2,"userInfo() throws without passwd entry, every command":1}.
{"findings":[
{"id":"R1","role":"code","class":"userInfo() throws without passwd entry, every command","outcome":"fixed","path":"src/cli/index.ts","round":"1","fix":"34a10024eda58d431f9b46213efe18835b0a7881"},
{"id":"R2","role":"claims","class":"documentation: claim must match behaviour","outcome":"fixed","path":"website/src/content/docs/docs/worker/running-the-daemon.mdx","round":"1","fix":"34a10024eda58d431f9b46213efe18835b0a7881"},
{"id":"R3","role":"code","class":"documentation: claim must match behaviour","outcome":"duplicate","path":"website/src/content/docs/docs/worker/running-the-daemon.mdx","round":"1","canonicalId":"R2"},
{"id":"R4","role":"code","class":"cli.mdx shows launchd output only for Linux-shared commands","outcome":"nonblocking","path":"website/src/content/docs/docs/reference/cli.mdx","round":"1"}
]}

Written by an agent.

@V3RON

V3RON commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

Not blocking, not verified. Each is one reviewer's claim.

  • code: website/src/content/docs/docs/reference/cli.mdx:296,299 and worker/running-the-daemon.mdx:60 show only the (launchd) form of Service removed: and the status values; Linux prints (systemd).

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review October 22, 2026 06:51
V3RON added 3 commits October 22, 2026 08:56
daemon status --json adds the service field wherever a service manager
exists (#831); with systemd on Linux the CI runner now has one, so the
exact { status: "stopped" } match failed (CI run 39737167866).
@V3RON
V3RON merged commit 76bff42 into main Oct 22, 2026
27 of 28 checks passed
@V3RON
V3RON deleted the task/832 branch October 22, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

simlock daemon install and uninstall a systemd user unit on Linux

1 participant