Commit cf69a05
refactor(infra-local): simplify + unify into one Python
## What
Simplifies `apps/infra-local` (the BoxLite-based local dev stack) and
unifies its two-language orchestrator into one Python package. **~4,500
→ ~2,190 lines (~50%)**, one entry point (`python -m compose`), flat
structure.
## Commits
1. **simplify** — drop dead config (the `BOXLITE_*_HOST_PORT` knobs
never moved a bound port; `pg_url`/`tcp_port`/`Severity.WARN`; dead
`configs/minio/init.sh`), dedupe the SDK import shim, delete the stale
`CONNECTIONS.md` (445 lines restating the code), rewrite the README, and
remove the infra-local test suite (not in CI; mostly asserted dataclass
defaults) — preserving the one unique capability as a native-gated SDK
test.
2. **port L2 to Python + rename + flatten** — the 4 native host
processes (API/runner/proxy/dashboard) move from ~800 lines of bash
(`scripts/`) into `compose/native.py` (subprocess supervision: detached
daemons, pidfiles, `killpg` teardown). Package `boxlite_local` →
`compose`. `scripts/` + `configs/` deleted; `api.env` → root. CLI is 7
verbs (`up/down/status/logs/restart/reset/nuke`); Makefile ~19 → 9 thin
aliases.
3. **adversarial fixes** — a 2-round adversarial-review loop found +
fixed an `export KEY=val` parser bug in the `.env` reader; the SDK
capability test was rewritten (`alpine` busybox lacks `httpd`) to a
`python:3-alpine` http.server box and verified live.
## Final structure
4 root files (`api.env`, `Makefile`, `README.md`, `pyproject.toml`) +
the `compose/` package (config / services / orchestrator [L1] / native
[L2] / doctor / _sdk / __main__). No `scripts/`, `configs/`, or
`tests/`.
## Verification
- `python -m compose --help` + all 7 subcommands; `py_compile` + import
all modules.
- SDK volume-port test passes **live** (`pytest -m integration` → 1
passed, 30s): RW-volume persistence + host-port mapping.
- 2-round adversarial review terminated at `ZERO_FINDINGS`; CLAUDE.md
auditor PASS on every commit; pre-push integration suite green.
## compose package (~50% smaller) (#796)1 parent 757692a commit cf69a05
39 files changed
Lines changed: 1299 additions & 3678 deletions
File tree
- apps/infra-local
- boxlite_local
- compose
- configs/minio
- scripts
- tests
- integration
- unit
- sdks/python/tests
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 7 | + | |
14 | 8 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 9 | + | |
| 10 | + | |
19 | 11 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 12 | + | |
| 13 | + | |
23 | 14 | | |
24 | | - | |
25 | | - | |
| 15 | + | |
| 16 | + | |
26 | 17 | | |
27 | | - | |
28 | | - | |
| 18 | + | |
| 19 | + | |
29 | 20 | | |
30 | | - | |
31 | | - | |
| 21 | + | |
| 22 | + | |
32 | 23 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 24 | + | |
| 25 | + | |
36 | 26 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 27 | + | |
| 28 | + | |
40 | 29 | | |
41 | | - | |
42 | | - | |
| 30 | + | |
| 31 | + | |
43 | 32 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 33 | + | |
| 34 | + | |
0 commit comments