fix(#1066): retry turn once on 401 before parking for re-login
This commit is contained in:
parent
ae695931ce
commit
cbd14e9cd0
2 changed files with 15 additions and 1 deletions
|
|
@ -34,7 +34,11 @@ binary, not two) runs:
|
|||
while the harness is parked. **Auth-failed detection**: both
|
||||
stdout and stderr pumps also match
|
||||
`AUTH_FAIL_MARKERS` (`"authentication_failed"`, `401`, etc.).
|
||||
On match the harness writes `{state_dir}/hyperhive-needs-login`,
|
||||
On the first 401, `drive_turn` retries the same prompt once
|
||||
immediately (transient token-refresh races and brief API hiccups
|
||||
can cause a 401 that clears on retry). Only if the retry also
|
||||
returns `AuthFailed` does `drive_turn` bubble it up to the serve
|
||||
loop, which then writes `{state_dir}/hyperhive-needs-login`,
|
||||
emits `needs_login_idle` status, requeues the inflight message
|
||||
(so it replays after re-auth), and parks in `wait_for_login` —
|
||||
the same path used at boot. The operator re-authenticates via
|
||||
|
|
|
|||
Loading…
Reference in a new issue