Skip to content

test(v18): check the kept errors in the heap-release test are stack depth errors - #215

Merged
devin-ai-integration[bot] merged 1 commit into
mainfrom
devin/1795673831-assert-kept-errors
Nov 26, 2026
Merged

devin-ai-integration[bot] merged 1 commit into
mainfrom
devin/1795673831-assert-kept-errors

Conversation

@pyramation

@pyramation pyramation commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to the coderabbit comment on #213 (#213 (comment)). The frees replaced WASM heaps even when callers keep the errors test kept the 30 errors from the deep parse but never looked at them, so it would still pass if the deep parse succeeded or threw something else. It now checks, before the memory reading and while the errors are still live, that all 30 are SqlError('stack depth limit exceeded').

Test only. Shown failing first: with the pre-#213 wrapper (versions/18/src/index.ts from e432873~1) on the current WASM build, the deep parse throws a raw V8 RangeError and this test fails (ℹ pass 0 / ℹ fail 1); with main's wrapper it passes.


libpg-query and parser opened this PR for Dan
Implemented in session Settle the last old WASM hardening PRs
Review with Devin · Open in Devin Desktop


Summary by CodeRabbit

  • Tests
    • Added coverage to verify that repeated deep-query parsing consistently produces the expected stack-depth error across all retained errors.
    • Test failure reports now include the number of unexpected errors and their stringified details for easier diagnosis.

@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 single-file test change tightens the WASM recovery test for PostgreSQL 18 by asserting on the expected error message in addition to existing behavior.

Files Change
versions/18/test/wasm-recovery.test.js Adds an assertion on the expected error message in the WASM recovery test to verify failure diagnostics more strictly.

Reviewed commit: d8eb251

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PG18 WASM recovery test now checks the type and exact message of all 30 retained errors from repeated deep-query parsing. It includes the count and stringified errors in the failure output.

Changes: PG18 recovery test

Layer / File(s) Summary
Retained error assertions
versions/18/test/wasm-recovery.test.js
The test checks that all 30 retained errors are lib.SqlError instances with the exact message stack depth limit exceeded. Failure output includes the count and stringified errors.

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

Change: Other

Possibly related PRs

Suggested reviewers: luxor-code-review

Merge Risk: Minimal · up to d8eb2

This is a test-only change that strengthens a recovery check on retained stack-depth errors. It has no runtime impact and is ready to merge.

Architecture risk: Low · up to d8eb2

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 subprocess test now verifies that all 30 retained deep-query errors are lib.SqlError instances with the exact stack depth limit exceeded message, and includes their stringified values in the failure message.
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 names the main change: the heap-release test now checks that the kept errors are stack-depth errors. The raw summary and PR objectives both describe a test-only change that asserts each of t…
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 names the main change: the heap-release test now checks that the kept errors are stack-depth errors. The raw summary and PR objectives both describe a test-only change that asserts each of the 30 retained errors is SqlError('stack depth limit exceeded'). The title is specific, follows the conventional commit style, and is not misleading. Its length (80 characters) is acceptable.

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 e432873 and d8eb251.

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; 3 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 9d25c60 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