Skip to content

test(v18): merge the two nesting-depth tests - #218

Merged
devin-ai-integration[bot] merged 1 commit into
mainfrom
chore/wasm-depth-tests-tidy
Nov 26, 2026
Merged

devin-ai-integration[bot] merged 1 commit into
mainfrom
chore/wasm-depth-tests-tidy

Conversation

@pyramation

@pyramation pyramation commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

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.


libpg-query and parser opened this PR for Dan
Implemented in session Review recent WASM depth branches for cleanliness
Review with Devin · Open in Devin Desktop


Summary by CodeRabbit

  • Tests
    • 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.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@luxor-code-review

luxor-code-review Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


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.

Reviewed commit: 2b52ea2

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

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.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related PRs

Suggested reviewers: luxor-code-review

Merge Risk: Minimal · up to 2b52e

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: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 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 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.
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
Recent review info

Run configuration

Commits

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.

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@devin-ai-integration
devin-ai-integration Bot merged commit 5edbda2 into main Nov 26, 2026
64 checks passed
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