Skip to content

Preserve Alpine bindings without the coverage runtime - #8

Merged
VitaliyBoyko merged 2 commits into
mainfrom
fix/alpine-bindings-without-collector
Nov 24, 2026
Merged

VitaliyBoyko merged 2 commits into
mainfrom
fix/alpine-bindings-without-collector

Conversation

@VitaliyBoyko

Copy link
Copy Markdown
Collaborator

What changed

Instrumented Alpine property paths now retain their original expressions in the served template. The shared Cypress and Playwright runtime adds each counter before Alpine reads the marked binding. PHP-generated listeners, loop collections and radio model grouping retain their original behavior and source attribution.

The regression opens the same strict-CSP fixture with plain and instrumented templates in a stock Playwright context. On main, the instrumented component never finished initialization. The fix passes initialization, model writes, clicks, loops and dynamic insertion. The measured browser tests also verify binding hits, including both radio models.

Validation

  • npm ci, npm test (55 passed), npm run test:types, npm run test:playwright (15 passed), and npm pack --dry-run.
  • npm run test:browser with the Mage-OS assets and Cypress 16.3.0 (19 passed). Both browser suites used Chrome for Testing 158.0.8127.36 and PHP 8.4.28.
  • Installed the locally packed artifact on the disposable Mage-OS 4.0.0 / Hyvä CSP 1.5.3 storefront with the original MageLens preparation code. ./bin/runner node --test tests/hyva-csp-pdp.cjs passed headed and headless with zero uncaught errors. The collector preserved 440 covered PDP statements, including 97 Alpine bindings.

This is the upstream replacement for the temporary patch in MageLens #104. Regenerate instrumented copies after upgrading to the published fix.

@VitaliyBoyko
VitaliyBoyko merged commit 6e2ceab into main Nov 24, 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.

1 participant