P1-A: wrap wp_schedule_single_event(GENERATE_ACTION) + fire_cron_now() in
on_orchestrate_tick() with 'if ( ! self::$sync_mode )' guard.
Mirrors the existing guard in on_generate_tick(). Prevents a background
wp-cron process spawning in parallel with the VPS --sync loop and
prematurely finalizing the run lock before Article_Worker completes.
P1-B: add two unit tests to GenerationCheckpointRunnerTest.php:
- test_orchestrate_tick_in_sync_mode_does_not_schedule_background_event:
asserts sync_mode=true suppresses GENERATE_ACTION schedule + spawn_cron.
- test_generate_tick_async_mode_schedules_generate_action:
asserts sync_mode=false (async path) still reschedules GENERATE_ACTION.
P1-C: create root CONTEXT.md with domain glossary (run, run_stages,
checkpoint, idea queue, Generation_Lock) and execution mode reference
(async wp-cron vs --sync VPS-driven).
P2: update ARCHITECTURE.md §25 Entry Points table with the
'wp prautoblogger generate --sync' VPS path row.
Agent-Session: prab-reliability-remediation-20260622
- wp prautoblogger generate --sync: synchronous VPS orchestrator mode.
Acquires lock in-process, calls on_orchestrate_tick() then loops
on_generate_tick() up to 20 ticks. Emits JSON summary; exits 0/1.
- Generation_Checkpoint_Runner::set_sync_mode(): static flag suppresses
wp-cron reschedule inside on_generate_tick() when the VPS external
loop is the driver. No effect on existing async (cron/AJAX) paths.
- Run_Reaper TZ fix: sweep_stuck_stages() + sweep_stuck_runs() now use
wp_date() for $cutoff so it matches updated_at's local-TZ storage.
gmdate() was 8h behind on Hostinger (UTC+8) — latent for old stale
runs but would suppress reaping of same-day-stalled runs.
- DB_Migrations v0221 self-heal: restores missing maintenance crons
(reap_orphan_research_rows, collect_metrics, sync_runware_models).
prautoblogger_daily_generation deliberately NOT re-registered — VPS
systemd timer owns generation scheduling. Note: wp-cron reliability on
this Hostinger host is suspect; maintenance crons are low-stakes.
Agent-Session: prab-reliability-20260622