refactor(2meet-data-optimizer-hivepress-addon): stop registering Hot zone fields
- 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
This commit is contained in:
@@ -33,21 +33,6 @@ class HivePressMarketplaceAdapterTest extends TestCase {
|
||||
$this->assertSame( 'HivePress\\Marketplace\\Plugin', $this->adapter->detection_class() );
|
||||
}
|
||||
|
||||
public function test_on_register_fields_registers_hot_hp_price(): void {
|
||||
$registry = WPDO_Schema_Registry::instance();
|
||||
$this->adapter->on_register_fields( $registry );
|
||||
|
||||
// Marketplace's filterable, sortable listing "price" attribute is stored as hp_price.
|
||||
$price = $registry->get_field( 'hp_listing', 'hp_price' );
|
||||
$this->assertSame( 'hot', $price['zone'] );
|
||||
$this->assertTrue( (bool) $price['indexed'] );
|
||||
$this->assertStringContainsString( 'decimal', $price['data_type'] );
|
||||
|
||||
// Neither key exists in hivepress-marketplace.
|
||||
$this->assertNull( $registry->get_field( 'hp_listing', 'hp_purchase_price' ) );
|
||||
$this->assertNull( $registry->get_field( 'hp_listing', 'hp_purchase_count' ) );
|
||||
}
|
||||
|
||||
public function test_score_aggregates_to_nine_eight_eight(): void {
|
||||
// D8 = 0.9 → aggregate = (7×1.0 + 0.9)/8 × 10 = 9.875 → 9.88.
|
||||
$this->assertSame( 9.88, $this->adapter->suitability_score()['aggregate'] );
|
||||
|
||||
Reference in New Issue
Block a user