Skip to content

test(browser): execute packed package in Chromium - #366

Merged
sameerank merged 3 commits into
sameerank/FFL-2835/configuration-from-stringfrom
agent/browser-chromium-smoke
Aug 13, 2026
Merged

test(browser): execute packed package in Chromium#366
sameerank merged 3 commits into
sameerank/FFL-2835/configuration-from-stringfrom
agent/browser-chromium-smoke

Conversation

@leoromanovsky

Copy link
Copy Markdown
Collaborator

Motivation

PR #344 adds production browser entry points and a React Native package smoke test, but the existing browser package check stops after TypeScript and Vite compilation. A package can build successfully while failing when its production output is loaded in a real browser, especially around package exports, initialization order, runtime globals, and capability-specific entry points.

This PR is stacked on #344 to close that runtime coverage gap before those browser APIs merge.

Changes

  • add a Playwright Chromium smoke test to the isolated Vite test app
  • build and serve separate pages for the full and /precomputed browser entry points from packed core/browser tarballs
  • exercise protobuf configuration parsing, round-trip serialization, boolean and integer evaluation, and SHA-256 matching through the full entry point
  • rerun the full entry point with TextEncoder, TextDecoder, and BigInt unavailable
  • verify the precomputed entry point parses and round-trips precomputed data without retaining rules
  • fail on browser page exceptions and console.error output
  • update the package-install check to install only the Chromium headless shell, execute the smoke tests, and restore the root lockfile after temporary package wiring

Decisions

  • keep this stacked on sameerank/FFL-2835/configuration-from-string because it directly tests the APIs introduced by [FFL-2835] Parse flags configuration wire format #344
  • test packed artifacts through a production Vite build and preview server rather than workspace links or a DOM emulator
  • keep the existing module-level assertion as the proof that /precomputed excludes Protobuf-ES; this browser smoke complements it by proving the entry point executes correctly
  • install only Chromium's headless shell to limit CI download size while retaining the real browser runtime boundary

Validation

  • yarn build
  • yarn lint
  • yarn format:check
  • yarn test
  • yarn test:browser-install (3 Playwright tests passed)

Comment thread test-app/src/precomputed.ts

Copilot AI 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.

Pull request overview

Adds real Chromium runtime smoke coverage for packed browser artifacts introduced by #344.

Changes:

  • Builds full and precomputed Vite entry points.
  • Tests parsing, evaluation, serialization, fallbacks, and browser errors.
  • Installs Chromium and runs Playwright during package validation.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test-app/vite.config.ts Configures multi-page production builds.
test-app/tests/smoke.spec.ts Adds Chromium smoke tests.
test-app/src/smoke.ts Provides smoke assertions and result reporting.
test-app/src/precomputed.ts Exercises the precomputed entry point.
test-app/src/main.ts Exercises full configuration parsing and evaluation.
test-app/precomputed.html Hosts the precomputed fixture.
test-app/playwright.config.ts Configures Chromium and Vite preview.
test-app/package.json Adds Playwright tooling and script.
test-app/index.html Simplifies the full-entry fixture page.
scripts/test-package-install.sh Runs browser tests against packed artifacts.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/test-package-install.sh Outdated
Comment thread test-app/src/precomputed.ts Outdated
Comment thread test-app/src/protobuf.ts Outdated
@leoromanovsky
leoromanovsky marked this pull request as ready for review August 13, 2026 20:39
@leoromanovsky
leoromanovsky requested a review from a team as a code owner August 13, 2026 20:39
@leoromanovsky
leoromanovsky requested review from btthomas and vjfridge and removed request for a team August 13, 2026 20:39

@vjfridge vjfridge 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.

The new coverage lgtm, thanks!

@sameerank sameerank 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.

Agreed with adding more test coverage 🙌

@sameerank
sameerank merged commit 9ee5444 into sameerank/FFL-2835/configuration-from-string Aug 13, 2026
3 checks passed
@sameerank
sameerank deleted the agent/browser-chromium-smoke branch August 13, 2026 21:38
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.

4 participants