fix(auth): report challenge timeout distinctly in turn-gate and host-hook logs
Your AI's guard dog to stop it from going rogue.
Brought to you by:
doberman
Originally created by: fu351
ADR 0046 gave the AUTH challenge a wall-clock deadline that fails closed: an unanswered
challenge returns non-approved, tagged TIMEOUT_METHOD. But every enforcement site
then collapsed the result to a plain denied, so the audit log and the user's message
could not tell a silent timeout from a deliberate human "no" — exactly the distinction
the deadline exists to record.
This propagates the AuthResult.method to the three sites AN-4a names:
_enforce (AUTH turns) records auth_result="timeout" with adenied;_handle_repeat (the TG4 escape hatch) records timeout at theturn_repeat_denied stage likewise;_resolve_auth deny message says the request expired (auto-denieddoberman 2fa setup hint when an un-enrolled 2FA tier is the blocker.The verdict is unchanged: a timeout still denies (fail closed). This is logging/message
honesty only, not a policy change — raise-only intact.
tests/integration/test_turn_hook.py: a timed-out AUTH turn records timeout (note +auth_result), a refusal still records denied, and a timed-outtimeout distinctly — all still not released.tests/unit/test_hosthook_auth_challenge.py: a timed-out AUTH denies with the "expired"doberman 2fa setup.test_auth_challenge_timeout.py) still pass —method those tests already set.timeout.
Ticket changed by: fu351
Ticket changed by: fu351
Ticket changed by: fu351