Skip to content

fix(workspace): citizen sync survives diverged submodule pointers (gitlinks resolve shared-wins) - #2137

Merged
joelteply merged 1 commit into
canaryfrom
fix/citizen-sync-gitlink-conflicts
Aug 3, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/citizen-sync-gitlink-conflicts

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Every resident's workspace sync has been failing on every ensure: the persona autosave commits her stale vendored submodule pointer while shared advances it, and git's recursive merge refuses non-trivial gitlink divergence regardless of -X theirs — so the stale-clone self-heal aborted forever and all four residents kept perceiving July trees (their conway fixation's substrate).

Fix: when the failed merge leaves ONLY gitlink entries unmerged, resolve each to FETCH_HEAD's sha (shared wins, same doctrine as -X theirs) and conclude the merge; any other conflict still aborts loud. Regression test constructs the exact both-sides-moved submodule shape. 11/11 git_bridge tests green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…esolve gitlinks shared-wins (#49 tail)

Glass-boxed 2026-08-03: every resident's citizen-workspace sync failed on every
ensure with 'Recursive merging with submodules currently only supports trivial
cases'. Mechanism: the sync's autosave commits the persona's stale vendored
submodule pointer while the shared checkout advances it — both sides move the
gitlink, and git's recursive merge refuses non-trivial gitlink divergence
regardless of -X theirs. The self-heal built for the stale-clone bug thereby
stranded every workspace stale forever (personas kept perceiving July trees;
the #2135 debris sweep could never reach them).

Fix: when the failed merge left ONLY gitlink (mode 160000) entries unmerged,
resolve each to FETCH_HEAD's recorded sha (shared wins — same doctrine as
-X theirs for files: the framework is not hers to diverge) and conclude the
merge. Any other conflict shape still aborts loud with the workspace intact.
Probe: workspace.sync.gitlink_resolved. Regression test builds the exact
both-sides-moved shape with a real submodule.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply enabled auto-merge (squash) August 3, 2026 17:05
@joelteply
joelteply merged commit 1771be4 into canary Aug 3, 2026
@joelteply
joelteply deleted the fix/citizen-sync-gitlink-conflicts branch August 3, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant