Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Retry Playground archive lock generation handoffs

Open
#2,464 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start at tryAcquireCacheLock() and trace the lease sidecar open and access paths, focusing on where generation changes are classified. Run the separate-process archive-cache regression first, then the full smoke aggregate; done means legitimate handoffs retry while unsafe filesystem states remain rejected and abandoned empty directories remain reclaimable.

Written by the indexing model from the issue text.

Description

Problem

The authoritative smoke aggregate for #2463 exposed a cross-process handoff that the lock protocol detected correctly but classified incorrectly. tryAcquireCacheLock() can create the shared lock directory and then be descheduled before opening it. After the bounded empty-directory grace expires, another process may legitimately reclaim and replace that uninitialized generation. The original creator then observes a generation change between lstat() and open().

Observed failure: smoke aggregate run 33561166359

LeaseSidecarUnsafeError: Playground cache lease sidecar changed while opening

The protocol already retried generation changes detected while accessing an opened sidecar, but identified that outcome by matching one error-message phrase. A generation change detected while opening therefore escaped as a terminal unsafe-sidecar failure.

Desired outcome

Represent legitimate sidecar generation changes as one explicit typed handoff outcome and retry them consistently during lock acquisition and inspection. Preserve the directory protocol because its non-empty removal interlock prevents a stale cleaner from deleting a replacement owner. Keep symlinks, non-directories, and other unsafe filesystem states fail-closed.

Acceptance criteria

  • Generation changes while opening or accessing a lease sidecar use one typed handoff classification.
  • A creator that loses its uninitialized directory generation retries instead of terminating.
  • Unsafe filesystem type and symlink replacements remain rejected or conservatively protected.
  • Empty abandoned directories remain reclaimable without extending timing allowances.
  • The separate-process archive-cache regression and full smoke aggregate pass.

Rejected design

An initialized file published by hard link was evaluated and rejected: portable Node filesystems do not provide atomic conditional unlink by inode, so stale cleanup could unlink a replacement owner and permit concurrent lock holders.

AI assistance

GPT-5.6 Sol via OpenCode analyzed the failed aggregate, evaluated and rejected an unsafe hard-link design during review, and drafted the typed handoff repair under Chris Huber's direction.

Dominant language
TypeScript
Stars
17
Forks
4
Avg merge
1h 37m
Merged PRs (30d)
45

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/wp-codebox

All issues in Automattic/wp-codebox

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.