mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 19:56:53 +00:00
Every sandboxed command runs in its own pid namespace, where the low numbers belong to that sandbox's own shell and children. Two places read a pid as if it named the same thing everywhere, and both blocked translation. The throwaway container was named after os.getpid(). A run whose cleanup never ran left `infinito-i18n-libretranslate-8` behind, and the next run, holding pid 8 in its own namespace, died on `docker run exited with 125: Conflict. The container name is already in use`. A random token cannot collide, so an orphan no longer blocks anything. `deploying()` accepted any live pid as a running deploy. The router writes build/deploy.pid and never removes it, so a file naming pid 8 refused every translation run with "A deploy is running" until it was deleted by hand. The recorded process now has to name the router in its command line; the marker is verified against the invocation in Makefile:200. /proc is read uncached because it is per-pid and vanishes with the process. The test that guarded this asserted the bug: it wrote pytest's own pid and expected a deploy. It now asserts the opposite for that input, and proves the positive case with a real process whose argv carries the router path. Neither fix addresses the root cause of the failures that exposed them: the sandbox denies 127.0.0.6, so `deployed()` never reaches the running service and every run falls down the throwaway path in the first place. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>