Repository navigation
RFC: Remote agent for cross-seed (with orphan-scan + dirscan as v2 fast-follow) #1814
Replies: 5 comments 5 replies
|
@nitrobass24 just noticed PR #1820, happy to see this in flight, will close the RFC out. Read through the Stage A+B scaffold and
(Also: when audit logging lands in Stage C, path fields will want If any are already on the radar for a later stage, ignore. Happy to engage directly on the PR for the relevant stage if useful. |
|
Commenting here for visibility. Me and soup will give this a thorough review. It's a great start! |
|
Circling back since it's been a few months. Looks like nitrobass24's split stack (#1913/#1914) has been parked since May with CI green, and the hardlink features shipping in recent releases are all local-only. Totally understand if remote just isn't the priority right now, but I'd love to see it land eventually, so consider this a standing offer to help rather than a nudge! For what it's worth, I don't have a horse in the transport race. The SSH helper and the daemon from my original writeup share the same fsops foundation, and that layer (#1914) is the bulk of the work either way. @s0up4200 if outside help would actually unstick anything, the pieces I think I could take off your plate:
And if the honest answer is "local-only for now, remote later or never," that's useful to know too and I'll stop watching the branches lol |
|
Works for me. I’ll reopen things tomorrow. And let’s jump on discord and
work it out. I think we can knock this out.
…On Mon, Aug 10, 2026 at 8:35 PM Jordan Rodgers ***@***.***> wrote:
Yeah, I'm in! Happy to build it and stick around to maintain it after.
@nitrobass24 <https://github.com/nitrobass24> I'd rather build on your
stack than replace it. Your branches are still on the repo and #1914
<#1914> was green when it closed, so
my plan is to revive that as the starting point with your commits intact.
If you want to stay involved, even better, and if you're done with it after
the long wait, totally get that too. Your split was clean and it deserved a
review.
On transport, having sat with both designs, I think your SSH approach was
the right call and I'm dropping the HTTPS daemon from my RFC. Shared
seedboxes don't give you root, systemd, or spare ports, but they always
give you SSH, and running the helper as a child of the connection means
nothing new is exposed and nothing to keep alive on the box. It's the
borg/restic model. The one thing I want to tighten from my original writeup
is the key handling: dedicated helper key rather than a personal one, the
authorized_keys forced-command template as the default path instead of
optional, and AAD binding on the stored key so a DB write can't swap
credentials between instances.
@s0up4200 <https://github.com/s0up4200> so the shape would be:
1. Revive the fsops backend layer (#1914
<#1914>) as the first PR.
Transport-neutral, was CI-green, bulk of the work.
2. SSH transport + schema next (#1917
<#1917> base), with the
key-handling hardening above folded in.
3. Small PRs, one at a time, each reviewable in a sitting.
If that works for you I'll get the first one up soon.
—
Reply to this email directly, view it on GitHub
<#1814?email_source=notifications&email_token=ABYUR2R2H6QECGJHEP3B37L5JJZ77A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNZZGY4TONJVUZZGKYLTN5XKO3LFNZ2GS33OUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#discussioncomment-17969755>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABYUR2TKBUCC6JURIHISGIT5JJZ77AVCNFSNUABIKJSXA33TNF2G64TZHMYTAMZRHA2DSNZUGQ5UI2LTMN2XG43JN5XDWOJZGUZTMMJQUF3AE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Agent BriefCategory: enhancement Current behavior: The transport question this RFC opened has been settled since it was filed: the SSH/SFTP-native design draft in Desired behavior:
Key interfaces:
Acceptance criteria:
Out of scope:
Why a human: Whether and when the remote backend lands is a maintainer call, and so is the contribution path, since the repo takes pull requests from collaborators only and a non-collaborator in this thread has a standing offer to implement it. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, drafted a design for the remote agent feature you've referenced a few times in #dev-general. Posting here for direction before writing any code.
Problem. Cross-seed needs
os.Link/os.SameFileagainst qbit's save paths. SSHFS doesn't propagatenlink/inode reliably (the idempotency check atpkg/hardlinktree/create.go:64-77returns wrong answers); rclone synthesises inodes; NFS works but most seedboxes won't export it. So users running qbit on a remote VPS or seedbox can't use cross-seed even with a network mount. A small daemon (qui-agent) colocated with the remote qbit, exposing a narrow filesystem RPC over HTTPS, fixes it cleanly.Scope. v1 is cross-seed only. v2 fast-follow migrates orphan-scan and dirscan to the same agent — adding new interfaces and endpoints without breaking the v1 wire protocol. The intent is that operators don't end up needing both an agent and a network mount; once v2 ships they can drop mounts entirely. Aware this introduces a second release artifact; goreleaser config covers it, no new CI infra.
Design. qui → agent over HTTPS, stateless, JSON. SPKI-pinned certificate (no PKI), bearer token AES-GCM-encrypted at rest in qui's DB with AAD bound to the instance ID, UUID-based pairing so a second qui can't accidentally race the same agent's filesystem.
os.Root+openat2(RESOLVE_BENEATH)plus per-opO_NOFOLLOWfor path safety; allowed-roots default deny-all; hardened systemd unit; audit log for destructive ops. NAT traversal is the operator's responsibility — the v1 deployment shape (qui at home, agent on a public seedbox) doesn't need a tunnel; if the agent is behind NAT, tailscale / cloudflared / wireguard / frp / chisel.Full design doc: was
docs/design/remote-agents.mdon a fork branch that no longer exists. It covered interfaces, wire protocol, path safety, auth, schema migration, failure semantics, phased PR plan, and threat model.Asking for direction on three things
These would meaningfully change the implementation, so I'd rather get input before drafting code:
fsops.Localbe shared by import, simplifies CI. Sibling repo lets the agent ship independently. My read: same repo, separatecmd/qui-agent, excluded from defaultmake buildso users not running it don't pay the binary-size cost.MinAgentVersionmismatch. My read: hard-block FS features with the existing failure banner — silent wire skew between qui and a stale agent is a support-burden generator. Warn-and-allow possible if you'd rather; foundational either way.What I'd do next, given a green light
The first PR is plumbing-only: introduces
internal/fsops(interfaces +Localimpl), refactorspkg/hardlinktreeandpkg/reflinktreeto take a backend, swaps the crossseed call sites to passfsops.Local{}directly. Nopool.GetFSBackendresolver yet — that lands in Phase 3 alongsideRemoteso there's no hanging indirection if Phase 3 slips. Behavior-preserving (covered by existinghardlinktree/reflinktreetests againstfsops.Local, plus a golden-fixture inode-tuple snapshot diff). About 600–800 lines, mostly in non-churn packages. The agent binary itself comes in Phase 2.Aware this repo is collaborators-only for PRs (per .github/CONTRIBUTING.md), so the workflow would be design issue here → push to a fork → maintainer applies the patch. Happy to stay engaged through landing and follow up on bugs after merge, and happy to pair with a maintainer on the security-sensitive parts (Phase 2: agent binary, path-safety guard, auth) if useful.
Open to anything I've gotten wrong or scoped wrong. If "we'd rather build this in-house" or "not the right shape," equally happy to hear that early.
All reactions