fix(kanban): preflight Codex worker auth readiness - #31551
Conversation
Allow Kanban workers with broken profile-local Codex auth to use valid global auth fallback without copying refresh tokens into profile homes. Add a narrow pre-spawn readiness gate for deterministic Codex auth failures, preserving configured runtime fallbacks and blocking immediately instead of crash-looping when no fallback can run. Tests cover profile/global auth fallback, source-store refresh writes, retry-limit override for readiness failures, ACPX canonical home env, and fallback-provider readiness semantics.
|
Related to closed #19475 (original Codex profile auth preflight fix) and open #31461 (Claude CLI runtime + Kanban auth preflight). This PR extends the preflight concept with global-root auth fallback — not a direct duplicate since it adds new fallback logic, but overlaps significantly with #31461's auth preflight scope. |
|
Thanks — agreed this overlaps with #31461 at the Kanban preflight layer, but the failure mode here is narrower/different:
Local validation on the PR branch: python -m py_compile hermes_cli/auth.py hermes_cli/kanban_db.py
scripts/run_tests.sh tests/hermes_cli/test_auth_codex_provider.py tests/hermes_cli/test_auth_profile_fallback.py tests/hermes_cli/test_kanban_db.py
# 200 passed, 0 failedActions are currently |
|
Thanks for identifying the broken-local-Codex-state case. The premise still holds on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
Summary
Test plan
python -m py_compile hermes_cli/auth.py hermes_cli/kanban_db.pyscripts/run_tests.sh tests/hermes_cli/test_auth_codex_provider.py tests/hermes_cli/test_auth_profile_fallback.py tests/hermes_cli/test_kanban_db.pyNotes
refresh_if_expiring=Falseso it does not consume Codex refresh tokens during preflight.