Problem
Static_Site_Importer_Client_Script_Policy::apply() drops local JavaScript files from inert imports but filters script markup only through each HTML file's content field. Product and fixture-matrix artifacts encode every file through content_base64, so the policy writes an empty content value while leaving the original base64 HTML intact. Blocks Engine then receives HTML that still references the removed script asset and correctly rejects the site plan with unresolved_local_url.
Canonical fixture 10-nonprofit reproduces this with website/index.html -> js/main.js. Directly compiling the unchanged three-file artifact succeeds; applying SSI's default inert script policy first drops website/js/main.js while preserving the script declaration in website/index.html. This blocked the combined proof for Automattic/blocks-engine#688 and Automattic/blocks-engine#822.
Acceptance
- Inert script filtering handles HTML represented by either
content or content_base64.
- Base64 HTML remains base64-represented after filtering and contains no executable script declarations.
- Local script assets are removed without leaving unresolved local references.
- Isolated-preview preservation remains byte-stable for base64 artifacts.
- Policy reports hash the actual file bytes for both representations.
- Contract coverage reproduces the product/matrix base64 artifact shape.
Reproduction
- Build a website artifact with base64-only
website/index.html containing <script src="js/main.js"></script> and base64-only website/js/main.js.
- Call
Static_Site_Importer_Client_Script_Policy::apply( $artifact, array() ).
- Observe that the JS file is removed but decoded
content_base64 for the HTML still contains the script declaration.
AI assistance
OpenAI gpt-5.6-sol via OpenCode traced the canonical matrix failure through WP Codebox diagnostics, reproduced the artifact directly, and isolated the base64 policy mismatch. Chris Huber directed the investigation and remains responsible for the issue and resulting change.
Problem
Static_Site_Importer_Client_Script_Policy::apply()drops local JavaScript files from inert imports but filters script markup only through each HTML file'scontentfield. Product and fixture-matrix artifacts encode every file throughcontent_base64, so the policy writes an emptycontentvalue while leaving the original base64 HTML intact. Blocks Engine then receives HTML that still references the removed script asset and correctly rejects the site plan withunresolved_local_url.Canonical fixture
10-nonprofitreproduces this withwebsite/index.html->js/main.js. Directly compiling the unchanged three-file artifact succeeds; applying SSI's default inert script policy first dropswebsite/js/main.jswhile preserving the script declaration inwebsite/index.html. This blocked the combined proof for Automattic/blocks-engine#688 and Automattic/blocks-engine#822.Acceptance
contentorcontent_base64.Reproduction
website/index.htmlcontaining<script src="js/main.js"></script>and base64-onlywebsite/js/main.js.Static_Site_Importer_Client_Script_Policy::apply( $artifact, array() ).content_base64for the HTML still contains the script declaration.AI assistance
OpenAI gpt-5.6-sol via OpenCode traced the canonical matrix failure through WP Codebox diagnostics, reproduced the artifact directly, and isolated the base64 policy mismatch. Chris Huber directed the investigation and remains responsible for the issue and resulting change.