fix: VPS-orchestrated generation reliability — generate --sync, reaper TZ fix, maintenance-cron self-heal (v0.22.1) (#171)

Synchronous --sync CLI tick loop for VPS-driven generation over a held-open SSH session (survives Hostinger's ~10-min background-kill); $sync_mode guard on both tick handlers prevents double-drive; Run_Reaper UTC-vs-site-tz fix; one-shot self-heal migration restoring the maintenance crons that vanished after the 06-15/16 deploy (daily-generation excluded — VPS owns it).

QA: APPROVE @ 0689989 (qa-reviews/prautoblogger/2026-06-23-0689989.md). CEO greenlight 2026-06-22.

Agent-Session: prab-reliability-merge-20260622
This commit is contained in:
peptiderepo
2026-06-23 00:53:23 +07:00
committed by GitHub
parent a2af04f2c4
commit 98eeb12274
11 changed files with 611 additions and 41 deletions

View File

@@ -6,6 +6,9 @@
* kick_off() -- schedules cron + writes initial transient, no pipeline call.
* on_generate_tick() -- pops ONE idea, reschedules or finalizes; halted run aborts early.
*
* Sync-mode guard tests live in GenerationCheckpointRunnerSyncModeTest.php
* (split to comply with the 300-line rule).
*
* @package PRAutoBlogger\Tests\Core
*/
@@ -104,7 +107,7 @@ class GenerationCheckpointRunnerTest extends BaseTestCase {
);
}
// ── kick_off() ────────────────────────────────────────────────────────
// __ kick_off() __________________________________________________________________________
/**
* kick_off() schedules exactly the ORCHESTRATE cron action and writes
@@ -129,7 +132,7 @@ class GenerationCheckpointRunnerTest extends BaseTestCase {
$this->assertTrue( $found_running_transient, 'kick_off() must write a running status transient' );
}
// ── on_generate_tick() ────────────────────────────────────────────────
// __ on_generate_tick() __________________________________________________________________
/**
* An empty queue causes generate tick to finalize without scheduling