Skip to content

feat: replace source build with binary download for benchx_cli#2249

Merged
colinaaa merged 1 commit intolynx-family:mainfrom
hzy:feature/benchx-cli-download
Feb 14, 2026
Merged

feat: replace source build with binary download for benchx_cli#2249
colinaaa merged 1 commit intolynx-family:mainfrom
hzy:feature/benchx-cli-download

Conversation

@hzy
Copy link
Copy Markdown
Collaborator

@hzy hzy commented Feb 14, 2026

Summary

Replaced the complex source build process for benchx_cli with a lightweight binary download script. This change significantly speeds up the setup process and removes build-time dependencies.

Changes

  • Replaced packages/lynx/benchx_cli/scripts/build.mjs with build.sh:
    • No longer builds from source (which required Ninja, Rust, etc.).
    • Downloads pre-built binaries from lynx-community/benchx_cli.
    • Supports macOS (arm64) and Linux (x86_64).
    • Includes platform detection and version locking.
  • Updated package.json:
    • Changed build script to run the new shell script.
    • Removed zx dependency as it's no longer needed for the build script.
  • Updated .github/renovate.json5:
    • Configured Renovate to monitor the LOCKED_VERSION in build.sh against GitHub Releases instead of git tags/commits.

Verification

  • Verified that pnpm build in packages/lynx/benchx_cli correctly downloads and extracts the binary.
  • Verified that the version check works correctly.

Summary by CodeRabbit

  • Refactor

    • Build now fetches prebuilt benchx_cli binaries from GitHub Releases instead of compiling from source.
    • Builds use a locked-version approach tied to release tags for consistent binaries.
    • Build process switched from a Node-based flow to a shell-based workflow.
    • Platform-specific binary selection added for macOS (arm64) and Linux (x86_64).
  • Chores

    • CI/task inputs updated to use the new shell-based build workflow.

Copilot AI review requested due to automatic review settings February 14, 2026 04:47
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 14, 2026

⚠️ No Changeset found

Latest commit: 3985e2d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 14, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Replaces the benchx_cli source build with a release-download workflow: removes build.mjs, adds build.sh, updates package build script and turbo inputs, and updates Renovate custom manager to track GitHub Releases with a regex versioning template. (50 words)

Changes

Cohort / File(s) Summary
Renovate config
\.github/renovate.json5
Custom manager updated: managerFilePatterns -> packages/lynx/benchx_cli/scripts/build.sh; matchStrings -> LOCKED_VERSION="(?<currentValue>benchx_cli-.*?)"; removed currentValueTemplate/packageNameTemplate; depNameTemplate -> lynx-community/benchx_cli; datasourceTemplate -> github-releases; added versioningTemplate.
Package metadata
packages/lynx/benchx_cli/package.json
scripts.build changed from node scripts/build.mjs to ./scripts/build.sh (no dependency changes).
Build scripts
packages/lynx/benchx_cli/scripts/...
packages/lynx/benchx_cli/scripts/build.mjs, packages/lynx/benchx_cli/scripts/build.sh
Removed Node-based build.mjs (full source build logic deleted). Added Bash build.sh implementing a LOCKED_VERSION-driven download: OS/arch detection, GitHub release tarball download/extract into dist/bin, and writing dist/bin/benchx_cli.version.
Turbo inputs
packages/lynx/benchx_cli/turbo.json
Build task inputs changed from ["scripts/build.mjs", "patches/*"] to ["scripts/build.sh"], removing patches/*.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • colinaaa
  • upupming

Poem

🐇 I hopped from source to release with glee,
A tarball fetched, the binary set free.
LOCKED_VERSION tucked in dist/bin's nest,
No ninja builds — just download and rest.
Nibble the carrot, the rabbit approves — zest! 🥕

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately and concisely summarizes the main change: replacing the source build process with binary downloads for benchx_cli, which matches the core objective of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.github/renovate.json5:
- Around line 198-205: The Renovate entry for the benchx_cli github-releases
datasource lacks a versioningTemplate, so non-semver tags like
"benchx_cli-202602132156" may be parsed incorrectly; update the object that
contains "customType", "matchStrings", and "depNameTemplate" to add a
"versioningTemplate" property that either (a) uses a regex to parse the
benchx_cli-YYYYMMDDHHMM style tags (matching year, month, day, time groups) or
(b) sets a loose/non-semver scheme so Renovate can sort and compare those
release tags correctly.

In `@packages/lynx/benchx_cli/scripts/build.sh`:
- Around line 62-69: The curl call that downloads URL built from LOCKED_VERSION
and ASSET_NAME can silently save HTTP error pages and cause tar -xzf to fail;
update the curl invocation that writes to TAR_PATH to include --fail (or -f) so
curl exits non‑zero on 4xx/5xx, and optionally check the curl exit status and
remove the partial TAR_PATH before exiting to avoid passing an invalid file to
tar (locate the line with curl -L --progress-bar -o "$TAR_PATH" "$URL" and add
--fail/-f and a brief exit-on-error handling).
🧹 Nitpick comments (2)
packages/lynx/benchx_cli/scripts/build.sh (2)

62-72: No integrity verification of the downloaded binary.

The script downloads and executes a binary from a remote URL without any checksum or signature verification. A compromised release or MITM (on non-HTTPS fallback) could inject a malicious binary. Consider adding a SHA-256 checksum check against a known digest.


37-54: Add a clarifying comment about intentional platform support limits.

The script currently supports Darwin/arm64 and Linux/x86_64, matching the published release assets. These are the only platforms with published binaries, which is reflected correctly in the build script. Consider adding a comment (e.g., above line 37) explaining why only these platforms are supported, so future maintainers understand this is intentional rather than an oversight. This will prevent accidental attempts to add support for Linux aarch64 or Darwin x86_64 without corresponding release artifact builds.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces the previous source-based build for packages/lynx/benchx_cli (which required fetching/cherry-picking from upstream and compiling) with a faster, version-locked binary download approach from GitHub Releases.

Changes:

  • Added a Bash build script that downloads a prebuilt benchx_cli tarball for supported platforms and writes it to dist/bin.
  • Removed the Node/zx-based build script and updated packages/lynx/benchx_cli/package.json to run the new shell script.
  • Updated Renovate configuration to track LOCKED_VERSION in build.sh via the github-releases datasource.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/lynx/benchx_cli/scripts/build.sh New CI-gated build that downloads a locked release asset and extracts it into dist/bin.
packages/lynx/benchx_cli/scripts/build.mjs Removes the previous source build pipeline (git fetch/cherry-pick + GN/Ninja build).
packages/lynx/benchx_cli/package.json Switches build script to the new shell script and removes zx dependency from the package manifest.
.github/renovate.json5 Adjusts custom regex manager to update LOCKED_VERSION from GitHub Releases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hzy hzy force-pushed the feature/benchx-cli-download branch 3 times, most recently from 1a45735 to 0e8593d Compare February 14, 2026 06:33
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/lynx/benchx_cli/package.json (1)

9-13: ⚠️ Potential issue | 🟡 Minor

Remove the unused zx dependency.

The build.mjs script that depended on zx has been removed and replaced with build.sh, a pure bash script that does not use Node.js or zx. The zx dependency in dependencies is no longer needed and should be removed.

Proposed fix
  "dependencies": {
-   "zx": "^8.8.5"
-  }
+  }

Or remove the dependencies field entirely if empty.

@hzy hzy force-pushed the feature/benchx-cli-download branch 4 times, most recently from 0f06e4f to eb9404c Compare February 14, 2026 06:57
This change replaces the complex source build process (which required various dependencies like git, ninja, rust, etc.) with a simple binary download from GitHub Releases. The script now downloads pre-built binaries for macOS and Linux, ensuring faster and more reliable setup.

Key changes:
- Replaced  with  for simpler dependency-free execution.
- Updated  to use the new shell script.
- Configured Renovate to monitor  for updates via GitHub Releases.
@hzy hzy force-pushed the feature/benchx-cli-download branch from eb9404c to 3985e2d Compare February 14, 2026 07:09
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 14, 2026

Merging this PR will degrade performance by 14.18%

⚡ 3 improved benchmarks
❌ 33 regressed benchmarks
✅ 27 untouched benchmarks
⏩ 3 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
more faster fib(20) 16.2 µs 18.8 µs -14.18%
faster fib(20) 46.6 µs 50 µs -6.9%
003-hello-list__main-thread-renderMainThread 14.7 ms 16.4 ms -10.27%
slower fib(20) 5.3 ms 5.7 ms -7.01%
003-hello-list__main-thread-processData 22.3 µs 24.3 µs -8.13%
basic-performance-div-10000 456.6 ms 491.6 ms -7.12%
003-hello-list__main-thread-serializeRoot 3.7 ms 4.1 ms -9.88%
003-hello-list__main-thread-componentAtIndex__reuse 3.1 ms 2.4 ms +26.45%
003-hello-list__main-thread-renderOpcodes 2.2 ms 2.5 ms -8.54%
006-static-raw-text__main-thread-renderOpcodes 3.2 ms 3.5 ms -7.85%
004-various-update-setAttribute__BatchedValues 316.1 µs 336.9 µs -6.17%
006-static-raw-text/main-thread.js_LoadScript 387.5 µs 413.6 µs -6.3%
006-static-raw-text__main-thread-serializeRoot 910.8 µs 997 µs -8.65%
005-load-script/background.js_LoadScript 1.2 ms 1.3 ms -7.78%
basic-performance-scroll-view-100 11 ms 10.4 ms +5.28%
006-static-raw-text__main-thread-renderMainThread 1.6 ms 1.8 ms -11.83%
003-hello-list-destroyBackground 2.4 ms 2.8 ms -11.36%
006-static-raw-text/background.js_LoadScript 481.6 µs 525.1 µs -8.29%
006-static-raw-text__main-thread-processData 21.4 µs 24 µs -10.69%
001-fib/background.js_LoadScript 565.3 µs 610.7 µs -7.44%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing hzy:feature/benchx-cli-download (3985e2d) with main (63a1cdb)2

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (b89b3e3) during the generation of this report, so 63a1cdb was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@relativeci
Copy link
Copy Markdown

relativeci bot commented Feb 14, 2026

Web Explorer

#7675 Bundle Size — 383.74KiB (0%).

3985e2d(current) vs 87682f6 main#7667(baseline)

Bundle metrics  Change 1 change
                 Current
#7675
     Baseline
#7667
No change  Initial JS 154.88KiB 154.88KiB
No change  Initial CSS 35.06KiB 35.06KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 8 8
No change  Assets 8 8
Change  Modules 238(+0.42%) 237
No change  Duplicate Modules 16 16
No change  Duplicate Code 2.99% 2.99%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#7675
     Baseline
#7667
No change  JS 252.83KiB 252.83KiB
No change  Other 95.85KiB 95.85KiB
No change  CSS 35.06KiB 35.06KiB

Bundle analysis reportBranch hzy:feature/benchx-cli-downloadProject dashboard


Generated by RelativeCIDocumentationReport issue

@colinaaa colinaaa merged commit df4bc6e into lynx-family:main Feb 14, 2026
45 of 46 checks passed
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.

3 participants