Skip to content

The resume heap test measures in isolation - #2300

Merged
santoshkumarradha merged 5 commits into
app/v3from
c52/heap-measure
Nov 3, 2026
Merged

santoshkumarradha merged 5 commits into
app/v3from
c52/heap-measure

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

What changes

Test only. TestResumeHeapDoesNotScaleWithDiscardedWindows could fail when other tests ran beside it. It read the shared heap, so another test's heap shrink gave a sample of zero, and another test's allocations inflated the next sample.

It now measures in isolation, after a garbage collection. The limit is unchanged at 1,492,992 bytes, so it still means resume heap must not scale with discarded windows.

Validation

  • Old measure with injected heap churn fails 5 of 5: discarded windows retained 2072616 extra bytes; limit 1492992.
  • New measure passes under CPU load 10 of 10 and under churn 5 of 5.
  • A fixture that really retains windows still fails, at 6,366,056 bytes.

Limits

  • No runtime change.
  • Why one package grouping triggered it more often is not fully confirmed. A newly added test likely moved it to a different test shard.

🤖 Generated with Claude Code

santoshkumarradha and others added 5 commits November 3, 2026 04:28
Shared-process heap shrink and unrelated allocations can turn a clamped minimum into false discarded-window growth. Compare absolute post-GC heaps in fresh subprocesses, preserving the original limit and checking a deliberately retained-window fixture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@santoshkumarradha
santoshkumarradha marked this pull request as ready for review November 3, 2026 10:31
@santoshkumarradha
santoshkumarradha merged commit 9fcdd6f into app/v3 Nov 3, 2026
@santoshkumarradha
santoshkumarradha deleted the c52/heap-measure branch November 3, 2026 10:31
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