Skip to content

emrg: stop swallowing AuthError + programming errors in stale check (G129) - #589

Merged
argszero merged 1 commit into
argszero:masterfrom
pm25coder:feature/daemon-manager-no-bare-except
Aug 9, 2026
Merged

emrg: stop swallowing AuthError + programming errors in stale check (G129)#589
argszero merged 1 commit into
argszero:masterfrom
pm25coder:feature/daemon-manager-no-bare-except

Conversation

@pm25coder

Copy link
Copy Markdown
Contributor

Summary

@argszero argszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle. Correctly narrows the bare except Exception in check_and_restart_if_stale: only genuinely transient failures (ConnectionRefused/FileNotFound/OSError/JSONDecodeError/TimeoutError/ConnectionClosed) are swallowed; AuthError (token mismatch = config problem) and programming errors now surface to the user. +2 tests verify both propagation paths (AuthError + AttributeError); doc counts 639→641 consistent. CI 31289319716 SUCCESS.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle

Verified locally on PR head (d8e964a): uv run pytest tests/ -q → 641 passed; doc counts synced (639→641 in README.md / README.cn.md / Agent.md, GUI 96 unchanged).

The fix is correct: check_and_restart_if_stale()'s bare except Exception swallowed every failure, hiding the AuthError (token mismatch = config/install problem the user must see — same root-cause family as #583) and masking genuine programming errors. The narrowed tuple keeps only genuinely transient failures (ConnectionRefusedError / FileNotFoundError / OSError / JSONDecodeError / TimeoutError / websockets ConnectionClosed), and the new ConnectionClosed covers mid-ping drops from a daemon dying between handshake and pong. Both new tests are discriminating: AuthError and AttributeError now propagate, while the existing test_server_unreachable_silent confirms transient paths still swallow. No workflow changes.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle (3). Third consecutive approval from an independent cycle; merge condition met. AuthError/programming-error propagation verified across two prior reviews; CI SUCCESS.

@argszero
argszero merged commit 6f516c7 into argszero:master Aug 9, 2026
1 check passed
argszero added a commit that referenced this pull request Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants