push-md: e2e suite only exercises the unscoped source, not the built (scoped) zip
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 68/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- bash, docker, git, github-actions, php
- 领域
- build-system, ci-cd, testing
调研方向
从 bin/build-plugins.sh、bin/run-push-md-playground.sh、bin/inspect-push-md-zip.sh 以及现有的 push-md-e2e.yml workflow 开始,追踪当前挂载源代码的流程是如何构建和运行的。新增一个 Playground 路径,用于安装 dist/plugins/push-md.zip,然后运行现有的 clone、Markdown 编辑、commit 和 push 流程。当限定范围内的 artifact 被正常加载、push 在没有 fatal 或 bad line length character 错误的情况下成功,并且 artifact 路径在 CI 中运行时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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:
--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:
bash bin/build-plugins.shto producedist/plugins/push-md.zip.- Install that zip on a fresh Playground site (a blueprint step that installs the artifact, rather than mounting source).
- Run the existing import/push flow:
git clone …/wp-json/git/v1/md.git, edit apost/*.md, commit,git push. - Assert success (no
bad line length character: <br, no PHP fatal in the receive-pack response).
Wire this into CI (e.g. push-md-e2e.yml) so every change that touches the scoper, prune list, or bundle layout is validated against the shipped artifact.
Notes
- #69 already adds a cheap static canary in
inspect-push-md-zip.sh(rejects in-class traituseof a scoped name missing a leading backslash). This issue is about the functional gate that a static grep can't cover. - Keep the unscoped-source e2e too (fast inner loop); the scoped-zip run is the release-artifact gate.
Follow-up to #69 / #68.
- 主要语言
- PHP
- 星标
- 22
- 派生
- 5
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Automattic/php-toolkit 的其他 Issue
-
Chore: Bump Docker demo environment PHP file upload size limit to 8MB可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
Automattic/php-toolkit#89 ·
-
Feature: PushMD - Media upload & upsert support for push-only staging workflow可能已有人在做 @niravmehta 于 67 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 35/100
Automattic/php-toolkit#102 ·
-
bug: PushMD - path conflict on duplicate slug for posts in draft可能已有人在做 @niravmehta 于 75 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 76/100
Automattic/php-toolkit#95 ·
-
Feature: Add Classic Editor & Standard HTML Support for Post Import/Export (PushMd)可能已有人在做 @niravmehta 于 79 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 25/100
Automattic/php-toolkit#91 ·
-
Feature: Add support for .gitignore parsing and system file whitelisting可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
Automattic/php-toolkit#88 ·
查看 Automattic/php-toolkit 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
humanmade/publication-checklist#73 · 1 条评论 ·
-
Do not throw `WordPress.Security.EscapeOutput.OutputNotEscaped` on `apply_shortcodes()`可能已有人在做 @tbradsha 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 62/100
landsman/adminer-desktop#120 ·
维护者通常 1 天内回复