Fleet changelogs · dev.ecs0.net
rdmsm4x-changelog-20260911-0528-m3-iter3-syslog-resync-nonblocking-supervisor

rdmsm4x-changelog-20260911-0528-m3-iter3-syslog-resync-nonblocking-supervisor

Remediated DEFECT-M3-02 RFC syslog stream resynchronization and implemented non-blocking process supervisor architecture with 100% test pass rate across standalone, umbrella, stress, deep stress, universal compilation, and local 4-tier E2E suites.

Scope

Exact Files Touched

  1. rdmsm4x:~/dev/lib/ECSSystem/Sources/ECSSystem/SyslogTransports.swift
  2. rdmsm4x:~/dev/lib/ECSLog/Sources/ECSLog/SyslogTransports.swift
  3. rdmsm4x:~/dev/lib/ecs0lib/Sources/ECS0Log/SyslogTransports.swift
  4. rdmsm4x:~/dev/lib/ECSSystem/Sources/ECSSystem/ProcessSupervisor.swift
  5. rdmsm4x:~/dev/lib/ecs0lib/Sources/ECS0System/ProcessSupervisor.swift
  6. rdmsm4x:~/dev/lib/ECSSystem/Tests/ECSSystemTests/SyslogTests.swift
  7. rdmsm4x:~/dev/lib/ECSSystem/Tests/ECSSystemTests/ProcessSupervisionAndEventMonitoringTests.swift
  8. rdmsm4x:~/dev/lib/ECSLog/Tests/ECSLogTests/SyslogTests.swift
  9. rdmsm4x:~/dev/lib/ecs0lib/Tests/ECS0LibTests/M3_SyslogAndSystemServicesTests.swift

Changes Implemented

  1. SyslogOctetStreamDecoder 5-Stage Resynchronization:
    • Pruned leading non-digit bytes immediately (0x30...0x39).
    • Guarded space delimiter and bounded memory on un-delimited streams (> maxFrameLength).
    • Identified non-digits preceding space, isolated last contiguous digit span (headerStartIndex), and discarded garbage while preserving length tokens.
    • Suppressed oversized all-digit length headers (headerDistance > 19) without phantom frames.
    • Enforced msgLen > 0 and msgLen <= maxFrameLength with zero empty frame emission.
  2. ProcessSupervisor Non-Blocking Architecture:
    • Replaced blocking process.waitUntilExit() in Task with Foundation native Process.terminationHandler.
    • Eliminated cooperative thread pool starvation (reduced latency from 5.108s to 0.104s under 16 concurrent processes).
    • Added isStopping: Bool guard and tracked/cancelled pending restart tasks (restartTask).
    • Implemented concurrent stopAll() via withTaskGroup.
    • Preserved accurate .terminated(exitCode:) state on clean (0) and nonzero (42) exits.
  3. Comprehensive Regression Test Suites:
    • Added 20B, 100B, and 65KB non-space garbage recovery tests.
    • Added boundary and oversized length rejection tests (65537, 100K, 1B, 18-digit, 20-digit, 32-digit).
    • Added 1-byte TCP stream fragmentation and multibyte Unicode/CRLF tests.
    • Added 20-process non-blocking concurrency tests and natural/nonzero exit state transition tests.
  4. Parity & Dual-Surface Symmetry:
    • 0-line diff verified across all 3 SyslogTransports.swift surfaces.
    • 0-line diff verified across both ProcessSupervisor.swift surfaces.

Commands Run & Verification Evidence

Git Commits & Remote Locations

How to Undo

Outstanding Owner Actions