Automattic / Automattic/blocks-engine

Do not infer posts from bare article landmarks

Open
#908 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
14
Forks
2
Avg merge
2h 10m
Merged PRs (30d)
561

Description

## Problem

WordPress Site Plan post inference treats a bare HTML `` landmark as sufficient publication evidence. Archive and listing pages commonly contain article landmarks while remaining hierarchical pages.

This makes mixed route trees impossible to materialize. For `https://www.puffinpackaging.co.uk/`, browser capture produces `/blog`, `/blog/categories/*`, and `/post/*` routes. Blocks Engine classifies the blog archive and several category archives as posts solely from `html:article`, then rejects the generated hierarchy with:

```text
wordpress_site_plan_not_self_contained: WordPress site plan page hierarchy cannot inherit a post route.
```

The actual `/post/*` documents also carry structured `BlogPosting` JSON-LD and publication timestamps, so removing the bare landmark signal preserves their post classification while allowing archive/listing routes to remain pages.

## Reproduction

1. Capture `https://www.puffinpackaging.co.uk/` as a `blocks-engine/php-transformer/site-artifact/v1` website artifact.
2. Compile it with `ArtifactCompiler` on current trunk.
3. Observe that WordPress Site Plan generation fails before WordPress materialization.

The failing capture contains 58 HTML routes. Its blog archive/category documents contain `` landmarks without publication dates or structured Article/BlogPosting metadata. Its 15 actual post documents contain structured `BlogPosting` evidence with normalized timestamps.

## Acceptance criteria

- A bare `` landmark remains an ordinary page when no publication evidence is present.
- Structured Article/BlogPosting metadata, valid publication timestamps, explicit declarations, and dated routes continue to infer posts.
- Mixed archive/category/post route trees produce a self-contained WordPress Site Plan.
- Contract coverage prevents archive/listing landmarks from regressing into post intent.

## AI assistance

OpenAI GPT-5.6 Sol via OpenCode ran the cross-stack reproduction, isolated the classifier regression, inspected the prior contract work, and drafted this issue. Chris Huber remains responsible for the report.

Contributor guide

Open the contributing guide

Research direction

Start with ArtifactCompiler and the WordPress Site Plan classifier for blocks-engine/php-transformer/site-artifact/v1, then reproduce the failure using the 58-route capture described in the issue. Inspect the existing contract coverage around article landmarks and publication evidence. Done means archive and category routes remain pages, actual posts still infer correctly, and the mixed route tree produces a self-contained WordPress Site Plan.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.