livesync-bridge: restore bidirectional sync at 60s poll (agent write workflow) - #176
Merged
Merged
Conversation
…rite workflow) PR #175 defaulted the bridge to one-way (CouchDB->disk only) for a pure-RAG read use case. But agents (Hermes/Claude) and host edits write docs INTO notes/ and need them to flow UP to CouchDB -> devices, which one-way disabled. Restore bidirectional, but at a 60s poll interval instead of the original 3s: polling stats every file each tick, so 3s on a ~5k-file vault pegged a core (~128% CPU), while 60s keeps the write workflow (updates reach CouchDB within a minute) at ~6% CPU. Validated: a file written into notes/ reached CouchDB within the poll window; idle CPU is a fraction of the 3s figure. Set USEPOLLING=0 for a read-only mirror at ~0 CPU if nothing writes to notes/ host-side. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Restores the disk->CouchDB direction that PR #175 disabled, so agent/host writes to
notes/flow up to CouchDB and devices. Uses a 60s poll interval (vs the original 3s that caused ~128% CPU) — ~6% CPU, writes propagate within a minute. Validated: a file written intonotes/reached CouchDB within the poll window. Supersedes #175's one-way default; setCHOKIDAR_USEPOLLING=0for a read-only mirror at ~0 CPU.🤖 Generated with Claude Code