Skip to content

fix(r3): fix chunk map memory leak — proper tests#219

Open
elazarcoh wants to merge 5 commits intomainfrom
fix/r3-memory-leak-chunks
Open

fix(r3): fix chunk map memory leak — proper tests#219
elazarcoh wants to merge 5 commits intomainfrom
fix/r3-memory-leak-chunks

Conversation

@elazarcoh
Copy link
Owner

Rebased on ci/vitest-framework. Added pendingChunkCount getter to Server.ts for observability. Integration tests verify map cleanup after message reassembly.

@elazarcoh elazarcoh force-pushed the fix/r3-memory-leak-chunks branch from 9085466 to 41fddad Compare March 7, 2026 21:14
An error occurred while trying to automatically change base from ci/vitest-framework to main March 7, 2026 21:32
@elazarcoh elazarcoh force-pushed the fix/r3-memory-leak-chunks branch from 41fddad to a2fd0fe Compare March 7, 2026 22:47
@elazarcoh elazarcoh changed the base branch from ci/vitest-framework to main March 7, 2026 22:51
@elazarcoh elazarcoh force-pushed the fix/r3-memory-leak-chunks branch from a2fd0fe to ce042cd Compare March 7, 2026 22:52
@github-actions
Copy link

github-actions bot commented Mar 7, 2026

✅ CI Results

🧪 Tests

Suite ✅ Passed ❌ Failed ⏭️ Skipped 📊 Total
E2E (UI) 16 0 2 18
Python Unit 110 0 0 110
TS Unit 100 0 0 100

📦 Artifacts

screenshots-ubuntu-latest  ·  test-results  ·  extension-vsix  ·  ts-unit-test-results  ·  python-unit-test-results

→ Full run details

@elazarcoh elazarcoh force-pushed the fix/r3-memory-leak-chunks branch from ce042cd to e278457 Compare March 8, 2026 20:08
@elazarcoh elazarcoh enabled auto-merge March 8, 2026 20:08
@elazarcoh elazarcoh disabled auto-merge March 8, 2026 20:12
elazarcoh and others added 5 commits March 10, 2026 23:51
Completed message chunks were never removed from the chunksByMessageId
Map, causing unbounded memory growth during long debug sessions.
Each image/tensor transfer left an orphaned entry.

Fix: delete the map entry immediately after extracting the full message
and before calling handleMessage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…integration tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…euse to stress test

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ediate race in tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@elazarcoh elazarcoh force-pushed the fix/r3-memory-leak-chunks branch from c92ba48 to cea6906 Compare March 10, 2026 22:01
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