Skip to content

[TEST ONLY] RTC: Discard stale compactions when a newer one already exists#77990

Closed
ramonjd wants to merge 2 commits into
trunkfrom
fix/rtc-polling-sync-tests
Closed

[TEST ONLY] RTC: Discard stale compactions when a newer one already exists#77990
ramonjd wants to merge 2 commits into
trunkfrom
fix/rtc-polling-sync-tests

Conversation

@ramonjd
Copy link
Copy Markdown
Member

@ramonjd ramonjd commented May 6, 2026

Note

I don't have any context on RTC and this was AI generated. I think it might be better to unblock folks by skipping the test, and wait for the experts to chime in. Skip PR here: #77991

Follow up to #77980

When a compaction arrives but a newer compaction already exists after the client's cursor, the server was storing the stale data as a regular update, but the newer compaction already subsumes that state. Discard it silently instead.

Also consolidates to a single Gutenberg_WP_HTTP_Polling_Sync_Server implementation (the established override pattern for shipping fixes ahead of Core), removing the duplicate WP_HTTP_Polling_Sync_Server class that was never loaded when Core's version exists.

What?

Closes

Why?

How?

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

Before After

Use of AI Tools

A lot

ramonjd added 2 commits May 6, 2026 11:46
…updates silently. Update collaboration.php to conditionally use Gutenberg-specific sync server and adjust REST route registration priority accordingly.
… to exclusively use Gutenberg-specific sync server. Adjust tests to reference the new class structure.
* @since 7.0.0
* @access private
*/
class Gutenberg_WP_HTTP_Polling_Sync_Server {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Gutenberg-specific class exists so that tests/other functionality works in the plugin in the absence of Core's WP_HTTP_Polling_Sync_Server

@ramonjd ramonjd added No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [Type] Build Tooling Issues or PRs related to build tooling labels May 6, 2026
@ramonjd
Copy link
Copy Markdown
Member Author

ramonjd commented May 6, 2026

Closing. #77986 exists. I didn't find it!

@ramonjd ramonjd closed this May 6, 2026
@ramonjd ramonjd deleted the fix/rtc-polling-sync-tests branch May 6, 2026 02:20
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Flaky tests detected in c450e9f.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25412398194
📝 Reported issues:

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

Labels

No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant