You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The container's cloud-prefetch page payloads pin a whole page each #253
truncateUtf8Bytes returns text.slice(0, maxBytes) unchanged whenever the sliced text already fits the byte budget, which is every all-ASCII page. In JSC a retained slice pins the buffer it was cut from, so each 6 KB excerpt holds its page's entire HTML as UTF-16 for as long as the payload list lives. That list lives across the whole streamed pre-rules walk, which is exactly the walk that exists to stop holding pages.
The same applies to title, the meta.description slice, and each heading in headings, and to the URL and selector sets absorbBlocklistUrls / absorbBlocklistSelectors retain and the seeds absorbSeeds retains. Those three are capped (1,500 urls, 500 selectors, 50 seeds) so the worst case is bounded by the cap rather than by page count, but the page payloads are one per page.
It shows only in process.memoryUsage().external, not in heapUsed and not in RSS, which is why it survives a casual look. See #240 for the same class of bug in the external-link collector.
The CLI's twin of this code was fixed in #252 by wrapping the retained payload in detachFromPage(..., "cloud-payload") and detaching the url/selector/seed entries at the point of retention. The container-side replica here still has it.
Acceptance Criteria
buildCloudPagePayloads in packages/audit-engine/src/cloud-prefetch-run.ts retains no string that references the page it was read off
The blocklist url and selector sets and the gaps seeds retain detached strings
The prefetch request body is unchanged: same fields, same values, same order
Measured on a per-page-distinct fixture of ~1 MB pages, process.memoryUsage().external after the collection walk no longer scales with page count
Activity
perf(audit-engine): pay the payload detach per unique value, not per …
fix(audit-engine): stop the container's cloud-prefetch payloads holdi…