Repository navigation
Description
What's the problem
util/control-server.py (432 lines) accepts config and upgrade changes and reports status. It runs on python3 (systemd/rigforge-control.service.template). The read half (GET /status, auth, readiness) is separable from the write half and is the safer first cut of a security-sensitive server.
What it impacts
Status polling by Pithead and LAN clients, the unit (Type=notify, DynamicUser, StateDirectory, ExecStartPre=+nft -f). Blocked by #699, #700 and #701 (the #684 update API), which change this file and land in Python first.
How I found it
Reading util/control-server.py and its tests (tests/test-control-readiness.py, test-control-hardening.sh, tests/contract/v1/control-status.json) at ea41133. Behavior to preserve: GET /status with optional ?change_id= (16 lowercase hex), age_seconds, 503 {"status":"no change applied yet"}, 400/404 for bad or unknown id; fail-closed auth (403 with no token, 401 otherwise) in constant time; sd_notify readiness.
How important is it
Medium for the port; care required because a divergence is a privilege or availability bug.
Acceptance criteria
- With
RIGFORGE_IMPL=rust,make test-suitepasses unchanged, includingtest-control-readiness.pyandtest-control-hardening.sh. -
tests/contract/v1/control-status.jsonbyte-matches for the HTTP-served parts (no-history 503 body, pending,age_seconds). - A table-driven test file shared by both implementations runs the same inputs against the Python and Rust servers and asserts identical status, headers and body for every read-path case.
- Bearer compare reuses the constant-time module from Port the sister API server (util/api-server.py) to Rust #711; fail-closed behavior is asserted natively.
- Readiness is signalled over
NOTIFY_SOCKET. -
PARITY.mdupdated; the Python server is kept until the flip.make checkpasses.
Possible solutions
sd_notifyas a few lines on aUnixDatagram, no crate.- Same HTTP and JSON crate decision as the API server; keep one decision for both.
- Unknown: whether any behavior depends on Python
http.serverquirks beyond what the tests pin.
Activity
pithead-architect commentedon Nov 27, 2026
Blocked by #699, #700 and #701 (native links added).