Fleet changelogs · dev.ecs0.net
rdmbair15m5-changelog-20260915-2154-tyrell-worktree-engine-defect-resolution

rdmbair15m5-changelog-20260915-2154-tyrell-worktree-engine-defect-resolution

Resolved Tyrell Worktree Engine empty OID defect (ISSUE-20260915-09) and hardened ProcessRunner pipe drain under concurrency.

Scope

Files Touched

  1. apps/Tyrell/Sources/TyrellCore/Worktree/WorktreeModels.swift:
    • Added case emptyCommitGenerated to enum WorktreeError.
    • Added case .emptyCommitGenerated: return "git commit-tree returned an empty commit OID." to errorDescription.
  2. apps/Tyrell/Sources/TyrellCore/Worktree/ECSWorktreeManager.swift:
    • In captureCheckpoint(), added: guard !commitOID.isEmpty else { throw WorktreeError.emptyCommitGenerated }.
  3. lib/ECSProcess/Sources/ECSProcess/ProcessRunner.swift:
    • Hardened drainNonBlocking(fileHandle:) to retry when read() returns -1 and errno == EINTR.
    • Added bounded poll(&pfd, 1, 50) when read() encounters EAGAIN/EWOULDBLOCK to guarantee all trailing child pipe output is captured.
    • Hardened PipeReadGate.readAvailable(from:) to retry on EINTR.
    • Closed parent's pipe write handles (stdoutPipe.fileHandleForWriting and stderrPipe.fileHandleForWriting) immediately after process.run(), ensuring child is the sole writer and true EOF is reached upon child exit.
  4. apps/Tyrell/Tests/TyrellCoreTests/WorktreeEngineTests.swift:
    • Added testParallelCheckpointStress50Iterations() running 50 concurrent checkpoint captures via withThrowingTaskGroup.

Git Commits

Verification Evidence

  1. lib/ECSProcess:
    • swift test on rdmbair15m5: 24/24 tests passed (0 failures).
    • swift test on rdmsm4x: 24/24 tests passed (0 failures).
  2. apps/Tyrell:
    • swift test --filter WorktreeEngineTests on rdmbair15m5: 12/12 tests passed (including testParallelCheckpointStress50Iterations in 2.175s).
    • swift test --filter WorktreeEngineTests on rdmsm4x: 12/12 tests passed (including testParallelCheckpointStress50Iterations in 1.465s and 0.657s).
  3. Swift 6 strict concurrency:
    • Compiled with 0 warnings / 0 errors on modified source files.
  4. Ticket resolution:
    • ISSUE-20260915-09 resolved on canonical rdmsm4x ticket registry.

Rollback & Undo

Outstanding Actions