rdmsm4x-changelog-20260905-0603-ramdisk-drain-polling-e2e-isolation
rdmsm4x-changelog-20260905-0603-ramdisk-drain-polling-e2e-isolation
Added descriptor drain polling to production CLI/Engine, non-blocking lock inspection, guaranteed E2E test teardown, and master runner signal traps in macOS-ramDisk-app to permanently eliminate unmount flakiness and cross-tier volume cascades.
Summary
- Host: rdmsm4x
- Scope: ~/dev/apps/macOS-ramDisk-app/
- Commit: a526eb7
(
fix(ramdisk): add descriptor drain polling, guaranteed E2E teardown, and non-blocking lock inspection) - Remotes: Pushed to
fleet,origin, andbackupwith 0 dirty and 0 0 parity.
Touched Files
Sources/ramdisk/main.swift: Added 2.0s descriptor drain polling loop prior to safe refusal exit(1); preserved verbatim invariantif !force && !engine.canReleaseWorkspace {.Sources/RAMDiskCore/RAMDiskEngine.swift: AddeddrainTimeout: TimeInterval = 2.0parameter and drain polling loop toreleaseWorkspaceCleanly(); preserved verbatim invariantguard canReleaseWorkspace else {and!activeLocks.contains(where: { $0.lockType == .exclusive }).Sources/RAMDiskCore/ProcessLockInspector.swift: Added-nand-Pflags tolsofprocess invocation to prevent DNS and port resolution hangs during descriptor inspection.Tests/E2ETests/e2e_framework.py: Modernizedrun_cli_jsonto parse JSON regardless of exit code (preserving error diagnostics) and addedunmount_volume(with retries and drain polling) andensure_unmounted()lifecycle helpers.Tests/E2ETests/test_tier4_real_world_scenarios.py: Modernized unmount calls to useunmount_volume, explicitly asserted safe refusal in T4.2 while active compilation lock is held, and wrapped all scenarios and suite intry ... finally: ensure_unmounted().Tests/E2ETests/test_tier5_adversarial_challenge.py: Added pre-flight cleanup and increased T5.5.2 list schema validation timeout from 10.0s to 15.0s.Tests/E2ETests/run_e2e_tests.sh: Addedcleanup_ramdisks()function (clearing numbered volumes andram://devices), signal traps onEXIT INT TERM, and per-tier isolation cleanup.
Verification Evidence
- Clean orphaned mounts: verified zero lingering mounts and zero attached ram devices.
- AST Invariants: All 3 grep checks passed cleanly.
swift build && swift test: 4/4 passed in 0.007s.swift test --sanitize=thread: 4/4 passed in 0.004s with 0 data races.zsh Tests/E2ETests/run_e2e_tests.sh:- Run 1: 192/192 PASSED (24s)
- Run 2: 192/192 PASSED (28s)
- Run 3: 192/192 PASSED (24s)
- Git Status:
dirty: 0,fleet: 0 0,origin: 0 0,backup: 0 0.