Template members: compile cluster members as posts on their representative's template
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
Start by reading the artifact normalization limits, compiler entry points, source provenance mapping, and compiled site report code; inspect the existing fixtures and tests for page compilation. Then trace how post content, entity fields, and per-page styles are produced for a full compile. Done means derived members match full compilation byte-for-byte, header changes escalate with a diagnostic, existing fixtures stay unchanged, and the required real capture comparison is documented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Part of Automattic/static-site-importer#2742.
Problem
A whole-site capture of a 2,202-route Blogger site produced 2,074 pages: 1,928 of them are verified members of one template cluster (DLA template-clusters.json, cluster t2, all six derivation checks equal). Blocks Engine treats every page as a separate site document. The artifact counts each page plus about 3 inline style/script expansions per page against ArtifactNormalizer::MAX_FILES (5000), and compiles each page in full, including its header, sidebar and footer, which compose later factors out again. The site cannot import.
On this source, members differ from the representative only in:
- the post entry (
.post-outer: title, date, labels, and a body that carries its own<style>); - the older/newer pager.
Header, sidebar and footer are identical. In WordPress terms the members are posts on the representative's single template, not new templates.
Desired behavior
- Contract. An artifact may declare template members:
template_members: [{ path, representative, payload_reference }]. Members are bounded by their own limits (count and bytes), notmax_files, because they are content instances rather than site documents. - Compile. The representative compiles in full, as today. For each member, the compiler diffs the member document against the representative's source document and maps every changed node to its block through source provenance (
_source_provenance_id).- If every change lies inside the representative's post-content region, or in blocks that are dynamic per post (
core/post-title,post-date,post-terms,post-navigation-link), the member becomes apostentity:- its
post_contentis converted from its own content region, reusing the representative's session (resolved stylesheets and analysis); - its fields (title, date, terms) come from the matching regions;
- its member-local styles go into the per-page stylesheet output, as for a fully compiled page.
- its
- Otherwise the member escalates to a full compile and counts against
max_fileslike any page, with a diagnostic naming the region outside the boundary.
- If every change lies inside the representative's post-content region, or in blocks that are dynamic per post (
- Report. The compiled site report lists derived and escalated members with reasons.
Acceptance criteria
- Equality gate. One test using real markup: a representative and two members with different titles, bodies, a body-local
<style>, and pager links. Each member'spost_content, entity fields and page stylesheet output are byte-equal to compiling that member as an ordinary page. A third member, differing in the header, escalates. - The compiled output of existing fixtures is unchanged.
composer testpasses.- The PR shows, for a sample of members from a real multi-page capture, the same equality against a full compile, plus the compile time per derived member against a full page.
Related: #4939 (shared shells), #2089 (staged compilation at scale).
AI disclosure: designed and written by Claude (Anthropic), acting as the orchestrating coding agent in the Data Liberation loop, from a whole-site import of a real Blogger source.
- Ngôn ngữ chính
- PHP
- Star
- 25
- Fork
- 3
- Merge trung bình
- 2 giờ 24 phút
- Pull request đã merge (30 ngày)
- 933
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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/blocks-engine
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Automattic/blocks-engine#5444 ·
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 70/100
Automattic/blocks-engine#4943 ·
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 70/100
Automattic/blocks-engine#4942 ·
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 75/100
Automattic/blocks-engine#4921 ·
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 82/100
Automattic/blocks-engine#775 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Automattic/blocks-engine
Issue tương tự
-
sync-en
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
repo:cms
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
craftcms/cms#20596 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Type] Bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Automattic/static-site-importer#2869 ·
Maintainer thường phản hồi trong vòng 1 ngày