Skip to content

feat(home): make fleet proxies automatic services, retire proxy-supervisor (#2104) - #2107

Merged
dezren39 merged 2 commits into
mainfrom
feat/proxy-automatic-services-2104
Oct 30, 2026
Merged

dezren39 merged 2 commits into
mainfrom
feat/proxy-automatic-services-2104

Conversation

@dezren39

@dezren39 dezren39 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Closes the redesign tracked in #2104. Supersedes #2092 and #2094 (both left open, unmerged): instead of removing consumers' Wants on the proxy units, this makes the named units real automatic services, so the Wants already on main (openclaw-gateway: commandcode/design-code/agy + mcpx; openchamber: clef/codex/antigravity-ls/design-code) are correct as-is — no consumer file changes needed.

What changes (home/common/default.nix only)

  • Automatic services: clef-proxy (:18742), agy-proxy (:18743), codex-proxy (:18744), antigravity-ls-proxy (:18745), design-code-proxy (:18746), commandcode-proxy (:18748) converted from manual one-off units to automatic services: Install.WantedBy = [ "default.target" ], Restart = "always" / RestartSec = 3 (agy previously Restart = "no" + labelled DISABLED; it is a live route the gateway wants, so it is a real service now).
  • New units: claude-code-proxy (:18749) and muse-proxy (:18747) — previously supervisor-config only, with no declarative unit. Muse is included so retiring the supervisor does not strand :18747; the redesign leaves exactly one owner per proxy port.
  • ExecStart parity with the supervisor: every unit runs the same checkout entry points the supervisor's systemd-run invocations ran — /run/current-system/sw/bin/node "$HOME/code/bin/<proxy>.mjs", and bash on ~/code/bin/commandcode-proxy-start.sh / muse-proxy-start.sh — with the same per-proxy env (canonical port var, host, PATH exports, ANTIGRAVITY_LS_BIN, commandcode MAX_TURNS pins). The checkout path also avoids the stale-store ExecStart failure of Home-layer eval uses a stale bin/ tree: commandcode-proxy unit 203/EXEC, managed opencode stuck on old rev #883.
  • Supervisor retired in the same change: proxy-supervisor oneshot service, its 2-minute timer, and the xdg.configFile supervisor config are removed, so nothing can respawn fps-* units. bin/proxy-supervise.mjs stays in the repo as history, uninvoked. Endpoint bookkeeping is retired with it: ~/.local/state/<proxy>/endpoint.json files become stale records with no writer; service state is read from the units. The hash-keyed A/B roll behaviour is deliberately not reproduced — a switch that changes a unit's ExecStart restarts that proxy, per the normal flake service pattern.
  • Manual units: none remain as separate declarations — the manual declarations became the services (same unit names), so there is no second startable unit that can fight a service for a canonical port.

Cutover (post-merge, staged)

Stop proxy-supervisor.timer → nixos-rebuild switch → stop the fps-* transient units → start the new services → verify: all ports answer, /v1/models on :18745/:18746/:18748, gateway + openchamber restarts, OpenCode serve (:13420) route smoke, systemctl --user --failed clean. Never leave supervisor + services owning the same port.

Verification so far

  • nix eval of the built home config in the worktree (unit ExecStart / WantedBy / supervisor absence) — see PR comments/checks.
  • CI: merge on green only; if the self-hosted queue stays backlogged this PR stays open and the supervisor-owned status quo stays live and untouched.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…visor (#2104)

Convert the manual per-proxy units (clef, agy, codex, antigravity-ls, design-code, commandcode) to automatic user services with Install.WantedBy default.target, add new claude-code-proxy and muse-proxy units (previously supervisor-config only), and run the same checkout entry points the supervisor ran via systemd-run. Remove the proxy-supervisor service, timer, and config in the same change so no second owner can respawn fps-* units. Consumers Wants on main already name these units and are kept unchanged.
@dezren39
dezren39 requested a review from a team as a code owner October 29, 2026 04:11
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4ad4b7ef-95e2-43e5-9e2b-06a3ef554217
Commits

Reviewing files that changed from the base of the PR and between 21e93e9 and 797c088.

Files selected for processing: 1
  • home/common/default.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T05:17:15.982858Z 797c088 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39

Copy link
Copy Markdown
Member Author

Stale-PR warden (merge-all pass 2026-10-29): this PR could not be merged — merge conflict with main. Resolution task: #2523 — this PR should be fixed and merged, or closed.

…services-2104

# Conflicts:
#	home/common/default.nix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant