Skip to content

fix(release): unify extension archive feature builds - #7952

Merged
proggeramlug merged 2 commits into
mainfrom
fix/7358-macos-stdlib-dispatch
Aug 12, 2026
Merged

fix(release): unify extension archive feature builds#7952
proggeramlug merged 2 commits into
mainfrom
fix/7358-macos-stdlib-dispatch

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Closes #7358

What changed

Release packaging now builds every native extension archive in the same Cargo invocation as perry, perry-runtime-static, and perry-stdlib-static. This gives the extension and the separately shipped runtime/stdlib archives the same resolved feature union.

A regression test checks that the release workflow keeps those packages paired.

Root cause

The release workflow built each perry-ext-* crate alone. Cargo therefore resolved a different runtime/shared-dependency feature set for that archive than for the separately built stdlib/runtime archives. The compiler's archive deduper could not discard the entire duplicate copy, leaving the HTTP accept loop attached to a reactor different from the one driven by the JS event loop.

The old no-op dispatch warning was removed by #6574, but that did not fix this feature-resolution mismatch.

Reproduction and verification

Using one compiler/runtime build and changing only how perry-ext-http was built:

  • Extension-only package set: the linker dropped 993 shared archive members, then the server panicked before responding because no reactor was running.
  • Unified package set: the linker dropped 1,676 shared archive members; curl received HTTP 200 with pong, and the TypeScript handler logged request received: /.

Additional checks:

  • cargo test -p perry --bin perry commands::compile::well_known::tests:: (21 passed)
  • Regression-test sabotage: removing perry-stdlib-static from the workflow made the new test fail
  • cargo fmt --all -- --check
  • actionlint -shellcheck= .github/workflows/release-packages.yml
  • bash scripts/check_file_size.sh
  • git diff HEAD~1 --check

No performance benchmark is needed: this changes release build package selection, not generated code or runtime hot paths.

Summary by CodeRabbit

  • Bug Fixes

    • Improved native extension release packaging so extensions share the shipped runtime and standard-library features.
    • Prevented incomplete or duplicated runtime components that could affect asynchronous HTTP functionality.
  • Tests

    • Added validation to ensure release builds include all required runtime, standard-library, compiler, and extension components together.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release workflow now builds native extensions with perry, perry-runtime-static, and perry-stdlib-static. A validation test checks this Cargo invocation, and a changelog entry documents the unified feature set.

Changes

Native extension release build

Layer / File(s) Summary
Unified Cargo build invocation
.github/workflows/release-packages.yml, changelog.d/7952-ext-feature-union.md
The workflow builds each native extension with the compiler and shipped static wrapper crates. The changelog documents the shared runtime and standard-library feature set.
Release workflow validation
crates/perry/src/commands/compile/well_known.rs
A test reads the Unix release workflow and verifies that the compiler, runtime, standard library, and extension packages are built together.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • PerryTS/perry#7029: Related cross-crate standard-library and runtime feature selection.
  • PerryTS/perry#7044: Related workflow changes that include the static runtime and standard-library wrapper crates.
  • PerryTS/perry#7118: Related native extension build and provisioning workflow changes.

Suggested labels: bug, tooling

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change to unify feature builds for release extension archives.
Description check ✅ Passed The description explains the change, root cause, issue, verification steps, and regression test, despite not using all template headings.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/7358-macos-stdlib-dispatch

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.

@proggeramlug
proggeramlug marked this pull request as ready for review August 12, 2026 11:45

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
crates/perry/src/commands/compile/well_known.rs (1)

681-714: 🗄️ Data Integrity & Integration | 🔵 Trivial | 🏗️ Heavy lift

Add an executable integration regression for the reported runtime failure.

This test only reads .github/workflows/release-packages.yml and checks package-token adjacency. It does not compile an extension, link it with the shipped archives, or run the HTTP accept path. The workflow can satisfy this test while the reactor mismatch remains.

Add a crates/perry/tests/*.rs test that invokes CARGO_BIN_EXE_perry and validates the compile → link → run path with the real runtime archive. Keep this workflow-contract test as a separate fast guard.

Based on learnings, Perry regressions that require the perry binary and the full compile → link → run path belong in crates/perry/tests/*.rs integration tests, not only in --lib unit tests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/perry/src/commands/compile/well_known.rs` around lines 681 - 714, Add
a separate integration test under crates/perry/tests that invokes
CARGO_BIN_EXE_perry and exercises the real compile, link, and run flow against
the shipped runtime archive, including the HTTP accept path that exposes the
reactor mismatch. Keep release_ext_builds_share_the_shipped_runtime_feature_set
as the fast workflow-contract guard, but do not rely on its YAML token checks as
the executable regression.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/perry/src/commands/compile/well_known.rs`:
- Around line 681-714: Add a separate integration test under crates/perry/tests
that invokes CARGO_BIN_EXE_perry and exercises the real compile, link, and run
flow against the shipped runtime archive, including the HTTP accept path that
exposes the reactor mismatch. Keep
release_ext_builds_share_the_shipped_runtime_feature_set as the fast
workflow-contract guard, but do not rely on its YAML token checks as the
executable regression.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 29619f4f-6194-4963-a1eb-6b34ea3d374a

📥 Commits

Reviewing files that changed from the base of the PR and between ac52a5c and dd11c28.

📒 Files selected for processing (3)
  • .github/workflows/release-packages.yml
  • changelog.d/7952-ext-feature-union.md
  • crates/perry/src/commands/compile/well_known.rs

@proggeramlug
proggeramlug merged commit 3da86b4 into main Aug 12, 2026
1 of 20 checks passed
@proggeramlug
proggeramlug deleted the fix/7358-macos-stdlib-dispatch branch August 12, 2026 12:05
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.

[macOS] node:http server accepts connections but request handler is never invoked — js_stdlib_init_dispatch no-op stub (brew v0.5.1220)

1 participant