Home / Projects / Orchestrata Ultimate / Decisions / ADR index / ADR-0067

ADR-0067: Developer daemons are deployed code; the checkout they serve is a runtime parameter

field value
Status Accepted — Accepted (rulings R1/R2 of plans/ast-daemon-deployment-plan.md, Mohamed, 2026-10-05: "1. every deploy must follow the professioal deployment menthods and be seperate from code, 2. yes codemodd should be fiuxed too")
Date 2026-10-05
Register factory (docs/adr, 4-digit ids)
Source docs/adr/0067-dev-daemons-are-deployed-code-serving-checkouts-as-data.md — permalink at 7c7bfeea7 (unchanged on master since that commit)
Wiki register entry ADR-0067 (wiki status: Accepted)

← ADR-0066 · ADR-0068 →

The record

Status: Accepted (rulings R1/R2 of plans/ast-daemon-deployment-plan.md, Mohamed, 2026-10-05: "1. every deploy must follow the professioal deployment menthods and be seperate from code, 2. yes codemodd should be fiuxed too") · Date: 2026-10-05

Context

Two long-running daemons accelerate development on this host: the AST daemon (scripts/ast_daemon.py, warm symbols/refs/source over a Unix socket) and the codemod daemon (orchestrata_ultimate.refactor.codemod._daemon_entry, the SPEC-110 code-intelligence-graph query server). Measured 2026-10-05:

This is the platform's deploy-in-place defect (CLAUDE.md convention 4, RUL-027) in three forms at once: code executing from a working tree, no identity, and configuration carrying a checkout path.

Decision (Mohamed, rulings R1/R2)

  1. A daemon that serves developer checkouts is deployed code. The AST daemon, the codemod daemon, and any future daemon of this kind are installed under /opt/orchestrata-tools by deploy/install-tools.sh from a pinned ref, into that deployment's own venv, at the commit VERSION records. The checkout a daemon serves is a runtime parameter — the systemd instance name %I (an escaped path) and the daemon's --repo-root / repo_root argument — never the location of the code it executes.

  2. No daemon process on this host executes from a workspace checkout. Not a plain unit, not a template instance whose ExecStart points at /%I/.venv, not a hook-spawned process. When the tools deployment is absent, the SessionStart hook says so in one line and the AST client takes its existing slow path; it does not spawn a daemon from the checkout venv. The U-T2 "runtime-only" compromise existed because a checkout literal in config was the code location; with code under /opt, an enabled instance naming the served checkout is data, and is permitted for the primary checkout (~/workspace/orchestrata-ultimate). Worktree instances stay runtime-only, started by the session hook.

  3. Identity, not health. The AST daemon's /health and the codemod daemon's JSON-RPC status report code_root and deployed_commit. The installer's verify step starts each deployed daemon against a fixture checkout and asserts code_root is under the deployment and deployed_commit equals the shipped SHA; the session hook REPLACES a running daemon whose code_root is a working tree.

  4. The gate refuses their return. scripts/check_prod_tree_separation.py (RUL-027) also inspects ~/.config/systemd/user/*.service: a non-template unit whose ExecStart or WorkingDirectory resolves under /home/*/workspace/ is a violation. install-tools.sh refuses success while orchestrata-ast-daemon.service or orchestrata-codemod-daemon.service (plain) exists.

  5. The codemod daemon is in the same wave (R2), as the second half of each packet, after the AST daemon proves the shape.

Alternatives rejected

Consequences

Provenance

Rulings cited

Specs cited