- Add inline TODO comment in runCommand.ts about standardising
replication failure cause identification logic.
- Add test-sync-locked-remote-linux.sh that verifies:
1. sync succeeds when the remote milestone is not locked.
2. sync fails with an actionable error when the remote milestone
has locked=true and accepted_nodes is empty.
When the remote database is locked and the CLI device is not in the
accepted_nodes list, openReplication returns false with no CLI-specific
guidance. The existing log message ('Fetch rebuilt DB, explicit
unlocking or chunk clean-up is required') is aimed at the Obsidian
plugin UI.
Check the replicator's remoteLockedAndDeviceNotAccepted flag after
sync failure and print a clear message directing the user to unlock
from the Obsidian plugin.
Ref: #832
Node.js v25 provides a built-in localStorage on globalThis, but without
`--localstorage-file` it is an empty object lacking getItem/setItem.
The existing check `!("localStorage" in globalThis)` passes, so the
polyfill is skipped and the CLI crashes with:
TypeError: localStorage.getItem is not a function
Check for getItem as well so the polyfill is applied when the native
implementation is incomplete.
- Fixed flaky timing issues in P2P synchronisation.
- Fixed more binary file handling issues in CLI.
### Tests
- Rewrite P2P end-to-end tests to use the CLI as host.