Skip to content

Proxy service-model redesign: automatic flake services, retire proxy-supervisor ownership, restore consumer Wants #2104

Closed

Description

@dezren39

Proxy service-model redesign: automatic flake services, supervisor retirement

Design decision (Drew, 2026-10-28 23:05 CDT): make the fleet proxies proper automatic flake-declared user services, retire the proxy-supervisor's process-ownership role, and restore consumers' Wants against the real units.

Current state

  • Seven proxies serve canonical ports: clef :18742, antigravity-agy :18743, codex :18744, antigravity-ls :18745, design-code :18746, commandcode :18748, claude-code :18749. (muse :18747 is supervised the same way and must not be stranded by a supervisor retirement.)
  • They currently run as supervisor-owned transient fps-* units (bin/proxy-supervise.mjs, run by the proxy-supervisor user timer every ~2 min; endpoint state under ~/.local/state/<proxy>/endpoint.json).
  • The supervisor had a symlink-guard bug (proxy-supervise: main() never runs when invoked via a symlinked path (~/code -> ~/git/code) — supervisor timer silently no-ops since 2026-10-27 #2083) making it a silent no-op from 2026-10-27 until manual cold-starts on 2026-10-28. PR fix(proxy-supervise): entry-point guard compares realpaths so symlinked invocations run main() (#2083) #2085 (guard fix) is open.
  • The flake also declares manual one-off units for the proxies in home/common/default.nix (no Install.WantedBy), currently stopped. claude-code-proxy and muse-proxy have no declarative unit at all — supervisor config only.
  • Consumers on main still Wants the manual units: openclaw-gateway (home/openclaw/default.nix: commandcode/design-code/agy + mcpx) and openchamber.service (home/common/default.nix: clef/codex/antigravity-ls/design-code).

Redesign

  1. One automatic user service per proxy: flake-declared (home-manager systemd.user.services), canonical port, ExecStart running the same checkout entry points the supervisor runs today (~/code/bin/*.mjs, commandcode-proxy-start.sh, muse-proxy-start.sh), Restart per flake patterns, Install.WantedBy = [ "default.target" ].
  2. Retire the supervisor's ownership in the same change: remove/disable the proxy-supervisor timer + oneshot service and its config so it cannot respawn fps-* units. No second owner may remain; the cutover must end in exactly one ownership model.
  3. Consumers' Wants stay/restored against the (now real, automatic) units with Wants+After semantics — soft pull-in, ordering when co-started, never blocks the consumer if a proxy is not live. mcpx Wants are legitimate and stay.
  4. The manual one-off declarations are replaced by the automatic units (same unit names), so nothing startable remains that can fight the services for a canonical port.

Supersedes / related

Acceptance criteria

  • After a switch: all proxy services active on canonical ports, proxy-supervisor timer gone/disabled, no fps-* units.
  • /v1/models spot-checks on :18745, :18746, :18748 return live lists.
  • openclaw-gateway and openchamber.service restart cleanly (Wants+After soft semantics).
  • One end-to-end route smoke through the background OpenCode serve (:13420).
  • systemctl --user --failed clean for proxy units.
  • Cutover safety: never leave supervisor + services fighting over ports; if the cutover cannot complete, the supervisor-owned status quo stays fully intact.

Activity

  1. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Implementation PR: #2107 (branch feat/proxy-automatic-services-2104, commit 659343a) — home/common/default.nix only.

    Local verification in the worktree before pushing: nix eval of the built home config renders clef-proxy's ExecStart, claude-code-proxy Install.WantedBy = ["default.target"], and the proxy-supervisor service attribute is absent (removal confirmed).

    Status 2026-10-28 night CDT: PR open, mergeable, checks pending (Nix flake evaluation / run / treefmt check queued on the backlogged self-hosted runners). Per merge-on-green-only, it has NOT been merged and no switch/cutover has been attempted. The supervisor-owned status quo remains fully live: proxy-supervisor.timer active, all fps-* units serving canonical ports 18742-18749. Cutover (timer stop -> switch -> fps stop -> service start -> port/model/consumer/smoke verification) is deferred until #2107 merges on green.

    Also done under this issue: superseded comments on #2092 and #2094 (both left open, unmerged) and a comment on #2083 noting PR #2085's guard fix becomes moot if the supervisor retires here.

  3. added
    source/humanFiled directly by a human
    priority/highImportant and time-sensitive
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Intake review

    Fleet monitor intake pass (protocol §5), 2026-10-28 ~23:35 CDT.

  5. added a commit that references this issue on Oct 30, 2026
  6. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: reviewed (coverage loop-back)
    Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 7290 (triage, queued, priority 50) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
    Found via: coverage loop-back 2026-11-03

  7. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  8. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (triage — closing with evidence)

    • Agent: queue worker (repo-worker-code), Lane P shift (lane code-p)
    • Session / ID: queue task 7290 (repo-health-code-pilot)

    Triage verdict — #2104 is implemented and live; closing with evidence

    Verified fresh 2026-11-03 ~23:25Z against GitHub current main and the laptop's live systemd user state.

    The redesign landed. PR #2107 — feat(home): make fleet proxies automatic services, retire proxy-supervisor (#2104) — MERGED 2026-10-30T05:16Z (merge commit 72749ff), home/common/default.nix only, exactly per this issue's design: one automatic flake-declared user service per proxy on its canonical port running the checkout entry points, new declarative units for claude-code-proxy (:18749) and muse-proxy (:18747), and the proxy-supervisor service + 2-minute timer + supervisor config removed in the same change so nothing can respawn fps-* units.

    Acceptance criteria, checked against the fleet's current shape:

    Residual papercut (not a blocker; routed, not filed as a duplicate): home/openclaw/default.nix still carries the pre-redesign comment claiming the proxies "are owned by the proxy-supervisor (transient fps-* units)" and keeps the retired agy-proxy.service in openclaw-gateway's After list (it shows as a not-found unit). The specific lines are recorded on #2775 (the open survey of laptop services & proxies declarative coverage) as its tracking home.

    Disposition: the queue task 7290 triage is complete with outcome already_done; this issue closes on its merits — the work it tracked is implemented, merged, and verified live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

effort/lLarge: multi-day or open-ended; expect staged check-inskind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/humanFiled directly by a humantask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions