T5.2: Introduce autostart.Manager interface + per-platform impls

Define Manager with Set/Status in autostart.go; add concrete types
(windowsManager, linuxManager, otherManager) in the per-platform files.
Service gains a manager field wired by Open() via autostart.New();
AutostartStatus and ApplyAutostart delegate to it instead of calling
package-level functions directly. Tests that don't need autostart get a
nil manager, which is safe (no-op returns).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mixeme
2026-06-22 07:22:41 +03:00
parent a9eea8cbe7
commit 428f018fe1
8 changed files with 67 additions and 7 deletions
+1 -1
View File
@@ -278,7 +278,7 @@ Track progress here. Mark tasks complete as they land and pass review.
### Phase 5 — Hardening & docs
- [x] T5.1 — Surface errors from service + storage
- [ ] T5.2 — Introduce `autostart.Manager` interface
- [x] T5.2 — Introduce `autostart.Manager` interface
- [ ] T5.3 — Fill test gaps (folder filtering, cleanup, migration, concurrency)
- [ ] T5.4 — Run `go test -race ./...` clean on both platforms
- [ ] T5.5 — Update docs (ARCHITECTURE.md, TESTS.md, README)