fix(setup): bind recovery to the published configuration file
Retain the staged file descriptor through atomic publication, readback and recovery. Refuse detected replacements or edits and restore through that owned descriptor instead of reopening a pathname. First-run readback failure now retains the file for manual recovery because pathname deletion cannot prove exact ownership. Keep both descriptor owners when nested closes fail; opaque close rejections do not transfer ownership. Validation: 192 focused checks in 9 files, check:fast, formatting and docs:check passed. Three replacement regressions fail on the baseline while six existing recovery controls pass. Six completed setup tasks preserve equivalent config and backups. Two read-only source reviews completed on macOS arm64 / Node24. Native Windows/Linux and real concurrent editor behavior remain unverified. State checks do not exclude an in-place writer after the last check. Closes #4900
This commit is contained in:
1 parent
19329e43bb
commit
7e4eed9dd4
5 files changed
+463
-85