Skip to content

SC-16: end-to-end sync pipeline integration - #7

Merged
iampryce merged 1 commit into
mainfrom
sc-16-pipeline-integration
Jul 31, 2026
Merged

iampryce merged 1 commit into
mainfrom
sc-16-pipeline-integration

Conversation

@iampryce

Copy link
Copy Markdown
Contributor

Wires SC-3/SC-4/SC-5/SC-7/SC-8 together into a real working sync for the first time. New internal/pipeline package orchestrates Sender/ Receiver over gob-encoded frames (3 types: file list, signature, delta

  • explicitly not rsync's real wire format, grsync-to-grsync only for now). Directories/symlinks skip the signature/delta round trip since their content already travels in the file list; regular files get the real exchange. Local-to-local and SSH-remote share identical Sender/Receiver code (in-process io.Pipe vs real Session), so the local E2E test exercises the same path the remote case uses.

grsync SRC DEST actually syncs files now. Added the -p/-t/-o/-g/-l attribute flags SC-8 built the machinery for but never exposed.

Real findings:

  • Directory attribute ordering bug: applying mtime/perms on creation gets clobbered once children are written. Fixed with a deepest-first deferred pass; verified by deliberately re-breaking it to confirm the test catches the regression.
  • Dropped-connection handling (sender/receiver vanishing mid-transfer) now proven to error promptly rather than hang.
  • Windows directories chmod to 0555/0777, not 0444/0666 like files - distinct from SC-8's file-only finding, needed for E2E correctness.

Hard links and device/special files deliberately deferred (SC-8 built DetectHardLinks/ApplyHardLinks/ApplySpecialFile, unused here) - separate follow-up ticket, not an oversight.

Clean on native Windows and cross-compiled Linux.

Wires SC-3/SC-4/SC-5/SC-7/SC-8 together into a real working sync for
the first time. New internal/pipeline package orchestrates Sender/
Receiver over gob-encoded frames (3 types: file list, signature, delta
- explicitly not rsync's real wire format, grsync-to-grsync only for
now). Directories/symlinks skip the signature/delta round trip since
their content already travels in the file list; regular files get the
real exchange. Local-to-local and SSH-remote share identical
Sender/Receiver code (in-process io.Pipe vs real Session), so the local
E2E test exercises the same path the remote case uses.

grsync SRC DEST actually syncs files now. Added the -p/-t/-o/-g/-l
attribute flags SC-8 built the machinery for but never exposed.

Real findings:
- Directory attribute ordering bug: applying mtime/perms on creation
  gets clobbered once children are written. Fixed with a deepest-first
  deferred pass; verified by deliberately re-breaking it to confirm the
  test catches the regression.
- Dropped-connection handling (sender/receiver vanishing mid-transfer)
  now proven to error promptly rather than hang.
- Windows directories chmod to 0555/0777, not 0444/0666 like files -
  distinct from SC-8's file-only finding, needed for E2E correctness.

Hard links and device/special files deliberately deferred (SC-8 built
DetectHardLinks/ApplyHardLinks/ApplySpecialFile, unused here) - separate
follow-up ticket, not an oversight.

Clean on native Windows and cross-compiled Linux.
@iampryce
iampryce requested a review from jasonmiller-cc July 31, 2026 21:06
@iampryce
iampryce merged commit 2ff78cb into main Jul 31, 2026
2 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