Skip to content

RUM-18325: Restore accessibility-change dedup for full ViewEvent writes - #3814

Open
hamorillo wants to merge 1 commit into
feature/view-updatefrom
hector.morilloprieto/RUM-18325
Open

RUM-18325: Restore accessibility-change dedup for full ViewEvent writes#3814
hamorillo wants to merge 1 commit into
feature/view-updatefrom
hector.morilloprieto/RUM-18325

Conversation

@hamorillo

Copy link
Copy Markdown
Contributor

What does this PR do?

Restores RumViewEventFilter's batch-level dedup for full ViewEvent writes, which was unintentionally disabled when RumDataWriter.hasAccessibility started always evaluating to true. Tracks the last-written accessibility snapshot per viewId in RumDataWriter, so hasAccessibility correctly reflects whether accessibility actually changed since the last full-view write for that specific view.

Motivation

Flagged by Codex's automated review on PR #3809: RumViewScope now always populates ViewEvent.view.accessibility (superseded AccessibilitySnapshotManager's null-unless-changed approach with diff-level dedup for ViewUpdateEvent, which works correctly). However, RumDataWriter still computed hasAccessibility = event.view.accessibility != null, which is now always true. Since RumViewEventFilter treats hasAccessibility == true as "always retain this event," dedup for redundant full ViewEvents never triggers anymore — every full view write is persisted/uploaded, even when a later document version fully supersedes it. Data volume only, not data loss (see RUM-18325 for full analysis).

Additional Notes

  • We expect to remove this once partial view updates (and the periodic full-view checkpoint mechanism) become the only way full ViewEvents are written — at that point each view will only ever produce an initial and a closing full ViewEvent, and RumViewEventFilter's existing max-documentVersion dedup already covers that case without needing this exemption.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Tests

All CI checks and tests passed. Datadog automation helped this PR pass.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 1 test - 1 passed on retry View in Datadog

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 71.31% (-0.05%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1a3a46f | Docs | View more details | Give us feedback!

@hamorillo
hamorillo marked this pull request as ready for review September 1, 2026 15:24
@hamorillo
hamorillo requested review from a team as code owners September 1, 2026 15:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T15:30:35.344174Z 1a3a46f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a3a46f65a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants