diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-06 10:58:46 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-06 10:58:46 -0500 |
| commit | 3d8778ba12cbbe2b8f6d5512d4b4a8f13a9c55ac (patch) | |
| tree | 9b6c1d5475c3074be59c0407e26470de34a50a08 /docs/developer-guide.org | |
| parent | fdc5f550d35d97272e3e5cac2f46ca7f892dda09 (diff) | |
| download | duet-3d8778ba12cbbe2b8f6d5512d4b4a8f13a9c55ac.tar.gz duet-3d8778ba12cbbe2b8f6d5512d4b4a8f13a9c55ac.zip | |
feat: add transfer-spec, the endpoint matrix, and the conflict/move planners
duet--transfer-spec classifies both endpoints, selects a backend through the registry, determines the route, and delegates argv construction to the backend (Phase 3 in the design spec). It returns the plist the executor will run: sources, destination, backend, route, argv, and async flag.
The route is decided independently of backend by duet--transfer-route: local, local-remote, remote-same-host, remote-direct, or remote-roundtrip. Different remote hosts default to the round-trip through this machine. Direct host-to-host runs only when a per-connection override asks for it, never automatically, because a direct route can silently fail where a round-trip always works.
This phase also registers the two stage-1 backends through the same duet-register-backend seam a plugin uses: rsync for local and ssh-reachable endpoints, TRAMP as the universal fallback that costs more so rsync wins whenever it applies. rsync receives its source and destination as separate argv elements, so a filename with spaces or shell metacharacters stays inert.
The two planners are pure and prompt-free, so the dangerous decisions are testable before a byte moves. duet--plan-conflicts resolves overwrite/skip/rename per file with an apply-to-all that stops asking, taking the existence check and the resolver as injected functions. duet--plan-move pairs each source's copy with a delete gated on that source's copy success, so a failed copy can never delete its source.
Remote-to-remote execution (honoring the round-trip route as a two-step through local) and TRAMP's in-process copy land in Phase 6. Here transfer-spec records the route and the rsync path the executor will use.
Diffstat (limited to 'docs/developer-guide.org')
0 files changed, 0 insertions, 0 deletions
