Repository navigation
Protect shared config sources when linking home aliases - #2
MGRAFF2006 wants to merge 1 commit into
Conversation
MGRAFF2006
left a comment
There was a problem hiding this comment.
Independent coordinator review of exact head 9101d4a1227aa5e1e06f9dfd943a84eaad81b77d in a separate detached worktree. Reviewed the complete link-home mutation flow, source validation, all machine link sets, path canonicalization, destination preflight, backup creation, and SSH/agent-kit delegation, plus regression fixture. No substantiated finding remains in this PR scope.
Independently ran python3 scripts/check-deployment.py, shellcheck scripts/link-home.sh, bash -n scripts/link-home.sh, and full PR whitespace check; all passed. The actual-script disposable check covers symlinked checkout, shared config/headless/units/SSH/backup aliases, unchanged originals on refusal, external home/config/backup aliases, relative paths, and repeat idempotence. No real home links, systemd units, credentials, or machine services changed.
Installer-specific shared-parent protection remains the separate PR #1; this review does not imply that unrelated old installer logic is safe before that fix lands. Static parent containment does not claim atomic resistance to a concurrent hostile filesystem swap. Bounded comment review, no merge or approval.
Running
link-home.shthrough a symlinked checkout can bypass its shared-source guard: a destination.configalias into the checkout replaces tracked configuration with broken self-links. Canonicalize the checkout and home roots, reject destination and backup parents inside the shared repository before replacing links, and retain normal local aliases and idempotent installs.Test plan:
python3 scripts/check-deployment.py: temporary actual-script fixtures cover shared parent/backup aliases, checkout aliases, existing content preservation, local aliases, relative custom homes, dry-run/check, and repeated installation.bash -n scripts/link-home.sh,shellcheck scripts/link-home.sh, andgit diff --checkpass.No live home installation or system/service changes. The agent-kit installer has its own separate fix in #1.