* fix(proxy): mint a fresh DB token when a respawned worker connects
A worker uvicorn respawns inherits the DATABASE_URL the CLI minted at
container start. Once that token expires the new worker's first connect is
refused, and it only recovers through the fallback refresh.
Fixes#49963
* test(proxy): cover a respawned worker whose inherited DB token is about to expire
* fix(proxy): stop a restarted worker's connection check from logging a false token expiry
* fix(proxy): judge each DB client's token by the URL its own engine connected with
A second PrismaClient in a running worker (POST /global/spend/refresh builds one) could mint a
fresh token into DATABASE_URL while the main client's engine still held its old one, so the main
client skipped its own refresh and its expired-token fallback. Each wrapper now reads the URL its
engine connected with for the refresh schedule, the refresh skip check and the fallback, and logs
when the pre-connect mint succeeds
* fix(proxy): skip the pre-connect token mint when the database uses a password
A password DATABASE_URL has no token to refresh, so the respawned-worker
check now returns before minting and no longer logs a false "Minted a fresh
database token" line on every connect.
Tests now pin the clock and also cover the refresh and recreate paths
recording the URL their new engine connected with.
* test(proxy): assert whole values with failure context in the token refresh tests
The respawned-worker and pre-connect mint tests now compare the full URL the
engine connected with, the refresh loop test checks both sleeps, and the
scheduling tests say which token the next refresh was computed from.
---------
Co-authored-by: akkupratap323 <akkupratap323@gmail.com>