fix(terminal): close retained string review gaps

This commit is contained in:
Neil
2026-07-29 17:32:58 -07:00
parent 1457a4a090
commit fdd692e895
48 changed files with 103 additions and 290 deletions
@@ -464,8 +464,7 @@ describe('terminal control stripping', () => {
}
})
// Every pane runs this detector (the ring is written before the Command Code
// early-out), so an attached ring pins one whole PTY chunk per open pane.
// Every pane persists this ring before Command Code detection.
const forcedGc = resolveForcedGc()
const itWithGc = forcedGc ? it : it.skip
itWithGc('does not pin the source chunk behind the recent raw-text ring', () => {
@@ -484,7 +483,6 @@ describe('terminal control stripping', () => {
const retainedMiB = (process.memoryUsage().heapUsed - before) / (1024 * 1024)
expect(detectors).toHaveLength(panes)
// ~8 MiB of source chunks stay alive if the rings are still attached.
expect(retainedMiB).toBeLessThan(2)
})
})