Files
prautoblogger/includes/core
peptiderepo 165921e8ef fix: resolve M4 prepare() binding + runner cap violation (v0.21.0)
P1 fixes (CTO remediation request, seq 47):

1. class-board-gen-log-query.php — both get_generating_cards() and
   get_failed_cards() had two defects in prepare():
   (a) missing comma between bound args (parse error: unexpected variable)
   (b) reversed arg order: int limit was first, datetime string was second,
       causing created_at >= <int> and LIMIT <datetime> silently.
   Fix: $since (string, for %s) is now first; (int) limit (for %d) is second.
   Both methods use settings-backed PRAUTOBLOGGER_DEFAULT_BOARD_COLUMN_LIMIT.

2. class-generation-checkpoint-runner.php — split private helpers into
   class-generation-checkpoint-helpers.php to stay under the 300-line cap.
   Runner: 267 lines. Helpers: 71 lines. Autoloader picks up helpers via
   core/ directory scan (no registration change needed).

3. tests/unit/Admin/BoardGenLogQueryTest.php — new test that captures
   prepare() call args and asserts arg[0] is string (the $since datetime)
   and arg[1] is int (the limit), catching any future reversed-order
   regression before CI. Also asserts card shape and column-limit option.

php -l clean on all 19 M4-touched files (verified via Hostinger SSH).

Agent-Session: phase2-admin-m4-20260614
2026-06-14 14:02:11 +00:00
..