Skip to content

chore: merge train 231 (v0.5.1610) - #10778

Merged
proggeramlug merged 3 commits into
mainfrom
train231r
Sep 20, 2026
Merged

proggeramlug merged 3 commits into
mainfrom
train231r

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Merge train 231 — one PR, released as v0.5.1610.

Contents

PR Change
#10765 refactor(stdlib): remove the qs / fastify / dayjs / date-fns / rate-limiter-flexible / node-cron native bindings

+862 / −11,820 across 73 files. Six bindings, four deleted crates (date-fns rode on perry-ext-dayjs; node-cron rode on perry-ext-cron, which stays for the cron package). Real npm source now compiles in place of each hand-written Rust reimplementation, per the standing "fix the compiler, never the bindings" decision.

typescript was pulled back out — deliberately, and it is the interesting part

An earlier revision removed typescript too. Removing that binding makes perry execute real typescript.js for the first time: well_known.rs routes a bare import 'X' to the bundled wrapper even when node_modules/X is on disk, so the real file is unreachable today. It throws — TypeError: Cannot convert undefined or null to object inside InferredProject.addRoot, three frames deep in real typescript.js.

The defect is pre-existing and reproducible on main, not caused by the removal. But import 'typescript' works for users today and would start throwing, so shipping the removal would ship a regression. The binding, crate, manifest rows and HIR enum folding are all retained unchanged; the removal waits for the compiler fix, tracked in #10772. The campaign's two steps land in the other order for this one package.

Two landing risks the author flagged, and how they were checked

Two surviving gap fixtures now exercise the real packages. test_gap_dayjs_factory_arg.ts and test_gap_ratelimiter_memory.ts are not in gap_snapshot.json (which holds only failing entries), so both are expected to pass — the gate goes red the moment a real package diverges from the shim it replaced. Both were run against the real packages in this train's sweep, alongside test_gap_cron_cronjob; all three PASS.

HIR keeps type-name → native-module tagging for removed modules. FastifyInstance/FastifyRequest/FastifyReply and ("dayjs", "add"|"subtract"|…) survive in four lower* sites with their NATIVE_MODULE_TABLE rows deleted. Expected dead-but-harmless, and exactly the shape that would let typed fastify behave differently from an untyped probe — so the author's fastify acceptance is deliberately typed, at both 5.10.0 and the 5.12.4 that ^5.10.0 actually resolves.

Absolute counts were re-derived on the assembled tree, not carried from the PR

This PR rebased three times across other binding removals that move the same surfaces, and an earlier revision's counts came through as clean auto-merges while being wrong. Every count was re-run here, on this train's tree, after typescript was pulled back out:

script on this tree
workspace_architecture.py --check --print-summary 72 members, externalize=23, keep=44 — policy: OK
native_result_ledger.py 369 rows / 320 providers
unrooted_local_shape.py --check 562 — OK
binding_pins.mjs --check lock-step holds; perry-ext-typescript retained

No perry-ext-{qs,dayjs,fastify,ratelimit} remains in Cargo.lock; perry-ext-typescript does.

Validation

Assembled on bd24fb32a2; PR proven fully represented — zero dropped insertions; no attribution trailers in any commit. All nine cheap gates, cargo check --workspace --all-targets under -D warnings, the release build of all five pinned artifacts (byte-identical before and after the gap sweep), every unit suite, and a 7-area gap sweep at PERRY_RUN_TIMEOUT=30 with zero unexplained regressions and every area asserted to have run a non-zero number of tests (dayjs 1, ratelimiter 1, cron 1, date 16, http 8, require 5, module 14). lint completed its full 6-of-6 compile tier with nothing outside the known-red public-baseline step.

One abort worth recording: the first sweep attempt returned rc=2, ran=0 on the first area — the harness refused to run because node_modules no longer matched package.json (this PR adds date-fns and fastify as real devDependencies). A refusal that reports zero tests is indistinguishable from a clean area unless something checks; the driver's per-area ran>0 assertion is what caught it. npm ci, relaunch, and the preflight now checks npm ls --depth=0 before a build starts rather than after.

@proggeramlug
proggeramlug merged commit 3f5b5b1 into main Sep 20, 2026
24 of 26 checks passed
@proggeramlug
proggeramlug deleted the train231r branch September 20, 2026 03:11
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ff4d6698-f293-42b4-8f9b-5e116eaff939

📥 Commits

Reviewing files that changed from the base of the PR and between bd24fb3 and 206f654.

⛔ Files ignored due to path filters (3)
  • Cargo.lock is excluded by !**/*.lock
  • package-lock.json is excluded by !**/package-lock.json
  • scripts/native_result_ledger.tsv is excluded by !**/*.tsv
📒 Files selected for processing (70)
  • CLAUDE.md
  • Cargo.toml
  • changelog.d/10765-remove-6-native-bindings.md
  • crates/perry-api-manifest/src/entries.rs
  • crates/perry-api-manifest/src/entries/part_1.rs
  • crates/perry-api-manifest/src/entries/part_2.rs
  • crates/perry-api-manifest/src/entries/part_4.rs
  • crates/perry-codegen/src/ext_registry.rs
  • crates/perry-codegen/src/lower_call/builtin.rs
  • crates/perry-codegen/src/lower_call/native_module_dispatch.rs
  • crates/perry-codegen/src/lower_call/native_table/dates.rs
  • crates/perry-codegen/src/lower_call/native_table/extras.rs
  • crates/perry-codegen/src/lower_call/native_table/fastify.rs
  • crates/perry-codegen/src/lower_call/native_table/mod.rs
  • crates/perry-codegen/src/lower_call/native_table/qs.rs
  • crates/perry-codegen/src/runtime_decls/stdlib_ffi/streams_events.rs
  • crates/perry-codegen/src/runtime_decls/stdlib_ffi/utilities.rs
  • crates/perry-ext-dayjs/Cargo.toml
  • crates/perry-ext-dayjs/src/lib.rs
  • crates/perry-ext-fastify/Cargo.toml
  • crates/perry-ext-fastify/src/app.rs
  • crates/perry-ext-fastify/src/cluster_bind.rs
  • crates/perry-ext-fastify/src/context.rs
  • crates/perry-ext-fastify/src/lib.rs
  • crates/perry-ext-fastify/src/router.rs
  • crates/perry-ext-fastify/src/server.rs
  • crates/perry-ext-fastify/src/upgrade.rs
  • crates/perry-ext-qs/Cargo.toml
  • crates/perry-ext-qs/src/codec.rs
  • crates/perry-ext-qs/src/lib.rs
  • crates/perry-ext-qs/src/options.rs
  • crates/perry-ext-qs/src/parse.rs
  • crates/perry-ext-qs/src/runtime.rs
  • crates/perry-ext-qs/src/stringify.rs
  • crates/perry-ext-qs/src/test_async_shims.rs
  • crates/perry-ext-ratelimit/Cargo.toml
  • crates/perry-ext-ratelimit/src/lib.rs
  • crates/perry-hir/src/destructuring/var_decl/native_new.rs
  • crates/perry-hir/src/js_transform/local_natives.rs
  • crates/perry-hir/src/lower/module_decl.rs
  • crates/perry-runtime/src/closure/mod.rs
  • crates/perry-runtime/src/closure/v8_stubs.rs
  • crates/perry-stdlib/Cargo.toml
  • crates/perry-stdlib/src/common/async_bridge.rs
  • crates/perry-stdlib/src/common/dispatch/init.rs
  • crates/perry-stdlib/src/common/dispatch/property_dispatch.rs
  • crates/perry-stdlib/src/dayjs.rs
  • crates/perry-stdlib/src/lib.rs
  • crates/perry-stdlib/src/ratelimit.rs
  • crates/perry-ui-android/src/stdlib_stubs.rs
  • crates/perry/src/commands/compile/optimized_libs/driver.rs
  • crates/perry/src/commands/compile/well_known.rs
  • crates/perry/src/commands/stdlib_features.rs
  • crates/perry/tests/issue_8751_qs_native_shim.rs
  • crates/perry/well_known_bindings.toml
  • docs/api/perry.d.ts
  • docs/native-libraries.md
  • docs/src/api/reference.md
  • docs/src/native-libraries/governance.md
  • docs/src/stdlib/other.md
  • package.json
  • scripts/native_result_ledger.py
  • scripts/string_payload_access_baseline.txt
  • scripts/unrooted_local_shape_baseline.json
  • test-files/test_date_fns_format.ts
  • test-files/test_parity_cron.ts
  • test-files/test_parity_date_fns.ts
  • test-files/test_parity_dayjs.ts
  • test-parity/known_failures.json
  • workspace-architecture.json
 ___________________________________________________________________________________________
< Optimism is an occupational hazard of programming; feedback is the treatment. - Kent Beck >
 -------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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