fix: complete 868787448's Bun TCP landing (API docs drift + ext-link shim) - #9780
fix: complete 868787448's Bun TCP landing (API docs drift + ext-link shim)#9780proggeramlug wants to merge 3 commits into
Conversation
8687874 ("feat(bun): add TCP socket facades") added method("bun", "listen", false, None), method("bun", "connect", false, None), to crates/perry-api-manifest/src/entries/part_4.rs but never ran scripts/regen_api_docs.sh, so the derived docs have been stale since 2026-09-03 and the `check` job fails on its "Check for API docs drift" step: -Total: 3046 entries across 138 modules. +Total: 3048 entries across 138 modules. +- `connect` — module +- `listen` — module Regenerated with the script's own commands from a release build: `perry --print-api-manifest=markdown` and `--print-api-manifest=dts`. The manifest crate carries no target cfgs (only cfg(test)) and the `check` job runs on ubuntu, so this Linux-generated output is what CI regenerates. Claude-Session: https://claude.ai/code/session_01YPfnmWZmSpSWpmnoXvH8z2
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe PR adds a no-op FFI shim for HTTP extension test linking and regenerates API metadata to include ChangesTest linking support
Bun API metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change restores HTTP extension test linking and documents the existing Bun.connect and Bun.listen APIs consistently. No remaining production or user-impacting risk is established. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
|
Conflicts with merge train #9798, which just landed 19 PRs (including #9750's rework of |
|
Held from train127. It cherry-picks with a conflict in |
Two red CI jobs, one cause.
868787448"feat(bun): add TCP socket facades" (2026-09-03 22:42)added
Bun.listen/Bun.connectbut left two derived things un-updated. Both are thatcommit's loose ends, so they are fixed together here.
1.
check— API docs drift868787448added tocrates/perry-api-manifest/src/entries/part_4.rs:and touched zero files under
docs/. Thecheckjob's "Check for API docs drift" stepregenerates the docs and diffs, so it has failed ever since:
Regenerated with
scripts/regen_api_docs.sh's own commands off a release build(
perry --print-api-manifest=markdown/=dts). The resulting diff is exactly the twoentries CI reported —
3046 → 3048, nothing else. The manifest crate has no targetcfgs(only
cfg(test)) andcheckruns onubuntu-latest, so this Linux-generated output isbyte-for-byte what CI regenerates.
2.
ext-link— undefined symbol, red since 2026-09-04The reported symbol is
js_bun_tcp_listen, but that is a red herring — it is definedunconditionally at
crates/perry-ext-net/src/bun_tcp.rs:275. The actual error is what itcalls:
js_bun_tcp_listendrives the shared runtime from its bind-poll loop(
perry_ffi::run_pending(2),bun_tcp.rs:324).perry-ext-netsupplies aperry_ffi_run_pendingstub in its owntest_async_shims.rs— but that module is#[cfg(test)], so it exists only whenperry-ext-netis itself the crate under test, notwhen it is linked as an ordinary dependency into
perry-ext-http's test binary.perry-ext-http's shim already coversperry_ffi_spawn_asyncfor exactly this transitivereason;
perry_ffi_run_pendingis the same situation one call deeper.Note this is not the same bug as
6dcd1a598(#9719), which fixed the analogousweb-fetch-gated HTTP bridge symbols inperry-stdliband left the TCP path alone.Verification (linux-x86_64, real builds)
cargo test --release --no-run -p perry-ext-http, with the shim file swapped between main'sversion and this one, sharing a target dir so the second run genuinely relinks:
I also linked the
wsfeature group to check whetherperry-ext-ws— which also depends onperry-ext-netand also lacks the stub — needs the same fix. It does not; both it andperry-ext-fastifyproduce executables cleanly, so the fix is deliberately scoped toperry-ext-httpalone rather than added defensively.Scope
This is one of several independent breakages on main. Also open from the same sweep:
#9776 (
warnings— aclashing_extern_declarationscompile error, culprit1ebc65e87)and #9777 (
cargo-test— an unkeyed build-cache env var, culprit0b68a25cf).https://claude.ai/code/session_01YPfnmWZmSpSWpmnoXvH8z2
Summary by CodeRabbit
Documentation
Bun.connectandBun.listenmethods.Bug Fixes