rented carrier: enroll-copy pushes the full 688-path closure over ssh-ng — let the target substitute stock nixpkgs from its own cache (follow-on to #698) #699
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#699
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Symptom
The rented (and own-VPS) enroll-copy leg pushes the FULL toplevel closure — ~688 store paths for a fresh gateway — from the enrolling host to the target over
nix copy --to ssh-ng(internal/clan/enrollment.go:838). On a cold box with no warm IDSS guest store (a bare DO NixOS rental has none — ADR 0133's primed closure lands on own-VPS/local-guest, not a broker rental), this is a real over-the-network transfer of the whole closure. Drive20260823T085132Zmeasured ~0.21 paths/s, extrapolating to ~55m for all 688 paths — the fault behind #698, which had to widen the e2e enroll-copy ceiling to 90m to fit it.Cause
copy()runsnix copy --no-check-sigs --to ssh-ng://<target> <toplevel>with NO--substitute-on-destination. Every path is sent from THIS host — including the hundreds of stock nixpkgs paths (glibc, php, nextcloud, kanidm, …) the target could fetch itself from cache.nixos.org, signed, in parallel, on its own bandwidth. Only the custom paths (the vendoredpkgs.caddy.withPluginsderivationrenderCaddybuilds —internal/clan/frontdoor.go:294— and the community's own config/vars) genuinely have to come from here, because cache.nixos.org never carries them (the--no-check-sigscase).Proposed fix
Add
--substitute-on-destinationto thenix copyinvocation (internal/clan/enrollment.go:838). The destination substitutes every path it can from its own substituters (signed, so no trust widening — the--no-check-sigsflag still covers only the unsigned custom paths that must push from here), cutting the ssh-ng transfer from ~688 paths to the handful of custom ones — minutes instead of ~55m.Seam / test
Unit-test the invocation args at the same seam as the existing copy tests (
internal/clan/enrollment_test.go,store_count_test.go): assertcopy()emits--substitute-on-destinationalongside--no-check-sigs. Real speedup is provable only by a rented/own-VPS drive reaching enroll-copy — the same reproduction constraint as #698.Payoff
Lets #698's precautionary 90m enroll-copy ceilings (
app/tests/e2e/journey.rented.spec.ts,journey.droplet.spec.ts) TIGHTEN sharply once a green drive confirms the smaller transfer.Provenance
Found while ruling #698 (rented enroll-copy budget). The budget widen there is the stopgap; this is the real efficiency fix. Not protected-path work —
internal/clan/is app code.swarm-claim host=elitebook-distributed-server-03 run=9217
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #699 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
enroll-copy's ceiling to a measured rented copy — with #716's drain fix the shared 20mdefaultPhaseTimeoutnow CUTS a cold copy instead of hanging on it #717--substitute-on-destination(#699) never reachedmachines update#1764