Home / Projects / Orchestrata Ultimate / Decisions / ADR index / ADR-0078
ADR-0078: The deployed codemod daemon reviews with every phase; the tools venv carries the free-threaded janus-swi
| field | value |
|---|---|
| Status | Proposed |
| Date | 2026-10-08 |
| Register | factory (docs/adr, 4-digit ids) |
| Source | docs/adr/0078-the-deployed-codemod-daemon-reviews-with-every-phase-the-tools-venv-carries-the-free-threaded-janus.md — permalink at 6bf2b5988 (unchanged on master since that commit) |
| Wiki register entry | ADR-0078 (wiki status: Proposed) |
The record
Status: Proposed · Date: 2026-10-08
Context
/opt/orchestrata-tools (deploy/install-tools.sh) vendored four hand-listed
subtrees of orchestrata_ultimate. Measured 2026-10-08 on master 1d5f3e52c
(scratch import_closure.py, then scripts/tools_import_closure.py):
- the eager import closure of
refactor.codemod._daemon_entryis 1 module — every import in the daemon is lazy, which is why the deploy smoke passed; - the eager closure of the daemon plus
refactor.codemod.review_checks— what the firstInMemoryReviewEngine(registry=None)review executes — is 103 modules over six packages (core40,refactor34,verification14,openspec7,knowledge_graph2,orchestrata_ast5);verificationandopenspecwere never vendored, so the first default review in the deployed daemon raisedModuleNotFoundError(task 580). The 2026-10-08 ship of3bb5319dffailed at exactly this smoke when the import was briefly eager; - the all-scopes closure of every deployed entry is 167 modules over nine
packages (adds
providers,llm,memoryon lazy paths).
WI-DEPLOY (plans/recorded-run-2026-10-08-eight-failures-design.md §3.2,
worktree wt-TOOLS-CLOSURE, commits 1d51e674d a49aea09d) made the vendor
list computed and gate-pinned (deploy/tools-vendor-manifest.txt ==
ClosureReport.vendor_manifest() of the all-scopes closure) and made the deploy
smoke construct the engine and review a two-file workspace. That smoke now
passes — and prints PrologSemanticReview: janus-swi not available, skipping:
the deployed review runs phases 1 and 2 only. janus_swi is a lazy third-party
import on the review path; the project's own venv carries the patched
free-threaded build (scripts/_janus_patched, scripts/build_janus_ft.py,
janus_swi-1.5.3 in /opt/orchestrata/.venv), because upstream janus-swi
re-enables the GIL process-wide on import (SPEC-023, the same class as the
msgpack/grpcio incidents, task 184).
A review that silently drops its semantic phase is the false-green class this
project forbids (RUL-009, docs/kernel-is-required.md): the daemon answers
"reviewed" while the Prolog checks never ran.
Decision (proposed)
- The deployed codemod daemon reviews with every phase its in-repo twin
runs.
deploy/install-tools.shinstalls into the tools venv the same free-threaded janus-swi artifact the project venv uses (the wheelscripts/build_janus_ft.pyproduces, from the pinned[tool.uv.sources]path), never upstreamjanus-swifrom PyPI. - The deploy smoke asserts the Prolog phase ran: the default-review smoke
fails on the
janus-swi not available, skippingline (or on any phase-3 skip marker), and asserts the venv interpreter still reports the GIL disabled afterimport janus_swi. - The vendor list stays the all-scopes computed closure (nine packages),
pinned by
tests/deploy/test_tools_vendor_manifest.py; the eager closure is reported, not vendored, because a lazy path that is reachable in the daemon is a path the daemon will take. - Third-party packages reachable only on lazy paths (
httpx,redis,tiktoken,pyyaml) are installed whentools_import_closure.py --piplists them for a deployed entry; the installer's pip line is derived from that output, as WI-DEPLOY already wired.
Alternatives rejected
- Ship phases 1–2 only and document it. The daemon's
reviewresult is then a different artifact from the repo's, with no marker in the result — the deployed thing is not the tested thing (RUL-012, RUL-027). - Install upstream
janus-swifrom PyPI in the tools venv. Re-enables the GIL for the daemon process (measured for janus in SPEC-023 work); the free-threaded daemon becomes a serialized one and thesys._is_gil_enabled()smoke fails. - Vendor the eager closure only (six packages). Smaller archive, but every
lazy path (
providers,llm,memory) is one more latentModuleNotFoundErrorof the task-580 class.
Consequences
- The tools deploy depends on the free-threaded janus wheel being buildable or
present on the host (
scripts/check_native_build_freshness.pyalready gates staleness of such builds); a host without it fails the install loudly, which is the intended behaviour. review_engine.py's comment that the tools deploy "does not vendor"verificationis stale after WI-DEPLOY and is corrected with this ADR's implementation.- Gates:
tests/deploy/test_tools_vendor_manifest.py(manifest == closure), the installer smoke (default review runs, phase 3 ran, GIL off).
Provenance
Orchestrator (Claude Code, Fable 5.1) on 2026-10-08, from the WI-DEPLOY worker's
report ("PrologSemanticReview: janus-swi not available, skipping … Decision
for you") during the eight-failures swarm
(plans/recorded-run-2026-10-08-eight-failures-design.md). Evidence:
scratchpad/install2.log of the scratch-prefix install; closure counts from
scripts/tools_import_closure.py; task 580; task 184 (janus/msgpack GIL
re-enable). Awaiting Mohamed's ruling.
Related ADRs
No other ADR is named in this record.
Rulings cited
- RUL-009: RUL-009 — Never run tests without live observation
- RUL-012: RUL-012 — Done means wired and deployed, not just built and tested
- RUL-027: RUL-027 — Production runs its own checkout, never the development tree