Flag HTML block misuse during validation#3267
Merged
youknowriad merged 3 commits intotrunkfrom Apr 28, 2026
Merged
Conversation
Collaborator
📊 Performance Test ResultsComparing 33fc200 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
Contributor
Author
|
I've tried this on 3 different sites now. The HTML block validation is working properly and the end result doesn't have html blocks in it. The tradeoff is that there's a few more turns when building the site but I think it's an acceptable tradeoff for now given the consistency of the results. |
Contributor
Author
|
I also like the simplicity of this approach. |
Contributor
Contributor
Author
|
I do think this creates more turns but we should try to reduce that number in other ways. Also maybe we should disable that max turns entirely now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds a content-policy pass to block validation so section-sized
core/htmlblocks are reported as invalid and corrected during the agent validation loop.Proposed Changes
validate_blocksso editable layout and text markup insidecore/htmlfails validation with remediation guidance.validate_blockstool description and add unit coverage for allowed and disallowed HTML block uses.Testing Instructions
core/html.<!-- wp:html --><section><h1>Auran</h1><p>Precision furniture.</p></section><!-- /wp:html -->and confirmvalidate_blocksreports a policy issue.Automated Checks
npx eslint --fix apps/cli/ai/block-content-policy.ts apps/cli/ai/block-validator.ts apps/cli/ai/tools.ts apps/cli/ai/tests/block-content-policy.test.tsnpm run typechecknpm test -- apps/cli/ai/tests/block-content-policy.test.tsnpm run cli:buildnode apps/cli/dist/cli/main.mjs --helpPre-merge Checklist