feat: cluster Phase 4 — remote backup browse, download, restore & delete #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/clustering-phase4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Completes the clustering vision: from the main dashboard you can now browse, download, restore, and delete a node's backup files — all over the node-initiated channel (main still never opens a connection into a node).
The mechanism gap this closes
Phase 2's command channel is fire-and-forget (good for actions). Phase 4 adds the two missing shapes:
dispatch_commandenqueues a command and blocks on a per-command-id waiter that the node's result event signals (timeout →CommandTimeout). Delivery still rides the existing long-poll, so it's near-instant.POST /api/cluster/nodes/:id/files/:token), and streams the pipe out to the browser. Two Puma threads rendezvous on the pipe.What's included
ClusterAgent):list_backups,backup_details,list_contents,delete_backup,restore(fire-and-forget + pollable status),upload_file(streams viaNet::HTTPbody_stream,application/octet-streamso Rack doesn't parse the body as params).BackupManagementService):GET /api/nodes/:id/files[/:date/:filename[/contents]],DELETE,POST …/restore,GET …/download,GET …/commands/:cid.BT_MAX_TRANSFERS(503 when exceeded); each holds 2 Puma threads, soBT_HEALTH_MAX_THREADSdefault raised to 24. Keep it ≳BT_MAX_LONGPOLL + 2×BT_MAX_TRANSFERS+ UI headroom.Testing
Full suite 1078 examples, 0 failures. Added coordinator RPC + transfer-relay specs, node file-op execution specs (webmock), and endpoint request specs. Plus an in-process E2E proving remote browse and a 200 KB file streamed node→main→browser byte-for-byte, and the no-responder → 504 path.
Depends on nothing outside main; safe to merge after review. Downloads are still gated by the node's existing
MAX_DOWNLOAD_SIZE.🤖 Generated with Claude Code