Automattic/wordpress-atmosphere / .agents/skills/review
review
UnverifiedShared base for reviewing a diff, a branch or a PR in this plugin. How to read the diff, which repo guidelines to load for the changed paths, and the shape of a finding. Used by the code-review and security-audit agents.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.1 KB |
| guidelines/accessibility.md | markdown | 781 B |
| guidelines/authorization.md | markdown | 2.8 KB |
| guidelines/content-exposure.md | markdown | 6.8 KB |
| guidelines/cron.md | markdown | 1.9 KB |
| guidelines/hooks.md | markdown | 2.3 KB |
| guidelines/oauth.md | markdown | 3.6 KB |
| guidelines/output.md | markdown | 610 B |
| guidelines/records.md | markdown | 2.1 KB |
| guidelines/remote-fetch.md | markdown | 5.3 KB |
| guidelines/supply-chain.md | markdown | 582 B |
| guidelines/uninstall.md | markdown | 2.0 KB |
| guidelines/well-known.md | markdown | 1.4 KB |
| judge.md | markdown | 1.2 KB |
guidelines/cron.md
View on GitHub# Scheduled callbacks
Publish, update, delete and reaction-sync events: running twice, running stale, surviving a disconnect.
Applies to: `includes/class-atmosphere.php` (cron registration), `includes/class-publisher.php`, `includes/class-reaction-sync.php`, `includes/class-backfill.php`, `get_cron_hooks()` in `includes/functions.php`, and any new `wp_schedule_event` or `wp_schedule_single_event`
## Running twice
- `wp_schedule_single_event` can fire twice: concurrent workers, reactivation, `wp cron event run`, traffic spikes that trigger overlapping loopback requests. A handler with a visible side effect (a published Bluesky post, a stored comment) gates on a meta sentinel before the side effect.
- The claim is atomic: `add_option( $key, $value, '', false )` only succeeds when the row does not exist yet, which makes it race-safe.
## In-flight state
- A publish writes meta before (rkey reservation in `get_rkey()`) and after (the URI in `mirror_thread_records_meta()`). A comment deletion or status change in between leaves the two inconsistent; confirm the reconcile-after-publish pattern is applied (see `reconcile_comment_after_publish()`).
## Stale events
- A lifecycle transition cancels or supersedes queued work. A publish or restore after a queued delete does not leave the delete alive to remove the restored records. A new delete does not leave an older update able to write protected content first.
- Handlers re-check visibility when they fire (see "When a post stops being public" in `content-exposure.md`).
## Unscheduling
Every plugin-owned cron hook is listed in `Atmosphere\get_cron_hooks()`, and disconnect, deactivate and uninstall clear them with `wp_unschedule_hook()`, not `wp_clear_scheduled_hook()`. The latter only clears events whose args match, so arg-carrying single events (the retry ladder carries `array( $post_id )`) survive an args-less clear and fire against a *different repo* after a disconnect and reconnect to another account.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |