feat(homebrew): provide a managed service and safe upgrade path
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 70/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- documentation, release
Research direction
Start with the GoReleaser release config (.goreleaser.yml/.goreleaser.yaml) browsers→brews section for the engram formula and add an opt-in service do stanza using opt_bin/"engram" with serve, keep_alive true and log paths. Then update the installation/upgrade documentation (the Homebrew section) to cover the one-time unmanaged-daemon transition, brew services start/restart gentleman-programming/tap/engram, and the Brewfile restart_service: :changed route, explicitly warning that plain brew upgrade does not restart a running process. Done looks like: a rendered formula containing the service block plus a release-config regression check (e.g. a test asserting the service block survives generation).
Written by the indexing model from the issue text.
Description
🔍 Problem Description
The GoReleaser-generated Homebrew formula for engram has no service do stanza. An unmanaged engram serve can survive a binary upgrade in the old, now-unlinked Cellar path and keep port 7437 occupied indefinitely. I reproduced this after upgrading 1.20.0 to 2.0.0: lsof showed the listener still executing /opt/homebrew/Cellar/engram/1.20.0/bin/engram, although engram --version on PATH reported 2.0.0. The Pi adapter on npm latest then refused memory operations with an opaque ownership-mismatch error.
This is distinct from #279 (daemon status plus a manual launchd template), #1255 (client diagnostic, fixed on main), and #1346 (that diagnostic not yet published). The formula still provides no standard managed-service path, and plain brew upgrade engram does not restart an unmanaged daemon.
💡 Proposed Solution
- Add an opt-in Homebrew
servicedefinition in the upstream GoReleaserbrewsconfiguration (the generated tap formula must not be hand-edited). Useopt_bin/"engram"withserve,keep_alive true, and standard log paths. Do not auto-start the service at install time or terminate a listener whose ownership cannot be established. - Document the one-time transition from an unmanaged daemon (stop the old listener only after verifying it),
brew services start gentleman-programming/tap/engram, and verification through/health/CLI. Document that plainbrew upgrade engrammay leave a still-running old process; the supported post-upgrade path should explicitlybrew services restart ..., or use a Brewfile withrestart_service: :changedandbrew bundleto automate restarts. Do not imply thatKeepAlivereplaces a still-running process automatically. - Add a deterministic release-config/formula-render regression check, if practical, so future generated formulas retain the service block.
I'd like to prepare a focused PR if the maintainers approve the approach. An alternative would be a dedicated engram upgrade command, but that is a much larger and more dangerous change to process ownership.
📦 Affected Area
Other (Homebrew release configuration and installation documentation)
🔄 Alternatives Considered
- #279's manual launchd recipe works, but isn't integrated with
brew servicesand is easy to miss. - Killing the listener automatically from Pi or a post-install hook is unsafe: a port occupant without a matching instance ID must be treated as untrusted.
KeepAliveby itself cannot reload a process that stays alive duringbrew upgrade; document an explicit managed restart path instead.
📎 Additional Context
The engram 2.0.0 formula in Gentleman-Programming/homebrew-tap/Formula/engram.rb is GoReleaser-generated and contains no service do block. The old server's pre-v2 /health response lacks an instance_id; its version field is hardcoded 0.1.0, so it is not a reliable running-binary version indicator. Verify the process image path when diagnosing this case. Related: #279, #1255, #1346.
- Dominant language
- Go
- Stars
- 7.1k
- Forks
- 729
- Avg merge
- 11h 17m
- Merged PRs (30d)
- 334
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Gentleman-Programming/engram
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Gentleman-Programming/engram#1899 ·
Maintainers usually reply within 1 day
-
status:needs-review type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Gentleman-Programming/engram#1687 ·
Maintainers usually reply within 1 day
-
priority:medium status:needs-review type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Gentleman-Programming/engram#863 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Gentleman-Programming/engram#1900 ·
Maintainers usually reply within 1 day
-
status:needs-review type:bug
Difficulty 3/5 1-2 days Newbie friendliness 70/100
Gentleman-Programming/engram#1897 ·
Maintainers usually reply within 1 day
All issues in Gentleman-Programming/engram
Similar issues
-
documentation hacktoberfest priority: low skill: good first issue status: ready for dev
Difficulty 2/5 Half a day Newbie friendliness 85/100
hyperledger-labs/fabric-smart-client#2142 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
numberly/vault-db-injector#107 ·
Maintainers usually reply within 1 day
-
area/import kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
[DOC] Wrong sg_egress_ports range in the Terraform Databricks Guide for AWS Hub & Spoke with Network FirewallPossibly taken @akhil9tiet claimed this today. Opendocs
Difficulty 1/5 Under an hour Newbie friendliness 72/100
databricks/terraform-provider-databricks#6080 · 1 comment ·
Maintainers usually reply within 3 days
-
spqr-coordinator usage shows 'run --config', but 'run' is not a subcommand (unknown command "run")Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pg-sharding/spqr#3092 · 1 comment ·
Maintainers usually reply within 1 day