* fix(gateway): map checkpoint-mode errors in run-prepare routes
The regenerate and edit-regenerate prepare routes read the same thread
checkpoints as the threads router but built the accessor and read the
latest checkpoint under a generic handler, so a delta/full mismatch
surfaced as a 500 instead of the 409 that names the mode flip. Move the
mapper to a shared module, reuse it for the accessor, latest-checkpoint
and history-scan failures, and update the troubleshooting page now that
the routes behave like the other state surfaces.
* fix(gateway): preserve route-level HTTP errors in run-prepare
The checkpoint-read fallback now sits around the accessor build, so a
config-loading HTTPException from the accessor was being rewritten as a
generic 500. Re-raise HTTPException before the generic handler and cover
the 503 passthrough with a test.
* docs: confirm the mode mismatch before advising a restart
A null token usage or a /runs/wait error body can also come from a
configuration or token-counting failure, so the troubleshooting entry
should point at the 409 from the thread/state endpoints first.
* fix(gateway): remove duplicate checkpoint imports after merge
---------
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>