Aller au contenu

Offers norm orchestrator

plugins/ccx-feeds-industrial/includes/pipeline/90-offers-norm.php is a compatibility facade for the run-scoped offers normalization pipeline.

The implementation is split under includes/pipeline/offers-norm/:

  • 10-cli-bootstrap.php: detects the direct CLI entrypoint and boots WordPress when required.
  • 20-dependencies.php: owns the normalization dependency load order.
  • 30-orchestrator.php: owns ccx_feeds_upsert_items_to_offers_norm() and the historical normalization phase order.
  • 80-cli-entrypoint.php: owns direct CLI argument handling, execution and stdout diagnostics.
  • 90-compose.php: composes those modules in bootstrap → dependencies → orchestrator → CLI order.

The refactor is structural. The run-scoped source filter, projection, merchant hooks, product rules, final coherence/status updates, SEO-path backfill, final Acer category policy, diagnostics and residual cleanup remain in their historical order.

Merchant-specific behavior remains delegated to merchant rules/providers. The orchestrator may call those delegated entrypoints at the historical phase boundaries, but new merchant-specific SQL should not be added directly to the orchestrator.

tests/Runtime/OffersNormOrchestratorBoundaryContractTest.php locks the compatibility facade, module composition order, public entrypoint, diagnostics surface and normalization phase ordering.