1.8 KiB
Verification
RED (before implementation)
python3 scripts/corporate-stage-migrate-test.py Transport exited 1: ran 3 tests, FAILED (failures=5). No-payload docker helper and four backup source subcases asserted None != -3 (DEVNULL). Payload and empty-byte contracts already passed. An earlier draft used dictionary indexing and produced KeyError for omitted stdin; assertions were refined to compare the effective inherited default using kwargs.get before the definitive RED run.
GREEN
python3 scripts/corporate-stage-migrate-test.py exited 0: ran 4 tests in 5.635s, OK. Includes real disposable local PostgreSQL transaction, rollback, lock contention, idempotency, checksum guard, full backup/restore; transport fault/order tests; stdin contract; pipeline order. Transport success output is from test doubles, not a real Stage migration. PostgreSQL fixture starts/stops only its newly created local scratch server, not existing CI/release processes.
git diff --check exited 0. Tests prove the explicit subprocess stdin contract (authorised alternative to actual PTY background reproduction), not the originating stop signal or successful live Docker/Stage recovery. SQL input remains passed through run(input=data), which creates PIPE for both nonempty and empty bytes; restore stdin remains the source stdout stream. No timeout, error sanitation, target, transaction or lock behavior changed.
Release boundary
Local tests only; no push/deploy, production/cron changes, cancellation, existing process signals, lock deletion or live migration invocation. Parent must integrate and manage owner cancellation before next CI. Existing graph query modified this isolated worktree's cache stamp only; restore that generated modification before commit. No whole-app build or live CI acceptance claimed for this Python-only change.