Pipeline flush modules¶
includes/pipeline/80-flush.php is a compatibility facade. The active flush implementation lives under includes/pipeline/flush/.
Module ownership¶
10-offers.phpowns draining the offer buffer, filtering known invalid titles, chunking stage writes in batches of 250, selecting the run id, and stage-only debug diagnostics.20-meta.phpowns draining the metadata buffer, compact/full metadata column selection, batch upserts, row-by-row salvage after a failed batch, sync-log counters, and debug diagnostics.90-compose.phploads the two stages in their historical order.
Compatibility contract¶
The public functions remain ccx_feeds_offers_buf_flush() and ccx_feeds_meta_buf_flush(). The refactor does not change the 250-row chunk size, invalid-title filtering, run-id fallback, SQL upsert semantics, row-level retry behavior, meta_flush_* counters, or debug behavior.
Retry ownership¶
The metadata retry loop intentionally remains inside 20-meta.php for this structural extraction. Splitting it into a helper would change the internal call surface and should be handled separately with behavioral tests if it becomes useful.
Change policy¶
Future changes to chunk size, retry policy, accepted metadata columns, counter semantics, stage persistence, or debug retention are behavioral changes and must be covered by dedicated tests.