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
rrweb fork: add tests for masking options on re-observed shadow/iframe paths #119
Follow-up from the Opus review of PR #117 (rrweb 2.2.0 upgrade). The new packages/rrweb/test/record/masking-observer-lifecycle.test.ts in the fork (bugsee-port-2.2.0, cdb77793) only covers part of the 2.2.0 re-observation paths. Mutation testing in the review found these surviving mutants:
Shadow-root observer: maskAttributeFn, blockSelector, unblockSelector dropped from the shadow bypassOptions.
Iframe "observe once" dedup removed: the test title promises "observed once" but nothing counts observers.
IMPORTANT:maskAllText turned off only for an iframe document that is re-observed after it unloads (navigation, removal, document.open) leaks IF_SECRET_EDIT2 / IF_SECRET_READDED / IF_SECRET_WRITTEN in Chromium and survives all 61 jsdom record tests. The 2.2.0 unload-then-re-observe path (iframe-manager.tswatchIframeWindow pagehide -> unloadListener -> observe(doc) again) is untested.
To do (fork, test-first, mutator loop):
Add tests for each option above on the shadow-root and iframe re-observed paths, and make the dedup test count observers/events.
Cover iframe unload then re-observe (navigate, remove and re-add, document.open). jsdom does not fire the needed lifecycle, so this likely needs a real-browser test (puppeteer in the fork, or the SDK Playwright test in the companion issue).
Keep the secret-in-events assertion non-vacuous (assert the masked form is present).
Related: the same-origin blocked-iframe leak issue (separate, HIGH).
Triage (agent): this issue targets test files inside the rrweb fork (packages/rrweb/test/record/masking-observer-lifecycle.test.ts on bugsee-port-*), which are not in this repo. Current main (c7f7f12, #200) only carries packages/rrweb/src/{index,index.test}.ts (a thin wrapper over a built fork artifact), and no masking-observer-lifecycle test exists here. Main has also moved to rrweb 2.2.2 (bugsee-port-2.2.2), so the work should be done against that fork branch (jsdom tests for the shadow/iframe option cases and the dedup counter; a real-browser puppeteer test for iframe unload then re-observe, including the IMPORTANT maskAllText leak). The only SDK-side option is the Playwright companion test, which needs an owner decision. No PR opened.
Activity
krassx commentedon Nov 12, 2026
Triage (agent): this issue targets test files inside the rrweb fork (
packages/rrweb/test/record/masking-observer-lifecycle.test.tsonbugsee-port-*), which are not in this repo. Current main (c7f7f12, #200) only carriespackages/rrweb/src/{index,index.test}.ts(a thin wrapper over a built fork artifact), and nomasking-observer-lifecycletest exists here. Main has also moved to rrweb 2.2.2 (bugsee-port-2.2.2), so the work should be done against that fork branch (jsdom tests for the shadow/iframe option cases and the dedup counter; a real-browser puppeteer test for iframe unload then re-observe, including the IMPORTANTmaskAllTextleak). The only SDK-side option is the Playwright companion test, which needs an owner decision. No PR opened.🤖 Generated with Claude Code and https://claude.ai/code/session_01WeiJxSd4XxSkeZk5vaw6dX