11942f6de5
andrexibiza's review on #101118 pointed out that the timeout branch still ran the SessionDB close/checkpoint even when _shutdown_executor() reported a live worker -- the exact sequence that produces the wrong-page-number corruption in #101093. The close block now only runs when _exec_live == 0; a surviving worker skips it entirely and leaves the handle open for SQLite to recover from its own WAL on next open. Adds test_stuck_worker_skips_the_session_db_close to prove the converse of the existing ordering test: a worker that outlives the budget must never be raced by close(). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019JujDvCo2vfpEiizidAS2U