Skip to content

Inconsistency: page validate passes but prebuild fails with invalid content error #338

@perasperaactual

Description

@perasperaactual

Description

`pages/content.yml` contains a grid section with columns.content_items that failed prebuild with:

Error: Invalid content: /home/charles/git/peraspera/www/pages/content.yml
  content.content_items.4: Invalid input

However, `stackwright page validate` reported "All pages are valid" for the same file.

Steps to reproduce:

  1. Create a grid content item with columns where content_items lacks required fields:
    • missing `type` field
    • missing `label` field
    • missing `textBlocks` wrapper for text_block items
  2. Run `stackwright page validate pages/content.yml` → passes
  3. Run `stackwright prebuild` → fails

Expected behavior:
Both commands should use the same validation logic so they produce consistent results.

Actual behavior:

  • `page validate` silently accepts malformed grid column content_items
  • `prebuild` correctly rejects them

Workaround used:
Wrap text in proper text_block structure with type, label, and textBlocks array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcliCLI tooling (@stackwright/cli)toolingDeveloper tools and utilities

    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