save_config truncated config.json in place on crash mid-write. Route through _write_text_atomic like the pairing store so a failed write leaves the prior file intact.