push-md: e2e suite only exercises the unscoped source, not the built (scoped) zip
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- bash, docker, git, github-actions, php
- Lĩnh vực
- build-system, ci-cd, testing
Hướng nghiên cứu
Bắt đầu với bin/build-plugins.sh, bin/run-push-md-playground.sh, bin/inspect-push-md-zip.sh và workflow push-md-e2e.yml hiện có để theo dõi cách flow hiện tại với source được mount được build và chạy. Thêm một đường dẫn Playground mới để cài đặt dist/plugins/push-md.zip, sau đó chạy flow clone, chỉnh sửa Markdown, commit và push hiện có. Hoàn tất khi artifact trong phạm vi được load đúng chức năng, push thành công mà không có lỗi fatal hoặc bad line length character, và đường dẫn artifact chạy trong CI.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- PHP
- Star
- 22
- Fork
- 5
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Automattic/php-toolkit
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Automattic/php-toolkit#89 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Automattic/php-toolkit#102 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
Automattic/php-toolkit#95 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Automattic/php-toolkit#91 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Automattic/php-toolkit#88 ·
Tất cả issue của Automattic/php-toolkit
Issue tương tự
-
Update the one-click "GTM4WP" Delay JS exclusion so that it also works with a custom data layer nameĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Remove Kanboard Discourse forum link from README.md and CONTRIBUTING.md, or moderate itĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
bug Localization
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
solana-foundation/pay-kit#341 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
cline/cline#14560 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày