rdmbair13m5-changelog-20260904-2025-m1-ecsprocess-ecspersistence-remediation
rdmbair13m5-changelog-20260904-2025-m1-ecsprocess-ecspersistence-remediation
Remediated critical concurrency, timeout escalation, binary preservation, and pipe hang defects in ECSProcess, fixed transactionDepth state leak in ECSPersistence, verified 93/93 tests passing under ThreadSanitizer locally and on rdmsm4x, and pushed clean commits to git.ecs0.net and GitHub.
- Date: 2026-09-04 20:25:00 EDT
- Host: rdmbair13m5 (promoted to rdmsm4x)
- Scope: ~/dev/lib/ECSProcess, ~/dev/lib/ECSPersistence
- Remediations:
- ECSProcess Concurrency: Replaced actor-blocking synchronous
waitUntilExit()with asynchronous suspension usingProcessExitCoordinator(withCheckedContinuationonprocess.terminationHandler) and maderunentry pointsnonisolated. Verified concurrent tasks run in 0.51s instead of 2.04s. - ECSProcess Timeout Escalation: Implemented two-stage timeout in
timeoutTasksending SIGTERM, waiting 500ms grace period, and escalating tokill(process.processIdentifier, SIGKILL)if still running. ThrowsProcessRunnerError.processTimedOut(timeoutSeconds). Verified trapped SIGTERM processes terminate in 1.54s instead of hanging for 5.11s. - ECSProcess Binary Preservation: Updated
ProcessResultto store rawstandardOutput: Data,standardError: Data, andcombinedData: Data, providingstdout,stderr, andcombinedOutputas computed UTF-8 properties. Verified non-UTF8 binary byte streams (3,072 bytes) are fully preserved. - ECSProcess Pipe Hang: Replaced synchronous
readDataToEndOfFile()withdrainNonBlockingutilizingO_NONBLOCKPOSIX file descriptor reads. Verified subprocesses with orphaned background children holding pipe open return in 0.03s instead of hanging for 4.07s. - ECSPersistence transactionDepth Fix: Corrected
transactionDepthpre-increment leak inECS0Persistence.swiftby incrementing only afterexecDirectsucceeds and applyingdefer { transactionDepth -= 1 }. Addedpublic var currentTransactionDepth: Int.
- ECSProcess Concurrency: Replaced actor-blocking synchronous
- Verification Evidence:
swift test --sanitize=threadon ECSProcess: 22/22 tests pass locally (6.210s) and on rdmsm4x (6.248s).swift test --sanitize=threadon ECSPersistence: 13/13 tests pass locally (0.284s) and on rdmsm4x (0.321s).- Full Tier 0 sweep on rdmsm4x: 93/93 tests pass with 0 failures, 0 warnings, and 0 TSAN race conditions.
- Git Commits & Remotes:
ECSProcess: commitdcd8550pushed togit.ecs0.net:git/lib/ECSProcess.git(main) andgithub.com/richhdoty/rdmsm4x-dev-lib-ecsprocess.git(main).ECSPersistence: commitc9002b0pushed togit.ecs0.net:git/lib/ECSPersistence.git(main) andgithub.com/richhdoty/rdmsm4x-dev-lib-ecspersistence.git(main).- Canonical
rdmsm4x:~/dev/lib/fast-forwarded and verified clean.