Repository navigation
test(render): guard page creation after native rejection - #2001
Merged
Merged
Conversation
schlessera
force-pushed
the
test/1978-native-boundary-be80cc0a
branch
from
October 16, 2026 00:29
cb7e387 to
7406792
Compare
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1978
What changed
Adds real-Chrome regression coverage for a rejection assertion that succeeds before the following page fails with
Target.createTarget: Target closed. Four ordinary native replies remain pending while the shared rejection helper runs. The test checks subsequent page creation, every pending reply and continued connectivity across 30 bounded batches.Why this shape
The explicit-await correction already shipped in #2000. This test guards the additional connection-close failure, which the existing large-response test did not exercise. Replacing only the shared helper with the original synchronous
.rejects.toThrowreproduces the exact exception without instrumentation. No product code, browser transport, deadlines, isolation arguments or original PDF assertions change; no consumer-visible changeset is needed.A separate bounded control uses the original predecessor/final PDF inputs and the real renderer (byte-identical to the original failed source). The old matcher causes socket close 1002 / unsupported control frame during the following
renderer.ts:324page creation, before shutdown, while the recorded Chrome root is still running. The unchanged explicit-await helper passes all 30 renderer pairs. The original historical job lacks socket telemetry, so its exact receive-byte grouping/scheduler interval cannot be reconstructed; the controlled cause is established without claiming those absent historical facts.Proof
Behavioral receipts use head
cb7e38721de83bdd6cdcc9e4c69f9845eeea10c4/ base45908608df63b07ee3d10d84ac608d132aa21caa. Refreshed candidate740679278c9a103e71e112c225e4781ce88b022cis based on9bebef7bfed47139792ccaf1d22d4ac7f5f093e9; the renderer, shared helper and regression are unchanged. Bun1.4.2+744846f84, Puppeteer 25.12.0, branded Google Chrome 155.0.8059.39.expectAsyncRejectiontoawait expect(operation).rejects.toThrow(message)and runbun run test tests/export-native-rejection-runtime.test.ts -t 'pending native replies'. 0 pass / 1 fail / 88 assertions, exactTargetCloseError: Protocol error (Target.createTarget): Target closedat the following page; no observer or protocol patch. Mutation restored.BRAIN_REQUIRE_CHROME=1 bun run test tests/export-links-runtime.test.ts tests/export-native-rejection-runtime.test.ts: 23 pass / 292 assertions. All original 21 PDF cases remain; the reported final case passes in 75.33 ms.bun run check:pr --base origin/main: 852 pass / 5,459 assertions, all local preflight gates pass.bun run check:pr --base origin/mainalso passes 852 cases / 5,459 assertions.5d65d2c14725c57164e41ec37e595c271f8fe662, parents45908608df63b07ee3d10d84ac608d132aa21caa/cb7e38721de83bdd6cdcc9e4c69f9845eeea10c4, tree3bbe7caf26b0edf23b7863dcb8c23bc406b095de(API/Git verified). The new regression passes in 1183.03 ms; the original final PDF case passes in 94.65 ms. Sole failing test is the existingMAINTENANCE_CHILD_GONE_BEFORE_TRANSPORTassertion atpackages/ui-server/tests/sync-mirror.test.ts:200, corrected by main's test(ui-server): distinguish teardown writes from live descendants #1962 /9bebef7bf. The full failed run completed before this refresh; it was not rerun unchanged or cancelled for a push.9721cbe1f37d87cccfc7b69cc0a1baa7415ad6d5, parents9bebef7bfed47139792ccaf1d22d4ac7f5f093e9/740679278c9a103e71e112c225e4781ce88b022c, tree7611912f25a00feab48ed09f9b7fbc80ed564419(immutable API/Git verified). The new regression passes in 1773.99 ms; the original final PDF case passes in 130.90 ms. Both corrected sync-mirror cases pass. Contract and project-sync gates also pass.116745550554116745709622116745709632116745709637116745709642116745709654116745709661116745709673116745709676116745709725116745709741116745709751116745709765116753034084Checklist
docs/reflect the change, or nothing documented moved.Anything left open
Nothing remains before the normal merge/reconciliation step. Historical unretained byte grouping/scheduling remains unknown; it is not needed to assert the observed causal control or to preserve the existing correction. No additional renderer behavior change is selected.