Make Mac config upgrades safely resumable - #321
Conversation
|
Reviewed this alongside #319 and #322, since all three rewrite The three PRs merge cleanly, and that is hiding a real conflict. I trial-merged them: #319+#321, #319+#322 and #321+#322 all merge without conflict, and each merges cleanly into current
Neither could account for the other, and the concrete collision is this: after both land, Neither test suite covers that, because neither of you could know about it. What I'd like: rebase this and #322 onto each other and let them be reviewed as one unit, with a single answer to "how does this script track resumable state." I don't think that's a redesign — your state directory and lock look like the right foundation, and #322's login work could plausibly sit on top of it rather than beside it. But it needs to be one design, decided deliberately, rather than two that happen not to collide textually. Since they're both yours, you're best placed to reconcile them; happy to take direction on which way you'd rather go. To be explicit about depth: I reviewed this at the architecture level — the state/lock/marker design and how it interacts with the other two PRs — not line-by-line across all +1120. I'll do a full pass once the resumability question is settled, so I'm reviewing the shape that's actually going to land. |
|
Please combine this with #322 before further review. The durable markers should be the single source of truth for both config and login transition state, with one test covering an interrupted cleanup-only retry. |
|
Needs work: reconcile this with #322. In the combined flow, cleanup-only mode reports success while skipping required config publication and setup. The existing suites pass; a production-main check with independent file assertions catches the failure. Use one completion model and cover interrupted retries through main. The earlier config blockers remain: validate both trees before adoption, publish atomically on the destination filesystem, and preserve directory metadata. |
|
Re-reviewed against current The cross-filesystem staging bug is an asymmetry, not an oversight in general. The symlink branch builds its temporary as #321 and #322 still merge cleanly, and that is still hiding the conflict. I raised this on 2026-09-05 and re-verified it today, so this is a status report rather than a new finding: both branches still merge cleanly into Both test suites pass green on the merged tree. Neither branch has moved since the reconciliation request (this one's head is 2026-09-03, #322's is 2026-09-01), so the request is still outstanding.
The stage directory is never cleaned up.
This script refuses to run on anything but aarch64 Arch Linux. There is no macOS Bash 3 runtime anywhere near it. Small thing, but in a 469-line addition to a one-way upgrade path, a comment that describes a system that isn't there makes the rest harder to extend trust to. The lock descriptor leaks into every child process. On altitude. This is 469 lines and six state files to make one Verified locally: focused suite 28 assertions pass, |
Summary
Testing
Fixes #315