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

オープン
#2,611 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php, typescript
領域
build-system, cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
19
フォーク
4
平均マージ
35分
マージ済み PR(30日)
11

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Automattic/wp-codebox のほかの issue

Automattic/wp-codebox の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。