You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(v18): merge the two nesting-depth tests - #218
Test-only cleanup of versions/18/test/wasm-recovery.test.js after #210 and #213; no source, build or WASM setting changes.
#210 added parses nesting within the stack depth limit (2,000 chained operators, subqueries, function calls) and #213 added parses nesting that 18.1.5 parsed next to it (4,000 chained operators, PL/pgSQL blocks). They are one test now, with the deeper chained-operator case only, the assert.doesNotThrow(() => assert.equal(...)) wrappers removed (a throw already fails the test) and one comment instead of two about past releases.
Coverage is the same apart from the 2,000-term chain, which the 4,000-term one includes.
Updated WebAssembly recovery test coverage for PostgreSQL 18.1.5-parsable nesting cases, including chained operators, nested subqueries, and nested function calls.
Simplified the assertion that checks parsing of a PL/pgSQL function.
This change consolidates the nested-construct parse tests in versions/18/test/wasm-recovery.test.js into one test covering the depths the WASM build now accepts, raising the chained-operator depth to 4000 and simplifying the doesNotThrow wrappers to direct assertions.
Files
Change
versions/18/test/wasm-recovery.test.js
Merges the two nesting-limit tests, raises chained operators to 4000, and converts assert.doesNotThrow wrappers to direct assert.equal calls with name labels.
No actionable comments were generated in the recent review.
Walkthrough
The PostgreSQL 18 wasm recovery tests now cover 4,000 chained operators, 1,000 nested subqueries, and 2,000 nested function calls. The PL/pgSQL nested-block check directly asserts that parsing yields one function.
Changes: Nesting recovery tests
Layer / File(s)
Summary
Nesting test cases and assertions versions/18/test/wasm-recovery.test.js
The nesting test includes the updated depth cases and direct parse assertions. The separate nesting test was removed. The PL/pgSQL check directly asserts one parsed function.
This change only adjusts PostgreSQL 18 parser nesting tests and does not touch shipped behavior. It is ready to merge.
Architecture risk: Low · up to 2b52e
The change affects 1 system.
Changed systems:versions
Architecture concerns
No architecture-level concerns identified.
Review details
Systems and components
observed — versions (service) was modified; 1 changed file maps to changed impact.
Before / after behavior
observed — Modified behavior in versions/18/test/wasm-recovery.test.js: The nesting test comment now identifies the 18.1.5-parsable depth cases and notes that nested subqueries and function calls can overflow V8's stack first on macOS. The test includes 4,000 chained operators, retains the 1,000-subquery and 2,000-function-call inputs, and directly asserts each parses to one statement; this replaces the previous 2,000-operator case and removes the separate 18.1.5 nesting test.
observed — Modified behavior in versions/18/test/wasm-recovery.test.js: The separate test for nesting that 18.1.5 parsed was removed, including its standalone 4,000-operator assertion and its setup of nested PL/pgSQL block cases.
observed — Modified behavior in versions/18/test/wasm-recovery.test.js: The PL/pgSQL nested-block check now directly asserts that parsing yields one function, replacing the assert.doesNotThrow wrapper.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "test(v18): merge the two nesting-depth tests" matches the main change. The PR merges the two nesting-depth tests in versions/18/test/wasm-recovery.test.js into one test that keeps the 4,000…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "test(v18): merge the two nesting-depth tests" matches the main change. The PR merges the two nesting-depth tests in versions/18/test/wasm-recovery.test.js into one test that keeps the 4,000-operator chain. The title is specific and concise, and it follows a conventional commit style.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 9d25c60 and 2b52ea2.
Files selected for processing: 1
versions/18/test/wasm-recovery.test.js
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
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
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
Test-only cleanup of
versions/18/test/wasm-recovery.test.jsafter #210 and #213; no source, build or WASM setting changes.#210 added
parses nesting within the stack depth limit(2,000 chained operators, subqueries, function calls) and #213 addedparses nesting that 18.1.5 parsednext to it (4,000 chained operators, PL/pgSQL blocks). They are one test now, with the deeper chained-operator case only, theassert.doesNotThrow(() => assert.equal(...))wrappers removed (a throw already fails the test) and one comment instead of two about past releases.Coverage is the same apart from the 2,000-term chain, which the 4,000-term one includes.
Implemented in session Review recent WASM depth branches for cleanliness
Review with Devin · Open in Devin Desktop
Summary by CodeRabbit