revert: undo wu_pre_* filter chokepoints (ADR-001 Amendment 1 supersedure)#1262
Conversation
This reverts commit ef74b6a. Under ADR-001 Amendment 1 — Direct-DB Push Model (Ultimate-Multisite/ultimate-multisite-multi-tenancy#86), sovereign tenants do not read network state via filter chokepoints at request time. Instead, the network pushes state into each tenant's local wp_options / wp_blogmeta via a Tenant_State_Pusher Action Scheduler job, and the tenant reads only from its local DB. These wu_pre_* filters on Base_Model::get_by, ::get_by_hash, ::query_by_columns, and the upstream model methods were the load-bearing interception points for the original REST-pull plan (Phase 3.4 / Phase 3.5). Under the push model they are dead-code surface — no sovereign tenant code hooks them. Reverting to keep core's surface area minimal. Ref Ultimate-Multisite/ultimate-multisite-multi-tenancy#86
)" This reverts commit f87f1e2. Under ADR-001 Amendment 1 — Direct-DB Push Model (Ultimate-Multisite/ultimate-multisite-multi-tenancy#86), the sovereign tenant runs as a single-site WordPress install that reads only its local DB. The Base_Model getter filters (get_by_id, get_by, get_by_hash) were intended as the interception points for the tenant's planned Network_Client SDK, allowing the tenant to service model reads from network state. That entire plan is replaced by direct-DB push from network into the tenant's local wp_options / wp_blogmeta. The tenant has no SDK, no HTTP client, no cache, no filter hook into Base_Model. These filters become dead-code surface in core and are reverted to keep the upstream API minimal. The companion 6-model-method filters PR (#1260) is reverted in the preceding commit. Ref Ultimate-Multisite/ultimate-multisite-multi-tenancy#86
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
💤 Files with no reviewable changes (6)
📝 WalkthroughWalkthroughRemoves ChangesModel filter hook removal
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
|
Performance Test Results Performance test results for 0245ff9 are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
Summary
Reverts two recently-merged PRs that added
wu_pre_*filter chokepoints to the model layer. These filters were the load-bearing interception points for the original WP Ultimo Multi-Tenancy Phase 3.4/3.5 plan (a REST-pullNetwork_ClientSDK on each sovereign tenant).That plan has been superseded by ADR-001 Amendment 1 — Direct-DB Push Model (merged downstream in
Ultimate-Multisite/ultimate-multisite-multi-tenancy#86). Under the new architecture:wp_options/wp_blogmetaby a network-sideTenant_State_Pusher(Action Scheduler job).The two
wu_pre_*filter PRs being reverted have no consumer under the push model and become dead-code surface in core. Removing them keeps upstream's API minimal.Reverted PRs
00d617fc#1260wu_pre_*filters on 6 model methods9acf0c7f#1259wu_pre_*filters onBase_Model::get_by_id,::get_by,::get_by_hashKept (aligned with amendment, not reverted)
#1257#1258#1261These three will be extended in a follow-up PR (downstream "3-A7") to disable the remaining customer-facing UI elements (Account_Summary, Billing_Info, Invoices, My_Sites, Subscription, Site_Actions, Template_Switching, Domain_Mapping) in sovereign mode, with replacement links to a new main-site Customer_Hub (downstream "3-A8").
Risk
Low. The reverted filters are net-new in core (merged hours ago) and have no published consumer. Reverting before any third-party integration depends on them is the cheap moment.
Verification
git diff origin/main -- inc/models/class-base-model.php— clean removal of the filter blocksgit diff origin/main -- inc/models/*.php— clean removal of per-method filter blocksReferences
Ultimate-Multisite/ultimate-multisite-multi-tenancy#86Ultimate-Multisite/ultimate-multisite-multi-tenancy:docs/adr-001-amendment-1-direct-db-push.mdUltimate-Multisite/ultimate-multisite-multi-tenancy#43aidevops.sh v3.17.28 plugin for OpenCode v1.15.7 with claude-opus-4-7 spent 17h 9m and 125,709 tokens on this with the user in an interactive session.
Summary by CodeRabbit
Base_Model,Customer,Domain,Membership, andSite) that previously allowed early result overrides. Methods now execute their standard database logic directly.Note: If you've customized integrations using these filter hooks, they will require updates.