Skip to content

editor-validate-blocks: support batch validation (one browser session for many posts) — per-site browser launch is too slow at corpus scale #1628

Description

@chubes4

Problem

wordpress.editor-validate-blocks (#1593) launches a browser + loads the editor per invocation. Running it across a fixture-matrix lane (e.g. 30 sites) calls it once per site → each a fresh browser/editor boot. A 30-site lane run timed out before completing a single batch (browser-per-site overhead dominates). So real validateBlock editor-validity can't currently be measured at corpus scale.

Ask

Make editor-validation batch-capable: accept multiple posts/contents in a single invocation and validate them all in one browser/editor session (boot the editor once, loop the contents through wp.blocks.parse + validateBlock, return an array of per-item results). The downstream matrix would then call it once per batch instead of once per site, amortizing the browser boot.

Schema: input a list of {id, content} (or post IDs); output [{id, total_blocks, valid_blocks, invalid_blocks, results:[…]}] — same per-item shape as the single-post command, just batched.

Impact

Unblocks at-scale editor-validity verification (the definitive "are imported blocks editor-valid across the corpus" signal), which is currently impractical due to per-site boot cost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions