Skip to content

Merge train 267: 3 PRs (v0.5.1650) — lands with the baseline gate red, owner-approved - #11110

Closed
proggeramlug wants to merge 10 commits into
mainfrom
train267
Closed

proggeramlug wants to merge 10 commits into
mainfrom
train267

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Merge train 267 — 3 PRs cherry-picked onto 1dbe9f46ed (v0.5.1647) and validated as one tree, released as v0.5.1650 (1648 and 1649 belong to trains 265 and 266, both ahead of this one).

PR head what it does
#11062 516c3673d4 base64 0.22.1 → 0.23.1
#11063 ba22b626b1 env_logger 0.10.2 → 0.11.11
#10704 f5524cc3ea remove the decimal.js / big.js / bignumber.js native binding

This train deliberately lands with one required step red

All three edit the root Cargo.toml, which benchmarks/public_baseline.py fingerprints as a SOURCE_PATHS input, so they invalidate the published benchmark artifact:

lint :: Public benchmark evidence freshness
public artifact benchmark inputs changed; regenerate it with ./benchmarks/run_public_baseline.sh

Source fingerprint on this head is f0ba5cb43e… against main's 9c87723d7c…. Clearing it properly means a ~2 h measurement on a quiet host pinned to Node v22.23.1 and Bun 1.3.14. The owner has approved landing these three without that regeneration.

The consequence, stated so nobody rediscovers it: after this lands the artifact is stale, so this step is red on main and therefore on every subsequent PR and train until someone regenerates. That is the state the repo was in for three weeks until it was cleared this morning. Treat it as known-red scenery again, and keep enumerating the failing lint steps rather than the job — this exact red has hidden real failures in the same job before.

Everything else is verified green

#10704 needed three things re-derived, because it was cut before merge train 259:

  • native_result_ledger absolutes. These are chained absolutes, the hazard Every queued binding-removal PR records an absolute workspace count; six are stale and the two correct ones collide with each other #10739 exists for. The branch recorded 302/267 against a main that read 314/279; main now reads 321/286 because fix(ioredis): wire extended command dispatch #11068 landed. Re-derived by running the script on the resolved tree, not by arithmetic: 309 rows, 274 providers — the same −12/−12 this removal always claimed. The base moved; the delta did not.
  • docs/src/api/reference.md, which was missing fix(ioredis): wire extended command dispatch #11068's seven ioredis entries: regenerated, 2809 → 2816 entries, 3828 → 3835 lines. Line count checked either side, because that gate has silently truncated this file before.
  • Cargo.lock, twice. Both conflicts were resolved by taking the train's own lock and re-resolving from the merged manifests, never by hand-merging hunks — and I then verified base64 0.23.1 and env_logger 0.11.11 both survived and that perry-ext-decimal is gone. Taking the other side is what silently dropped seven bumps during train 263's assembly, and lock_no_downgrade stayed green through it because nothing had moved backwards — the bumps simply never happened.
cargo fmt --all -- --check                      clean
scripts/check_file_size.sh                      OK: no Rust source files exceed 2000 lines.
cargo metadata --locked                         rc=0
scripts/native_result_ledger.py                 309 rows, 274 providers
scripts/lock_no_downgrade.py --vs main          no resolved version moved backwards (3143 edges)
scripts/tokio_inventory.py                      17 edges, 14 packages — unchanged

Closes #10684

Summary by CodeRabbit

  • New Features

    • Added native support for Node.js async_hooks, including async context storage and resource methods.
  • Changes

    • decimal.js and bignumber.js no longer use built-in native bindings. Imports resolve to the npm packages and compile from source when available in the project.
    • Updated the project version to 0.5.1650.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: dd0ccde0-4713-4203-a797-0725a1d03ae5

📥 Commits

Reviewing files that changed from the base of the PR and between 5af68d1 and e23cfce.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • scripts/native_result_ledger.tsv is excluded by !**/*.tsv
📒 Files selected for processing (3)
  • CLAUDE.md
  • Cargo.toml
  • scripts/unrooted_local_shape_baseline.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • CLAUDE.md

Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

The change removes the bundled decimal.js, big.js, and bignumber.js binding from package resolution, compiler lowering, and runtime support. It adds a separate native signature table for async_hooks and updates related manifests, documentation, tests, and project records.

Changes

Native math binding removal

Layer / File(s) Summary
Package resolution and native-instance classification
perry/well_known_bindings.toml, perry/src/commands/compile/collect_modules/feature_detect.rs, perry/src/commands/stdlib_features.rs, perry-hir/src/destructuring/var_decl/*, perry-hir/src/js_transform/imports.rs, perry-hir/src/lower/module_decl.rs, perry-hir/src/lower_patterns.rs, perry-hir/src/lower/expr_call/static_and_instance.rs
Removed the well-known package mappings and feature routing for decimal.js and bignumber.js. Removed the Big, Decimal, and BigNumber native-instance classification and math-library call paths.
Decimal lowering and runtime removal
perry-codegen/src/lower_call/builtin.rs, perry-codegen/src/runtime_decls/stdlib_ffi*, crates/perry-ext-decimal/*, crates/perry-stdlib/*, crates/perry-ui-android/src/stdlib_stubs.rs, Cargo.toml
Removed Decimal constructor lowering, decimal FFI declarations and implementations, Android decimal stubs, and the decimal feature and workspace registrations.
Manifests, documentation, and project records
crates/perry-api-manifest/src/entries*, docs/api/perry.d.ts, docs/src/api/reference.md, docs/src/stdlib/*, docs/src/native-libraries/governance.md, docs/examples/stdlib/other/snippets.ts, test-files/test_parity_decimal.ts, test-parity/known_failures.json, changelog.d/10704-remove-decimaljs-binding.md, scripts/*, workspace-architecture.json, CLAUDE.md, Cargo.toml
Removed decimal package entries, documentation, and parity coverage. Updated the changelog, workspace records, baselines, project version, and dependency versions.

async_hooks native table

Layer / File(s) Summary
Define and register async_hooks signatures
crates/perry-codegen/src/lower_call/native_table/async_decimal.rs, crates/perry-codegen/src/lower_call/native_table/async_hooks.rs, crates/perry-codegen/src/lower_call/native_table/mod.rs
Added native signature rows for AsyncLocalStorage, AsyncHook, and AsyncResource methods. Replaced the combined async_decimal table module and dispatch entry with the async_hooks table.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to e23cf

The dependency updates remain lockfile-compatible, and AsyncLocalStorage.run preserves its store/callback calling convention. No merge-blocking issue is established.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The Cargo.toml changes upgrade base64 from 0.22 to 0.23 and env_logger from 0.10 to 0.11. Issue #10684 does not require or support these dependency upgrades. The PR summary identifies them as se… Revert the base64 and env_logger upgrades, or link coding requirements that justify these upgrades in this pull request.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 12 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies merge train 267, the release version, and the approved baseline-gate status. It does not list the dependency upgrades or native binding removal, but it clearly describes the merge…
Description check ✅ Passed The description provides a detailed summary, lists all three included changes, identifies the related issue, documents the expected failing step, and records verification commands and results. It does…
Linked Issues check ✅ Passed The changes satisfy the coding resolution in issue #10684. They delete perry-ext-decimal and remove its decimal.js, big.js, and bignumber.js registries, compiler paths, FFI declarations, stdli…
Full details: Out of Scope Changes check

Explanation

The Cargo.toml changes upgrade base64 from 0.22 to 0.23 and env_logger from 0.10 to 0.11. Issue #10684 does not require or support these dependency upgrades. The PR summary identifies them as separate changes, but no linked coding requirement justifies them here.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 12 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 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.

dependabot Bot and others added 10 commits September 23, 2026 14:36
Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.22.1 to 0.23.1.
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](marshallpierce/rust-base64@v0.22.1...v0.23.1)

---
updated-dependencies:
- dependency-name: base64
  dependency-version: 0.23.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 516c367)
Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.10.2 to 0.11.11.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](rust-cli/env_logger@v0.10.2...v0.11.11)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-version: 0.11.11
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit ba22b62)
Fixes #10684 -- the removal is the fix. Native division returned "1" for
both 1/3 and 10/4, and new Decimal("123456789123456789").times("987654321987654321")
aborted the process (Multiplication overflowed in rust_decimal -- a fixed
96-bit type backing an arbitrary-precision library). instanceof and
constructor.name were also broken, the same way as lru-cache's.

Removes both copies (crates/perry-ext-decimal/ and the feature-gated
crates/perry-stdlib/src/decimal.rs), the dedicated HIR/codegen recognition
for Big/Decimal/BigNumber (they share one binding/crate with decimal.js),
and every registry row (well_known_bindings.toml, NATIVE_MODULES, the API
manifest, stdlib_features.rs, native_result_ledger, workspace-architecture.json,
Android stubs). big.js/bignumber.js go with it -- same crate, same defects.

Based on PR #10699's branch (fix/10439-native-binding-import-provenance):
without that fix, decimal.js/big.js/bignumber.js at their default import
name are unreachable regardless of perry.compilePackages, so this removal
is not independently mergeable.

(cherry picked from commit 19fdac8)
…nding removal)

(cherry picked from commit d128c81)
… orphaned decimal.js parity fixture

Removes the stray perry-ext-decimal crate entry that survived the rebase's
auto-merge in workspace-architecture.json, resyncs Cargo.lock, and
recomputes native_result_ledger EXPECTED_ROWS/PROVIDERS (344 rows, 295
providers), the unrooted-local-shape baseline, the generated
binding-governance table, and docs/api/perry.d.ts + docs/src/api/reference.md
from a fresh perry-dev build.

crates/perry-hir/src/lower_patterns.rs: detect_native_instance_expr's
new-expression arm went dead. Its match on class_name used to have five live
arms (Big/Decimal/BigNumber from this PR, LRUCache/Command from the already-
landed #10708/#10712) -- with all five gone the fallback-only match triggered
rustc's unreachable_code lint under -D warnings. Simplified the arm to what
it now always evaluates to (None after the local-class shadow check), and
rewrote the function doc comment to explain why the stub is kept rather than
deleted. This is a sequencing interaction the brief calls out explicitly:
this file wasn't touched by mysql2/pg/cron's diffs, but decimal.js landing
after commander/lru-cache emptied a match neither PR could see on its own.

test-files/test_parity_decimal.ts + its test-parity/known_failures.json
entry: the original PR left this fixture behind (unlike #10795, which
deleted its own moment/cron/backoff test files as part of the same removal).
The fixture is now double-dead: decimal.js has no Perry-specific behavior
left to validate, and the file was already skip-listed as a broken oracle
(node itself can't resolve decimal.js post-npm-ci, #8271) before this PR.

(cherry picked from commit 0532209)
)

The prior commit's ledger/baseline/doc numbers were computed against an
earlier rebase base and went stale when main moved again. Recomputed
from the resolved tree with a fresh release build:

- scripts/native_result_ledger.py: EXPECTED_ROWS/PROVIDERS 314 -> 302,
  279 -> 267 (-12/-12: the 12 NR_HANDLE_ID-classified js_decimal_*
  providers and their table rows). Verified: native_result_ledger.py
  passes with these exact counts on the resolved tree.
- workspace-architecture.json: workspace_members/externalize 68 -> 67,
  14 -> 13. Verified two independent properties: internal
  (sum(decision_counts) == workspace_members == len(crates) == 67) and
  external (the crate name set matches cargo metadata --offline's 67
  workspace members exactly).
- scripts/unrooted_local_shape_baseline.json: total 390 -> 389,
  verified with the absolute --check (not just --no-raise-vs).
- docs/api/perry.d.ts, docs/src/api/reference.md: regenerated via
  scripts/regen_api_docs.sh from a freshly built release perry binary;
  diff is just the two header count lines, tail intact.
- Cargo.lock: resynced via cargo metadata --offline, dropping the 4
  stale entries (perry-ext-decimal, rust_decimal, borsh, borsh-derive)
  that survived the conflict resolution.

scripts/string_payload_access_baseline.txt needed no change: rerunning
--write-baseline against the resolved tree produced an identical file
(decimal.rs never held any open-coded StringHeader payload access).

(cherry picked from commit 2b68bfa)
ABSOLUTES, not deltas. This branch was cut when main read 314/279; main
now reads 321/286 because #11068 (ioredis command dispatch) landed in
merge train 259. The recorded 302/267 was therefore stale by
construction, and the rebase surfaced it as a conflict rather than
silently keeping a wrong number.

Re-derived by RUNNING the script on the resolved tree, not by
arithmetic:

  native_result_ledger passed: 309 rows, 274 providers
  NR_FOREIGN_PTR=4 NR_GCPTR=104 NR_HANDLE_ID=192 NR_JS_VALUE=7 NR_NULLABLE_GCPTR=2

321 -> 309 and 286 -> 274, i.e. the same -12/-12 this removal always
claimed; the base moved, the delta did not. Cargo.lock re-resolved from
the merged manifests rather than hand-merged.

(cherry picked from commit 4c0dca0)
The branch carried a reference.md generated before merge train 259, so
it was missing #11068's seven ioredis command entries (hdel/hget/
hgetall/...). Regenerated with scripts/regen_api_docs.sh from a freshly
built perry: 2809 -> 2816 entries across 115 modules, 3828 -> 3835
lines. docs/api/perry.d.ts was already correct and is unchanged.

Line count checked before and after because this gate has silently
TRUNCATED reference.md in the past when CARGO_TARGET_DIR is set
out-of-tree; it grew by exactly the 7 added entries.

(cherry picked from commit f5524cc)
@proggeramlug

Copy link
Copy Markdown
Contributor Author

Superseded by merge train 270 (#11128 — see below), which carries all three of this train's PRs (#11062, #11063, #10704) plus three more.

Why folded rather than re-run. Train 268 landed while this was in CI, and the two are not disjoint: both touch crates/perry-hir/src/lower/module_decl.rs. #10704 removes the Big/Decimal/BigNumber name→package mappings; #11087 (in 268) narrows the re-export name-existence check to node-core modules only. Both concern how non-node-core module names are handled — exactly the shape where each half passes and the combination does not. So a re-validation was required, not optional.

Given that, folding into train 270 — which had to be rebased onto the new main anyway — validates all six PRs in one CI cycle instead of two.

This train's own result, for the record. After the re-run it was clean apart from two explained steps:

lint    :: Public benchmark evidence freshness   ← owner-approved known red (#10704/#11062/#11063 land without regenerating the artifact)
pr-gate :: Require the plan and every planned job to have passed   ← the fan-in of the above

Its one earlier red, test_gap_turnloop_p3_timer_heap: pass -> parity_fail on shard 4, was a flake: attempt 2 of the same job on the same SHA passed. That fixture has 18 timing constructs (setTimeout/setInterval/Date.now/hrtime) and arrived with #10354. It is the third flaky gap/e2e test found today, after #11103 and #11124.

Nothing is lost — the branch stays until 270 lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants