TanStack
OSS
ai
Sign in / Sign up
Open main menu
ai
GitHub
Overview
Runs
Analytics
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
feat/otel-middleware
3a513b6d fix(ai-client): capture abort signal before await to prevent race condition (#377) * capture abort signal before await to prevent race condition * add unit tests for abort signal race condition fix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * replace setTimeout with deterministic promise await in test Capture the nested append() promise and await it directly instead of relying on a fixed 50ms setTimeout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Added changeset * ci: apply automated fixes * test(ai-client): exercise actual reload() race + add asChunk casts Rewrites the second race-condition test to use reload() instead of a queued append() — append() early-returns when isLoading and queues via queuePostStreamAction, so it never reassigns this.abortController mid-flight. reload() calls cancelInFlightStream() synchronously then starts a new streamResponse(), which is the actual code path that triggers the race the fix protects against. Adds asChunk() casts so the new yields satisfy the strict AGUIEvent typing introduced by AG-UI core interop. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ai-client): bail out when stream is cancelled during onResponse await Capturing the AbortController signal locally avoided the original null deref but exposed a latent deadlock: when stop() runs during the onResponse await, cancelInFlightStream() calls resolveProcessing() before waitForProcessing() has set processingResolve, so the call is a no-op. Post-fix, streamResponse no longer crashed on the now-null controller, reached waitForProcessing() (creating a fresh resolver nothing would resolve), and hung on `await processingComplete` — breaking the ai-react useChat unmount test. Add a `signal.aborted` check after the onResponse await to short-circuit cancelled or superseded streams cleanly, restoring main's pre-fix flow control without relying on a thrown TypeError. Update the two race tests to reflect the correct semantics: cancelled streams must not invoke the connection layer or surface errors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Tom Beckenham <34339192+tombeckenham@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
by Francisco ...
F
Succeeded
main
13cceaed fix(ai-client): capture abort signal before await to prevent race condition (#377) * capture abort signal before await to prevent race condition * add unit tests for abort signal race condition fix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * replace setTimeout with deterministic promise await in test Capture the nested append() promise and await it directly instead of relying on a fixed 50ms setTimeout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Added changeset * ci: apply automated fixes * test(ai-client): exercise actual reload() race + add asChunk casts Rewrites the second race-condition test to use reload() instead of a queued append() — append() early-returns when isLoading and queues via queuePostStreamAction, so it never reassigns this.abortController mid-flight. reload() calls cancelInFlightStream() synchronously then starts a new streamResponse(), which is the actual code path that triggers the race the fix protects against. Adds asChunk() casts so the new yields satisfy the strict AGUIEvent typing introduced by AG-UI core interop. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ai-client): bail out when stream is cancelled during onResponse await Capturing the AbortController signal locally avoided the original null deref but exposed a latent deadlock: when stop() runs during the onResponse await, cancelInFlightStream() calls resolveProcessing() before waitForProcessing() has set processingResolve, so the call is a no-op. Post-fix, streamResponse no longer crashed on the now-null controller, reached waitForProcessing() (creating a fresh resolver nothing would resolve), and hung on `await processingComplete` — breaking the ai-react useChat unmount test. Add a `signal.aborted` check after the onResponse await to short-circuit cancelled or superseded streams cleanly, restoring main's pre-fix flow control without relying on a thrown TypeError. Update the two race tests to reflect the correct semantics: cancelled streams must not invoke the connection layer or surface errors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Tom Beckenham <34339192+tombeckenham@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
by Francisco ...
F
Succeeded
main
13cceaed fix(ai-client): capture abort signal before await to prevent race condition (#377) * capture abort signal before await to prevent race condition * add unit tests for abort signal race condition fix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * replace setTimeout with deterministic promise await in test Capture the nested append() promise and await it directly instead of relying on a fixed 50ms setTimeout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Added changeset * ci: apply automated fixes * test(ai-client): exercise actual reload() race + add asChunk casts Rewrites the second race-condition test to use reload() instead of a queued append() — append() early-returns when isLoading and queues via queuePostStreamAction, so it never reassigns this.abortController mid-flight. reload() calls cancelInFlightStream() synchronously then starts a new streamResponse(), which is the actual code path that triggers the race the fix protects against. Adds asChunk() casts so the new yields satisfy the strict AGUIEvent typing introduced by AG-UI core interop. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(ai-client): bail out when stream is cancelled during onResponse await Capturing the AbortController signal locally avoided the original null deref but exposed a latent deadlock: when stop() runs during the onResponse await, cancelInFlightStream() calls resolveProcessing() before waitForProcessing() has set processingResolve, so the call is a no-op. Post-fix, streamResponse no longer crashed on the now-null controller, reached waitForProcessing() (creating a fresh resolver nothing would resolve), and hung on `await processingComplete` — breaking the ai-react useChat unmount test. Add a `signal.aborted` check after the onResponse await to short-circuit cancelled or superseded streams cleanly, restoring main's pre-fix flow control without relying on a thrown TypeError. Update the two race tests to reflect the correct semantics: cancelled streams must not invoke the connection layer or surface errors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Tom Beckenham <34339192+tombeckenham@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
by Francisco ...
F
Succeeded
fix/chat-client-abort-signal-race
b1306c37 Merge 5ef85e091a6f881539e9a2753d0ce73c1fcf3dfe into b2d3cc131a31c54bd1e5841f958fbe333514e508
by Francisco ...
F
Previous page
Previous
Next
Next page