Repository navigation
feat: doctor warns when the Synloq home or project root is on a network filesystem (#112) - #149
Merged
Merged
Conversation
…rk filesystem (#112) SQLite WAL is documented unsafe on NFS-class filesystems; a corporate share hosting ~/.synloq risks silent corruption. doctor now checks the locality of the Synloq home and the project root and emits loud warning entries (path + filesystem family + remediation note) when either is remote. Never a failure — diagnostics only. Detection: fs.statfs f_type on POSIX (nfs/cifs-smb/sshfs/afs magics); UNC prefix on Windows (Node exposes no GetDriveType — mapped drive letters stay undetected, documented). Unknown types and probe errors fail soft to "local" — no false alarms. Tests: NFS/CIFS/SSHFS magics flagged, ext4 not, UNC flagged without statfs, statfs error fails soft, doctor reports the warning entry and stays silent on local filesystems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Проблема (issue #112)
SQLite WAL документированно небезопасен на сетевых ФС (NFS и др.): synloq home на корпоративной шаре = молчаливая коррупция.
Решение
src/diagnostics/fs-locality.ts:checkFilesystemLocality(path)— POSIX:fs.statfsf_type против магий nfs/cifs-smb/sshfs/afs; Windows: UNC-префикс (Node не даёт GetDriveType — mapped drive letters не детектятся, задокументировано). Неизвестные типы и ошибки probe → local (fail-soft, без ложных тревог).paths.homeиprojectRootв новом полеfilesystemWarnings(path + fsType + remediation). Не падает никогда — только диагностика. DIfilesystemLocalityдля герметичных тестов.Тесты (test/diagnostics/fs-locality.test.ts)
Ограничения
Closes #112.