Skip to content

Add real WordPress proof profiles and content-addressed receipts - #15

Draft
noeltock wants to merge 2 commits into
mainfrom
foundry/8-add-real-wordpress-proof-profiles-and-content-addressed-rece
Draft

Add real WordPress proof profiles and content-addressed receipts#15
noeltock wants to merge 2 commits into
mainfrom
foundry/8-add-real-wordpress-proof-profiles-and-content-addressed-rece

Conversation

@noeltock

@noeltock noeltock commented Sep 3, 2026

Copy link
Copy Markdown
Member

Problem

Headless validation and a successful JavaScript build do not prove that a generated plugin activates, registers in both runtimes, mounts in the editor, persists edits, loads styles on the frontend, or supports pattern overrides. One ok: true would hide which claims actually ran. Closes #8.

Solution

The repair makes substantial progress, but both original blocker classes remain incompletely addressed. Detector isolation is not fully asserted, and field editing can still escape the inserted pattern.

⚠️ Verification files modified

  • package.json

  • Assumed in scope: package.json — the implementation requires this verification change despite the path not being named.

Testing & verification

  • Coverage gap — no test file changed; no targeted test was added for this revision: The repair makes substantial progress, but both original blocker classes remain incompletely addressed. Detector isolation is not fully asserted, and field editing can still escape the inserted pattern.
  • Local runnpm run typecheck → pass.
  • Local runnpm run test → pass.
  • Local runnpm run build → pass.
  • Not run — no live/manual verification; this Foundry run has no browser.

Risk / rollout

Small, targeted change — see the diff for the affected paths.

Must-fix blockers from review

  • mutation-tests-do-not-exercise-independent-detectors · The integration suite now uses real WordPress mutations and valid fixture code, but it asserts only the target gate and a hand-picked list of prerequisites. Baseline and mutated runs do not require every unrelated gate to pass, so collateral failures after or alongside the target gate remain undetected and the mutations are not proven isolated.
  • pattern-editing-scope-can-escape · Link and alt-text editing still falls back to a page-global first matching control when no inline descendant is found. The integration fixture uses custom inline controls for link, alt text, and media, so it never exercises these global fallbacks or the stock media path; real inspector- or toolbar-backed controls can therefore still escape the inserted pattern scope.

Built by 🪺 Rookery · flight #40 · 46m48s · 4 passes · gpt-5.6-terra·xhigh

@noeltock

noeltock commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

Independent adjudication of Warden's blockers (Codex gpt-5.6-sol, high)

Requested by Noel: each blocker judged against the diff rather than waiting. Confirmed items below are the revision brief.

mutation-tests-do-not-exercise-detectors

VERDICT: CONFIRMED

test/proof.test.ts tests status evaluation and substitutes a gateRunner that returns synthetic results; it never runs deliberately broken registration, save, stylesheet, or pattern artifacts through the real detectors required by the acceptance criteria. Separately, provePatternOverride() calls editAllFields(page, undefined, ...), whose default RichText path selects page-global [contenteditable="true"] elements, then considers values present anywhere in the post sufficient—so it can edit the previously inserted standalone block and falsely pass the pattern gate.

Minimal fix: add real wp-env integration mutation cases for all four defects and assert each fails its designated independent gate. For patterns, record block IDs before insertion, identify the newly inserted pattern blocks, scope all editing to those blocks, and verify persisted values specifically inside that same pattern subtree after reopening.

runtime-pins-can-remain-unobserved

VERDICT: CONFIRMED

collectObservedRuntimePins() assigns firstLine(stdout) without checking each command’s exitCode or validating formats and requested versions; requiredRuntimeObservationFailures() merely rejects empty or sentinel strings. It also does not require environment.observations, generator.packageLock, or any wordpressPackages entries, and the test itself demonstrates permissive values such as sha256:core and sha256:theme being accepted. Consequently, incidental output or a custom adapter can satisfy the gate without trustworthy observations or the required package hashes.

Minimal fix: require every observation command to exit successfully and parse/validate its expected value, including exact WordPress/PHP pins and valid hashes/image identifiers. Make the environment gate require and reference the content-addressed raw observation evidence, require the lockfile pin, and require the expected @wordpress/* packages with locked versions and integrity hashes; add failing tests for command errors, malformed values, absent evidence, and missing package pins.

OVERALL: REVISE

Both blockers identify real ways the proof receipt could report success without exercising or preserving the evidence it claims. The implementation needs genuine broken-artifact tests, pattern-local editing, and stricter verification of runtime observations before it is safe to promote.

@noeltock

noeltock commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

Round-2 adjudication (Codex gpt-5.6-sol, high, severity-aware)

PROMOTE-WITH-FOLLOW-UPS — both blockers are real hardening work but neither lets an invalid proof pass. Filed as follow-up issues; merge decision stays with Noel.

mutation-tests-do-not-exercise-independent-detectors

VERDICT: DEFER

The concern is valid: each mutation test asserts only the target and selected prerequisites, and the full baseline lacks visual/accessibility configuration, so it cannot establish a fully passing profile or detect every collateral failure. This is a coverage-depth weakness, not a shipped correctness or safety defect—the production evaluator still fails every required non-passing gate closed.

Require mutation tests to prove isolated gate failures
Make each baseline pass every required gate in its selected profile. For each mutation, assert the complete expected gate-status map so only intentionally affected detectors may fail, documenting mutations such as registration that legitimately affect multiple gates.

pattern-editing-scope-can-escape

VERDICT: DEFER

The link and alt-text paths select a block within the inserted pattern but then fall back to page.getByLabel(...).first(), which is page-global; the fixture’s inline controls never exercise that behavior or the stock media modal. However, persistence is checked against the captured pattern subtree, so an escaped edit should produce a failed proof rather than a false pass—making this beta hardening and compatibility work rather than merge-blocking correctness.

Scope stock editor controls to the selected pattern block
Add fixtures covering inspector-, toolbar-, and stock-media-backed controls with competing controls elsewhere in the post. Resolve portal-rendered controls through the selected block’s identity and editor state, and assert that no block outside the captured pattern subtree changes.

OVERALL: PROMOTE-WITH-FOLLOW-UPS

Both findings identify legitimate test and editor-control hardening work, but neither permits an invalid proof to pass: required gates fail closed, and pattern persistence is verified within the inserted subtree. Promote the beta and track both items as precise follow-ups.

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.

Add real WordPress proof profiles and content-addressed receipts

1 participant