Skip to content

Bound WordPress Playground custom archive cache growth #1924

Description

@chubes4

Problem

WP Codebox/Homeboy sandbox runs have grown ~/.wordpress-playground to 8.2 GiB by retaining hundreds of content-addressed custom-*.zip archives indefinitely.

Observed on the Extra Chill VPS:

  • cache total: 8.2G
  • ordinary version archives: a handful at roughly 25-62 MiB
  • hundreds of unique custom-<hash>.zip files at roughly 30-62 MiB each
  • filesystem reached 95% usage after sustained Codebox/Homeboy test activity

packages/runtime-playground/src/playground-cli-runner.ts owns WP_CODEBOX_PLAYGROUND_WORDPRESS_CACHE_DIR, cache validation, and archive locking, but only deletes invalid archives. No size/age/count retention policy exists for valid custom archives.

Expected

  • distinguish reusable release archives from ephemeral/content-addressed custom archives
  • clean custom archives when no active runtime/lock references them, or enforce bounded age/size/count retention
  • never delete active archives or lock holders
  • expose diagnose/cleanup evidence with candidate count, bytes, active protection, removed count, and verified bytes reclaimed
  • use the configured WP Codebox cache directory rather than requiring operator cron against a hard-coded home path
  • cover concurrent runtimes sharing an archive and stale custom cache accumulation

Acceptance

A workload generating many distinct custom runtime archives converges to a bounded cache after teardown/retention while stable WordPress release archives remain reusable.

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