Repository navigation
fix(workbuddy): 401→refresh 非 auth 不再假升格 login_required - #371
Merged
Merged
Conversation
…uired Chat 401 → Refresh used to surface KindAuth for any refresh error, so transport/5xx refresh failures falsely marked accounts login_required. Only session-dead / KindAuth refresh failures keep that path; other failures return KindUnavailable with Observe(error) for diagnostics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sendChat在 chat 401 后 Refresh 失败时,仅当refreshErr为 KindAuth / session-dead(含既有 session dead 文案、12153)才保持KindAuth+token refresh after 401 failed; re-login required;运输错误 / 5xx / 其它非 auth 改为返回KindUnavailable(池短冷却 + failover),不再写 re-login 文案,也不因此Observe(login_required)。真 auth 仍走 Refresh 内既有Observe(login_required)。Observe(error, KindUnavailable),带上 refresh 失败原因摘要,便于控制台/DB 诊断。TestChat401RefreshFailureSurfacesAuthForFailover;新增 refresh 5xx → Unavailable、session-dead body → Auth。Test plan
go test ./internal/providers/workbuddy/...python3 scripts/release-notes.py validate