Skip to content

Modularize sync push and pull orchestration helpers#19

Merged
danieljhkim merged 1 commit into
mainfrom
orbit/T20260510-20-6a00ea6e
May 10, 2026
Merged

Modularize sync push and pull orchestration helpers#19
danieljhkim merged 1 commit into
mainfrom
orbit/T20260510-20-6a00ea6e

Conversation

@danieljhkim
Copy link
Copy Markdown
Owner

Task

T20260510-20 — Modularize sync push and pull orchestration helpers

Description

Problem

internal/sync/push.go mixes push orchestration, remote config creation/update, workspace-reference serialization, path helpers, and commit-message formatting. pull.go is smaller but repeats the remote setup sequence in-line. The production sync package would be easier to extend if shared remote setup and push-specific helpers were separated.

Why It Matters

Sync work often intersects with remote Git and persistence behavior. Pulling remote setup/config and workspace-reference concerns into focused files reduces the amount of context a future sync change needs and lets sync production work run independently from sync test-suite cleanup.

Constraints / Notes

  • Treat this as a behavior-preserving refactor.
  • Keep public Syncer, PushStore, PullStore, request/result types, and persisted workspace reference JSON shape unchanged.
  • Good target split: remote setup/config helpers, workspace reference serialization, push orchestration, and pull orchestration in separate files.
  • Do not reorganize syncer_test.go in this task; there is a separate test-only task for that.

Acceptance Criteria

  • Push orchestration, pull orchestration, remote config/setup helpers, and workspace-reference serialization live in focused sync package files instead of being concentrated in push.go.
  • Persisted workspace reference JSON fields and buildPushCommitMessage outputs remain byte-for-byte compatible with existing tests.
  • go test -v ./internal/sync -run 'Push|Pull|Workspace|CommitMessage' passes.
  • go test -v ./internal/sync passes.

Execution Summary

Click to expand

Outcome: success

Changes:

  • Split sync push helpers into focused files: push orchestration remains in push.go, commit-message formatting moved to commit_message.go, workspace-reference serialization/path helpers moved to workspace_reference.go, and remote config/setup helpers moved to remote.go.
  • Updated pull orchestration to use shared remote config/setup helpers while preserving existing error wrapping and cancellation checkpoints.

Assessment: Behavior-preserving refactor validated by the requested focused and full internal/sync test runs.

Validation

  • Not reported

Branch Freshness

  • Base ref: origin/main
  • Head ref: orbit/T20260510-20-6a00ea6e
  • Behind base: 0
  • Ahead of base: 1

authored by: gpt-5

Tasks:
- T20260510-20: Modularize sync push and pull orchestration helpers
@danieljhkim danieljhkim merged commit ad258a6 into main May 10, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant