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
- Hosts:
rdmbair15m5,rdmsm4x - Projects:
apps/Tyrell,lib/ECSProcess - Ticket:
ISSUE-20260915-09
Files Touched
apps/Tyrell/Sources/TyrellCore/Worktree/WorktreeModels.swift:- Added
case emptyCommitGeneratedtoenum WorktreeError. - Added
case .emptyCommitGenerated: return "git commit-tree returned an empty commit OID."toerrorDescription.
- Added
apps/Tyrell/Sources/TyrellCore/Worktree/ECSWorktreeManager.swift:- In
captureCheckpoint(), added:guard !commitOID.isEmpty else { throw WorktreeError.emptyCommitGenerated }.
- In
lib/ECSProcess/Sources/ECSProcess/ProcessRunner.swift:- Hardened
drainNonBlocking(fileHandle:)to retry whenread()returns -1 anderrno == EINTR. - Added bounded
poll(&pfd, 1, 50)whenread()encountersEAGAIN/EWOULDBLOCKto guarantee all trailing child pipe output is captured. - Hardened
PipeReadGate.readAvailable(from:)to retry onEINTR. - Closed parent's pipe write handles
(
stdoutPipe.fileHandleForWritingandstderrPipe.fileHandleForWriting) immediately afterprocess.run(), ensuring child is the sole writer and true EOF is reached upon child exit.
- Hardened
apps/Tyrell/Tests/TyrellCoreTests/WorktreeEngineTests.swift:- Added
testParallelCheckpointStress50Iterations()running 50 concurrent checkpoint captures viawithThrowingTaskGroup.
- Added
Git Commits
lib/ECSProcess: commit19d19d6on canonicalmain(rdmsm4x:~/dev/lib/ECSProcessandrdmbair15m5:~/dev/lib/ECSProcess)apps/Tyrell: commit67b55b9on isolated worktreeagy/tyrell-issue-20260915-09-worktree-engine(rdmsm4x:~/dev/_worktrees/tyrell-issue-20260915-09-worktree-engine)
Verification Evidence
lib/ECSProcess:swift testonrdmbair15m5: 24/24 tests passed (0 failures).swift testonrdmsm4x: 24/24 tests passed (0 failures).
apps/Tyrell:swift test --filter WorktreeEngineTestsonrdmbair15m5: 12/12 tests passed (includingtestParallelCheckpointStress50Iterationsin 2.175s).swift test --filter WorktreeEngineTestsonrdmsm4x: 12/12 tests passed (includingtestParallelCheckpointStress50Iterationsin 1.465s and 0.657s).
- Swift 6 strict concurrency:
- Compiled with 0 warnings / 0 errors on modified source files.
- Ticket resolution:
ISSUE-20260915-09resolved on canonicalrdmsm4xticket registry.
Rollback & Undo
- Revert commit
19d19d6inlib/ECSProcess. - Remove worktree
~/dev/_worktrees/tyrell-issue-20260915-09-worktree-engineor delete branchagy/tyrell-issue-20260915-09-worktree-engine.
Outstanding Actions
- None.