Repository navigation
feat(daemon): add daemon restart as an alias of daemon reinstall - #339
Conversation
Restart is the verb people reach for after a config change (and the Mac app already labels this command "Restart the daemon"). The command stays a full reinstall: rewriting the service definition is what points it at the current binary after an update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014EpZRe7yWjZunzctBs382w
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
⏱️
|
| Scenario | base | head | Δ | p | |
|---|---|---|---|---|---|
Startup/floor |
132 µs ±11% | 137 µs ±19% | ~ | 0.165 | A/A |
Startup/version |
1.51 ms ±3% | 1.54 ms ±7% | ~ | 0.143 | ✅ |
Track/daemon/pre |
1.69 ms ±5% | 1.66 ms ±14% | ~ | 0.631 | ✅ |
Track/daemon/post |
1.72 ms ±8% | 1.65 ms ±6% | ~ | 0.436 | ✅ |
Track/direct/pre |
1.72 ms ±8% | 1.64 ms ±31% | ~ | 0.739 | ✅ |
Track/direct/post |
3.22 ms ±4% | 3.11 ms ±10% | ~ | 0.353 | ✅ |
Track/direct/post-sync |
3.93 ms ±17% | 3.86 ms ±11% | ~ | 0.280 | ✅ |
Binary size: 19.2 MiB → 19.2 MiB (+0.0%).
CPU, tail latency and memory
Per exec, base → head (Δ when significant).
| Scenario | p95 wall | user CPU | sys CPU | peak RSS |
|---|---|---|---|---|
Startup/floor |
147 µs → 157 µs | 118 µs → 122 µs | 3 µs → 3 µs | 9.1 MiB → 9.2 MiB (+0.87%) |
Startup/version |
1.60 ms → 1.77 ms | 1.23 ms → 1.27 ms | 292 µs → 299 µs | 15.8 MiB → 15.8 MiB |
Track/daemon/pre |
1.82 ms → 1.78 ms | 1.38 ms → 1.38 ms | 376 µs → 323 µs | 16.6 MiB → 16.6 MiB |
Track/daemon/post |
1.92 ms → 1.76 ms | 1.40 ms → 1.35 ms | 344 µs → 341 µs | 16.4 MiB → 16.4 MiB |
Track/direct/pre |
2.00 ms → 1.86 ms | 1.39 ms → 1.35 ms | 400 µs → 372 µs | 16.5 MiB → 16.5 MiB |
Track/direct/post |
3.60 ms → 3.31 ms | 2.55 ms → 2.45 ms | 886 µs → 828 µs | 17.5 MiB → 17.5 MiB |
Track/direct/post-sync |
4.41 ms → 4.25 ms | 3.05 ms → 3.11 ms | 1.30 ms → 1.09 ms | 19.3 MiB → 19.3 MiB |
benchstat
goos: linux
goarch: amd64
pkg: github.com/malamtime/cli/perf
cpu: AMD EPYC
│ base │ head │
│ sec/op │ sec/op vs base │
Startup/floor-2 132.0µ ± 11% 137.3µ ± 19% ~ (p=0.165 n=10)
Startup/version-2 1.506m ± 3% 1.544m ± 7% ~ (p=0.143 n=10)
Track/daemon/pre-2 1.690m ± 5% 1.662m ± 14% ~ (p=0.631 n=10)
Track/daemon/post-2 1.718m ± 8% 1.647m ± 6% ~ (p=0.436 n=10)
Track/direct/pre-2 1.721m ± 8% 1.637m ± 31% ~ (p=0.739 n=10)
Track/direct/post-2 3.218m ± 4% 3.112m ± 10% ~ (p=0.353 n=10)
Track/direct/post-sync-2 3.928m ± 17% 3.858m ± 11% ~ (p=0.280 n=10)
geomean 1.435m 1.416m -1.36%
│ base │ head │
│ p50-sec/op │ p50-sec/op vs base │
Startup/floor-2 127.8µ ± 4% 130.9µ ± 5% ~ (p=0.105 n=10)
Startup/version-2 1.486m ± 3% 1.506m ± 8% ~ (p=0.218 n=10)
Track/daemon/pre-2 1.635m ± 5% 1.640m ± 4% ~ (p=0.912 n=10)
Track/daemon/post-2 1.677m ± 6% 1.623m ± 3% ~ (p=0.436 n=10)
Track/direct/pre-2 1.679m ± 6% 1.603m ± 24% ~ (p=0.631 n=10)
Track/direct/post-2 3.163m ± 4% 3.090m ± 8% ~ (p=0.436 n=10)
Track/direct/post-sync-2 3.916m ± 10% 3.834m ± 7% ~ (p=0.247 n=10)
geomean 1.405m 1.389m -1.19%
│ base │ head │
│ p95-sec/op │ p95-sec/op vs base │
Startup/floor-2 147.2µ ± 35% 156.6µ ± 37% ~ (p=0.247 n=10)
Startup/version-2 1.601m ± 7% 1.767m ± 10% ~ (p=0.089 n=10)
Track/daemon/pre-2 1.816m ± 29% 1.785m ± 34% ~ (p=0.579 n=10)
Track/daemon/post-2 1.923m ± 15% 1.762m ± 22% ~ (p=0.247 n=10)
Track/direct/pre-2 1.996m ± 20% 1.858m ± 44% ~ (p=0.739 n=10)
Track/direct/post-2 3.598m ± 11% 3.306m ± 25% ~ (p=0.481 n=10)
Track/direct/post-sync-2 4.406m ± 45% 4.249m ± 31% ~ (p=0.315 n=10)
geomean 1.593m 1.562m -1.94%
│ base │ head │
│ peak-rss-B │ peak-rss-B vs base │
Startup/floor-2 9.135Mi ± 2% 9.214Mi ± 1% +0.87% (p=0.012 n=10)
Startup/version-2 15.77Mi ± 0% 15.77Mi ± 0% ~ (p=0.697 n=10)
Track/daemon/pre-2 16.65Mi ± 0% 16.65Mi ± 0% ~ (p=0.985 n=10)
Track/daemon/post-2 16.40Mi ± 0% 16.40Mi ± 0% ~ (p=0.782 n=10)
Track/direct/pre-2 16.52Mi ± 0% 16.52Mi ± 0% ~ (p=0.668 n=10)
Track/direct/post-2 17.54Mi ± 0% 17.53Mi ± 0% ~ (p=0.468 n=10)
Track/direct/post-sync-2 19.30Mi ± 0% 19.29Mi ± 0% ~ (p=0.927 n=10)
geomean 15.55Mi 15.57Mi +0.12%
│ base │ head │
│ sys-sec/op │ sys-sec/op vs base │
Startup/floor-2 2.600µ ± 62% 3.610µ ± 57% ~ (p=0.251 n=10+9)
Startup/version-2 291.9µ ± 15% 299.3µ ± 26% ~ (p=0.280 n=10)
Track/daemon/pre-2 375.5µ ± 16% 323.4µ ± 45% ~ (p=0.912 n=10)
Track/daemon/post-2 343.5µ ± 17% 341.0µ ± 36% ~ (p=0.853 n=10)
Track/direct/pre-2 400.2µ ± 36% 371.6µ ± 55% ~ (p=0.971 n=10)
Track/direct/post-2 885.8µ ± 31% 828.4µ ± 18% ~ (p=1.000 n=10)
Track/direct/post-sync-2 1.300m ± 43% 1.087m ± 35% ~ (p=0.393 n=10)
geomean 239.4µ 235.2µ -1.76%
│ base │ head │
│ user-sec/op │ user-sec/op vs base │
Startup/floor-2 118.2µ ± 8% 121.8µ ± 11% ~ (p=0.143 n=10)
Startup/version-2 1.228m ± 8% 1.272m ± 8% ~ (p=0.353 n=10)
Track/daemon/pre-2 1.384m ± 10% 1.383m ± 6% ~ (p=0.912 n=10)
Track/daemon/post-2 1.397m ± 6% 1.353m ± 5% ~ (p=0.218 n=10)
Track/direct/pre-2 1.386m ± 8% 1.348m ± 15% ~ (p=0.481 n=10)
Track/direct/post-2 2.549m ± 5% 2.455m ± 7% ~ (p=0.315 n=10)
Track/direct/post-sync-2 3.055m ± 26% 3.112m ± 7% ~ (p=0.912 n=10)
geomean 1.172m 1.169m -0.22%
│ head │
│ sys-ns/op │
Startup/floor-2 0.000 ± ∞ ¹
¹ need >= 6 samples for confidence interval at level 0.95
Δ compares medians; ~ means no significant difference (Mann-Whitney U, p ≥ 0.05). A scenario is flagged when it is more than 10% and more than 250µs slower with p < 0.05. Startup/floor runs true, not shelltime: it is an A/A check of runner noise. Runner: linux/amd64, AMD EPYC. go1.27.1, 10 rounds × 100 execs per scenario and binary.
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
☁️ Claude Code cloud · Add daemon restart alias for reinstallAdded
2.2M tokens: 32 input · 8.2K output · 2.1M cache read · 103.2K cache write 📝 AI summaryReviewed the daemon CLI command naming and agreed that Updated View this session on ShellTime → Updated 2026-11-03 03:31 UTC by ShellTime · totals for the whole session so far · the session page is visible to its owner |
Summary
shelltime daemon restartnow runs the same command asshelltime daemon reinstall.People usually type "restart" after changing the config (for example
aiCodeOtel.enabled). The Mac app already labels this command "Restart the daemon". The command is still a full reinstall, not a plainlaunchctl/systemctlrestart. Rewriting the service definition is what points the service at the current binary aftershelltime updateor a move between Homebrew and the curl installer. A reinstall covers everything a restart would do, so the alias is safe.commands/daemon.reinstall.go: addsAliases: []string{"restart"}and changes the usage text to "Reinstall and restart …"commands/daemon.reinstall_test.go: checks that bothreinstallandrestartresolve toDaemonReinstallCommandand to no other subcommandREADME.md: the command table mentions the aliasshelltime updatestill callsdaemon reinstallitself. Doctor hints, the web setup steps and the Mac app still printdaemon reinstall, and that keeps working.Test plan
go vet ./commands/go test ./commands/shelltime daemon --helplistsreinstall, restart, andshelltime daemon restart --helpresolves to reinstallGenerated by Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.