Repository navigation
feat: add pull-only mode for machines that should never push - #104
Open
Rahulsharma0810 wants to merge 1 commit into
Open
Rahulsharma0810 wants to merge 1 commit into
Rahulsharma0810 wants to merge 1 commit into
Conversation
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.
Closes #102
What
Adds
"mode": "sync" | "pull-only"toopencode-synced.jsonc(defaultsync).In
pull-onlymode:pullbehave as before: fetch and apply remote changes;pushandsecrets-pushreturnSkipped: opencode-synced is in pull-only mode ...instead of committing;statusprintsMode: pull-only(andMode: syncotherwise).Why
There was no way to mark a machine as a consumer. A headless box, a shared machine or an appliance that happens to carry local edits, or a different layout, would push to the shared repo on its next startup.
Compatibility
Default is
sync, so existing setups are unchanged. An unknown value falls back tosync.Not included
#102 also suggested per-machine include/exclude lists for pulls (for example taking only
skills/andAGENTS.md). That is a separate piece of work and I left it out of this PR.Tests
service.test.ts: two machines against a local bare remote. The pull-only machine edits its local config,push()andstartupSync()leave the remote commit count unchanged, and a laterpull()still applies a change pushed by the other machine.config.test.ts:modenormalization (default,pull-only, invalid value).bun run check,bun run test(208 passing) andbun run buildpass.