rdmsm4x-changelog-20260905-1142-ramdisk-m4-it7-settling-probe-isolation
rdmsm4x-changelog-20260905-1142-ramdisk-m4-it7-settling-probe-isolation
Settling probe hardening, APFS synthesized container discovery, and multi-run test isolation implemented and verified across macOS-ramDisk-app on canonical rdmsm4x.
Scope
- Repository: canonical
rdmsm4x:~/dev/apps/macOS-ramDisk-app/ - Commit:
786c175 - Files touched:
Sources/RAMDiskCore/StoragePrimitive.swiftTests/E2ETests/e2e_framework.pyTests/E2ETests/run_e2e_tests.sh
Changes Made
Sources/RAMDiskCore/StoragePrimitive.swift:- Settling probe: verify
FileManager.default.fileExists(atPath: cleanDev)before querying size. Add fallback probe with 200ms backoff if device node is present but settling. Add 2.0s settling pause before retryingeraseDiskif error contains "Could not find disk". - Post-mount collision rejection: dynamically extend
verifyDeadline = max(verifyDeadline, Date().addingTimeInterval(5.0)), add 150ms pause afterclearMountPathStub, and pass-mountPoint targetMountPathif directory exists (falling back to barediskutil mount <volumeDev>if absent). resolveAllDeviceEntities: querydiskutil apfs list -plistto discover synthesized APFS containers and volumes mapped to the RAM disk physical store (PhysicalStores), ensuring child APFS containers are unmounted and ejected before parent disk ejection.
- Settling probe: verify
Tests/E2ETests/e2e_framework.py:- Added post-drain verification and emergency fallback loop in
ensure_unmounted().
- Added post-drain verification and emergency fallback loop in
Tests/E2ETests/run_e2e_tests.sh:- Added pre-tier and post-tier verification barriers in
run_tier(). - Added post-suite
cleanup_ramdisks.
- Added pre-tier and post-tier verification barriers in
Verification Evidence
- AST Invariants: All 6 literal strings pass with exit code 0.
swift build: 0 errors, 0 warnings.swift test: 4/4 Modern Testing Library tests pass.swift test --sanitize=thread: 0 data races, exit code 0.- 15-cycle rapid stress test: 15/15 PASS strictly at
/Volumes/RAMDiskwith 0 collisions and 0 kernel leaks. - Master E2E suite (
run_e2e_tests.sh): 3 consecutive runs passed 192/192 tests across all 5 tiers (total 576/576 tests passed, exit code 0 on all runs). - Residual state:
mount | grep -i ramdisk(exit 1) andhdiutil info | grep -i ram://(exit 1) confirmed 0 mounts and 0 residual devices. - Git remotes:
git push fleet main && git push backup main && git push origin mainsucceeded with 0 dirty and 0 0 ahead-behind.