Merge train 208: Response.json shares ctor init validation, --platform bun null-body-status (v0.5.1586) - #10400
Merged
Merged
Conversation
added 4 commits
September 17, 2026 04:51
…kips null-body-status check (#10360)
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (16)
📝 WalkthroughWalkthroughThe change adds shared ChangesResponse validation and Bun platform handling
Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Compiler
participant RuntimeFlag
participant ResponseValidation
Compiler->>RuntimeFlag: initialize Bun mode before module code
ResponseValidation->>RuntimeFlag: query Bun platform state
RuntimeFlag-->>ResponseValidation: return enabled or disabled
ResponseValidation-->>Compiler: apply platform-specific Response validation
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
This train lands #10368 as v0.5.1586, on
ff19bd536a. Three source commits, each verified to preserve its patch-id and authorship. No train repairs were needed; the train adds only the version bump.#10360) —Response.json(value, init)skipped theResponseInitvalidation thatnew Response(body, init)applies. Both now share one check, in Node's order: status range (RangeError), thenstatusText(TypeError), then the body/null-body-status conflict. SoResponse.json({a: 1}, {status: 204})throws Node'sTypeErrorinstead of returning a 204. The fix covers bothperry-stdlibandperry-ext-fetch. Programs compiled with--platform bunfollow Bun instead, where a body with a null-body status is accepted.Why this was still open
It was set aside earlier on the belief that another lane already carried the fix. That was wrong: checking the PR's content against
mainshows 387 lines that are not on main. The fix is still needed.Its red checks also read worse than they are.
gap-suite (3),(4)and(5)are the three regressions #10387 fixed onmain— this branch predates that, so those failures are stale and clear on rebase.build-and-freshnessbelongs to the Docs checks (gettext catalog) workflow, which feedspr-gatezero times. What remains is the benchmark-evidence freshness step inlint, which every PR inherits.Validation
Validated head
57670cf415. Five-package release build pinned and hash-verified, and re-verified after the gap run so nothing rebuilt underneath the fixtures.main's one known runtime failure.perry-ext-fetchwas added to the suite set for this train, because the PR edits that crate'slib.rs: 15/15, withshipped_staticlib_does_not_define_stdlib_owned_fetch_symbolsexplicitlyok. That guard forbids the ext archive from defining stdlib-owned fetch symbols (ext archives link before stdlib), and it is the test that caught fix(ext-fetch): own the Headers surface this crate already half-implemented (#10310) #10319's breakage.issue_10360_bun_platform_response_null_body— 2 passed. This compiles and runs real TypeScript under both platform modes, which is the acceptance bar for a--platformbehavioural change; a crate suite cannot see it.main.fetch,response,headers,blob,bun,body,request. Aplatformfilter was dropped: it matches zero fixtures, and the driver's vacuous-filter assertion aborted rather than reporting a falserc=0.Every red attributed
test_bun_plugin— the decisive case, since this PR adds 47 lines tobun_compat/platform.rs. A/B againstmain's own artifact set: identical on both arms (node=1, main=0, train=0), with distinct build stamps asserted per arm. Same fortest_hono_bundle.test_issue_617_inline_await_fetch_with_auth— this one first produced an asymmetric result (main refused to link, train ran), which would have read as a finding. It was neither. The sharedlibperry_ext_http.abundles a different tokio compilation than the pinned stdlib archive, so perry's perry-ext-net: outbound TCP panics — LTO dead-strips tokio CONTEXT statics #507/test_gap_fetch_request_from_node_incoming_message SIGABRTs deterministically on pristine main, and is in no allowlist #7629 guard refuses that link — and the archive happened to be coherent with only one arm. Rebuilt coherently per arm (one cargo invocation includingperry-ext-http, so tokio unifies), both arms compile, run, and emit byte-identical correct output; node itself fails withReferenceError: fetchWithAuth is not defined. An oracle failure.test_issue_340_axios_response_props— both arms refuse the link identically, samelibperry_ext_axios.atokio-coherence guard. Symmetric environmental failure of the pinned package set, not a code difference. (The distinction matters: 617's arms disagreed, so it needed a coherent rebuild; 340's agree.)test_issue_4826_array_headersandtest_node_http_post_bodytime out under the pinned v26.5.1.parity-skipfixtures — two fastify (background server) andtest_issue_9330_9517_mysql2_bundled(live MySQL). The harness skips them before compiling.Note that
--filteris a substring match over all fixtures, so these runs selecttest_issue_*/test_bun_*names that CI's gap suite (--filter test_gap_) never runs. Everytest_gap_*fixture in scope passed.Before merging, the pushed head and unchanged main are checked again. After merging, the rewritten commits are checked for preserved authorship and the main tree must match the validated train exactly.
Summary by CodeRabbit
Bug Fixes
ResponseandResponse.jsonvalidation across Node-compatible runtimes.Documentation
Tests
Chores