docs/solutions/logic-errors/2026-04-04-slate-browser-nested-selection-proofs-must-pass-handle-keys-and-build-the-v2-dist-the-site-actually-runs.md
The mixed-inline browser proof exposed two separate lies in the test layer:
null in the assertion helperThose were not the same bug.
Two fixes made the browser proof honest:
slate-browser/playwright page-eval selection snapshots now pass the
browser-handle key explicitly into the page context, and the helper waits a
beat for handle hydration before falling backbuild:slate-browser:playwright now rebuilds slate-v2 alongside the
other v2 packages, because the site examples consume built package dist filesWithout the first fix, nested-path selection assertions could return null
even while the real page selection was correct.
Without the second, the browser lane could run stale slate-v2 fragment logic
and make clipboard proofs look broken after the core contract was already green.
Playwright page-eval functions do not get free access to module locals.
If a helper depends on a key like __slateBrowserHandle, that key has to be
serialized into the browser function explicitly.
Likewise, if the site runs built package outputs, browser proofs are only as fresh as the dist artifacts they load.
That means browser truth depends on both:
For slate-browser and site-example browser proofs:
If core tests are green but the browser proof still looks red, check for stale dist output before rewriting working logic.