hardening 2.0: 2meet-data-optimizer-hivepress-addon (staged rollout, dev22 first) #1

Merged
wpdev merged 12 commits from hardening/2.0 into main 2026-09-26 10:24:17 +08:00
Owner

Hardening 2.0 for 2meet-data-optimizer-hivepress-addon — the backlog PRs committed on hardening/2.0 (see dev30/notes/pr-backlog.md, Completed Log).

Commits

  • refactor(2meet-data-optimizer-hivepress-addon): stop registering Hot zone fields
  • feat(2meet-data-optimizer-hivepress-addon): register Hot-only HivePress fields as entity groups
  • feat(2meet-data-optimizer-hivepress-addon): provide HivePress defaults to core via filters
  • refactor(2meet-data-optimizer-hivepress-addon): remove TMDO_HPCT_Import
  • fix(2meet-data-optimizer-hivepress-addon): declare post_type scopes on HivePress post groups
  • test(2meet-data-optimizer-hivepress-addon): pin hp entity group definitions to persisted schema hashes
  • refactor(2meet-data-optimizer-hivepress-addon): take ownership of hp_* entity groups
  • refactor(2meet-data-optimizer-hivepress-addon): remove HPCT-era interceptors and query rewriters
  • refactor(2meet-data-optimizer-hivepress-addon): remove comment mirror writes to never-created tables
  • fix(2meet-data-optimizer-hivepress-addon): map marketplace hot field to hp_price
  • fix(2meet-data-optimizer-hivepress-addon): register enabled social links as hp_{name}
  • fix(2meet-data-optimizer-hivepress-addon): map bookings hot field to hp_quantity

Rollout

  • Staged: dev22 first (symlink to this branch, HP AddOn active before the core), then merge and roll out to the other sites
  • Do not merge before the dev22 verification is done
Hardening 2.0 for `2meet-data-optimizer-hivepress-addon` — the backlog PRs committed on `hardening/2.0` (see `dev30/notes/pr-backlog.md`, Completed Log). ## Commits - refactor(2meet-data-optimizer-hivepress-addon): stop registering Hot zone fields - feat(2meet-data-optimizer-hivepress-addon): register Hot-only HivePress fields as entity groups - feat(2meet-data-optimizer-hivepress-addon): provide HivePress defaults to core via filters - refactor(2meet-data-optimizer-hivepress-addon): remove TMDO_HPCT_Import - fix(2meet-data-optimizer-hivepress-addon): declare post_type scopes on HivePress post groups - test(2meet-data-optimizer-hivepress-addon): pin hp entity group definitions to persisted schema hashes - refactor(2meet-data-optimizer-hivepress-addon): take ownership of hp_* entity groups - refactor(2meet-data-optimizer-hivepress-addon): remove HPCT-era interceptors and query rewriters - refactor(2meet-data-optimizer-hivepress-addon): remove comment mirror writes to never-created tables - fix(2meet-data-optimizer-hivepress-addon): map marketplace hot field to hp_price - fix(2meet-data-optimizer-hivepress-addon): register enabled social links as hp_{name} - fix(2meet-data-optimizer-hivepress-addon): map bookings hot field to hp_quantity ## Rollout - Staged: dev22 first (symlink to this branch, HP AddOn active before the core), then merge and roll out to the other sites - Do not merge before the dev22 verification is done
wpdev added 12 commits 2026-09-26 07:25:53 +08:00
- hivepress-bookings has no guests field; the places booked are stored as
  hp_quantity (only when "Allow multiple places" is enabled)
- Verified against hivepress-bookings 1.5.5: start_time / end_time were
  already correct and stay unchanged

Verify: vendor/bin/phpunit --filter test_on_register_fields_uses_real_booking_meta_keys;
  addon unit 155 OK, integration 57 OK
PR: PR-009
- hivepress-social-links stores each link as hp_{name} (hp_facebook, not
  hp_facebook_url) and lets admins enable links separately for listings
  and vendors; the hardcoded 7 *_url vendor keys never matched real meta
- Read hp_listing_social_links / hp_vendor_social_links and register each
  enabled link on its own post type, so custom links (e.g. line_oa) work
- dev34 check: meta holds hp_instagram / hp_website, and zero *_url keys

Verify: vendor/bin/phpunit --filter HivePressSocialLinksAdapterTest;
  addon unit 156 OK, integration 57 OK
PR: PR-010
- hivepress-marketplace stores its filterable, sortable listing price as
  hp_price; hp_purchase_price never existed (dev34: 588 hp_price rows)
- Drop hp_purchase_count: the addon keeps no per-listing sales counter
- Remove the stale docblock note about the legacy core registration path

Verify: vendor/bin/phpunit --filter test_on_register_fields_registers_hot_hp_price;
  addon unit 156 OK, integration 57 OK
PR: PR-011
- Favorites/Messages adapters reduced to detection only; Requests keeps hot_hp_request fields, drops hp_offer mirror
- Delete TMDO_HivePress_Comment_Router (read path to wpdo_comment_hp_* tables that no installer creates)
- Verify: addon unit 141 OK, integration 52 OK; phpcs 41E/57W → 35E/48W
- PR: PR-013
- Delete 7 interceptors + 5 query rewriters that read/write hpct_* tables no site has (only an empty hpct_latepoint_idx exists)
- Drop their loading/registration in TMDO_HP_Bootstrap, back-compat aliases, integration bootstrap, and ListingMetaInterceptorTest
- Verify: unit 141 OK, integration 49 OK, bootstrap smoke OK; phpcs 34E/40W → 25E/28W
- PR: PR-014
- Add TMDO_HivePress_Entity_Groups registering hp_listing_core / hp_request_core / hp_vendor_core / hp_user, copied verbatim from core (same order; schema hashes match the persisted wpdo_registry_meta rows)
- Drop the core adapter's conflicting hp_user definition (hp_verified / hp_avatar_id — keys HivePress never writes)
- Verify: HivePressEntityGroupsTest (identical to core, same shared-key resolution, no collisions); HP unit 144 / integration 49 OK; hashes = dev20 registry_meta
- PR: PR-019
- HivePressEntityGroupsTest no longer loads core TMDO_Post_Fields / TMDO_Member_Fields, so it survives core dropping them (PR-020b)
- Pin the 4 groups to their wpdo_registry_meta hashes and the current owner of the 8 shared post keys (documented as existing behaviour, not intent)
- Verify: HP unit 144 OK; mutating one field type fails the hash test
- PR: PR-020a
- hp_listing_core / hp_request_core / hp_vendor_core declare hp_listing / hp_request / hp_vendor, matching core (PR-033), so the AddOn keeps scoped routing once core stops registering them (PR-020b)
- Test: with tmdo_post_scoped_routing on, every key of each group resolves to its own post type's group; legacy owner and hash pins unchanged
- Verify: HP unit 145 / integration 49 OK
- PR: PR-033b
- Delete the HPCT importer (no caller left after core dropped HPCT in PR-020c) and its bootstrap/alias/test-bootstrap entries
- Conflict guard notice, log line and HivePress admin tab no longer point to the never-existing `wp wpdo hivepress migrate-from-hpct`; they say to deactivate the legacy plugins (their own tables are not imported)
- Verify: ConflictGuardTest guard; HP unit 146 / integration 49 OK, bootstrap smoke OK
- PR: PR-020d
- TMDO_HivePress_Entity_Groups hooks tmdo_rest_default_post_type so GET /wpdo/v1/listings keeps defaulting to hp_listing now that core defaults to 'post' (PR-020e)
- Test: TMDO_Post_Group_Reconciler::plan() over the AddOn's groups yields the 8 misrouted HivePress keys (coverage moved out of core in PR-020b)
- Verify: HP unit 148 / integration 49 OK, bootstrap smoke OK
- PR: PR-020f
- New scoped post groups for fields only the Hot zone covered (ADR-003):
  hp_draft_flags (hp_listing, hp_request: hp_drafted), hp_booking_core,
  hp_membership_plan_core, hp_membership_core. hp_drafted lives in one group
  spanning both post types, so it adds no shared key.
- New groups register before the existing ones: the legacy (unscoped)
  owner of hp_expired_time stays hp_request_core; existing hashes unchanged.
- Reconciler now also plans hp_membership rows of hp_expired_time out of
  hp_request_core. dev20-22 hold 0 native rows for these keys.
- Verify: HP unit 151 / integration 49 green, phpcs clean
- PR: PR-036
refactor(2meet-data-optimizer-hivepress-addon): stop registering Hot zone fields
Tests / PHP Lint (pull_request) Successful in 50s
Tests / Unit Tests (pull_request) Successful in 58s
Tests / Integration Tests (pull_request) Successful in 57s
0254e40d83
- ADR-003 step 4 (AddOn side): core, requests, bookings, memberships and
  marketplace adapters no longer register zone=hot fields or contribute
  hot_* FSM modules; their keys live in TMDO_HivePress_Entity_Groups.
  Cold/warm registrations are unchanged.
- Hot-table doctor probes go with them (trait defaults apply). The
  hot-clause query rewrite and cron optimizer are now inert and are left
  for the ADR step-5 removal together with core's hot path.
- New NoHotZoneRegistrationTest pins the invariant across all 13 adapters;
  per-adapter hot assertions removed.
- Verify: HP unit 142 / integration 49 green, phpcs clean (WordPress)
- PR: PR-037
wpdev merged commit 61762c49d0 into main 2026-09-26 10:24:17 +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#1