Split-root state sync degrades to local-only with no origin remote#364
Merged
Merged
Conversation
…heckout has no origin Detection: stateHasOrigin probe (git remote get-url origin, network-free named-origin discriminator) in internal/status/state.go (runGitCmd) and internal/dispatch/build.go (local exec). Boot (AC-1/AC-4): gatherBoot populates a split-root-only stateRemote field; the text STATE_BACKEND line gains a remote: origin / remote: none — state not remotely synced clause, and the JSON envelope gains state_remote after entity_dir_present. Single-root omits both. Dispatch (AC-2/AC-3): stateCommitGuidance takes a hasOrigin param; origin keeps the push/pull-rebase reminder verbatim, no-origin replaces only the remote-sync tail with a local-only line while keeping the path-scoped commit. Callers pass stateHasOrigin(stateCheckout). Contract prose: no-origin carve-out added to the ensign and FO split-root Multi-writer sync sections. Tests: real-git fixtures (detection unit, boot text+JSON origin/none pair, dispatch origin/no-origin pair). Existing origin-asserting fixtures gain an origin remote. go test ./... green (1260 passed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
clkao
added a commit
that referenced
this pull request
Jun 13, 2026
clkao
added a commit
that referenced
this pull request
Jun 13, 2026
clkao
added a commit
that referenced
this pull request
Jun 14, 2026
clkao
added a commit
that referenced
this pull request
Jun 14, 2026
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.
Degrade split-root state sync to local-only when the state checkout has no
originremote, so a local-only workflow isn't told to run impossible push/pull.What changed
stateHasOriginprobe (git remote get-url origin) shared by boot and dispatchstatus --bootexposes remote availability — textSTATE_BACKEND … remote: origin|noneand JSONstate_remote(split-root only)dispatch buildkeeps the path-scoped commit but dropsgit push/pull --rebasefor a no-origin checkout, emitting a local-only lineEvidence
go test ./...green (1344)--boottext+JSON on real split-root checkoutsgf