SIGN IN SIGN UP

fix(infra): commit the new host's recovery record before clearing the stale id

A kill between removing the prior server_id and landing the new
last-created-hostname left the state directory with no record of the
just-billed host, so teardown could not discover it. Persist the hostname
record first (staged in STATE_DIR so the rename is atomic across
filesystems), then drop the stale id; the parse-failure path still falls
through to hostname recovery for the new host.

Co-authored-by: Cursor <cursoragent@cursor.com>
M
Michael Shimeles committed
7bd7f702d3f1ae19d3c6e2f5f598c1e066292f53
Parent: 9e82e1d