Commit Graph

48 Commits

Author SHA1 Message Date
wpdev d6fd831416 Merge pull request 'release 0.5.3: 2meet-data-optimizer-hivepress-addon' (#7) from release/0.5.3 into main
Tests / PHP Lint (push) Successful in 6s
Tests / Unit Tests (push) Successful in 1m6s
Tests / Integration Tests (push) Successful in 1m6s
2026-10-07 14:02:51 +08:00
wpdev 763f705ac1 fix(2meet-data-optimizer-hivepress-addon): 0.5.3 view-count flush keeps flat row and meta cache in sync
Tests / PHP Lint (pull_request) Successful in 6s
Tests / Unit Tests (pull_request) Successful in 53s
Tests / Integration Tests (pull_request) Successful in 1m13s
flush_views_to_postmeta() adds warm-zone views back with a direct UPDATE,
which the Hook Bus never sees: under dual_write/shadow_read the
hp_listing_core.hp_view_count column drifted after every hourly batch and
the (Redis) object cache kept the old count. After the UPDATE, drop the
post's meta cache and, while native is still the source of truth, rebuild
the entity's flat row with migrate_entity().
2026-10-07 10:37:57 +08:00
wpdev 5953a5ed3b fix(2meet-data-optimizer-hivepress-addon): 0.5.2 attribute bridge uses hp_{slug} meta keys
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 09:30:09 +08:00
wpdev 6909bf6a99 Merge pull request 'release 0.5.1: 2meet-data-optimizer-hivepress-addon' (#6) from release/0.5.1 into main
Tests / PHP Lint (push) Successful in 9s
Tests / Unit Tests (push) Successful in 1m1s
Tests / Integration Tests (push) Successful in 1m47s
2026-10-02 20:46:33 +08:00
wpdev 9803f8379d chore(2meet-data-optimizer-hivepress-addon): 0.5.1 repackage (no functional change)
Tests / PHP Lint (pull_request) Successful in 7s
Tests / Unit Tests (pull_request) Successful in 56s
Tests / Integration Tests (pull_request) Successful in 1m22s
Version bump for a re-release packaged alongside the WP-MVB v8 hub (dev39)
acceptance; code is identical to the previous release.
2026-10-02 17:23:21 +08:00
wpdev f7f9bc5cc4 Merge pull request 'hardening 2.4: 2meet-data-optimizer-hivepress-addon 0.5.0 (sort indexes, a day's transient TTL)' (#5) from hardening/2.4 into main
Tests / PHP Lint (push) Successful in 7s
Tests / Unit Tests (push) Successful in 1m24s
Tests / Integration Tests (push) Successful in 1m24s
2026-09-27 23:57:57 +08:00
wpdev bfe8912600 chore(2meet-data-optimizer-hivepress-addon): 0.5.0 release notes and version
Tests / PHP Lint (pull_request) Successful in 7s
Tests / Unit Tests (pull_request) Successful in 1m23s
Tests / Integration Tests (pull_request) Successful in 1m16s
- CHANGELOG: PR-119 (sort indexes ending with post_id), PR-120 (a day's TTL)
- Version 0.4.0 -> 0.5.0 (header, TMDO_HIVEPRESS_VERSION)
- PR: PR-125
2026-09-27 23:29:33 +08:00
wpdev 15bbf335f4 perf(2meet-data-optimizer-hivepress-addon): keep HivePress transients a day in the object cache
- MAX_CACHE_TTL: a week -> a day (HivePress's own default); a timeout still
  outlives its value by a minute
- dev36 (1.3M listings): 4.7M entries / 1 GB in the shared Redis at a week,
  evicting other sites' keys
- Verify: composer test (148), integration (53), phpcs clean on the file
- PR: PR-120
2026-09-27 23:26:08 +08:00
wpdev 0cd2a9db5b perf(2meet-data-optimizer-hivepress-addon): (column, post_id) indexes for the listing sorts HivePress offers
- hp_listing_core declares (hp_price, post_id), (hp_rating, post_id) and
  (hp_hourly_rate, post_id): with core 1.4.0 a flat-first price, rating or
  hourly-rate sort reads them in order instead of sorting every match
  (dev36 stage 3: the price-range + price-sort search was the slowest routed
  page, 2.9 s at 1.3M listings); core 1.3.0 ignores indexes ending with post_id
- the pinned schema hash is unchanged (indexes are not part of it)
- Verify: HivePressEntityGroupsTest, unit 148, integration 53, phpcs;
  dev36 front-end sorts
- PR: PR-119
2026-09-27 22:41:46 +08:00
wpdev d802bf0145 Merge pull request 'hardening 2.3: 2meet-data-optimizer-hivepress-addon 0.4.0 (listing indexes, transient TTLs, site attributes)' (#4) from hardening/2.3 into main
Tests / PHP Lint (push) Successful in 24s
Tests / Unit Tests (push) Successful in 1m15s
Tests / Integration Tests (push) Successful in 1m32s
2026-09-27 18:37:50 +08:00
wpdev df62edd0f5 docs(2meet-data-optimizer-hivepress-addon): add PR-115 to the 0.4.0 release notes
Tests / PHP Lint (pull_request) Successful in 7s
Tests / Unit Tests (pull_request) Successful in 1m21s
Tests / Integration Tests (pull_request) Successful in 1m12s
- timeout TTL order, attribute types and registration timing; Redis upgrade
  procedure gains the timeout pass
- PR: PR-102 (follow-up)
2026-09-27 17:34:19 +08:00
wpdev 69cd4b6f8b fix(2meet-data-optimizer-hivepress-addon): let transient timeouts outlive their values; register site attributes once themes load
- review F5: a timeout entry expired before its value (a day vs a week), and
  HivePress reads a missing timeout as "never expires", serving the stale
  value for up to six more days. The timeout now expires a minute after the
  later of MAX_CACHE_TTL and its own time, so HivePress sees it expire first
- review F7: site attributes accept only types with a plain index (json and
  binary would fail the CREATE TABLE)
- review F8: the hp_listing_attrs group is registered on the run after
  after_setup_theme (init:1), so a filter added in a theme counts and the
  group has one definition per request; only keys of other groups are skipped
- Verify: TTL test, attribute group tests, unit 148, integration 53, phpcs
- PR: PR-115 (2.3 acceptance correctness review)
2026-09-27 17:33:13 +08:00
wpdev c139ebca89 docs(2meet-data-optimizer-hivepress-addon): add PR-109 to the 0.4.0 release notes
- Added: site listing attributes through tmdo_hp_listing_attribute_fields
- PR: PR-102 (follow-up)
2026-09-27 17:12:54 +08:00
wpdev 0efac618de feat(2meet-data-optimizer-hivepress-addon): flatten a site's own listing attributes on opt-in
- the tmdo_hp_listing_attribute_fields filter (hp_ key => type) registers a
  site's HivePress listing attributes, such as a "Warranty" number attribute
  (hp_warranty, 901k rows on dev36), in their own hp_listing_attrs group: a
  new table with each column indexed at creation; hp_listing_core and its
  pinned hash are unchanged
- keys another group manages, keys without the hp_ prefix and unknown types
  are ignored
- Verify: HivePressEntityGroupsTest (opt-in, filtering, pinned hashes), unit
  147, integration 53, phpcs; dev36 hp_warranty backfill and queries
- PR: PR-109
2026-09-27 17:10:19 +08:00
wpdev e57dd5bd15 docs(2meet-data-optimizer-hivepress-addon): 0.4.0 release notes
- version 0.4.0; CHANGELOG for PR-090, 090b and 099 with dev36 numbers
- Upgrading: deploy with core 1.3.0; give 0.3.0 Redis entries a TTL with
  redis-cli --scan | EXPIRE ... NX | --pipe (tested on dev36: 3.0 M keys,
  45 s, latency max 2 ms), never flush-group
- Verify: composer test (145)
- PR: PR-102
2026-09-27 16:50:01 +08:00
wpdev b2585459e3 fix(2meet-data-optimizer-hivepress-addon): declare the listing indexes only on a core that adds them outside web requests
- the hp_listing_core indexes are declared only when TMDO_Schema_Manager has
  ddl_allowed() (core 1.3.0+); core 1.2.0 would run the ALTER on 900k rows
  inside the first request after deploy, a visitor's included, if this AddOn
  were deployed first
- Verify: unit 145, integration 53, phpcs
- PR: PR-090b (found while writing the 0.4.0 notes)
2026-09-27 16:50:01 +08:00
wpdev d129139c7d perf(2meet-data-optimizer-hivepress-addon): expire object-cache transients
- with an external object cache, a HivePress timeout entry expires when it
  records; the value (written before its timeout) after at most a week — a
  miss only makes HivePress rebuild it. Entries of deleted posts no longer
  accumulate without end
- Verify: HivepressTransientFilterTest TTL test, integration 53, unit 145;
  dev36 Redis TTL on tmdo_hp_transient keys
- PR: PR-099
2026-09-27 16:42:52 +08:00
wpdev f06a80eae5 perf(2meet-data-optimizer-hivepress-addon): index the numeric listing columns HivePress filters and sorts on
- hp_listing_core declares indexes on hp_hourly_rate and hp_rating_count; core
  adds them in place (WP-CLI / WP-Cron), the pinned schema hash is unchanged
- Verify: unit 145, integration 52, phpcs; dev36 902k listings (SHOW INDEX, EXPLAIN)
- PR: PR-090
2026-09-27 16:08:23 +08:00
wpdev 130678a8e6 Merge pull request 'hardening 2.2: 2meet-data-optimizer-hivepress-addon 0.3.0 (transients in the object cache)' (#3) from hardening/2.2 into main
Tests / PHP Lint (push) Successful in 38s
Tests / Integration Tests (push) Successful in 1m38s
Tests / Unit Tests (push) Successful in 1m38s
2026-09-27 10:56:52 +08:00
wpdev 788ddccfb3 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
- 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
2026-09-27 10:32:12 +08:00
wpdev c6faaebbc1 docs(2meet-data-optimizer-hivepress-addon): 0.3.0 release notes
- 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
2026-09-27 09:54:03 +08:00
wpdev ef7e005583 chore(2meet-data-optimizer-hivepress-addon): escape the admin status cells
- 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
2026-09-27 09:20:27 +08:00
wpdev 99f4653b25 docs(2meet-data-optimizer-hivepress-addon): map HivePress extension meta keys and query shapes
- 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
2026-09-27 09:19:09 +08:00
wpdev bab91ef6b9 docs(2meet-data-optimizer-hivepress-addon): document registered keys HivePress never writes
- 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
2026-09-27 09:15:20 +08:00
wpdev b515b8441e fix(2meet-data-optimizer-hivepress-addon): keep HivePress transients in the object cache when there is one
- 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
2026-09-27 09:00:03 +08:00
wpdev fda9e43087 Merge pull request 'hardening 2.1: 2meet-data-optimizer-hivepress-addon 0.2.0 (staged rollout)' (#2) from hardening/2.1 into main
Tests / PHP Lint (push) Successful in 7s
Tests / Integration Tests (push) Failing after 1m15s
Tests / Unit Tests (push) Successful in 1m22s
2026-09-26 21:19:51 +08:00
wpdev a01314cbb1 refactor(2meet-data-optimizer-hivepress-addon): leave HivePress queries to the post router
Tests / PHP Lint (pull_request) Successful in 1m5s
Tests / Unit Tests (pull_request) Successful in 1m9s
Tests / Integration Tests (pull_request) Failing after 1m46s
- Do not bind optimize_query / optimize_search on hivepress/v1/models/{listing,vendor}/{query,search} while core's TMDO_Post_Query_Router is active: core now routes HivePress searches (filters and _sort) to the entity flat tables, and two routers would claim the same clauses
- Version 0.2.0 (released with core 1.1.0); CHANGELOG
- Verify: composer test (144, +2 binding tests); integration 49; dev36 fe.sh 9 URLs ids == native (except known flat drift)
- PR: PR-063
2026-09-26 20:19:27 +08:00
wpdev 61762c49d0 Merge pull request 'hardening 2.0: 2meet-data-optimizer-hivepress-addon (staged rollout, dev22 first)' (#1) from hardening/2.0 into main
Tests / PHP Lint (push) Successful in 5s
Tests / Unit Tests (push) Successful in 1m6s
Tests / Integration Tests (push) Successful in 1m18s
2026-09-26 10:24:16 +08:00
wpdev 0254e40d83 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
- 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
2026-09-26 01:13:35 +08:00
wpdev 0e260ee3a9 feat(2meet-data-optimizer-hivepress-addon): register Hot-only HivePress fields as entity groups
- 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
2026-09-26 01:09:34 +08:00
wpdev 69c8bf2a88 feat(2meet-data-optimizer-hivepress-addon): provide HivePress defaults to core via filters
- 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
2026-09-26 00:24:43 +08:00
wpdev dca134b5b6 refactor(2meet-data-optimizer-hivepress-addon): remove TMDO_HPCT_Import
- 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
2026-09-26 00:16:00 +08:00
wpdev 3c57fb0ee6 fix(2meet-data-optimizer-hivepress-addon): declare post_type scopes on HivePress post groups
- 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
2026-09-25 23:57:52 +08:00
wpdev 7d0edb6228 test(2meet-data-optimizer-hivepress-addon): pin hp entity group definitions to persisted schema hashes
- 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
2026-09-25 23:49:00 +08:00
wpdev 19add5fc16 refactor(2meet-data-optimizer-hivepress-addon): take ownership of hp_* entity groups
- 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
2026-09-25 23:43:40 +08:00
wpdev ff6d6b10e4 refactor(2meet-data-optimizer-hivepress-addon): remove HPCT-era interceptors and query rewriters
- 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
2026-09-25 23:01:56 +08:00
wpdev 5777210184 refactor(2meet-data-optimizer-hivepress-addon): remove comment mirror writes to never-created tables
- 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
2026-09-25 22:58:34 +08:00
wpdev f089b0934b fix(2meet-data-optimizer-hivepress-addon): map marketplace hot field to hp_price
- 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
2026-09-25 22:39:57 +08:00
wpdev d3ddbb8933 fix(2meet-data-optimizer-hivepress-addon): register enabled social links as hp_{name}
- 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
2026-09-25 22:35:30 +08:00
wpdev e443f20edb fix(2meet-data-optimizer-hivepress-addon): map bookings hot field to hp_quantity
- 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
2026-09-25 22:28:54 +08:00
wpdev 2540bee0d1 docs: CHANGELOG 記錄 integration 測試套件與 ListingStatsTest
Tests / PHP Lint (push) Successful in 5s
Tests / Unit Tests (push) Successful in 15s
Tests / Integration Tests (push) Successful in 18s
2026-07-31 10:44:14 +08:00
wpdev 80ed7b1bb2 test: 移植 ListingStatsTest(9 tests)
Tests / PHP Lint (push) Successful in 6s
Tests / Unit Tests (push) Successful in 18s
Tests / Integration Tests (push) Successful in 21s
unit bootstrap 改載入真實 TMDO_Listing_Stats:先 define
TMDO_TEST_SKIP_LISTING_STATS_STUB,核心 bootstrap 便會跳過它的 stub。
145 → 154 tests。
2026-07-31 10:41:13 +08:00
wpdev 59c9b698b7 test: 加入 integration 測試套件(連真實 MariaDB)
Tests / PHP Lint (push) Successful in 5s
Tests / Unit Tests (push) Successful in 16s
Tests / Integration Tests (push) Successful in 20s
從 wp-data-optimizer v3.4.6 移植 5 個 integration 測試檔,並新增
tests/integration/bootstrap.php(複用核心的 integration bootstrap,不重複
 與 WP stub)+ phpunit-integration.xml + CI integration job。
2026-07-31 09:56:48 +08:00
wpdev 843a8e2156 ci: 加入 test workflow(lint + unit)
Tests / PHP Lint (push) Successful in 5s
Tests / Unit Tests (push) Successful in 15s
unit job 會一併 checkout 核心 plugin — 本 AddOn 的測試 bootstrap 直接
require 核心的 tests/bootstrap.php。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 09:20:07 +08:00
wpdev 0a3b05789e test: 建立 phpunit 測試基建並移植 25 個 HivePress 測試
AddOn 先前 tests=0。新增:
- composer.json(dev 依賴 + phpunit/phpcs script)
- phpunit.xml(failOnWarning=true)
- tests/bootstrap.php:直接 require 核心 plugin 的 unit bootstrap,避免複製
  ~700 行 WP stub,再載入本 AddOn 的類別;補 trait wrapper 與自動 WPDO_ alias
  (includes/back-compat-aliases.php 掛在 plugins_loaded:7,PHPUnit 下不會跑)
- tests/unit/ 25 個測試 + WpdbMockTrait(自 A 移植)

生產碼一併修對外契約:interface-tmdo-hp-adapter.php 改為先宣告空的
WPDO_HivePress_Adapter、再讓 TMDO_HivePress_Adapter extends 它(PHP 無法
class_alias 介面,只有繼承能讓 instanceof WPDO_HivePress_Adapter 對
implements TMDO_ 名稱的 adapter 成立)。與核心 interface-entity-adapter.php
同一模式。這也讓第三方自訂 adapter 用舊介面名仍可通過核心檢查。

145 tests / 357 assertions GREEN

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 09:19:01 +08:00
wpdev b96b041445 fix(hivepress): detector active-plugin 偵測 + 4 個 interceptor 改繼承核心基底(F2/F3/F4)
F3 detector(A v3.4.5):HivePress addon 不暴露任何 per-addon class/const,
   它們是透過 add_filter('hivepress/v1/extensions') 註冊目錄,所以原本的
   class_exists / defined 偵測永遠只認得 core → 反 EAV 覆蓋率卡在 1/13。
   改以 get_option('active_plugins') 為第一級訊號(新增 active_plugin_files()),
   version_for() 對 addon 改讀其主檔 Version: header。覆蓋率回到 7/13。

F2 interceptor:reviews / messages / memberships / requests 改繼承核心的
   TMDO_Standard_Post_Interceptor,573 → 344 行。FIELD_MAP 由 private
   提升為 public(late static binding 從基底讀取)。
   bootstrap 的 require 迴圈加核心版本守衛:這 4 個檔案在舊核心下會於
   parse 階段就 fatal,class_exists 守衛來不及。

F4 listing-stats:view 計數改用 Zone_Warm::increment() 原子遞增,
   flush 改原子 UPDATE,消除 get()+set() 的 lost-update race。

F5:主檔補 TablePrefix header(打包終檢 §10 schema drift 主路徑)。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 06:07:39 +08:00
wpdev e3ede89197 feat(back-compat): 加入 WPDO_* class alias(E3)
核心的 class-tmdo-back-compat.php 在 plugins_loaded:4 執行,AddOn 於 :6
才載入,所以核心的 alias 表涵蓋不到 AddOn 類別 —— 姊妹外掛或第三方若
以 WPDO_* 名稱引用本 AddOn 的類別會直接 fatal。

新增 includes/back-compat-aliases.php,於 plugins_loaded:7 為本 AddOn
自有類別建立 WPDO_ alias;主檔加入 require。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 06:03:47 +08:00
wpdev b4400a68e5 chore: initial snapshot of 2meet-data-optimizer-hivepress-addon v0.1.0
Baseline before backporting wp-data-optimizer v3.0.1-v3.4.6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 05:06:36 +08:00