feat(vnext): add bounded browser parser executor - #181
Merged
Conversation
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Adds a package-private, browser/main-realm executor that serializes SQL parse requests through a bounded FIFO and manages isolated parser worker generations (deadlines, cancellation, retirement, and no-replay semantics) as groundwork for the /vnext isolated execution ADR.
Changes:
- Introduces
createNodeSqlParserBrowserExecutorwith bounded queueing (count + UTF-16 units) and startup/queue/execution deadlines, plus robust worker generation lifecycle management. - Adds extensive Node (deterministic) and Chromium browser tests, including hostile/reentrant boundary cases and real-worker smoke coverage.
- Updates packaging smoke checks and documentation/ADR text to reflect the new private executor infrastructure.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/vnext/node-sql-parser-browser-executor.ts | Implements the bounded FIFO executor and worker generation lifecycle (deadlines, cancellation, retirement/no-replay). |
| src/vnext/browser_tests/node-sql-parser-browser-executor.test.ts | Browser-level integration tests covering production worker path and recovery from silent/crash workers. |
| src/vnext/browser_tests/fixtures/node-sql-parser-silent-worker.js | Fixture worker that becomes ready but never responds to parse requests (deadline coverage). |
| src/vnext/browser_tests/fixtures/node-sql-parser-crash-worker.js | Fixture worker that crashes on message handling (retirement/recovery coverage). |
| src/vnext/tests/node-sql-parser-browser-executor.test.ts | Large deterministic Node test suite validating edge cases, reentrancy, hostile workers, and deadline behavior. |
| scripts/package-smoke.mjs | Ensures the new executor artifacts are present in the packed dist/vnext output. |
| docs/vnext/node-sql-parser-adapter.md | Updates vnext adapter documentation to describe the new private executor responsibilities and guarantees. |
| docs/adr/0004-isolated-parser-execution.md | Aligns ADR 0004 language with the new private bounded executor and no-replay/generation rules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the private main-realm executor for the isolated parser worker selected in
ADR 0004.
and retained UTF-16 text limits.
replaying posted work.
cleanup/settlement reentrancy.
there is no root or
/vnextpublic API change.Risk classification
Medium: concurrency, cancellation, worker lifecycle, resource accounting, and
packaging boundaries.
The principal risks are double settlement, stale-generation authority, physical
worker overlap, posted-work replay, unbounded retention, and browser bundler
regressions. The implementation mutates ownership before every external cleanup
or settlement boundary, uses an iterative pump trampoline, and tests hostile
synchronous callbacks at each boundary.
Evidence
deadline, recovery, and default static Worker URL behavior.
patch.
Adversarial review ledger
The review loop found and fixed:
preventDefaultrunning before generation retirement;Two independent reviewers approved the corrected pre-rebase patch. Two fresh
independent audits also approved the exact rebased head after rerunning Node,
Chromium, package, coverage, type, lint, integrity, placement, and demo gates.
API and rollout
This is implementation infrastructure only. It is not wired to sessions,
completion, diagnostics, or other public features. No compatibility or migration
work is required in this slice. The next consuming coordinator must preserve the
same bounded ownership and no-replay rules.
Summary by cubic
Adds a private, single-lane browser executor for the isolated SQL parser worker with bounded queueing, strict deadlines, and safe lifecycle handling. Internal only; no public or
/vnextAPI changes. Hardened to fail closed on retirement errors with explicit terminal states.New Features
scripts/package-smoke.mjsasserts executor artifacts.Bug Fixes
Written for commit 1cb7105. Summary will update on new commits.