Skip to content

test: add required Bun-only and outdated Node integration coverage - #7899

Merged
FarhanAliRaza merged 7 commits into
reflex-dev:mainfrom
somiljain2006:bun
Nov 20, 2026
Merged

FarhanAliRaza merged 7 commits into
reflex-dev:mainfrom
somiljain2006:bun

Conversation

@somiljain2006

@somiljain2006 somiljain2006 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

New Feature Submission:

  • Does your submission pass the tests?
  • Have you linted your code locally prior to submission?

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Closes #7896

Add a dedicated bun-only-startup job on Linux, macOS and Windows. It runs tests/integration/test_nodeless_frontend.py in two scenarios: no Node on PATH, and an outdated Node (20) on PATH.

  • The bun_runtime fixture asserts Reflex's own runtime choice: plain bun with no Node, and bun --bun over an outdated Node. It pins get_node_version to the scenario, because the per-process cache can hold a value that was probed under another PATH.
  • test_dev_frontend_serves: the dev server starts with bun --conditions=development, serves the document, and compiles the page's route module.
  • test_prod_frontend_serves: the production build (bun [--bun] run export) runs and serves the prerendered page.
  • In the dedicated job, a missing runtime or a skipped test fails CI. Elsewhere the tests skip and give the reason (-rs).
  • The job installs the Bun version from constants.Bun.VERSION and sets REFLEX_USE_SYSTEM_BUN=1, so Reflex runs that Bun. It also records the runtime versions and paths.

On Linux and macOS, the pre-#7895 dev command starts fine, so only the argv assertion catches a revert there. The original restart-guard failure happens only on Windows.

View guided diff

@somiljain2006
somiljain2006 requested a review from a team as a code owner November 14, 2026 16:40
@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no new blocking issues were found.

Summary

Adds required Bun startup coverage on Linux, macOS, and Windows.

  • Integration tests check Bun frontend startup with and without Node.
  • CI runs the Bun startup scenarios on three operating systems.

Previous threads:

  • The page-output assertion thread was manually resolved without explanation.
  • The bare Python commands now use uv run python.
  • somiljain2006 dismissed the small duplicated assertions because the scenarios differed and self-contained tests were clearer. Greptile withdrew that suggestion.

Reviews (6) · Last reviewed commit: "Merge branch 'main' into bun" · Reviewed by Greptile

Comment thread .github/workflows/integration_tests.yml Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

@codspeed

codspeed Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 6.35%

3 warnings

⚠️ 15 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ 3 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

⚠️ 3 benchmarks with a significant change ran in a different software environment

Their base and head results were measured with a different OS or toolchain, such as compiler, runtime or library versions, so the changes might come from this difference rather than from the code. Open an affected benchmark to see what changed.

See affected benchmarks

❌ 3 regressed benchmarks
✅ 143 untouched benchmarks
⏩ 8 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_route_matching[1000] 90 ms 96.8 ms -6.95%
❌ test_route_matching[100] 9.4 ms 10.1 ms -6.8%
❌ test_route_matching[10] 1.2 ms 1.3 ms -5.31%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing somiljain2006:bun (f139a3a) with main (1609525)

Open in CodSpeed

Footnotes

  1. 8 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. ↩

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

@FarhanAliRaza FarhanAliRaza added the on deck PRs lined up to review / merge next label Nov 20, 2026
- One fixture runs each test with no node and with an outdated node. It
  pins get_node_version to the scenario, because the per-process cache can
  hold a value probed under another PATH (telemetry fills it first).
- The fixture asserts Reflex's own executor: plain bun with no node, and
  `bun --bun` over an outdated node, so the two cases are told apart.
- Add a prod test: the production build must run and serve the page.
- The dev test checks the compiled route module holds the app's text.
- One `_require` helper skips, or fails in the dedicated job.
- The job reads the Bun version from constants.Bun.VERSION and sets
  REFLEX_USE_SYSTEM_BUN, so Reflex runs the provisioned bun.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

View guided diff | Re-trigger cubic

Comment thread .github/workflows/integration_tests.yml Resolved
Inside echo, a failed command substitution does not stop bash -e, so an
empty version reached setup-bun, which then installs the latest Bun.
@FarhanAliRaza
FarhanAliRaza merged commit 063619a into reflex-dev:main Nov 20, 2026
169 of 170 checks passed
@somiljain2006
somiljain2006 deleted the bun branch November 20, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on deck PRs lined up to review / merge next

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Bun-only frontend regression test skips in Linux jobs; cover macOS and outdated Node

2 participants