Repository navigation
Conversation
…ctor in a child process #1552 Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
marked this pull request as ready for review
November 9, 2026 11:15
This was referenced Nov 11, 2026
Merged
Contributor
Author
|
Already on main as b56a1c6, which landed through an earlier bundle, so merging this changes nothing. Closing as landed. nik |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the last open box of #1552: an engine-level test that fails if the per-page retention of the leaked-secrets collector returns. Test only, no behaviour change.
What it does
packages/audit-engine/tests/leaked-secrets-residency-1552.test.tsrunshelpers/leaked-secrets-residency-probe.tsin one child process (likeresidency-probe.tsfor the page-rule residency test). The probe runsrunStreamingRulesover 16 pages of about 1.5 MB, each with secret-shaped values in two inline scripts and in an attribute (the attribute value is the one a record holds as a slice of the serialized markup), with onlysecurity/leaked-secretsenabled. It forces a GC after every batch and recordsheapStats().heapSize(process.memoryUsage().heapUsedlags string memory on Bun, which is why my first in-process try could not see the retention). The test asserts the heap grows by under 25% of a page per page, a ratio rather than an absolute size. About 4.5 s.Measured
Mutation check (each mutant applied, run, restored,
git diff --statchecked between runs)detachSecretas identity: passes.structuredCloneindetachFromPageas identity: passes.Two layers copy the strings (
detachSecretin the rule and the structuredClone indetachFromPage) and either is enough, so removing one alone is not a retention regression and the test does not fail on it. It fails when retention actually returns, which needs both gone. The test comment says so.Agent skill
No skill change needed.
Gates
New test passes three times in a row; tsgo clean on audit-engine.