fix(mod_compiler): flush directory entries before unpack to avoid XFS delayed-log causing partial readdir results

This commit is contained in:
2026-03-05 13:21:03 +00:00
parent e1198c0a78
commit 920095d008
3 changed files with 37 additions and 1 deletions

View File

@@ -1,5 +1,13 @@
# Changelog
## 2026-03-05 - 4.1.11 - fix(mod_compiler)
flush directory entries before unpack to avoid XFS delayed-log causing partial readdir results
- Add fs import and call child_process.execSync('sync') before unpacking compiled output to force kernel-level sync
- Add syncDirectoryTree(dir) to recursively open and fsync directory file descriptors and traverse subdirectories
- Call syncDirectoryTree on the destination directory before performing unpack to ensure TypeScript writeFileSync entries are committed (prevents partial readdir results on XFS)
- Errors during directory sync are ignored to avoid breaking normal flow
## 2026-03-05 - 4.1.10 - fix(unpack)
use atomic renames to flatten nested output and make unpacking more reliable