Automattic / Automattic/newspack-rolling-coverage
Pin, breakout-status, and scheduled-publish changes never reach open coverage lists
- Dominant language
- PHP
- Stars
- 1
- Forks
- 1
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 3
Description
Both polling surfaces detect change through the same two signals: `post_modified_gmt` as the delta predicate, and the `rolling_coverage_last_modified` term meta as the query short-circuit. That covers the reader-facing block poll (`Rolling_Coverage_Block`, `includes/blocks/class-rolling-coverage-block.php`) and, since #23, the admin entries-view sync (`Post_Type`, `includes/class-post-type.php`).
Three mutation paths change what an open list should show without advancing either signal:
- **Pin toggles** — `Post_Type::pin_entry()` / `unpin_entry()` write only the autoloaded option `rolling_coverage_pinned_entries`.
- **Breakout status** — written with `update_post_meta()` (`Breakout::sync_breakout_status_to_entry()`, `includes/class-breakout.php`), which does not bump `post_modified_gmt`.
- **Scheduled publish** — `wp_publish_post()` flips `post_status` with a direct `$wpdb->update` and leaves `post_modified_gmt` unchanged, so the `save_post` writer stores the entry's stale modified time and the delta predicate can never match the transition.
Effect: open admin lists keep stale pin and breakout columns indefinitely, and a `future` entry going live can fail to reach open clients on either surface until an unrelated edit or a full reload.
Direction from the #23 review discussion: track per-entry freshness as a **post meta**, bumped on every visible mutation (save, pin toggle, breakout transition, `future → publish`), and key both delta queries and the term-meta short-circuit off it instead of `post_modified_gmt` alone. That gives every mutation path one writer to call and keeps the two pollers on a single signal.
Surfaced while reviewing #23; deliberately kept out of that PR's scope.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the polling code in includes/blocks/class-rolling-coverage-block.php and includes/class-post-type.php, then trace Post_Type::pin_entry(), unpin_entry(), Breakout::sync_breakout_status_to_entry(), and the future-to-publish path. Review the #23 direction and identify the shared freshness writer and both query consumers. Done means pin, breakout, save, and scheduled-publish changes reach open lists on both polling surfaces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100