Skip to content

[build-tools] Share the urql abort-signal wrapper - #4435

Open
vonovak wants to merge 2 commits into
codex/session-teardown-helperfrom
codex/graphql-abort-signal
Open

vonovak wants to merge 2 commits into
codex/session-teardown-helperfrom
codex/graphql-abort-signal

Conversation

@vonovak

@vonovak vonovak commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Why

urql replaces fetchOptions.signal, so a caller's signal must be joined into fetch after urql sets its own. Two call sites carried that wrapper by hand.

How

graphqlAbortContext(signal) returns a urql context whose fetch joins both signals, or nothing without a signal. The artifact upload-session and sandbox-ready mutations use it.

Stack 5/6, based on #4431, followed by #4441.

Test plan

A unit test aborts the joined request from either side. The real-HTTP cancellation test and the sandbox tests pass through the helper.

🤖 Generated with Claude Code

https://claude.ai/code/session_01D29AEWN9ajZXbzobHUH4fF

@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (codex/session-teardown-helper@e780c40). Learn more about missing BASE report.

Additional details and impacted files
@@                       Coverage Diff                        @@
##             codex/session-teardown-helper    #4435   +/-   ##
================================================================
  Coverage                                 ?   72.43%           
================================================================
  Files                                    ?      974           
  Lines                                    ?    46372           
  Branches                                 ?     9951           
================================================================
  Hits                                     ?    33583           
  Misses                                   ?    11794           
  Partials                                 ?      995           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vonovak
vonovak force-pushed the codex/graphql-abort-signal branch 2 times, most recently from 34c7538 to db713d1 Compare September 18, 2026 08:09
@vonovak vonovak added the no changelog PR that doesn't require a changelog entry label Sep 18, 2026
@vonovak
vonovak force-pushed the codex/graphql-abort-signal branch from db713d1 to 6a7fb47 Compare September 18, 2026 10:02
@vonovak
vonovak force-pushed the codex/graphql-abort-signal branch from 6a7fb47 to f6e2e3a Compare September 18, 2026 10:19
@vonovak
vonovak force-pushed the codex/graphql-abort-signal branch from f6e2e3a to 3e3a01a Compare September 18, 2026 11:16
vonovak and others added 2 commits September 18, 2026 13:17
The artifact upload-session mutation and the sandbox-ready mutation each
wrapped fetch by hand to join a cancellation signal after urql set its own.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D29AEWN9ajZXbzobHUH4fF
@vonovak
vonovak force-pushed the codex/graphql-abort-signal branch from 3e3a01a to a005cd2 Compare September 18, 2026 11:17
@github-actions

Copy link
Copy Markdown

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant