Orchestrata Ultimate › Plans › briefs › ast-daemon-p5-builder

Builder brief — AST daemon plan P5: retire the checkout-bound units and gate their return

Source: plans/briefs/ast-daemon-p5-builder.md at 8a2cb42ad · last changed 2026-10-06 · first committed 2026-10-06 · 162 lines.

Prose pending.

Plan text

Builder brief — AST daemon plan P5: retire the checkout-bound units and gate their return

Plan: plans/ast-daemon-deployment-plan.md § 3 "P5" (lines ~759–771), § 3b ship log, § "P4 review round 4" (the three MINOR findings carried to P5). Design authority: ADR-0067 (Accepted; R1 "every deploy must follow the professional deployment methods and be separate from code", R2 "codemod daemon in the same wave").

DESIGN_WAIVER: ADR-0067 — P5's entire scope executes ADR-0067 R1/R2 (remove the two checkout-bound plain units; make their return a gate violation; make the deployer refuse to finish while they exist). Nothing here adds a design decision. Anything beyond this scope is a STOP, not a guess.

GOAL: After P5, (a) orchestrata-ast-daemon.service and orchestrata-codemod-daemon.service (the plain, checkout-bound units measured in § 0 and § 2 of the plan) no longer exist on this host; (b) scripts/check_prod_tree_separation.py (RUL-027) fails on ANY installed non-template orchestrata-*/orchgraph-* unit whose ExecStart or WorkingDirectory resolves under a /home/*/workspace/ checkout, not only under the one --dev-tree; (c) deploy/install-tools.sh's verify arm fails when either plain unit is still installed; (d) the three P4 MINOR findings are closed. Build in the worktree /home/mohamed/workspace/wt-AST-DAEMON-P5 (branch feat/ast-daemon-p5-retire-units, minted off origin/master 2d64c35c9, env provisioned), not in wt-SPEC-110 or wt-AST-DAEMON-P4.

FILES:

CONSTRAINTS:

DONE WHEN:

  1. scripts/check_prod_tree_separation.py has the workspace rule; the fixture tests prove: plain unit under /home/x/workspace/r → violation with the workspace reason; same path via --dev-tree → violation with the dev-tree reason (both may fire); template @.service under workspace via %I only → clean; /opt/... → clean; non-service *.timer still examined and counted.
  2. deploy/install-tools.sh retires both plain units idempotently (second run is a no-op) and its verify arm fails while either exists; the socket-holder refusal path is exercised by a test that opens a real AF_UNIX client on a fixture socket.
  3. The four P4 MINOR items are closed with tests that fail on the pre-fix code (state in the hand-back how each was shown to fail: git stash-free — use a temporary WIP commit or run the test against HEAD~ in a scratch worktree).
  4. Targeted modules green, zero skips: tests/scripts/test_check_prod_tree_separation.py, tests/scripts/test_check_prod_tree_separation_paths.py, tests/deploy/test_install_tools.py, tests/deploy/test_ast_daemon_unit.py, tests/refactor/codemod/test_daemon_lifecycle.py, tests/refactor/codemod/test_daemon_coverage.py, tests/promotion/test_identity_*.py (the identity verifier shares identity_core; prove no regression).
  5. Coverage ≥ 90 % on scripts/check_prod_tree_separation.py and on refactor/codemod/daemon.py from the modules above (--cov=scripts --cov=src/orchestrata_ultimate/refactor/codemod), numbers in the plan record.
  6. Plan § 3 P5 record written with the host before-measurement, each MINOR's closure, coverage, gate results; ship-log row added with Shipped/master/Verify/Deploy/Promote columns reading "pending ship". Commits: code+tests, then plan, as Mohamed.
  7. git status --short empty; hand back the commit shas, the gate outputs, the pytest counts, and the exact check_prod_tree_separation.py output against the real host (expected exit 1 with two violations until shipped).

VERIFY: paste the gate exit codes; the pytest summary lines for every module in DONE WHEN 4; the coverage lines for the two targets; uv run python scripts/check_prod_tree_separation.py real-host output; the installer test's captured fail message for the "unit still present" and "socket held" paths; git log --oneline origin/master..HEAD; git status --short.