Repository navigation
fix(rrweb): observe each iframe document once - #5426
posthog[bot] wants to merge 1 commit into
Conversation
Generated-By: PostHog Desktop Task-Id: a31bd01c-7078-480e-ae93-f1f446e128c0
Replay incident risk checkThis diff touches code involved in past incidents. This is a heads-up, not a verdict: read the matched sections of INCIDENTS.md and answer their review questions before merging. For a judgment on whether this diff has the same failure mode, run the |
Coherence4 spec problems · 0 failing chokepoints · 2 spec gaps · 0 guard failures 44 components, 7 bullets (5 invariants, 2 requirements), 4 problems Spec problems (spec --check)
Chokepoints: none declared. Spec gaps: 2 entrances with outside or unknown trust and no traced control, and 10 more held by the adoption baseline
Close one with |
|
Size Change: +5.29 kB (+0.02%) Total Size: 25.2 MB 📦 View Changed
ℹ️ View Unchanged
|
Problem
Why: Repeated full snapshots attach the same iframe document again. Each attachment starts another observer, so one DOM change can emit duplicate replay mutations and add work on the customer's page.
Origin
Changes
The replay incident-risk check matched rrweb snapshot correctness by path. This change does not alter serialization; the browser test checks for exactly one mutation after repeated snapshots and for observation after navigation and restart. It should not change the number of recordings shipped.
Verification: rrweb build and type check; full rrweb suite; lint and formatting for the new test; changeset status.
Refs #3765.
Release info Sub-libraries affected
Libraries affected
Checklist
If releasing new changes
pnpm exec changeset status🤖 Agent context
Autonomy: Human-driven (agent-assisted)
PostHog Desktop implemented a narrow document-identity guard from the Inbox report. The upstream manager refactor and helper-iframe teardown were excluded because this fork has its own lifecycle behavior. Human review is required before merge.
Created with PostHog Desktop from an inbox report