Files
spine/.github/instructions
TheWitness 803d42398d docs: enshrine script/process lifecycle design principles (#631)
## What
Adds `.github/instructions/instructions.md` (did not exist on this
branch) with a *Script and process execution design principles (do not
regress)* section codifying three invariants for script and PHP Script
Server execution:

1. One read attempt per command, no looping to EOF.
2. Never block the polling thread in `waitpid()` — single non-blocking
WNOHANG attempt, then hand off to an async sweep.
3. Script timeouts must go through `nft_popen()`/`nft_pchild()`
(pid-tracked), not a native `popen()`/`pclose()` fallback.

## Why
While investigating a reported poller slowdown, this branch's
`nft_pclose()` was found to do an unbounded blocking `waitpid()` on the
polling hot path. Writing these invariants down so future AI-assisted
changes to this branch don't reintroduce that or the related issues
found on develop (#614). Tracked in #632.

## What was tested
Docs-only change; no build/test impact.

Signed-off-by: TheWitness <thewitness@cacti.net>
2026-09-24 09:40:38 -05:00
..