Guard OAuth callback result from post-completion overwrites#3417
Guard OAuth callback result from post-completion overwrites#3417
Conversation
Test Failure Analysis
Summary: Root Cause: This failure is unrelated to this PR. The timeout occurs inside Suggested Solution: This is a pre-existing flaky test on Windows CI, not caused by this PR. Re-running the workflow should confirm if it is transient. If it recurs consistently, the affected test could be given a longer timeout or marked to skip on Windows — but that is a separate issue from this PR. Detailed AnalysisFailing test: Relevant stack trace: The hang occurs in PR changes do NOT touch:
PR changes only touch:
Related Files
|
|
/marvin fix static analysis |
|
Claude finished @jlowin's task in 46s —— View job Fixed static analysis
Marvin Context Protocol | Type Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Auto-reviewed and merging on behalf of @jlowin — CI is green (Windows OAuth proxy timeouts are pre-existing flaky tests). |
Motivation
Description
store_result_oncehelper insrc/fastmcp/client/oauth_callback.pythat writes to the sharedOAuthCallbackResultand callsresult_ready.set()only if the event has not already been set, and route all callback success/error paths through it.tests/client/test_oauth_callback_race.pythat starts the callback server, sends a legitimate callback, then sends a second callback and asserts the original result is retained.Testing
uv syncsuccessfully and executed the targeted test withuv run pytest tests/client/test_oauth_callback_race.py -q, which passed.uv run pytest -n autoin this environment but observed unrelated failures/timeouts (14 failed, 4675 passed) that pre-existed or are environment-dependent and are not caused by this change.uv run prek run --all-filesfailed to initialize hooks due to network/proxy restrictions when fetching pre-commit hooks (hook init error).Codex Task