Skip to content

chore: make enabled property work consistently in withLargeResponse runner - #10

Merged
alexmarqs merged 1 commit into
mainfrom
chore/rework-large-response-runner-wrapper
Sep 10, 2026
Merged

alexmarqs merged 1 commit into
mainfrom
chore/rework-large-response-runner-wrapper

Conversation

@alexmarqs

@alexmarqs alexmarqs commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

withLargeResponse now resolves enabled per request on the runner path, so the same global-off / per-call-on combination the interceptor supports finally works on a runner too (same behaviour of axios http interceptor)

👉 Background

The runner read enabled once at wrap time and returned the original runner untouched when it was false — so a global enabled: false could never be re-enabled per request, an asymmetry with the interceptor that was documented as a deliberate quirk rather than fixed.

👉 What's Fixed?

Wrap-time enabled early-return dropped from large-response-runner.ts — the wrapper is always installed and decides per call
A per-request enabled: true now re-enables a globally disabled runner, matching the interceptor path
The [NAMESPACE] request key is stripped even when the request stays disabled, so it never reaches the transport as payload

- Updated README to clarify the behavior of the `enabled` option for the runner, emphasizing its per-request resolution.
- Improved test descriptions for clarity and accuracy regarding the handling of globally disabled requests and per-request options.
- Added tests to ensure that per-request options are stripped correctly when the request remains disabled.
@alexmarqs
alexmarqs marked this pull request as ready for review September 10, 2026 12:13
@alexmarqs
alexmarqs merged commit 8b26148 into main Sep 10, 2026
1 check passed
@alexmarqs
alexmarqs deleted the chore/rework-large-response-runner-wrapper branch September 10, 2026 12:44
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.

1 participant