fix: QA remediation P1-A/P1-B/P1-C/P2 for v0.22.1 sync-mode
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
This commit is contained in:
15
CHANGELOG.md
15
CHANGELOG.md
@@ -13,6 +13,21 @@ and this project uses [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [0.22.1] - 2026-06-22
|
||||
|
||||
### Fixed (remediation 2026-06-23)
|
||||
- **`on_orchestrate_tick()` sync-mode double-drive** (P1 QA finding): added
|
||||
`if ( ! self::$sync_mode )` guard around `wp_schedule_single_event(GENERATE_ACTION)` +
|
||||
`fire_cron_now()` in `on_orchestrate_tick()`. 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.
|
||||
- **Sync-mode unit tests**: added `test_orchestrate_tick_in_sync_mode_does_not_schedule_background_event`
|
||||
and `test_generate_tick_async_mode_schedules_generate_action` to
|
||||
`GenerationCheckpointRunnerTest.php`.
|
||||
- **Root `CONTEXT.md`**: created domain glossary (run/run_stages/checkpoint/idea-queue/
|
||||
Generation_Lock) and execution mode comparison (async wp-cron vs. `--sync` VPS).
|
||||
- **`ARCHITECTURE.md` §25**: added `WP-CLI (sync / VPS)` row to Entry Points table.
|
||||
|
||||
## [0.22.1] - 2026-06-22
|
||||
|
||||
### Added
|
||||
- **`wp prautoblogger generate --sync`** (VPS orchestrator mode): runs the full
|
||||
checkpoint pipeline synchronously in the calling process — acquires lock, calls
|
||||
|
||||
Reference in New Issue
Block a user