Fleet changelogs · dev.ecs0.net
rdmsm4x-changelog-20260905-1103-ramdisk-m4-it6-remediation

rdmsm4x-changelog-20260905-1103-ramdisk-m4-it6-remediation

Summary: Resolved unmount pre-flight dynamic discovery, strict collision rejection, multi-entity APFS container teardown, and test isolation flakiness in macOS-ramDisk-app on rdmsm4x.

Scope & Changes

  1. Sources/ramdisk/main.swift:
    • In unmount command, performed dynamic mount discovery DarwinStoragePrimitive.findMountedVolumes(matchingPrefix: "/Volumes/RAMDisk") before evaluating guard engine.volumeState.isMounted.
    • Latched engine.volumeState and engine.config.mountPath to the resolved active mount point.
    • Required sustained consecutive clean checks (consecutiveCleanChecks >= 3, 300ms quiet state) in descriptor drain loop before early exit.
    • Enforced safe refusal exit code 1 with structured JSON when exclusive write locks exist.
  2. Sources/RAMDiskCore/RAMDiskEngine.swift:
    • Updated releaseWorkspaceCleanly() descriptor drain loop to require consecutiveCleanChecks >= 3.
  3. Sources/RAMDiskCore/StoragePrimitive.swift:
    • Added clearMountPathStub(_ mountPath: String) with lsof -t +D handle termination, specific metadata unlinking (.fseventsd, .DS_Store), recursive removal, /bin/rm -rf, and 2.0s VFS teardown drain.
    • Enforced strict collision rejection in formatVolume: force unmount collision path (/Volumes/RAMDisk 1), clear stub /Volumes/RAMDisk, and remount strictly via diskutil mount <volumeDev>. Never return collision paths.
    • Extended device settling probe to 5.0s with exponential backoff retries and APFS container deletion fallback.
    • Reverse topological detachment in detachVolume (mounts, containers, partitions, root physical parent disks).
  4. Tests/E2ETests/run_e2e_tests.sh:
    • Updated cleanup_ramdisks() to terminate handles before unmount, force eject APFS containers + physical parents, remove stubs, and verify triple-point settlement.
  5. Tests/E2ETests/e2e_framework.py:
    • Updated ensure_unmounted() with dual lsof/fuser termination, reverse APFS container + root disk ejection, directory stub clearing, and triple-point settlement check.
    • Increased CLI unmount timeout to 15.0s in unmount_volume.
  6. Tests/E2ETests/test_tier4_real_world_scenarios.py:
    • Replaced isolated unmount calls at scenario startups (T4.1, T4.2, T4.4, T4.5) with ensure_unmounted().

Verification Evidence