Release CLI artifact deletes runtime-overlays/mdi-native, so every mdi-native recipe fails missing-path

Abierto
#2,611 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
75/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
php, typescript
Área
build-system, cli

Línea de trabajo

Read scripts/package-release-artifact.ts and packages/cli/src/recipe-sources.ts to trace how packaging removes runtime-overlays/ and where the MDI archive is resolved. Check the packaged tree against BUNDLED_MDI_NATIVE_ARCHIVE and the pinned revision in provenance.json; done means the release artifact contains the matching archive and packaging fails if it is missing.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Problem

The release CLI artifact (wp-codebox-cli-<platform>-<arch>.tar.gz) has no runtime-overlays/mdi-native/ archive. Any recipe using wp-codebox:mdi-native, including wordpress.phpunit --database-type=mdi-native, fails validation:

RecipeValidationError [missing-path] $.inputs.extra_plugins[2].source: File does not exist: …/wp-codebox-cli/runtime-overlays/mdi-native/markdown-database-integration-4cf0a57.zip

Downstream, every homeboy review test data-machine-events run fails with PHPUNIT_ZERO_TESTS_FAILED (195 test files, 0 executed): on main (https://github.com/Extra-Chill/data-machine/actions/runs/46828923017), on Extra-Chill/data-machine#4216, and locally.

Evidence

tar -tzf wp-codebox-cli-linux-x64.tar.gz | grep runtime-overlays on v0.34.5 returns nothing.

Root cause

In scripts/package-release-artifact.ts, materializePinnedPhpWasmOverlay() copies the php-wasm overlays into node_modules/@php-wasm/node-8-x, then runs rm(join(root, "runtime-overlays")). That deletes the whole directory, including runtime-overlays/mdi-native/. But packages/cli/src/recipe-sources.ts resolves BUNDLED_MDI_NATIVE_ARCHIVE to ../../../runtime-overlays/mdi-native/markdown-database-integration-<rev>.zip, relative to packages/cli/dist.

Target state

  • The release artifact keeps runtime-overlays/mdi-native/ (the zip plus provenance.json). Only the php-wasm overlay sources that were moved into node_modules get removed.
  • A packaging assertion (in the packaging script or a test) fails the release build if the archive that BUNDLED_MDI_NATIVE_ARCHIVE points to is missing from the packaged tree. The same check would also catch drift between the pinned revision and the archive file.
  • Optional: one source of truth for the pinned MDI revision. recipe-sources.ts and runtime-core/src/recipe-builders.ts both hard-code it today, and provenance.json already records it.

Secondary: stale local build

On the shared host, /usr/bin/wp-codebox → /var/lib/datamachine/workspace/wp-codebox/packages/cli/dist/index.js still has the 49ec937 path compiled in, while the source and checked-in zip are 4cf0a57. Rebuilding the checkout fixes that host. This issue is about the release artifact.

Lenguaje dominante
TypeScript
Estrellas
19
Forks
4
Merge medio
35 min
PR fusionados (30 d)
11

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Automattic/wp-codebox

Todos los issues de Automattic/wp-codebox

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.