Commit Graph
5 Commits
Author SHA1 Message Date
osobh bb299f4b77 chore: commit local changes before node reformat
CI / Publish dry-run (clawsync-core) (push) Has been cancelled
CI / Test (stable) (push) Has been cancelled
CI / Clippy + fmt (push) Has been cancelled
CI / MSRV (1.85) (push) Has been cancelled
2026-05-10 13:58:39 -07:00
osobhandClaude Sonnet 4.6 22f1ec995d feat+test: fix serve-all pull-fs dispatch; add all 4 remaining test gaps
Bug fix:
- handle_any_client now routes FsDirPullRequest to FsSyncServer, fixing
  "serve-all: unrecognized first message" error when `pull-fs` connected
  to a `serve-all` server; FsSyncServer::handle_with_first_message already
  dispatched pull vs push internally — it just wasn't reachable

New subprocess tests:
- subprocess_hdf5_sync_delta: second sync transfers only the changed dataset
- subprocess_hdf5_sync_delete: --delete removes a server-side dataset
- subprocess_pull_fs_cold_copy: pull-fs cold copy via serve-all (TCP)
- subprocess_watch_syncs_on_change: initial sync + FS-event triggered re-sync

New serve_all test:
- serve_all_pull_fs: verifies the just-fixed FsDirPullRequest dispatch path

ServeHdf5Server::start_with_delete() helper added.

665 tests, 0 failures.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-07 06:24:50 -05:00
osobhandClaude Sonnet 4.6 6d2eb5a1db feat: QUIC backend tests, diff command, clippy/doc fixes, QUIC push race fix
- Add QuicSyncBackend + quic_scheduler; fix push stream/close race by
  waiting for peer close instead of calling close_and_drain() on the
  client side (SyncComplete stream was racing CONNECTION_CLOSE)
- Add PipeWriteHalf::shutdown_push() for client-sends-last QUIC paths;
  use it in cmd_push so the server can process SyncComplete before the
  connection tears down
- Add SshSyncBackend + ssh_scheduler with subprocess integration tests
- Add clawsync diff command with --porcelain flag and subprocess tests
- Add QUIC subprocess push/pull integration tests
- Fix clippy --tests violations across 5 crates
- Fix broken intra-doc links (reader.rs, lib.rs, scheduler.rs)
- Rewrite crate READMEs; update BENCHMARKS.md with clawsync-fs CDC row

653 tests, 0 failures.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-06 22:40:31 -05:00
osobhandClaude Sonnet 4.6 b8365a4d41 feat: --verbose per-file progress for sync + serve-all QUIC integration tests
- Add ProgressEvent enum (TotalFiles / FileAcked) to clawsync-fs
- Add FsSyncClient::with_progress() builder accepting an UnboundedSender<ProgressEvent>;
  emits one TotalFiles before RTT2 and one FileAcked per completed file
- Add --verbose / -v flag to `clawsync sync`: spawns a background printer
  that reports each synced file and byte count to stderr as acks arrive
- Add ServeAllServerQuic harness to serve_all integration tests
- Add 3 QUIC integration tests for serve-all: cold-copy, warm-noop, incremental;
  exercises the wait_for_peer_close drain path in handle_any_client

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-05 12:06:07 -05:00
osobhandClaude Sonnet 4.6 a6df333dfe Add serve-all integration tests + fix push/pull agent-id routing
Integration tests (tests/serve_all.rs):
7 new tests verifying serve-all dispatches correctly for each protocol:
  - serve_all_routes_onion_push/pull — push 4 revisions, pull back
  - serve_all_routes_hdf5_sync — dataset-granular sync via serve-all
  - serve_all_routes_fs_sync — general file sync via serve-all
  - serve_all_multi_protocol_sequential — FS then HDF5 on same server
  - serve_all_fs_warm_noop — second sync is a no-op
  - serve_all_push_pull_round_trip — push N revisions, pull, count matches

Bug fix (main.rs):
cmd_push and cmd_pull were hardcoding agent_id as "push-client" /
"pull-client" in their IbltManifest / ManifestRequest. serve-all uses
the agent_id to derive the filename in the root directory, so these
literal strings routed all pushes to the same stub file regardless of
the remote path. Fixed by using remote_path.to_string_lossy() as the
agent_id — this is the natural semantic (agent identifies the remote
endpoint) and remains backward-compatible with the fixed-file serve
command (which ignores agent_id entirely).

Added onion_path_for_agent() helper in handle_any_client: lazily creates
the base HDF5 stub file (8-byte magic) when the serve-all root doesn't
yet contain the target file, mirroring the create-on-first-pull behavior
in cmd_pull.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-04 21:56:50 -05:00