Files
orca/config/scripts
Neil b45c6bbb9a test(relay): attribute the post-GC residual with a heap-snapshot diff
Adds snapshot capture to the GC host, a constructor-level snapshot diff, and a
capture probe, then uses them to settle what survives a forced collection across
PTY churn.

It is not relay state. Diffing cycle 2 against cycle 10 over 200 PTY
create/destroy cycles, the entire +0.467 MB delta is V8: compiled code objects,
TrustedByteArray, ProtectedFixedArray, WeakArrayList, FeedbackVector,
LoadHandler. No application object appears in the growth at all -- no PTY
record, no replay buffer, no relay map or set. The replay-buffer retention at
pty-handler.ts:2150 was a plausible suspect and is not the cause.

Extending to 30 cycles shows why 10 was not enough to say so: retained heap
climbs 0.064 MB/cycle through the first decade, 0.017 through the second, and is
flat across the last three (12.834 / 12.834 / 12.835). It also falls twice,
which monotonic retention cannot do. The cycle count is env-overridable and
defaults to 30 so the next reader does not repeat the short-window mistake.

File descriptors stayed at exactly 25 for all 31 samples across 600 PTYs.

The diff reports instance count and total self size per constructor rather than
true retained size, which would need a dominator tree; a constructor whose
instance count tracks the churn is the signal being looked for.
2026-09-11 01:23:37 -07:00
..
2026-05-15 05:44:25 -04:00