Skip to content

Keep warm primary bootstrap read-only and bounded #254

Description

@chubes4

Problem

Primary-mode warm bootstrap still runs the synchronization owner inline from WP_Markdown_DB::db_connect(). PR #250 bounds contenders, but the owner can spend longer than Studio and WP-CLI startup deadlines reconciling a large canonical store before WordPress receives control.

On the intelligence-chubes4 site, deploying merged PRs #249 and #250 reduced is_blog_installed() from roughly 6-10 minutes to 87 seconds, but startup still never reached the HTTP listener before the CLI deadline. The daemon log stopped after WordPress already installed; skipping installer; port 8881 remained unbound.

Root cause

Warm boot_connection() selects sync_incremental, and run_primary_loader_action() invokes sync_incremental_if_available() inline. The process that acquires the gate therefore remains responsible for the complete canonical scan and SQLite mutation before bootstrap can continue.

Required contract

  • Warm primary bootstrap opens and serves the last complete index without inline reconciliation.
  • Read-only WordPress and WP-CLI boots complete within a fixed deadline regardless of canonical store size.
  • Reconciliation runs at an explicit deferred maintenance boundary with single-owner, process-safe authority.
  • Cold reconstruction remains fail-closed and publishes only complete indexes.
  • Deterministic coverage proves the synchronization owner cannot delay warm bootstrap, not only that contenders return quickly.

AI assistance

OpenAI GPT-5.6 Sol via OpenCode correlated the deployed MDI fixes with Studio daemon timing, traced the remaining delay to the inline warm loader action, and drafted this report. Chris Huber directed the investigation and remains responsible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions