Clojure->Python CUTOVER: Step 3 — decommission the Clojure math service everywhere - #2688
Draft
jucor wants to merge 1 commit into
Draft
Clojure->Python CUTOVER: Step 3 — decommission the Clojure math service everywhere#2688jucor wants to merge 1 commit into
jucor wants to merge 1 commit into
Conversation
This was referenced Jul 28, 2026
Draft
Draft
Draft
Draft
Draft
Draft
This was referenced Jul 28, 2026
Draft
Draft
python-math #43: docs(delphi): s7 goal state + journal — mode collapse executed, battery 20/20
#2672
Draft
Draft
Draft
Draft
jucor
force-pushed
the
spr/edge/ae5fdde0
branch
2 times, most recently
from
July 28, 2026 00:24
a18b886 to
c3d1fb8
Compare
…ce everywhere
After the flip (Step 2) has run stable for the agreed period, this removes the Clojure math service from every place that could still start or build it. The Python engine becomes the one and only math service. The Clojure SOURCE CODE stays in the repo until Step 4.
## What's in this PR
- `docker-compose.yml`: the `math` (Clojure) service is deleted. `math-python` now starts by default with `make start` (no longer opt-in) and reads the SAME setting the server reads — `MATH_ENV=${MATH_ENV:-prod}`, exactly the line the Clojure service had. The transitional setting `MATH_PYTHON_ENV` (used for the flip) stops existing here.
- `docker-compose.dev.yml`: the Clojure REPL developer override deleted.
- `docker-compose.test.yml` (what CI runs): Clojure math replaced with a `math-python` service, built with `USE_CPU_TORCH=true` so CI reuses the already-built image layers instead of building a second multi-GB image with GPU libraries nothing uses.
- `.github/workflows/deploy-alpha-aws.yml`: the lines that built and pushed the Clojure math image are deleted — with the service gone they would fail and block EVERY deploy. (That registry copy was never used by deploys anyway; instances build locally.)
- Deploy scripts (US + the forgotten euro copy): the math host starts `math-python`; `down --remove-orphans` added so a leftover Clojure container cannot survive a deploy.
- `example.env` / `test.env`: dead Clojure-only settings removed; the poller section rewritten.
- `math/README.md`: banner saying the service is retired and the source tree goes away at Step 4.
## The settings handover
At the moment this deploys, the instance `.env` still contains `MATH_PYTHON_ENV=prod` (from Step 2) and `MATH_ENV=prod` (the server's) — after this PR the poller simply reads `MATH_ENV=prod`. Same value, no behavior change. Optional cleanup afterwards (Julien): delete `MATH_PYTHON_ENV` from the secret.
## Merge gate
Only after the Step 2 soak. Note the rollback cost changes here: bringing Clojure math back stops being a single compose command.
## Rollback
1. First point the Python engine at a different `math_env` than the server's (secret `MATH_PYTHON_ENV='python'`, propagated via a deploy or the manual `.env` route — see Step 2's note that restarts do not pick up new settings), so the returning Clojure engine is the only writer of the server's rows.
2. Revert this PR and redeploy.
3. Run `docker compose up -d math` yourself — the revert+redeploy alone still starts only `math-python`.
The old Clojure rows were never deleted; the engine resumes from the rows as they are.
Series: Step 0 = #2685. Nothing merges without Julien's explicit go.
commit-id:1f679952
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After the flip (Step 2) has run stable for the agreed period, this removes the Clojure math service from every place that could still start or build it. The Python engine becomes the one and only math service. The Clojure SOURCE CODE stays in the repo until Step 4.
What's in this PR
docker-compose.yml: themath(Clojure) service is deleted.math-pythonnow starts by default withmake start(no longer opt-in) and reads the SAME setting the server reads —MATH_ENV=${MATH_ENV:-prod}, exactly the line the Clojure service had. The transitional settingMATH_PYTHON_ENV(used for the flip) stops existing here.docker-compose.dev.yml: the Clojure REPL developer override deleted.docker-compose.test.yml(what CI runs): Clojure math replaced with amath-pythonservice, built withUSE_CPU_TORCH=trueso CI reuses the already-built image layers instead of building a second multi-GB image with GPU libraries nothing uses..github/workflows/deploy-alpha-aws.yml: the lines that built and pushed the Clojure math image are deleted — with the service gone they would fail and block EVERY deploy. (That registry copy was never used by deploys anyway; instances build locally.)math-python;down --remove-orphansadded so a leftover Clojure container cannot survive a deploy.example.env/test.env: dead Clojure-only settings removed; the poller section rewritten.math/README.md: banner saying the service is retired and the source tree goes away at Step 4.The settings handover
At the moment this deploys, the instance
.envstill containsMATH_PYTHON_ENV=prod(from Step 2) andMATH_ENV=prod(the server's) — after this PR the poller simply readsMATH_ENV=prod. Same value, no behavior change. Optional cleanup afterwards (Julien): deleteMATH_PYTHON_ENVfrom the secret.Merge gate
Only after the Step 2 soak. Note the rollback cost changes here: bringing Clojure math back stops being a single compose command.
Rollback
math_envthan the server's (secretMATH_PYTHON_ENV='python', propagated via a deploy or the manual.envroute — see Step 2's note that restarts do not pick up new settings), so the returning Clojure engine is the only writer of the server's rows.docker compose up -d mathyourself — the revert+redeploy alone still starts onlymath-python.The old Clojure rows were never deleted; the engine resumes from the rows as they are.
Series: Step 0 = #2685. Nothing merges without Julien's explicit go.
commit-id:1f679952
Stack: