mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-13 20:58:33 +00:00
Three independent reviewers found that deleting timer.unref() in createChromeMemorySampler left the suite green: the plan's Global Constraint (fire-and-forget on an unref'd interval) had no failing test. The new test captures the real NodeJS.Timeout through the setIntervalFn seam and asserts hasRef() is false after start(); it goes red when the unref() call is removed. The seam could not be used without a cast as typed in the plan (`typeof setInterval`): with the DOM lib in scope that type also carries the `(handler, timeout) => number` overload, which a capturing wrapper cannot satisfy. setIntervalFn / clearIntervalFn keep their names but are now typed to the two-argument shape the sampler actually calls; the global timers are assignable to those shapes, so the defaults are unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>