Skip to content

test: clarify routed stream cancellation coverage - #164

Merged
rgarcia merged 2 commits into
mainfrom
hypeship/clarify-routing-abort-test
Aug 10, 2026
Merged

test: clarify routed stream cancellation coverage#164
rgarcia merged 2 commits into
mainfrom
hypeship/clarify-routing-abort-test

Conversation

@rgarcia

@rgarcia rgarcia commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make the signal-identity assertion explicit about what it guarantees for RequestInit and Request inputs
  • verify the documented stream.controller.abort() path retains the exact signal passed to the routed telemetry request

Follow-up to #160.

Tests

  • ./scripts/test
  • ./scripts/lint

Note

Low Risk
Only test renames and new coverage in browser-routing.test.ts; no production code paths change.

Overview
Test-only follow-up to routed browser subresource behavior: no runtime changes.

Renames the abort-signal test to preserves signal identity from RequestInit and Request inputs, keeping the same assertions that the routed VM fetch receives the exact AbortSignal from either RequestInit or a Request object.

Adds keeps stream.controller.abort connected to routed telemetry requests, which opens kernel.browsers.telemetry.stream, checks the underlying routed fetch uses stream.controller.signal, and confirms calling stream.controller.abort() aborts that signal.

Reviewed by Cursor Bugbot for commit 3f07f94. Bugbot is set up for automated code reviews on this repo. Configure here.

@Sayan-

Sayan- commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Verified, and it addresses the note from #160 the right way.

✕ preserves signal identity from RequestInit and Request inputs
✕ keeps stream.controller.abort connected to routed telemetry requests
  • The rename is the correct resolution rather than a cosmetic one. The old title implied the routed request survives abort for Request inputs, which it does not when the caller drops that Request, since input.signal is itself a dependent signal owned by it. Scoping the claim to identity is accurate and does not overpromise.
  • The new test earns its place: it pins stream.controller.signal identity end to end through the client, which is the path taken by callers who never pass a signal of their own. That was the case with no coverage at all before.

One nit, take it or leave it: expect(routedSignal?.aborted).toBe(true) is implied by the identity assertion two lines above, since aborting the controller necessarily flips the same object. Harmless, and arguably useful as documentation of intent.

Worth stating for whoever reads this later: neither test exercises the GC-sensitive part of the original failure, and that is deliberate. Reproducing it needs --expose-gc, which jest.config.ts does not set, so a behavioral test would pass with or without the fix. Identity assertions are the right deterministic substitute.

@Sayan- Sayan- left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified: both tests fail when the #160 fix is reverted, and the rename accurately scopes the guarantee. LGTM.

@rgarcia
rgarcia merged commit be4a056 into main Aug 10, 2026
11 checks passed
@rgarcia
rgarcia deleted the hypeship/clarify-routing-abort-test branch August 10, 2026 19:37
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.

2 participants