Skip to content

bridge web - #3966

Closed
sxlijin wants to merge 1 commit into
canaryfrom
push-xxlwmvqoowku
Closed

sxlijin wants to merge 1 commit into
canaryfrom
push-xxlwmvqoowku

Conversation

@sxlijin

@sxlijin sxlijin commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • CI Improvements
    • Added a merge-queue fast path that reuses an already-green result when the merge-group content matches the PR head.
    • Skips follow-on validation work on the fast path while still reporting success through the required-check “skip-as-success” behavior.
  • Test & SDK Infrastructure
    • Introduced TypeScript web SDK browser test harness wiring, including Unix/Windows setup scripts and nextest profile commands.
    • Added web SDK test-side generation and validation helpers for generated ESM output.
  • Web/Platform Support
    • Added a new web bridge crate and introduced WASM-specific scaffolding for the bridge.
    • Updated the CFFI bridge to use target-appropriate implementations.

@vercel

vercel Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beps Ready Ready Preview, Comment Jul 13, 2026 10:12pm
promptfiddle Ready Ready Preview, Comment Jul 13, 2026 10:12pm
promptfiddle2 Ready Ready Preview, Comment Jul 13, 2026 10:12pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The workflow adds merge-queue reuse validation, while the Rust workspace gains a WASM bridge scaffold and a generated TypeScript web SDK test harness with cross-platform setup and browser-oriented validation.

Changes

Web bridge and TypeScript web SDK

Layer / File(s) Summary
WASM bridge separation and scaffold
baml_language/crates/bridge_cffi/..., baml_language/sdks/web/bridge_web/..., baml_language/Cargo.toml
Native CFFI runtime code is excluded from WASM builds, which instead exposes bytecode staging, placeholder dispatch, and call-ID generation through a new web bridge crate.
TypeScript web fixture generation
baml_language/sdk_tests/harness_setup/...
The harness generates web-targeted SDK fixtures, browser package configuration, rewritten bridge imports, and generated Rust tests.
Web SDK test crate and validation
baml_language/sdk_tests/crates/typescript_web/..., baml_language/sdk_tests/harness_runner/src/lib.rs
A new test crate runs generated tests, while assertions validate ESM metadata, browser compiler settings, web bridge imports, and import extensions.
Cross-platform web test setup
baml_language/.config/nextest.toml, baml_language/sdk_tests/crates/typescript_web/setup.*
Unix and Windows setup commands install and build the web bridge, update generated fixture dependencies, and record setup completion.

Merge-queue CI fast path

Layer / File(s) Summary
Fast-path validation and downstream gating
.github/workflows/ci.yaml
The workflow checks merge-group ancestry, tree identity, and successful PR-head workflow runs before skipping change detection; errors fail open and required-check documentation reflects the skip behavior.

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

Possibly related PRs

Suggested reviewers: aaronvg, hellovai, rossirpaulo, codeshaunted, blacksmith-sh[bot]

Poem

A rabbit builds a web bridge bright,
With browser tests that hop just right.
The queue checks trees, then skips with care,
While generated SDKs fill the air.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is vague and underspecified; it hints at the web bridge but does not clearly describe the main change. Use a specific title such as "Add merge-queue fast path and web bridge test harness".
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
✨ 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 push-xxlwmvqoowku

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.

@vercel
vercel Bot temporarily deployed to Preview – beps July 10, 2026 19:19 Inactive

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7fd71fa6f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yaml Outdated
statuses: write
steps:
- name: Report failure
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Include ancestor failures in the gate

If determine_changes fails (for example checkout, merge-base, or a broken path-filter script), every direct job listed in needs is skipped, so this condition sees only skipped results and the required ci-failure-alert job passes; on PRs the following marker step can then record the tree as green even though no CI ran. The previous failure() || cancelled() job condition caught failed ancestors, so this gate needs to include determine_changes/other ancestors or use a failure status check here instead of only inspecting direct needs.

Useful? React with 👍 / 👎.

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

🧹 Nitpick comments (1)
.github/workflows/ci.yaml (1)

76-79: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Optional: page the combined-status lookup.

getCombinedStatusForRef returns at most 30 statuses per page by default, so if the PR head accumulates more than 30 commit statuses, find could miss the ci-fast-path/baml-language marker (fail-open → full CI). Only commit statuses count here (not Actions check runs), so risk is low, but a per_page bump makes the fast path robust.

♻️ Suggested tweak
                 const { data: combined } = await github.rest.repos.getCombinedStatusForRef({
-                  owner, repo, ref: prHead,
+                  owner, repo, ref: prHead, per_page: 100,
                 });
🤖 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 @.github/workflows/ci.yaml around lines 76 - 79, Make the combined-status
lookup in the PR head status-check logic robust against pagination by requesting
a larger page size via the getCombinedStatusForRef options, then continue
locating the ci-fast-path/baml-language marker from combined.statuses. Preserve
the existing fail-open behavior if the marker is absent.
🤖 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 @.github/workflows/ci.yaml:
- Around line 76-79: Make the combined-status lookup in the PR head status-check
logic robust against pagination by requesting a larger page size via the
getCombinedStatusForRef options, then continue locating the
ci-fast-path/baml-language marker from combined.statuses. Preserve the existing
fail-open behavior if the marker is absent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1ee202fc-7146-4dfc-b53c-4b4b409c03c7

📥 Commits

Reviewing files that changed from the base of the PR and between 3eaee78 and 7fd71fa.

📒 Files selected for processing (1)
  • .github/workflows/ci.yaml

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 10, 2026 19:26 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 10, 2026 19:40 Inactive
@sxlijin
sxlijin force-pushed the push-xxlwmvqoowku branch from 7fd71fa to b8451bf Compare July 10, 2026 21:44
@vercel
vercel Bot temporarily deployed to Preview – beps July 10, 2026 21:45 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 10, 2026 21:53 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 10, 2026 22:06 Inactive
@sxlijin
sxlijin force-pushed the push-xxlwmvqoowku branch from b8451bf to b4b0211 Compare July 13, 2026 21:51
@sxlijin sxlijin changed the title merge queue fast path bridge web Jul 13, 2026
@github-actions

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@vercel
vercel Bot temporarily deployed to Preview – beps July 13, 2026 21:52 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 13, 2026 21:59 Inactive
@github-actions

Copy link
Copy Markdown

Binary size checks passed

✅ 7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
✅ baml-cli Linux 🔒 21.9 MB 9.4 MB file 21.5 MB +404.0 KB (+1.9%) OK
✅ packed-program Linux 🔒 15.8 MB 6.7 MB file 15.6 MB +187.8 KB (+1.2%) OK
✅ baml-cli macOS 🔒 16.9 MB 8.1 MB file 16.6 MB +316.3 KB (+1.9%) OK
✅ packed-program macOS 🔒 12.2 MB 5.9 MB file 12.1 MB +117.2 KB (+1.0%) OK
✅ baml-cli Windows 🔒 18.4 MB 8.4 MB file 18.1 MB +311.8 KB (+1.7%) OK
✅ packed-program Windows 🔒 13.1 MB 6.0 MB file 13.0 MB +104.9 KB (+0.8%) OK
✅ bridge_wasm WASM 14.6 MB 🔒 4.1 MB gzip 4.1 MB +86.8 KB (+2.1%) OK

🔒 = the size this artifact is GATED on (ceiling + delta). Binaries gate on file size (installed binary); WASM gates on gzip (download size). The other size is shown for information only.


Generated by cargo size-gate · workflow run

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

Actionable comments posted: 2

🧹 Nitpick comments (4)
baml_language/crates/bridge_cffi/src/wasm.rs (1)

15-35: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add unit tests for the WASM bridge transitions. Cover empty-bytecode rejection, the pre/post-staging call_function_in_wasm behavior, and monotonic new_function_call_id() allocation.

🤖 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 `@baml_language/crates/bridge_cffi/src/wasm.rs` around lines 15 - 35, Add unit
tests for stage_runtime_bytecode, call_function_in_wasm, and
new_function_call_id: verify empty bytecode is rejected, calls return the
uninitialized error before staging and WASM_RUNTIME_UNAVAILABLE after successful
staging, and successive call IDs increase monotonically. Isolate or reset shared
atomic state as needed so tests remain deterministic.

Source: Coding guidelines

baml_language/sdk_tests/harness_setup/src/typescript_web.rs (2)

156-169: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider unit tests for the pure recursion/formatting helpers.

has_vitest_tests, rewrite_test_bridge_imports, and write_fixtures_tests_rs contain non-trivial recursion/exclusion logic (e.g., the baml_sdk skip, .test.ts suffix matching) with no accompanying unit tests in this diff.

As per coding guidelines, "Prefer writing Rust unit tests over integration tests where possible" — these are good candidates for #[cfg(test)] unit tests using a tempfile-based fixture tree.

🤖 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 `@baml_language/sdk_tests/harness_setup/src/typescript_web.rs` around lines 156
- 169, Add #[cfg(test)] unit tests for has_vitest_tests,
rewrite_test_bridge_imports, and write_fixtures_tests_rs using tempfile-based
fixture trees. Cover recursive discovery, .test.ts suffix matching, baml_sdk
exclusion, and the expected import rewriting and generated fixture output
formatting.

Source: Coding guidelines


22-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add context to .unwrap() on required env vars.

CARGO_MANIFEST_DIR/OUT_DIR are unwrapped with no message, while the sibling helper in harness_runner.rs uses a descriptive .expect("CARGO_MANIFEST_DIR not set; run via \cargo test`")` for the same variable. A bare panic here gives a confusing build-script failure.

♻️ Proposed fix
-    let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
+    let manifest_dir = PathBuf::from(
+        env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set; run via `cargo build`"),
+    );
     let fixtures_root = fixtures_root_from_manifest(&manifest_dir);
     let node_tests_root = manifest_dir.parent().unwrap().join("typescript_node");
-    let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
+    let out_dir = PathBuf::from(env::var("OUT_DIR").expect("OUT_DIR not set; run via `cargo build`"));
🤖 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 `@baml_language/sdk_tests/harness_setup/src/typescript_web.rs` around lines 22
- 27, Update the environment-variable reads in run_all to replace the bare
unwrap calls for CARGO_MANIFEST_DIR and OUT_DIR with descriptive expect
messages. Match the existing harness_runner.rs wording for CARGO_MANIFEST_DIR
and provide equivalent context for OUT_DIR.
baml_language/sdk_tests/harness_runner/src/lib.rs (1)

207-258: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Web ESM assertion is weaker than its Node counterpart.

assert_typescript_node_generated_esm (lines 177-186) also asserts absence of CommonJS syntax (module.exports, exports., require() and presence of ESM import/export syntax. assert_typescript_web_generated_esm drops both checks, only validating bridge-package usage and import extensions. tsc/vitest would likely still catch a real regression, but the earlier, clearer signal from this assertion is lost.

🤖 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 `@baml_language/sdk_tests/harness_runner/src/lib.rs` around lines 207 - 258,
Strengthen assert_typescript_web_generated_esm to match
assert_typescript_node_generated_esm by rejecting generated CommonJS syntax
(module.exports, exports., and require() calls) and requiring ESM import/export
syntax. Apply these checks while scanning each generated SDK file, preserving
the existing web bridge and relative-import extension validations.
🤖 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.

Inline comments:
In `@baml_language/sdk_tests/crates/typescript_web/setup.ps1`:
- Around line 16-29: Update the fixture enumeration in the setup script to scan
the generated packages under the harness_setup fixture root rather than the
crate directory. Preserve the existing pnpm install/update and exit handling for
each generated directory, and only write SDK_TEST_TYPESCRIPT_WEB_SETUP after
those fixtures have been processed.

In `@baml_language/sdk_tests/harness_setup/src/templates/package_web.json`:
- Line 10: Update the `@boundaryml/baml-bridge-web` dependency path in
package_web.json to resolve to baml_language/sdks/web/bridge_web, correcting the
relative path so generated fixtures reference the intended bridge package.

---

Nitpick comments:
In `@baml_language/crates/bridge_cffi/src/wasm.rs`:
- Around line 15-35: Add unit tests for stage_runtime_bytecode,
call_function_in_wasm, and new_function_call_id: verify empty bytecode is
rejected, calls return the uninitialized error before staging and
WASM_RUNTIME_UNAVAILABLE after successful staging, and successive call IDs
increase monotonically. Isolate or reset shared atomic state as needed so tests
remain deterministic.

In `@baml_language/sdk_tests/harness_runner/src/lib.rs`:
- Around line 207-258: Strengthen assert_typescript_web_generated_esm to match
assert_typescript_node_generated_esm by rejecting generated CommonJS syntax
(module.exports, exports., and require() calls) and requiring ESM import/export
syntax. Apply these checks while scanning each generated SDK file, preserving
the existing web bridge and relative-import extension validations.

In `@baml_language/sdk_tests/harness_setup/src/typescript_web.rs`:
- Around line 156-169: Add #[cfg(test)] unit tests for has_vitest_tests,
rewrite_test_bridge_imports, and write_fixtures_tests_rs using tempfile-based
fixture trees. Cover recursive discovery, .test.ts suffix matching, baml_sdk
exclusion, and the expected import rewriting and generated fixture output
formatting.
- Around line 22-27: Update the environment-variable reads in run_all to replace
the bare unwrap calls for CARGO_MANIFEST_DIR and OUT_DIR with descriptive expect
messages. Match the existing harness_runner.rs wording for CARGO_MANIFEST_DIR
and provide equivalent context for OUT_DIR.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 55003535-9f56-4df8-90f9-2eb340443535

📥 Commits

Reviewing files that changed from the base of the PR and between b8451bf and b4b0211.

⛔ Files ignored due to path filters (1)
  • baml_language/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (21)
  • .github/workflows/ci.yaml
  • baml_language/.config/nextest.toml
  • baml_language/Cargo.toml
  • baml_language/crates/bridge_cffi/Cargo.toml
  • baml_language/crates/bridge_cffi/src/lib.rs
  • baml_language/crates/bridge_cffi/src/wasm.rs
  • baml_language/sdk_tests/crates/typescript_web/.gitignore
  • baml_language/sdk_tests/crates/typescript_web/Cargo.toml
  • baml_language/sdk_tests/crates/typescript_web/build.rs
  • baml_language/sdk_tests/crates/typescript_web/setup.ps1
  • baml_language/sdk_tests/crates/typescript_web/setup.sh
  • baml_language/sdk_tests/crates/typescript_web/src/lib.rs
  • baml_language/sdk_tests/harness_runner/src/lib.rs
  • baml_language/sdk_tests/harness_setup/Cargo.toml
  • baml_language/sdk_tests/harness_setup/src/lib.rs
  • baml_language/sdk_tests/harness_setup/src/templates/package_web.json
  • baml_language/sdk_tests/harness_setup/src/templates/tsconfig_web.json
  • baml_language/sdk_tests/harness_setup/src/templates/vitest_web.config.ts
  • baml_language/sdk_tests/harness_setup/src/typescript_web.rs
  • baml_language/sdks/web/bridge_web/.gitignore
  • baml_language/sdks/web/bridge_web/Cargo.toml

Comment on lines +16 to +29
Get-ChildItem -Directory | ForEach-Object {
$generated = Join-Path $_.FullName 'generated'
if (Test-Path $generated) {
Push-Location $generated
try {
pnpm install --force --ignore-workspace --ignore-scripts
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
pnpm update @boundaryml/baml-bridge-web --force --ignore-workspace --ignore-scripts
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
} finally { Pop-Location }
}
}

if ($env:NEXTEST_ENV) { Add-Content -Path $env:NEXTEST_ENV -Value 'SDK_TEST_TYPESCRIPT_WEB_SETUP=1' }

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Enumerate the generated fixtures, not the crate directory.

After Set-Location $PSScriptRoot, Get-ChildItem -Directory scans baml_language/sdk_tests/crates/typescript_web, but generated packages are written under baml_language/sdk_tests/harness_setup/<fixture>/generated. The loop therefore skips fixture setup and still writes SDK_TEST_TYPESCRIPT_WEB_SETUP=1.

Proposed fix
-Get-ChildItem -Directory | ForEach-Object {
+$HarnessSetupRoot = Join-Path $WorkspaceRoot 'sdk_tests\harness_setup'
+Get-ChildItem -Directory $HarnessSetupRoot | ForEach-Object {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Get-ChildItem -Directory | ForEach-Object {
$generated = Join-Path $_.FullName 'generated'
if (Test-Path $generated) {
Push-Location $generated
try {
pnpm install --force --ignore-workspace --ignore-scripts
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
pnpm update @boundaryml/baml-bridge-web --force --ignore-workspace --ignore-scripts
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
} finally { Pop-Location }
}
}
if ($env:NEXTEST_ENV) { Add-Content -Path $env:NEXTEST_ENV -Value 'SDK_TEST_TYPESCRIPT_WEB_SETUP=1' }
$HarnessSetupRoot = Join-Path $WorkspaceRoot 'sdk_tests\harness_setup'
Get-ChildItem -Directory $HarnessSetupRoot | ForEach-Object {
$generated = Join-Path $_.FullName 'generated'
if (Test-Path $generated) {
Push-Location $generated
try {
pnpm install --force --ignore-workspace --ignore-scripts
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
pnpm update `@boundaryml/baml-bridge-web` --force --ignore-workspace --ignore-scripts
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
} finally { Pop-Location }
}
}
if ($env:NEXTEST_ENV) { Add-Content -Path $env:NEXTEST_ENV -Value 'SDK_TEST_TYPESCRIPT_WEB_SETUP=1' }
🤖 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 `@baml_language/sdk_tests/crates/typescript_web/setup.ps1` around lines 16 -
29, Update the fixture enumeration in the setup script to scan the generated
packages under the harness_setup fixture root rather than the crate directory.
Preserve the existing pnpm install/update and exit handling for each generated
directory, and only write SDK_TEST_TYPESCRIPT_WEB_SETUP after those fixtures
have been processed.

"test": "vitest run --config vitest.config.ts"
},
"dependencies": {
"@boundaryml/baml-bridge-web": "file:../../../../../sdks/web/bridge_web"

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'File location and nearby context:\n'
git ls-files 'baml_language/sdk_tests/harness_setup/src/templates/package_web.json' \
  'baml_language/sdk_tests/harness_setup/*/generated/package_web.json' \
  'baml_language/sdks/web/bridge_web/package.json' \
  'sdks/web/bridge_web/package.json' || true

printf '\nTemplate file contents:\n'
cat -n baml_language/sdk_tests/harness_setup/src/templates/package_web.json

printf '\nBridge package path check:\n'
python3 - <<'PY'
from pathlib import Path

template = Path('baml_language/sdk_tests/harness_setup/src/templates/package_web.json')
print('template exists:', template.exists())
for p in [
    Path('baml_language/sdk_tests/harness_setup/fixture/generated/package_web.json'),
    Path('baml_language/sdk_tests/harness_setup/some_fixture/generated/package_web.json'),
]:
    print(p, 'parent count', len(p.parents))
PY

Repository: BoundaryML/baml

Length of output: 1213


Fix the bridge dependency path for generated fixtures.
baml_language/sdk_tests/harness_setup/<fixture>/generated/package_web.json:10 should point to baml_language/sdks/web/bridge_web; ../../../../../sdks/web/bridge_web walks past baml_language, so pnpm resolves the wrong location.

Proposed fix
-    "`@boundaryml/baml-bridge-web`": "file:../../../../../sdks/web/bridge_web"
+    "`@boundaryml/baml-bridge-web`": "file:../../../../sdks/web/bridge_web"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@boundaryml/baml-bridge-web": "file:../../../../../sdks/web/bridge_web"
"`@boundaryml/baml-bridge-web`": "file:../../../../sdks/web/bridge_web"
🤖 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 `@baml_language/sdk_tests/harness_setup/src/templates/package_web.json` at line
10, Update the `@boundaryml/baml-bridge-web` dependency path in package_web.json
to resolve to baml_language/sdks/web/bridge_web, correcting the relative path so
generated fixtures reference the intended bridge package.

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 13, 2026 22:12 Inactive
@sxlijin sxlijin closed this Jul 13, 2026
@sxlijin
sxlijin deleted the push-xxlwmvqoowku branch July 13, 2026 22:13

This branch was previously deployed

3 inactive deployments
Preview – promptfiddle — b4b0211e Deployed Jul 13, 2026 by vercel[bot]
Preview – promptfiddle2 — b4b0211e Deployed Jul 13, 2026 by vercel[bot]
Preview – beps — b4b0211e Deployed Jul 13, 2026 by vercel[bot]
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.

1 participant