Automattic / Automattic/php-toolkit

push-md: e2e suite only exercises the unscoped source, not the built (scoped) zip

Offen
#70 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
PHP
Sterne
22
Forks
5
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## Summary

The push-md e2e suite never functionally imports the **built (scoped) plugin zip** — it mounts the **unscoped source tree** directly. This is the testing gap that let the scoping regression in #68 (fixed by #69) ship in v0.6.6 / v0.6.7 uncaught: clone worked, but the first Markdown **import/push** fataled on the scoped build, and no automated test loaded the scoped artifact.

## Details

`bin/run-push-md-playground.sh` boots Playground against the live source, not the release artifact:

```bash
--mount="$ROOT_DIR:/workspace"
--mount="$ROOT_DIR/vendor:/wordpress/wp-content/vendor"
--mount="$ROOT_DIR/components:/wordpress/wp-content/components"
--mount="$ROOT_DIR/plugins/push-md:/wordpress/wp-content/plugins/push-md"
```

So the e2e flow runs with:
- the **unscoped** namespaces (`Nette\…`, `League\…`, …), where inline qualified references resolve fine, and
- the dev bootstrap / composer autoloader, **not** the generated/scoped `php-toolkit/vendor/composer/*` classmap.

`bin/build-plugins.sh` produces the scoped `dist/plugins/push-md.zip`, but it's only checked **structurally** by `bin/inspect-push-md-zip.sh` (file presence + content greps). Nothing ever **loads** the scoped classes through their autoloader and pushes Markdown, so a scoping bug that fatals at class-load time passes every gate.

## Proposed follow-up

Add an e2e path that exercises the **built zip**:

1. `bash bin/build-plugins.sh` to produce `dist/plugins/push-md.zip`.
2. Install **that zip** on a fresh Playground site (a blueprint step that installs the artifact, rather than mounting source).
3. Run the existing import/push flow: `git clone …/wp-json/git/v1/md.git`, edit a `post/*.md`, commit, `git push`.
4. Assert success (no `bad line length character:

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne mit bin/build-plugins.sh, bin/run-push-md-playground.sh, bin/inspect-push-md-zip.sh und dem vorhandenen push-md-e2e.yml-Workflow, um nachzuverfolgen, wie der aktuelle Flow mit eingehängtem Quellcode erstellt und ausgeführt wird. Füge einen neuen Playground-Pfad hinzu, der dist/plugins/push-md.zip installiert, und führe anschließend den vorhandenen Flow zum Klonen, Bearbeiten von Markdown, Committen und Pushen aus. Erledigt ist die Aufgabe, wenn das abgegrenzte Artefakt funktional geladen wird, der Push ohne einen fatal- oder bad line length character-Fehler erfolgreich ist und der Artefaktpfad in CI ausgeführt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
bash, docker, git, github-actions, php
Bereich
build-system, ci-cd, testing
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
68/100

Neue Issues direkt in Ihr Postfach

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