Repository navigation
fix(test): stop asserting immediate buffer reclamation - #99
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 6:14 AM ET / 10:14 UTC. ClawSweeper reviewWhat this changesRemoves the test assertion that an unreferenced buffer must be fully reclaimed immediately after one forced garbage-collection turn. Merge readiness✅ Ready for maintainer review This remains a useful, narrowly scoped test fix: current main retains the GC-timing assertion, and the patch preserves the documented resource-accounting contract. No actionable patch defect was found. Priority: P3 Review scores
Verification
How this fits togetherPlugin Inspector's resource helpers capture CPU, memory, and active-resource observations inside a measured Node process. Its tests check that snapshots and endpoint differences accurately describe those observations. flowchart LR
A[Measured Node process] --> B[Resource snapshots]
B --> C[Endpoint differences]
C --> D[CPU and memory observations]
C --> E[Active resource changes]
D --> F[Resource contract tests]
E --> F
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep resource tests deterministic by checking observed endpoint accounting without requiring a particular V8 reclamation schedule. Do we have a high-confidence way to reproduce the issue? No deterministic current-main reproduction was established: the failure depends on GC timing. Source confirms the timing-sensitive assertion, and the linked Node 22 attempt failed, but detailed failure logs were unavailable. Is this the best way to solve the issue? Yes: removing the unsupported reclamation deadline is a focused correction, while positive allocation, timer disposal, and signed memory accounting remain covered. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b8321a836f69. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
Fixes: the Node 22 CI suite fails when V8 does not reclaim an unreferenced buffer during the test's single forced-GC turn.
User Impact
User impact: no runtime behavior changes; CI no longer treats V8 garbage-collection timing as a plugin-inspector resource-accounting contract.
Why This Change Was Made
The test already proves positive buffer growth and timer disposal, while the next test independently proves signed memory deltas. Immediate backing-store reclamation is controlled by V8, not
captureProcessResources()ordiffProcessResources(), and failed twice on the same hosted runner after an earlier stabilization attempt.Evidence
test/resource-profile.test.js:56.