Skip to content

Recover stale WordPress archive cache locks after interrupted runs #1941

Description

@chubes4

Problem

Interrupted concurrent recipe-run executions can leave the shared WordPress archive cache lock unavailable. Subsequent independent runs wait through both the primary and fixture-recovery attempts, then fail before WordPress starts.

Observed while validating Automattic/blocks-engine#663 after a controller timeout left duplicate retained executions:

PlaygroundStartupAssetError
code: wp-codebox-playground-startup-asset-unavailable
phase: preview:loading-wordpress
asset: wordpress-archive-cache-lock
sourceUrl: /home/chubes/.wordpress-playground/7.0.2.zip.lock
message: Timed out waiting for WordPress archive cache lock

The clean follow-up used a unique output directory and no concurrent fixture process, but both the normal batch and automatic recovery batch timed out on the same lock. It produced no browser summary.

Expected

The startup asset resolver should distinguish an actively owned lock from a stale lock left by an interrupted/dead process and recover the stale case safely. Parallel healthy owners must remain serialized.

Evidence

  • Runner: homeboy-lab
  • WP Codebox: 0.12.29
  • Runtime: runtime-mruz2z83-7kaoki
  • Run: run_cb9ccecf6dfb452fbbb3e6ba3239329b
  • Retained workspace: /home/chubes/Developer/_lab_workspaces/blocks-engine-fix-project-image-selectors-2e71f61c0eed-960d5578-79d0-442e-b941-b66e2d9f4dbe-1784657092502579000
  • Recovery output: artifacts-fisiostetic-image-wrapper-v11/ssi-matrix/wp-codebox-output-batch-001-recovery-fisiostetic.json

Acceptance

  1. Kill/interupt a process while it owns the WordPress archive cache lock.
  2. Start a second recipe-run for the same WordPress version.
  3. The second run safely recovers the stale lock and starts WordPress.
  4. A genuinely active concurrent owner remains protected from lock stealing.

AI disclosure

Diagnosed with openai/gpt-5.6-sol.

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