Skip to content

test(leaks): add heap-snapshot regression harness - #189

Merged
truthixify merged 13 commits into
wraith-protocol:developfrom
ranvirjrj-beep:fix/heap-snapshot-regression-harness-182
Aug 26, 2026
Merged

test(leaks): add heap-snapshot regression harness#189
truthixify merged 13 commits into
wraith-protocol:developfrom
ranvirjrj-beep:fix/heap-snapshot-regression-harness-182

Conversation

@ranvirjrj-beep

Copy link
Copy Markdown

Summary

Adds a deterministic V8 heap-snapshot regression harness for the SDK leak test suite.

  • captures heap snapshots before and after repeated scan workloads
  • compares retained objects at constructor level
  • supports configurable regression thresholds
  • requires deterministic GC via --expose-gc
  • includes an intentional leak-injection mode to verify that the harness fails on a real regression
  • writes a machine-readable heap-diff.json report
  • runs the harness in the nightly CI job and uploads the report as an artifact
  • documents local usage, thresholds, and failure interpretation

Validation

The harness is designed to:

  • pass when retained constructor growth stays within the configured threshold
  • fail when deliberate retained-object growth is injected
  • produce a reproducible constructor-level diff for CI inspection

Issue

Closes #182

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@ranvirjrj-beep Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ranvirjrj-beep ranvirjrj-beep changed the title test(leaks): add heap-snapshot regression harnessFix/heap snapshot regression harness 182 test(leaks): add heap-snapshot regression harness Aug 26, 2026
@truthixify
truthixify merged commit dbb606f into wraith-protocol:develop Aug 26, 2026
12 checks passed
@truthixify

Copy link
Copy Markdown
Contributor

Merged. Constructor-level diffing on top of the existing snapshot dump is exactly the delta that was missing, and gating it to nightly keeps PR time sane. Nice work @ranvirjrj-beep.

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.

Heap-snapshot leak-regression harness

2 participants