Homebrew tap installer, dropbear roots CLI, and tray daemon lifecycle control #22
No reviewers
Labels
No labels
agent
blocked
agent
new
agent
review
agent
working
complexity
high
complexity
low
priority
high
priority
low
priority
medium
risk
high
risk
low
risk
medium
type
bug
type
chore
type
feature
type
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tfks/dropbear!22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "add-installer-and-roots-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Polishes the bootstrap story in two workstreams (plus the tray lifecycle commit this branch builds on):
Roots management — new
dropbear roots list|add|removebacked byinternal/rootsedit, a comment-preserving daemon.toml editor (raw-byte span surgery; go-toml/v2 has no document model). Every candidate is reparse-validated before an atomic write.addcarries the[roots.init]bootstrap flags shared withregister;--restartbounces the daemon viadaemonctl. The CLI sources the daemon env file as fallback so$DROPBEAR_DEVICE_ID-style indirection validates outside the service environment.daemonconfigexportsParse,NormalizePath,StarterTemplatefor reuse by the future status-API endpoint.Homebrew installer — org tap
tfks/homebrew-tap(tap astfks/tap, formula builds both binaries from the release source tarball; the tray needs CGo so there are no cross-compiled bottles).just build::distreplaces the nonexistentbuild-releasetarget release.yaml called: per-platform daemon tarballs, git-archive source tarball, checksums.txt. A post-publish step bumps the formula url/sha256 using theTAP_TOKENsecret (warns and skips when unset).Fixed en route:
CGO_ENABLED=0cross-builds broken since the FSEvents backend (nowdarwin && cgo, fsnotify fallback)daemon installpinned brew's versioned Cellar path into the plist (StableBinaryPathkeeps the prefix symlink)Docs: new
wiki/runbooks/homebrew-install.md+wiki/runbooks/release.md; install-daemon, README, PROJECT.md updated.Verified: full test suite (race), lint, gitleaks; roots roundtrip byte-clean against a copy of the real config; formula validated with
brew audit+ real--HEADinstall +brew test.🤖 Generated with Claude Code
Replace the kqueue/fsnotify backend on Darwin with a native FSEvents stream that watches the root recursively in a single call. Confirmed with lsof: fd count is constant regardless of file count under the root, eliminating the EMFILE failure on large trees. Introduces a build-tag-selected `backend` interface inside `internal/fswatch`; the platform-neutral shell (debounce, ignore filtering, shelve suppression, single-slot wakeup) drives whichever backend is compiled in: - //go:build !darwin: existing fsnotify logic, unchanged semantics - //go:build darwin: github.com/fsnotify/fsevents v0.2.0, one recursive EventStream per root, no per-directory subscription growth Key correctness details: - Root-directory events (rel == ".") suppressed — FSEvents emits them as a side-effect of child changes; the child's event is the real signal - shouldEmitPath now walks ancestor dirs so files inside ignored dirs (node_modules/ etc.) are filtered even with FSEvents' full-subtree visibility - filepath.EvalSymlinks at New time normalises /var → /private/var so reported paths feed relPath correctly Also adds 7 tag-free shell unit tests (fake backend) and 4 Darwin end-to-end tests including a 300-file EMFILE regression. Closes the "macOS file-watcher exhausts file descriptors" entry in doc/gaps.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>424ccbdec62fb499c8c8