hardening 2.2: 2meet-data-optimizer-hivepress-addon 0.3.0 (transients in the object cache) #3

Merged
wpdev merged 6 commits from hardening/2.2 into main 2026-09-27 10:56:53 +08:00
Owner

Hardening 2.2 for the HivePress AddOn (0.3.0), released with 2meet-data-optimizer 1.2.0.

Summary

  • With a persistent object cache the transient filter keeps HivePress's per-post transients in the tmdo_hp_transient cache group instead of wp_options (1.15 M pairs on dev36). (PR-081)
  • The cache is then the only store: no get_option() fallback, which added every miss to notoptions for good and kept old rows in the options cache group without expiry (Redis flush 8.9 s → BUSY). (PR-089c, HIGH, found in acceptance)
  • Admin status cells escaped. (PR-084)
  • Docs: REGISTERED-KEYS.md (six alias keys HivePress never writes), HIVEPRESS-COVERAGE.md (attribute auto-registration not needed now). (PR-082, 083)

Acceptance on dev36 (100k listings): dev30/notes/tmdo-acceptance-2.2-2026-09-27.md. Backlog: dev30/notes/pr-backlog.md (PR-066〜089).

Test plan

  • unit 144, integration 52
  • dev36: notoptions 210 → 210 over 1,000 posts (was 128 → 1,128); no extra queries on a warm cache
  • CI green on this PR
  • After deploy: core wp tmdo cleanup-hp-transients --options --confirm
Hardening 2.2 for the HivePress AddOn (0.3.0), released with 2meet-data-optimizer 1.2.0. ## Summary - With a persistent object cache the transient filter keeps HivePress's per-post transients in the `tmdo_hp_transient` cache group instead of wp_options (1.15 M pairs on dev36). (PR-081) - The cache is then the only store: no `get_option()` fallback, which added every miss to `notoptions` for good and kept old rows in the options cache group without expiry (Redis flush 8.9 s → BUSY). (PR-089c, HIGH, found in acceptance) - Admin status cells escaped. (PR-084) - Docs: `REGISTERED-KEYS.md` (six alias keys HivePress never writes), `HIVEPRESS-COVERAGE.md` (attribute auto-registration not needed now). (PR-082, 083) Acceptance on dev36 (100k listings): `dev30/notes/tmdo-acceptance-2.2-2026-09-27.md`. Backlog: `dev30/notes/pr-backlog.md` (PR-066〜089). ## Test plan - [x] unit 144, integration 52 - [x] dev36: notoptions 210 → 210 over 1,000 posts (was 128 → 1,128); no extra queries on a warm cache - [ ] CI green on this PR - [ ] After deploy: core `wp tmdo cleanup-hp-transients --options --confirm`
wpdev added 6 commits 2026-09-27 10:47:18 +08:00
- With a persistent object cache (wp_using_ext_object_cache(), Redis on the HivePress sites) the transient filter stores HivePress's per-post transient pairs in the tmdo_hp_transient cache group instead of wp_options, where they piled up (1.15 M rows on dev36). Reads fall back to wp_options for values written before; deletes clear both. Without an object cache nothing changes.
- Verify: HivepressTransientFilterTest object-cache cases (RED before); dev36 with Redis: update/get/delete_post_meta on an HP transient key leaves 0 rows in wp_options and postmeta.
- PR: PR-081
- docs/REGISTERED-KEYS.md lists the six registered keys that are aliases of core columns in the HivePress models (listing hp_vendor → post_parent, hp_status → post_status; request hp_status, hp_user → post_author; vendor hp_user; review hp_rating → comment_karma), with the dev36 evidence (0 meta rows each) and why the schema stays (plan D03). README links it.
- PR: PR-082
- docs/HIVEPRESS-COVERAGE.md: read-only inventory on dev36 of the hp_* meta each post type holds (registered or not, queried or not), where the extensions keep their data (comments, taxonomies, user meta) and the query shapes a front-end crawl produced.
- Conclusion for plan D04: attribute auto-registration is not needed now — every meta key HivePress queries is registered, select attributes are taxonomies, and the unregistered keys written (hp_due_date, hp_availability, hp_warranty) are never queried; revisit for sites that add filterable or sortable number / date attributes. README links it.
- PR: PR-083
- The detected / bound status cells of the HivePress admin table echo their literal marks through esc_html() (2.1 audit, Info 1, AddOn part); the output is unchanged.
- PR: PR-084
- Bump to 0.3.0; CHANGELOG entry for PR-081–084, with the post-upgrade cleanup-hp-transients step
- Verify: composer test, integration
- PR: PR-087
fix(2meet-data-optimizer-hivepress-addon): with an object cache, keep HivePress transients out of wp_options entirely
Tests / PHP Lint (pull_request) Successful in 10s
Tests / Unit Tests (pull_request) Successful in 1m2s
Tests / Integration Tests (pull_request) Successful in 1m53s
788ddccfb3
- On a cache miss the filter fell back to get_option(): with the values now written to the cache, the option is absent, so WordPress added its name to `notoptions` for good (dev36: +1,000 entries for 1,000 posts, one array loaded on every miss); a hit kept the old row in the options cache group with no expiry, which slowed the selective Redis flush (8.9 s, BUSY). The cache is now the only store for reads and deletes; old rows wait for cleanup-hp-transients --options. Without an object cache nothing changes.
- Verify: HivepressTransientFilterTest (2 RED before); dev36 notoptions 210 → 210 over 1,000 posts (was 128 → 1,128)
- PR: PR-089c
wpdev merged commit 130678a8e6 into main 2026-09-27 10:56:53 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wpdev/2meet-data-optimizer-hivepress-addon#3