Repository navigation
Description
What's the problem
The write half of util/control-server.py is the writable path (ADR 0001): POST /apply and /upgrade and the spool that root-side units consume. Any divergence is a privilege or availability bug.
What it impacts
Remote config apply and remote upgrade from Pithead or a LAN client; the spool consumed by control-apply and control-upgrade. Blocked by #699-#701 landing in Python first.
How I found it
Reading util/control-server.py and its tests (tests/test-control-hardening.sh, test-control-spool-cap.py, test-control-replay.sh, test-control-revocation.sh, control-revocation.py) at ea41133. Behavior to preserve: POST /apply with WRITABLE keys (pools, DONATION, autotune, watchdog, watchdog_interval_min, max_temp_c), refusal of unsafe thermal removal and Tor-unsafe donation changes, body 1..65536 bytes, 411/413/415/400, 202 with change_id, 503 when MAX_PENDING (20) is full, 202 with warning on DurabilityUncertain; POST /upgrade exactly {"version":"vX.Y.Z"}, 403 unless control_upgrade is enabled; atomic spool writes with fsync of file and directory.
How important is it
Medium for the port, high for care: it must not widen anything.
Acceptance criteria
- With
RIGFORGE_IMPL=rust,make test-suitepasses unchanged, including everytest-control-*script andcontrol-revocation.py. - The shared table-driven harness from Port the control receiver read path (/status, auth, readiness) to Rust #712 covers every status code and body above against both servers with identical expected output.
- The writable key list is the same set and the allowlist-subset guard in
tests/run.shpasses. - A test kills the process between temp write and rename and asserts no claimable partial file exists; file and directory fsync are asserted via strace or an injected hook;
MAX_BODYandMAX_PENDINGlimits hold. -
PARITY.mdupdated; the Python server is kept until the flip.make checkpasses.
Possible solutions
- Share the token, derived-bearer and compare module with the sister API port.
- Unknown: whether the update API (Token-authenticated API to check for and perform an update, with scope, rate limit and single flight #684) adds new write routes before this lands; follow its merged shape.
Activity
pithead-architect commentedon Nov 27, 2026
Blocked by #699, #700 and #701 (native links added).