Skip to content

cli: day-1 bootstrap helpers — config check, agent cert, node pairing #162

Description

@mbertschler

Problem (friction log F1–F4, F34, F35 — bootstrap day)

Bootstrap was the friction-densest stretch of the reference-setup walk. Everything trust-critical is DIY:

  • F1 — agent TLS cert + sha256:<hex of DER> pin require hand-rolled openssl incantations; no command produces either, nothing prints the fingerprint.
  • F2 — crypt passwords must be pre-obscured with rclone obscure by hand (4 invocations for two crypt destinations), the only place rclone leaks through squirrel's "you never touch rclone" stance. (sync: sftp and b2 credential keys don't match rclone's option schema #153 fixes the sftp pass case internally; crypt config should follow the same principle.)
  • F3 — one nas↔htpc relationship needs four token bindings across two files; nothing validates the pairing until a runtime 401.
  • F4 — a freshly configured machine reports nothing: volumes reads the DB, not the config, so parse-success is indistinguishable from "nothing configured".
  • F34 — the node byte-path is an unvalidated out-of-band contract (nothing checks it at load; failures surface as undiagnosable transfer errors).
  • F35 — cadence-only machines must run the full agent listener just to get the scheduler.

Decision (Martin, 2026-07-24 — option 6d)

Day-1 helpers get their own issue (this one); recovery paths (destination reset, machine replacement) are a separate issue.

Scope

  • squirrel config check — parse + resolve everything (env vars included), validate offload_requires satisfiability (with sync: plain mirrors earn durability evidence; unsatisfiable offload_requires is a config error #156), stat volume paths and node byte-paths, flag empty volume paths, and print the affirmative summary: "5 volumes, 3 destinations, 2 nodes — all resolvable".
  • squirrel agent cert — generate self-signed cert+key at the configured paths and print the sha256: pin ready to paste into peers' [nodes.X.tls]; the agent also logs its own fingerprint at startup.
  • Node pairing helper — generate the matching config halves for both sides of a peer relationship (tokens both directions, endpoint, fingerprint), killing the F3 token-matrix class of error. Exact shape (squirrel node pair emitting TOML snippets vs something richer) to be designed in the PR.
  • Crypt secrets accepted as plaintext (env or literal) and obscured at rclone.conf render time, retiring the manual rclone obscure step (breaking-change note: existing obscured values need a migration story or a marker key).
  • Listener-less agent mode (scheduler without [agent] listen, F35) — possibly its own small PR.

See design/friction-log.md F1–F4, F34, F35.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions