Measure Sai web layout probe

This commit is contained in:
Meta Vens 2026-07-09 12:27:28 +01:00
commit e81c81bd3e
7 changed files with 44 additions and 16 deletions

View file

@ -287,13 +287,17 @@ Exit criteria:
Recently cut:
- The web reference now has a schema-backed layout probe for the
`embedded-surface` fixture. `scripts/run-web-reference-layout-probe-smoke.ps1`
builds the browser lowerer, runs Chrome headless through
`embedded-surface` and `sai-vn` fixtures.
`scripts/run-web-reference-layout-probe-smoke.ps1` builds the browser lowerer,
runs Chrome headless through
`tools/web-reference/run-layout-probe.mjs`, writes
`gamecult.eve.web_layout_probe.v1` evidence under
`artifacts/web-reference-layout-probe/latest/embedded-surface.json`, and
parity consumes that artifact so `web:embedded-surface:bounding-boxes` is
measured runtime evidence instead of `pending-runtime-probe`.
`artifacts/web-reference-layout-probe/latest/`, and parity consumes those
artifacts so `web:embedded-surface:bounding-boxes` and
`web:sai-vn:bounding-boxes` are measured runtime evidence instead of
`pending-runtime-probe`. This proves the browser oracle can measure both core
embedded slots and Sai's nested Norn/TeX plugin composition without taking
custody of plugin semantics.
- The conformance export now carries `screenshotComparisonMetrics[]` records.
Runtime owners get structure, color-token, bounding-box, and text-presence
metrics per runtime/fixture pair without relying on byte-identical screenshots

View file

@ -434,13 +434,14 @@ box records name whether authored layout boxes exist or whether a runtime still
owes a capture/layout probe. A missing Unity, Electron, TUI, or Direct2D capture
body therefore appears as `pending-capture`, not as fake visual parity.
The web reference has the first measured bounding-box probe. The harness runs
The web reference has the first measured bounding-box probes. The harness runs
`scripts/run-web-reference-layout-probe-smoke.ps1`, which builds the browser
lowerer and uses Chrome headless to write
`artifacts/web-reference-layout-probe/latest/embedded-surface.json` as
`gamecult.eve.web_layout_probe.v1`. Parity consumes that artifact and marks
`web:embedded-surface:bounding-boxes` as `pass` with
`evidenceLayer: runtime-layout-probe`.
`artifacts/web-reference-layout-probe/latest/embedded-surface.json` and
`artifacts/web-reference-layout-probe/latest/sai-vn.json` as
`gamecult.eve.web_layout_probe.v1`. Parity consumes those artifacts and marks
`web:embedded-surface:bounding-boxes` and `web:sai-vn:bounding-boxes` as `pass`
with `evidenceLayer: runtime-layout-probe`.
The fixture matrix also includes `embedded-surface`, which proves that nested
CultMesh document slots survive the shared surface contract. The web reference,
@ -509,8 +510,8 @@ Pending runtimes are allowed. Silent fake parity is not.
## Next Cuts
1. Extend runtime-owned image/layout probes beyond web `embedded-surface`,
starting with Sai VN in web and the Unity/Electron/TUI capture blockers.
1. Extend runtime-owned image/layout probes to the Unity/Electron/TUI capture
blockers.
2. Normalize text scale and font loading across web, Flutter Android, Flutter
desktop, and iOS.
3. Give iOS a real `vn.stage` scene compositor instead of compact stacked

View file

@ -67,6 +67,9 @@ try {
--expect-screenshot-metric web:embedded-surface:color-tokens:pass `
--expect-screenshot-metric web:embedded-surface:text-presence:pass `
--expect-screenshot-metric web:embedded-surface:bounding-boxes:pass `
--expect-screenshot-metric web:sai-vn:structure:pass `
--expect-screenshot-metric web:sai-vn:color-tokens:pass `
--expect-screenshot-metric web:sai-vn:bounding-boxes:pass `
--expect-screenshot-metric electron-shell:aetheria-world:bounding-boxes:pending-capture `
--expect-capability-gap "split-target:EveUnity:EveUnity:proof:Tagged UPM release" `
--expect-conformance-handoff

View file

@ -14,6 +14,12 @@ $env:EVE_PARITY_OUTPUT = if ([System.IO.Path]::IsPathRooted($OutputDirectory)) {
Push-Location $projectRoot
try {
& (Join-Path $PSScriptRoot "run-web-reference-layout-probe-smoke.ps1")
& (Join-Path $PSScriptRoot "run-web-reference-layout-probe-smoke.ps1") `
-ProviderId "gamecult.home.vn" `
-FixtureId "sai-vn" `
-OutputPath "artifacts\web-reference-layout-probe\latest\sai-vn.json" `
-Port 8893 `
-SkipBuild
node .\tools\parity\run-parity.mjs
& (Join-Path $PSScriptRoot "run-eveconformance-handoff-smoke.ps1")
& (Join-Path $PSScriptRoot "run-plugin-handoff-smoke.ps1")

View file

@ -128,6 +128,9 @@ node $consumerScript $consumerExport `
--expect-screenshot-metric web:embedded-surface:color-tokens:pass `
--expect-screenshot-metric web:embedded-surface:text-presence:pass `
--expect-screenshot-metric web:embedded-surface:bounding-boxes:pass `
--expect-screenshot-metric web:sai-vn:structure:pass `
--expect-screenshot-metric web:sai-vn:color-tokens:pass `
--expect-screenshot-metric web:sai-vn:bounding-boxes:pass `
--expect-screenshot-metric unity-scene:aetheria-world:bounding-boxes:pending-capture `
--expect-screenshot-metric electron-shell:aetheria-world:bounding-boxes:pending-capture `
--expect-screenshot-metric tui:aetheria-world:bounding-boxes:pending-capture `

View file

@ -4,7 +4,8 @@ param(
[string] $OutputPath = "artifacts\web-reference-layout-probe\latest\embedded-surface.json",
[int] $Port = 8892,
[int] $Width = 1280,
[int] $Height = 720
[int] $Height = 720,
[switch] $SkipBuild
)
$ErrorActionPreference = "Stop"
@ -18,9 +19,11 @@ $absoluteOutputPath = if ([System.IO.Path]::IsPathRooted($OutputPath)) {
Push-Location $projectRoot
try {
npm --prefix packages/eve-browser-lowering run build | Out-Host
if ($LASTEXITCODE -ne 0) {
throw "Eve browser lowering build failed with exit code $LASTEXITCODE"
if (-not $SkipBuild) {
npm --prefix packages/eve-browser-lowering run build | Out-Host
if ($LASTEXITCODE -ne 0) {
throw "Eve browser lowering build failed with exit code $LASTEXITCODE"
}
}
node .\tools\web-reference\run-layout-probe.mjs `

View file

@ -1122,6 +1122,14 @@
"schema": "gamecult.eve.web_layout_probe.v1",
"path": "artifacts/web-reference-layout-probe/latest/embedded-surface.json",
"runner": "scripts/run-web-reference-layout-probe-smoke.ps1"
},
{
"fixtureId": "sai-vn",
"providerId": "gamecult.home.vn",
"surfaceId": "sai.visual_novel.surface",
"schema": "gamecult.eve.web_layout_probe.v1",
"path": "artifacts/web-reference-layout-probe/latest/sai-vn.json",
"runner": "scripts/run-web-reference-layout-probe-smoke.ps1"
}
]
}