Skip to content

Extract runtime resource element conversion - #1436

Merged
chubes4 merged 1 commit into
trunkfrom
refactor-runtime-resource-elements
Aug 30, 2026
Merged

Extract runtime resource element conversion#1436
chubes4 merged 1 commit into
trunkfrom
refactor-runtime-resource-elements

Conversation

@chubes4

@chubes4 chubes4 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • extract canvas, script, and template routing into one cohesive RuntimeResourceElementConverter
  • move static-script classification, addressable JSON validation/serialization, runtime-island recording, and fallback capture out of HtmlTransformer
  • remove five transformer helper methods and the now-unused latestScriptMetadata() state API
  • reduce HtmlTransformer by 86 net lines (97 removed, 11 wiring/dispatch lines added)

Verification

  • 15 direct runtime-resource assertions covering canvas, static JSON, executable script, template, metadata, islands, and handled-null behavior
  • HTML transformer session-state contract
  • composer validate --strict
  • composer test
  • 292 PHP transformer parity fixtures
  • exact-base CSS-attached corpus: 383 documents, 87 fixtures, 82 with CSS, 0 throws
  • base/candidate SHA-256: 6f0fd03d6eaa5b9683919e19a0a44eb652f7517373b91c4de3880ac9055ab04f

Part of #242.

AI assistance

OpenAI GPT-5.6-sol via OpenCode was used to map the runtime-resource subsystem, implement the cohesive extraction, remove obsolete state, add direct tests, and run verification. The changes and evidence were reviewed and orchestrated by Chris Huber.

@chubes4
chubes4 merged commit cc5cf24 into trunk Aug 30, 2026
10 checks passed
@chubes4
chubes4 deleted the refactor-runtime-resource-elements branch August 30, 2026 16:29
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.

1 participant