e75336d597
The inlined temp-file + os.replace in openclaw_to_hermes.dump_yaml_file replaced a symlinked config.yaml with a regular file, silently detaching managed deployments that symlink ~/.hermes/config.yaml into a dotfiles repo or profile package. The bare path.write_text it replaced followed the link, and utils.atomic_replace -- which the hermes_cli twin reaches through atomic_write_text -- resolves the link for exactly this reason (#16743). Mirror that here: resolve the symlink before creating the temp file so the rename lands on the real file, and fall back to copyfile on EXDEV/EBUSY now that the target can live on another device. Covered by a regression test that fails when the resolution is removed. Also guard the permission-denied test for Windows: os.geteuid does not exist there and chmod-based denial is unreliable, so skip on non-POSIX.