Skip to content

Authoring: adapt source styles to native WordPress markup in core - #67

Merged
noeltock merged 10 commits into
mainfrom
foundry/63-authoring-adapt-source-styles-to-native-wordpress-markup-in-core
Sep 7, 2026
Merged

Authoring: adapt source styles to native WordPress markup in core#67
noeltock merged 10 commits into
mainfrom
foundry/63-authoring-adapt-source-styles-to-native-wordpress-markup-in-core

Conversation

@noeltock

@noeltock noeltock commented Sep 7, 2026

Copy link
Copy Markdown
Member

Problem

Source links, images and grids do not have the same markup as their native WordPress equivalents. Copying classes alone can apply padding and hover effects twice, lose image sizing, or let native layout rules override the source. Closes #63.

Solution

The existing authoring pipeline now emits bounded native adapters from source bindings and exact supplied declarations. Original declaration ownership remains separate from generated selectors and resets; unsupported relationships return source-located diagnostics.

Behaviour Implementation Proof
Button styles reach the inner link; wrapper effects are neutralised src/author/plan.ts, src/authoring/generate.ts Hero, split-feature and cards tests; live hover/focus checks
Image, caption and responsive grid relationships survive native wrapping Existing selector transport and structured rule emitter Editor/frontend image sizing and one/two-column matrix
Invalid or altered adapter provenance is rejected Canonical plan validation Unmatched selector, missing marker and tamper regressions
Save/reopen proves the actual edited field scripts/proof-playwright.mjs Wrong-block regression and exact content/tree hash equality

18 files changed, 1,412 insertions and 42 deletions.

source + proposal → source bindings → native adapters → canonical compiler
                                                    → WordPress proof

Verification

Candidate: 3adf250c194a93b19b7f90d5d06cc0f98550bd5b.

  • Full local test suite: 647 passed, 4 skipped. Typecheck and build passed.
  • Final focused checks: 16 tests passed across field persistence and proof setup; typecheck, JavaScript syntax and whitespace checks passed.
  • Targeted WordPress 7.1 proof passed for the editor and published frontend, reusing the generated plugin: exact save/reopen hashes, selected field persistence, wrapper alignment, settled hover movement/colour, keyboard focus, image ratio/sizing, caption and responsive grids.
  • The npm 10 packaging scan encountered lifecycle chatter in JSON output. The existing private-file checker passed with lifecycle execution disabled via npm_config_script_shell=/usr/bin/true node scripts/check-private-refs.mjs; npm run pack:check also passed.
  • Fresh CI on this exact commit passed: Node 20, 22 and 24, packed consumers, and the full WordPress 7.1 integration suite. This targeted runtime proof does not claim full visual/accessibility or manual release acceptance.

Risk

Adapters support the declared native relationships rather than arbitrary CSS. Unsupported mappings remain explicit failures. Repeat proof setup reuses an existing fixture image only after its bytes match exactly.

Authored with Terra medium and Codex.

@noeltock
noeltock changed the base branch from foundry/62-authoring-let-block-runner-own-source-binding-and-bookkeepin to main September 7, 2026 05:29
@noeltock

noeltock commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

Foundry hard stop

This draft preserves the stopped work for owner review; it is not ready to merge.

What was attempted

Failure

Foundry could not safely classify the verification failure; its original evidence was retained.

Diff

Line totals unavailable; file layout reflects the recorded change inventory.

Change inventory unavailable; inspect the PR diff.

Testing & verification

  • CI: awaiting bounded terminal verification.

Owner question

Can the mixed or unrecognised verification output be inspected before any code repair is attempted?

Assumptions

  • None recorded.

@noeltock

noeltock commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

Foundry hard stop

This draft preserves the stopped work for owner review; it is not ready to merge.

⚠️ Unsafe Warden concern

What was attempted

Failure

Local verification changed the Warden-reviewed tree or its base commit.

Diff

Line totals unavailable; file layout reflects the recorded change inventory.

 File changes (line counts, not file creation/deletion)
  "src/proof/runner.ts" # recorded status: M
  "test/proof-control-setup.test.ts" # recorded status: M

Testing & verification

  • CI: awaiting bounded terminal verification.

Owner question

Can the changed tree be reviewed again before this issue is committed?

Assumptions

  • None recorded.

@noeltock
noeltock marked this pull request as ready for review September 7, 2026 11:17
@noeltock
noeltock merged commit 60f5afd into main Sep 7, 2026
5 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.

Authoring: adapt source styles to native WordPress markup in core

1 participant