diff --git a/apps/benchmarks/scripts/capture-slug-role-scenes.mts b/apps/benchmarks/scripts/capture-slug-role-scenes.mts index f619fc44..d83e2f64 100644 --- a/apps/benchmarks/scripts/capture-slug-role-scenes.mts +++ b/apps/benchmarks/scripts/capture-slug-role-scenes.mts @@ -6,7 +6,7 @@ import { SLUG_AFFINE_ROLE_SCENE, SLUG_PROJECTION_ZOOM_SCENE, SLUG_ROLE_SCENES, -} from '../src/renderer/slug-role-scenes.ts'; +} from '../src/benchmark/targets/conformance/raster/slug-role-scenes.ts'; const executable = fileURLToPath(new URL('../node_modules/.bin/vitexec', import.meta.url)); const cwd = fileURLToPath(new URL('..', import.meta.url)); diff --git a/apps/benchmarks/src/benchmark/target-boundary.test.ts b/apps/benchmarks/src/benchmark/target-boundary.test.ts index baa2366f..2166fc6e 100644 --- a/apps/benchmarks/src/benchmark/target-boundary.test.ts +++ b/apps/benchmarks/src/benchmark/target-boundary.test.ts @@ -103,6 +103,7 @@ describe('benchmark target boundaries', () => { slugCaptureProbes.every((probe) => probe.includes('/benchmark/targets/conformance/raster/slug-capture.ts')), ).toBe(true); expect(slugCaptureProbes.every((probe) => !probe.includes('/renderer/slug-text.ts'))).toBe(true); + expect(slugCaptureProbes.every((probe) => !probe.includes('/renderer/slug-role-scenes.ts'))).toBe(true); const { createAdvancedShapingConformanceTarget } = await import('./targets/conformance/advanced-shaping'); expect(createAdvancedShapingConformanceTarget().id).toBe('advanced-shaping-conformance'); expect(await loadRegisteredTarget('missing')).toBeUndefined(); diff --git a/apps/benchmarks/src/benchmark/targets/conformance/raster/slug-capture.ts b/apps/benchmarks/src/benchmark/targets/conformance/raster/slug-capture.ts index cff2e613..ea2bae68 100644 --- a/apps/benchmarks/src/benchmark/targets/conformance/raster/slug-capture.ts +++ b/apps/benchmarks/src/benchmark/targets/conformance/raster/slug-capture.ts @@ -17,7 +17,7 @@ import type { SlugAffineRoleSceneDefinition, SlugProjectionZoomSceneDefinition, SlugRoleSceneDefinition, -} from '../../../../renderer/slug-role-scenes'; +} from './slug-role-scenes'; import { createConfiguredRenderer, disposeConfiguredRenderer, diff --git a/apps/benchmarks/src/renderer/slug-role-scenes.ts b/apps/benchmarks/src/benchmark/targets/conformance/raster/slug-role-scenes.ts similarity index 98% rename from apps/benchmarks/src/renderer/slug-role-scenes.ts rename to apps/benchmarks/src/benchmark/targets/conformance/raster/slug-role-scenes.ts index aa96429e..751ef750 100644 --- a/apps/benchmarks/src/renderer/slug-role-scenes.ts +++ b/apps/benchmarks/src/benchmark/targets/conformance/raster/slug-role-scenes.ts @@ -1,4 +1,4 @@ -import type { BenchmarkFontFixture } from '../benchmark/font-fixtures'; +import type { BenchmarkFontFixture } from '../../../font-fixtures'; export type SlugRoleSceneKind = 'large-size' | 'extreme-zoom' | 'complex-outline' | 'clipping'; diff --git a/apps/benchmarks/vitexec/slug-role-scenes.probe.ts b/apps/benchmarks/vitexec/slug-role-scenes.probe.ts index 7ac0acc0..d7104729 100644 --- a/apps/benchmarks/vitexec/slug-role-scenes.probe.ts +++ b/apps/benchmarks/vitexec/slug-role-scenes.probe.ts @@ -1,7 +1,7 @@ export {}; const slugCapturePath = '/src/benchmark/targets/conformance/raster/slug-capture.ts'; -const scenesPath = '/src/renderer/slug-role-scenes.ts'; +const scenesPath = '/src/benchmark/targets/conformance/raster/slug-role-scenes.ts'; const environmentPath = '/src/benchmark/environment.ts'; const [slugCapture, sceneDefinitions, { environmentResource }] = await Promise.all([ import(/* @vite-ignore */ slugCapturePath), diff --git a/docs/log.md b/docs/log.md index 3fb9c0d7..64926cb3 100644 --- a/docs/log.md +++ b/docs/log.md @@ -2,6 +2,7 @@ ## 2026-08-03 +- **Slug conformance scene locality** — Moved the Slug release-role scene definitions from the reusable renderer directory beside the conformance capture that owns and executes them. The capture script and URL-loaded browser probe now resolve the target-owned module directly, and the benchmark boundary regression rejects the obsolete renderer path. - **Bitmap conformance target ownership** — Moved the remaining finite Bitmap and source-outline wrappers from the live renderer into `benchmark/targets/conformance/raster/bitmap-capture`, retaining the renderer-neutral finite scene and exact atlas reference under `benchmark/low-level/raster`. Conformance targets, runtime fallback, and the React finite surface now import only the target wrapper; boundary tests reject every old renderer capture path. The complete 314-test benchmark gate and production build passed, and all 19 isolated browser scenarios—including exact Bitmap product and source-outline captures—remained deterministic. - **Target-owned raster conformance captures** — Moved finite MTSDF and Slug resource creation, standard/source-outline capture, CPU comparison, borrowed-renderer state restoration, and disposal from live renderer modules into `benchmark/targets/conformance/raster`. Both techniques now implement the same warm session contract directly; Slug's external-resource, large/extreme/complex/clipped, affine, and projection-zoom proofs moved with the shared finite resource graph. Conformance surfaces, runtime fallback, and URL-loaded probes import the target modules directly. The complete 314-test benchmark gate and production build passed, all 19 isolated browser scenarios remained deterministic, retained comparison capture/navigation recovery passed on WebGPU and forced WebGL2, and both complete Slug role and external-resource probes passed on both backends. - **Finite product target ownership** — Moved the Bitmap, MTSDF, and Slug finite public-`Text` product lifecycles from renderer implementation files into lazy `benchmark/targets/product` modules. Extracted Bitmap line construction, the reusable finite Bitmap scene, exact CPU-reference capture, and renderer-neutral RGBA8 readback into explicit renderer/low-level modules; conformance surfaces consume the neutral capture contract without importing an executable product target. The complete 314-test benchmark gate and production build passed, all 19 isolated headless scenarios remained deterministic, the external raster and retained comparison probes recovered on WebGPU and forced WebGL2, all 42 sequential Presentation cells rendered with one renderer, both timed demos returned to Off-axis / 3D at 60.02 FPS, and React Doctor reported 100/100 with no issues. diff --git a/docs/packages/benchmarks.md b/docs/packages/benchmarks.md index 086a428d..7d26d9db 100644 --- a/docs/packages/benchmarks.md +++ b/docs/packages/benchmarks.md @@ -5,7 +5,7 @@ description: Provides the shared interactive and automated benchmark product sur resource: ../../apps/benchmarks workspace_package: '@pmndrs/text-benchmarks' documentation_type: reference -source_digest: 'sha256:b2e15cd5e8b2f8996b1fe6b4b8cc6ea4c09cd2b47c574cf63f57fbc855ae22df' +source_digest: 'sha256:c1177178e6fa116cb0c21977e8dad330a1800d247beab18ae479897a26ddf2e9' tags: [package, benchmarks, react, vite, product-e2e] sources: - id: manifest @@ -39,7 +39,7 @@ sources: resource: ../../apps/benchmarks/src/workloads/font-assets/runtime.ts title: Public FontLoader runtime source-font path - id: slug-role-scenes - resource: ../../apps/benchmarks/src/renderer/slug-role-scenes.ts + resource: ../../apps/benchmarks/src/benchmark/targets/conformance/raster/slug-role-scenes.ts title: Slug release-role scene definitions - id: slug-role-scene-evidence resource: ../../apps/benchmarks/fixtures/results/slug-role-scenes-chromium149.json