fix(sync-bridge): 讀取與刪除路徑補 entity-bridge 所有權守衛(A13)

intercept_get / intercept_delete 先前沒有 is_owned_by_entity_bridge() 檢查,
post entity 進入 dual_write 以上時:讀路徑會用 zone 值蓋掉 Hook Bus 的值、
刪路徑會在 aeav_only 下誤刪 flat 欄位(A v3.3.3 P1-24)。

unit 379 / integration 398 GREEN

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
This commit is contained in:
2026-07-31 05:22:21 +08:00
parent d040400da8
commit 6e81dc51c5
@@ -74,6 +74,11 @@ class TMDO_Sync_Bridge {
return $value;
}
// P1-24: defer to Hook Bus for reads when post entity is dual_write or higher.
if ( self::is_owned_by_entity_bridge( $meta_key ) ) {
return $value;
}
$module = $this->get_zone_module( $field['zone'], $post_type );
if ( ! TMDO_Feature_Flags::is_read_custom( $module ) ) {
return $value;
@@ -245,6 +250,11 @@ class TMDO_Sync_Bridge {
return;
}
// P1-24: skip zone cleanup when Hook Bus owns this key (aeav_only blocks native delete).
if ( self::is_owned_by_entity_bridge( $meta_key ) ) {
return;
}
$module = $this->get_zone_module( $field['zone'], $post_type );
if ( ! TMDO_Feature_Flags::is_write_active( $module ) ) {
return;