Cairn desktop client — Windows, macOS and Linux from one Go codebase. Phase 1: sync engine core.
The watcher dropped every Chmod-only event. On kqueue a truncation goes through setattr and raises only NOTE_ATTRIB, so on macOS truncate and ftruncate changed a file's content with no event, and only the periodic rescan caught it. Where the backend is kqueue, the watcher now records each watched file's size and modification time before its folder's watch is added, and on every event after. An attribute-only event is reported when either one moved, or when the file was never seen; it is still dropped when both are unchanged, as for a mode change or the extended attributes macOS updates on open. inotify reports a truncation as a write, so on Linux Chmod-only events are still dropped outright and no stamps are kept. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Nikola Somborski <Nsomborski1995@gmail.com> |
||
|---|---|---|
| .forgejo/workflows | ||
| build/icons | ||
| cmd/cairnsync | ||
| docs | ||
| frontend | ||
| internal | ||
| test/integration | ||
| .gitignore | ||
| CLAUDE.md | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
cairn-desktop
The desktop sync client for Cairn, a self-hosted file server. Windows, macOS and Linux are built from one Go codebase.
Status
Phase 1 of 4 (phase-1-engine): the three-way sync engine core, in pure Go, in-memory and
property-tested. The real WebDAV remote, the real filesystem and the CLI arrive in phase 2, the
desktop app in phase 3, and files-on-demand in phase 4. Nothing ships before v1.0, at the end of
phase 4.
Layout
internal/sync/ the three-way sync engine: no OS, network or UI imports (arch_test.go enforces it)
internal/vfs/ filesystem interface + in-memory implementation
internal/remote/ Cairn server interface + in-memory implementation
internal/state/ SQLite store of last-synced state (pure-Go driver)
Running the tests
CGO_ENABLED=0 go test ./...
You need Go 1.25 or newer. CGO_ENABLED=0 always applies, so no dependency may require cgo. CI
runs go vet, then the tests, then prints coverage.
Contributing
Every commit needs a DCO sign-off: git commit -s. Read CLAUDE.md first: it holds the
constraints, the workflow and the order of work. The full design is in docs/design-spec.md.
Licence
GPLv3. See LICENSE.