SyncModeTest runs alphabetically before GenerationCheckpointRunnerTest and
PublisherSideEffectsTest. Defining PRAutoBlogger_Post_Assembler via eval with
only amortize_research_costs() caused Publisher* and ResearchReaper tests to
fail with 'Call to undefined method sanitize_llm_content()' because the stub
registered before the autoloader could load the real class.
Fix: remove the Post_Assembler eval block entirely from both generate-tick
tests. The 'more ideas remain' path (2-idea queue, pop one) never calls
Post_Assembler::amortize_research_costs() -- that only runs in the last-idea
branch. No stub is needed.
Article_Worker stub is retained (it IS called in this path and needs a no-op
generate() to avoid real LLM calls).
Agent-Session: prab-reliability-test-fix-20260622
- GenerationCheckpointRunnerSyncModeTest.php (new, 246 lines): three tests that
genuinely exercise the sync-mode guards --
test_orchestrate_tick_in_sync_mode_does_not_schedule_background_event:
orchestrate_only() now returns 1 idea so execution reaches the guard at
line ~181 (was vacuous -- empty-ideas stub triggered early return at ~148).
Asserts GENERATE_ACTION NOT scheduled, spawn_cron NOT called.
test_generate_tick_sync_mode_suppresses_reschedule (new):
2-idea queue, set_sync_mode(true), on_generate_tick() -- asserts
GENERATE_ACTION NOT in scheduled events, spawn_cron NOT called.
test_generate_tick_async_mode_schedules_generate_action:
async regression guard moved from original file.
- GenerationCheckpointRunnerTest.php (233 lines): removed the two sync-mode
tests to stay under 300-line rule; added docblock pointer to SyncModeTest.
- CHANGELOG.md: merged duplicate [0.22.1] headings into one entry (NF-2).
Production code unchanged. Version stays 0.22.1.
Agent-Session: prab-reliability-test-fix-20260622