Skip to content

MILAB-6700: raise HTTP/2 connection window + bump quickjs-emscripten - #1772

Merged
xnacly merged 2 commits into
mainfrom
MILAB-6700_grpc-window-quickjs-bump
Aug 4, 2026
Merged

MILAB-6700: raise HTTP/2 connection window + bump quickjs-emscripten#1772
xnacly merged 2 commits into
mainfrom
MILAB-6700_grpc-window-quickjs-bump

Conversation

@xnacly

@xnacly xnacly commented Aug 4, 2026

Copy link
Copy Markdown
Member

The two Desktop-App-side items from MILAB-6700, one commit each. Both come out of the MILAB-6303 slow-network spec (text#190, A-0019 / A-0020).

1. HTTP/2 connection window (grpc-js 1.14.4)

The spec called this a blocked item needing an upstream grpc-js change plus a patch-package shim. That upstream change has since landed, so no patch is needed:

  • grpc/grpc-node#2971 ("Send connection-level WINDOW_UPDATE at session start") shipped in grpc-js 1.14.0.
  • Since then, grpc-node.flow_control_window drives the connection-level window via session.setLocalWindowSize(), not just the per-stream initial window. Under 1.13.4 the option was per-stream only, which is why the spec assessed it as insufficient.
  • 1.13.5 does not carry the fix, so the pin has to cross to 1.14.x.

Changes: catalog pin ~1.13.4 -> ~1.14.4, and grpc-node.flow_control_window: 16 MiB on the client options in pl-client.

2. quickjs-emscripten 0.32.0

quickjs (wasm) is the top remaining worker CPU cost (~18% of active CPU under load, ~66% at baseline). 0.32.0 upgrades bellard/quickjs to 2025-09-13, moves to Emscripten 5.0.1, and reworks newFunction host binding onto a new HostRef abstraction.

Greptile Summary

The PR increases the gRPC client’s HTTP/2 flow-control window and upgrades the QuickJS WebAssembly runtime.

  • Raises grpc-node.flow_control_window to 16 MiB for LLPlClient gRPC transports and moves @grpc/grpc-js to 1.14.4, where the setting also initializes the connection-level window.
  • Upgrades quickjs-emscripten from 0.31.0 to 0.32.0 for middle-layer rendering, MCP-server sandboxing, and integration-test consumers.
  • Adds package changesets for the affected published packages.
  • Important touched terms:
    • HTTP/2 connection window — connection-wide flow-control allowance shared by streams; changed from Node’s effective 64 KiB default to 16 MiB on LLPlClient gRPC channels.
    • grpc-node.flow_control_window — grpc-js channel option controlling stream and connection flow-control capacity; newly configured to 16 MiB.
    • @grpc/grpc-js — Node.js gRPC implementation used by Platforma clients; upgraded from 1.13.4 to 1.14.4 so the configured window applies at session start.
    • QuickJS — embedded JavaScript engine used for middle-layer rendering and sandbox execution; upgraded through quickjs-emscripten 0.32.0.
    • HostRef — quickjs-emscripten’s host-reference abstraction for bindings such as newFunction; introduced by the dependency upgrade without direct source changes in this PR.
    • LLPlClient — low-level Platforma backend client that creates gRPC or REST transports; its gRPC initialization now supplies the larger flow-control window.

Confidence Score: 5/5

The PR appears safe to merge, with the dependency resolutions and central gRPC transport configuration aligned with the stated changes.

The larger HTTP/2 window reaches the primary gRPC transport construction path, reconnect and proxy paths preserve the same options, supported runtime requirements remain compatible, and no concrete QuickJS ownership or packaging regression was established.

Important Files Changed

Filename Overview
lib/node/pl-client/src/core/ll_client.ts Adds the 16 MiB grpc-js flow-control option to the central gRPC transport initialization path; no actionable defect was identified.
pnpm-workspace.yaml Updates the central catalog pins for grpc-js and quickjs-emscripten consistently with the intended runtime changes.
pnpm-lock.yaml Resolves all affected workspace importers and transitive snapshots to the new dependency versions without an identified incompatibility.
.changeset/grpc-connection-window.md Records patch releases for the packages affected by the grpc-js transport update.
.changeset/quickjs-emscripten-032.md Records patch releases for the packages affected by the QuickJS runtime upgrade.

Sequence Diagram

sequenceDiagram
  participant App as Desktop / middle layer
  participant Client as LLPlClient
  participant GRPC as grpc-js 1.14.4
  participant PL as Platforma backend
  App->>Client: Initialize gRPC connection
  Client->>GRPC: "ClientOptions(flow_control_window = 16 MiB)"
  GRPC->>PL: Open HTTP/2 session
  GRPC->>PL: Advertise connection-level window
  PL-->>GRPC: Stream project data
  GRPC-->>Client: Deliver data with larger flow-control allowance
  Client-->>App: Project response
Loading

Reviews (1): Last reviewed commit: "MILAB-6700: bump quickjs-emscripten to 0..." | Re-trigger Greptile

Context used:

  • Context used - Terms is a types in codebase. Provide the list of ... (source)
  • Knowledge Base — pl-client

xnacly added 2 commits August 4, 2026 10:50
grpc-js 1.14.0 (grpc/grpc-node#2971) made grpc-node.flow_control_window
drive the connection-level window via setLocalWindowSize, not just the
per-stream initial window. Bumping off 1.13.4 and setting it to 16 MiB
lifts the client connection window from Node's 64 KB default.
0.32.0 upgrades bellard/quickjs to 2025-09-13 and reworks newFunction
binding onto HostRef. Our newFunction/setProp/consume pattern verified
unchanged for return values, host error propagation and repeated context
disposal.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@notion-workspace

Copy link
Copy Markdown

@changeset-bot

changeset-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 497ad12

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@milaboratories/pl-client Patch
@milaboratories/pl-drivers Patch
@milaboratories/pl-healthcheck Patch
@milaboratories/pl-middle-layer Patch
@milaboratories/pl-mcp-server Patch
@milaboratories/pl-model-backend Patch
@milaboratories/pl-errors Patch
@milaboratories/pl-tree Patch
@platforma-sdk/pl-cli Patch
@platforma-sdk/test Patch
@milaboratories/pl-deployments Patch
@platforma-sdk/tengo-builder Patch
@platforma-sdk/block-tools Patch
@platforma-sdk/bootstrap Patch

Not sure what this means? Click here to learn what changesets are.

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

@xnacly
xnacly enabled auto-merge August 4, 2026 09:17
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.91%. Comparing base (eac18ff) to head (497ad12).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1772   +/-   ##
=======================================
  Coverage   52.91%   52.91%           
=======================================
  Files         370      370           
  Lines       19994    19994           
  Branches     4435     4435           
=======================================
+ Hits        10579    10580    +1     
- Misses       8107     8110    +3     
+ Partials     1308     1304    -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xnacly
xnacly added this pull request to the merge queue Aug 4, 2026
Merged via the queue into main with commit 241d13c Aug 4, 2026
19 of 20 checks passed
@xnacly
xnacly deleted the MILAB-6700_grpc-window-quickjs-bump branch August 4, 2026 09:59
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.

2 participants