Skip to content

Release - #1110

Open
selul wants to merge 11 commits into
masterfrom
development
Open

Release#1110
selul wants to merge 11 commits into
masterfrom
development

Conversation

@selul

@selul selul commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

This PR merges the latest changes from development into master.

Linked issues

This release will close the following issues once merged:

Public changelog

  • Fixed queued posts being shared even after exceeding the maximum post age limit.
  • Fixed stale Instant Sharing queue entries flooding connected accounts after a cron recovery — entries older than one day now expire instead of being shared.
  • Fixed LinkedIn account reconnection losing data before the dashboard reloads.

girishpanchal30 and others added 9 commits August 3, 2026 13:06
Fixes four defects in the publish-now queue reported in #1102:
- WP_Query ignores numberposts, so the drain batch silently fell back
  to the posts_per_page option; use posts_per_page => 300
- queue entries had no staleness cutoff, so a stalled cron blasted
  months-old posts on recovery; entries older than a filterable
  rop_publish_now_expiration (default 1 day) are now marked expired
  instead of shared
- routine edits of already-published posts re-queued shares from
  leftover meta; wp_after_insert_post now only queues on new publishes
  unless the classic metabox explicitly submits publish_now
- entries with no accounts left rop_publish_now_status stuck at
  queued forever; the status is now cleared when they are skipped

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PHPUnit (tests/test-publish-now.php, new `publish-now` suite):
8 of the 15 tests fail on unfixed development, one per defect — stale
entries sharing, a backlog delaying the fresh post, the batch capped at
posts_per_page, orphan entries stuck at queued, an edit of a published
post re-queueing, and the metabox pre-checking itself on archive content.
The other 7 are guards for the paths that must keep sharing: publishing a
draft, a scheduled post going live, an explicit Classic Editor submit,
and the Block Editor re-share action.

The edit test clears `rop_maybe_publish_now_<id>` first. Publishing sets
that transient for a minute, so without clearing it the test passes on
unfixed code for the wrong reason instead of exercising the defect.

E2E (publish-now-backlog.spec.js): seeds three months-old queue entries
via a new `/queued-post` endpoint, publishes a post through the editor
and asserts the mocked X API only ever receives the fresh one. On
unfixed code all four posts are shared — the customer's flood. A second
test shares an entry queued seconds ago so the expiry cannot regress
into dropping legitimate shares.

Also clears leftover `rop_publish_now_history` in `/reset`, which
otherwise leaks between runs, and adds `/publish-now-state` so tests can
assert on queue meta rather than on editor UI a cron run can erase.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- reschedule another drain pass when a full batch is consumed, so a
  fresh post behind a large stale backlog is not stranded until an
  unrelated share event (batch size now filterable via
  rop_publish_now_batch_size)
- retire orphaned entries (no accounts left) through the expiration
  path so their queued history rows are cleared and the editor stops
  polling forever
- skip re-queueing on ordinary saves of a post with a pending share:
  the Classic metabox keeps publish_now checked, and refreshing the
  history timestamp let stalled entries evade the expiration cutoff

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Enforced maximum post age when sharing queued posts
fix: expire stale Instant Sharing queue entries instead of flooding accounts
@pirate-bot

pirate-bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Plugin build for 72b3180 is ready 🛎️!

girishpanchal30 and others added 2 commits August 20, 2026 17:01
* fix: improve API response handling to prevent data loss

* fix: enhance error handling

* fix: use instance context in error handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants