Skip to content

docs(daemon): describe daemon.http_addr and install-service PATH capture - #12

Closed
peterkc wants to merge 1 commit into
mainfrom
docs/daemon-http-addr-path
Closed

peterkc wants to merge 1 commit into
mainfrom
docs/daemon-http-addr-path

Conversation

@peterkc

@peterkc peterkc commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

Documents two merged daemon changes that the docs did not cover yet: daemon.http_addr (zzet#863) and PATH capture in install-service (zzet#864).

Changes

  • docs/server.md, docs/cli.md: the HTTP address can come from --http-addr, GORTEX_DAEMON_HTTP_ADDR or daemon.http_addr, in that order, read at startup. An install-service daemon starts without flags, so it needs the config key.
  • docs/onboarding.md: install-service captures the installing shell's PATH (absolute entries only), so run it from the shell whose PATH the daemon should use.
  • docs/multi-repo.md: a commented daemon.http_addr example in the sample config. It stays commented so copying the sample does not open a TCP port.

Testing

  • All tests pass (go test -race ./...)
  • New tests added for new functionality
  • Benchmarks run if performance-relevant

Docs only. Each statement was checked against resolveDaemonHTTPAddr in cmd/gortex/daemon.go and servicePath in cmd/gortex/daemon_service.go on main. On macOS, a daemon installed with install-service from a main build had no --http-addr in its plist, listened on the address from daemon.http_addr, and had the login shell's PATH.

Checklist

  • Code follows existing patterns in the codebase
  • No unnecessary abstractions added

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

📝 Summary

Summary by CodeRabbit

  • Documentation
    • Clarified that the daemon’s HTTP address can be set with a command-line option, environment variable, or configuration file, and documented the precedence order.
    • Added configuration examples for enabling the HTTP interface and noted that leaving the address unset keeps the socket-only default.
    • Explained that the supervised daemon reads its options from configuration, including the HTTP address in ~/.gortex/config.yaml.
    • Documented that the service captures the installing shell’s PATH and should be reinstalled after PATH changes.

Walkthrough

The documentation describes daemon HTTP address sources and precedence, opt-in configuration examples, and install-service startup behavior.

Changes

Daemon HTTP configuration

Layer / File(s) Summary
HTTP address and service configuration
docs/cli.md, docs/server.md, docs/multi-repo.md, docs/onboarding.md
The CLI and server documentation describe HTTP address sources, precedence, and startup-time reading. Examples show how to set daemon.http_addr. The onboarding documentation describes service PATH capture and states that the service starts without flags.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: 🔵 Low · up to a2ba2

On systems with an absolute XDG_CONFIG_HOME, following the multi-repo example may leave the HTTP endpoint disabled. The server and onboarding docs explain the correct config location, making this a narrow, readily correctable documentation issue.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the daemon configuration and install-service PATH documentation. At 72 characters, it exceeds the preferred length of under 50 characters, but that limit is advisory.
Description check ✅ Passed The description explains the documentation changes, their technical details, and the reported validation. It is relevant to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 23ff2b7e-9861-4842-b5fe-41929df2446b
📥 Commits

Reviewing files that changed from the base of the PR and between b36a02d and bb858a4.

📒 Files selected for processing (4)
  • docs/cli.md
  • docs/multi-repo.md
  • docs/onboarding.md
  • docs/server.md

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC.

📜 Review details
⏰ Context from checks skipped due to timeout. (9)
  • GitHub Check: build-onnx
  • GitHub Check: test (macos-latest, 1.27)
  • GitHub Check: test (windows-latest, 1.27)
  • GitHub Check: test (ubuntu-latest, 1.27)
  • GitHub Check: benchmark
  • GitHub Check: trivy-fs
  • GitHub Check: build-linux-static
  • GitHub Check: lint
  • GitHub Check: govulncheck
🔇 Additional comments (3)
docs/cli.md (1)

9-9: LGTM!

docs/multi-repo.md (1)

45-47: LGTM!

docs/server.md (1)

11-11: 🎯 Functional Correctness

The supplied inspection output is truncated before showing DefaultGlobalConfigPath or LoadGlobal. It does not establish which path the config loader uses when XDG_CONFIG_HOME is set, so the documentation concern cannot be decided from this evidence.

Comment thread docs/server.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Document the XDG config path for this example. · multi-repo.md:38-46

docs/multi-repo.md:38-46
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document the XDG config path for this example.

When XDG_CONFIG_HOME is absolute, the daemon loads $XDG_CONFIG_HOME/gortex/config.yaml, not ~/.gortex/config.yaml. A user who copies this example can set daemon.http_addr in a file the daemon does not read, so the HTTP API remains disabled.

Suggested fix
-# ~/.gortex/config.yaml
+# ~/.gortex/config.yaml (or $XDG_CONFIG_HOME/gortex/config.yaml when XDG_CONFIG_HOME is absolute)

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: faaeae3e-aed9-44e4-9ad6-b694a271de4b
📥 Commits

Reviewing files that changed from the base of the PR and between bb858a4 and a2ba252.

📒 Files selected for processing (2)
  • docs/onboarding.md
  • docs/server.md

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC.

📜 Review details
⏰ Context from checks skipped due to timeout. (7)
  • GitHub Check: test (ubuntu-latest, 1.27)
  • GitHub Check: test (windows-latest, 1.27)
  • GitHub Check: build-onnx
  • GitHub Check: test (macos-latest, 1.27)
  • GitHub Check: benchmark
  • GitHub Check: lint
  • GitHub Check: build-linux-static
🔇 Additional comments (2)
docs/server.md (1)

11-11: LGTM!

Also applies to: 22-22

docs/onboarding.md (1)

241-241: LGTM!

The docs still said the daemon serves HTTP only with --http-addr, and the
install-service section listed only the XDG variables it captures.

- server.md, cli.md: the address can also come from GORTEX_DAEMON_HTTP_ADDR or
  daemon.http_addr, with flag > env > config precedence, read at startup.
- onboarding.md: install-service captures the installing shell's PATH, and the
  unit runs a bare `daemon start`, so daemon options belong in config.
- server.md, onboarding.md: name the global config path, including
  $XDG_CONFIG_HOME/gortex/config.yaml when that variable is absolute.
- multi-repo.md: a commented daemon.http_addr example in the sample config.
@peterkc
peterkc force-pushed the docs/daemon-http-addr-path branch from a2ba252 to 7bd2f9e Compare October 4, 2026 23:07
@peterkc

peterkc commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

Continued upstream as zzet#876

@peterkc peterkc closed this Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant