Skip to content

fix(plugins): reject mismatched filter results - #469

Merged
DavidBabinec merged 1 commit into
mainfrom
fix/plugin-filter-result-validation
Aug 31, 2026
Merged

fix(plugins): reject mismatched filter results#469
DavidBabinec merged 1 commit into
mainfrom
fix/plugin-filter-result-validation

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

Fixes #394

What changed

  • Reject filter results whose runtime value type differs from the current pipeline value.
  • Keep the previous value, identify the offending plugin in the error log, and continue later filters.
  • Document the runtime filter contract for plugin authors and the publisher.

Why

A plain JavaScript publish.html filter could return null, bypass the static bake, and make the live renderer serve an empty 200 response. Validation belongs in the hook bus so every filter pipeline gets the same fallback and plugin-aware diagnostics.

Verification

  • Before: targeted regression test failed, 10 pass / 1 fail
  • Control without source fix: failed with the same null-good result
  • bun run build (exit 0)
  • bun run lint (exit 0)
  • bun test (exit 0, 6,726 pass / 0 fail)

@DavidBabinec
DavidBabinec marked this pull request as ready for review August 31, 2026 21:09
@DavidBabinec
DavidBabinec merged commit 038c908 into main Aug 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A publish.html filter returning null skips the bake and serves an empty 200 for every page

1 participant