Automattic / Automattic/wp-codebox

Preserve readonly mount targets for PHPUnit cwd resolution

Offen
#2,234 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
16
Forks
4
Ø Merge
59 Min.
Gemergte PRs (30 T.)
131

Beschreibung

## Problem

A readonly directory mount is staged to a private host path before Playground execution. The PHPunit command handler then receives its configured sandbox cwd unchanged, e.g. `/home/wpcom/public_html/bin/tests/isolated`, but that target is not readable in the sandbox after staging. The handler aborts before PHPUnit runs.

## Reproduction

1. Build WP Codebox at `6ad43b20c488166a08346b44e0e736579c1fd178`.
2. Run a `wordpress.phpunit` recipe with a readonly mount from a WPCOM runtime root to `/home/wpcom` and `cwd=/home/wpcom/public_html/bin/tests/isolated`.
3. Observe `RuntimeException: cwd is not a readable sandbox directory` with the staged host source reported under `/tmp/wp-codebox-inputs/...`.

## Expected

Readonly staging must preserve the declared sandbox mount target so commands can use declared `cwd`, test-root, and phpunit-xml paths.

## AI assistance

OpenAI GPT-5.6 Sol via OpenCode reproduced the isolated WP Codebox runtime failure, narrowed it to readonly mount staging versus PHPUnit cwd resolution, and drafted this tracker. Chris Huber remains responsible for the report.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne damit, das wordpress.phpunit-Rezept bei Commit 6ad43b20c488166a08346b44e0e736579c1fd178 zu reproduzieren, und verfolge dann das Staging des readonly-Mounts bis zum PHPunit-Befehls-Handler. Überprüfe, dass das deklarierte sandbox-Mount-Ziel weiterhin für cwd-, test-root- und phpunit-xml-Pfade verwendet werden kann, und bestätige, dass PHPUnit ohne die Ausnahme wegen eines nicht lesbaren cwd ausgeführt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
php, typescript
Bereich
backend, infrastructure
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.