9d0d886c43
`_append_entry` moved to `utils.atomic_json_write`, which dumps with `ensure_ascii=False` through a utf-8 text handle. An argv token holding surrogate-escaped bytes (a non-UTF-8 project path via os.fsdecode) makes json.dump raise UnicodeEncodeError — a ValueError, so the `except OSError` does not catch it and callers silently lose their registration. Expose `ensure_ascii` on `atomic_json_write` (default unchanged) and pass True at the ledger call site, restoring the previous json.dumps behaviour while keeping mode=0o600. One round-trip test, red on base. Follow-up to #109156.