Image quality normalization¶
25-image-quality.php is a compatibility facade. The active image-quality implementation lives under includes/pipeline/norm/media-quality/image/.
Module ownership¶
10-color.phpowns token normalization, filename extraction, the canonical color dictionary, and color detection.20-gallery.phpowns normalized gallery URL extraction.30-policy-stats.phpowns reason-code merging, counters, mutation policy lookup, evidence-source counters, and table identifier validation.40-apply.phpowns the publicccx_image_quality_apply()stage and its database mutation/audit loop.90-compose.phploads the modules in historical dependency order and keeps the existingmedia-quality/evidence/color-evidence.phpdependency explicit.
Compatibility contract¶
The public function names and the runtime call surface are unchanged. ccx_image_quality_apply() remains the public entrypoint. The refactor does not change mutation opt-in behavior, confidence thresholds, reason codes, SQL selection criteria, evidence decisions, or sync-log keys.
Change policy¶
Structural moves should remain behavior-neutral. Any future change to color aliases, evidence scoring, mutation confidence, replacement policy, or database write semantics must be reviewed as a behavioral change and covered by dedicated tests.