Automattic / Automattic/wordpress-atmosphere

Durable pending-deletes table for hard-delete cleanup

Open
#47 0 comments 0 reactions 0 assignees View on GitHub
[Feature] Publisher enhancement
Dominant language
PHP
Stars
52
Forks
3
Avg merge
2d 1h
Merged PRs (30d)
22

Description

The `atmosphere_delete_comment_record` cron handler is the worst-case path: by the time it fires, the WP comment row and meta are gone. The TID survives only as the cron event's argument. If `Publisher::delete_comment_by_tid()` returns `WP_Error`, the PDS record is orphaned with no remaining WordPress pointer, and the cron event itself does not survive once the handler returns.

The `error_log` line is the only recovery artifact and operators may never see it.

### Suggested shape

Capture pending hard-deletes in a durable plugin option/table *before* the comment row is removed (e.g. an `atmosphere_pending_deletes` array of TIDs), then a periodic cron retries until each remote delete succeeds.

### Origin

Codex adversarial review; deferred from #32.

Contributor guide

Open the contributing guide

Research direction

Start by locating the atmosphere_delete_comment_record cron handler and Publisher::delete_comment_by_tid(), then review the deferred context in #32. Trace when the comment row and meta disappear and how cron arguments are handled. Done means failed remote deletes leave durable TIDs and periodic retries continue until deletion succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.