Skip to content

fix(ecs): harden filter rasters and resource caches with regression coverage - #386

Merged
xiaoiver merged 1 commit into
masterfrom
codex/ecs-render-resource-coverage
Oct 9, 2026
Merged

xiaoiver merged 1 commit into
masterfrom
codex/ecs-render-resource-coverage

Conversation

@xiaoiver

@xiaoiver xiaoiver commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Filtered multiline gradient text could disappear because each line clipped the previous line, and a 50% fill could become 25% opaque. Render-cache keys could also change when callers edited sampler descriptors, while failed LUT uploads leaked the newly allocated texture.

This change builds one complete text mask before clipping, applies text opacity once, and stacks CSS gradients with the first layer on top. Filter rasters now use the configured canvas adapter. Resource caches snapshot sampler descriptors, distinguish the volume-texture W address mode, normalize pipeline/layout keys before lookup without modifying caller-owned input, and release LUT textures on upload failure.

Adds 69 behavioral unit tests and a small Chromium pixel regression for native Path2D, conic gradients, and multiline text. Canvas pixel tests use real Cairo; GPU cache tests use allocation/upload doubles to assert resource identity and ownership. New coverage gates protect the three tested modules. The full ECS source collection remains unchanged.

Coverage Before After
ECS lines 63.77% 65.23%
ECS branches 50.57% 51.57%
Filter raster lines 8.55% 91.81%
Render-cache lines 90.32% 100%
Cube-LUT-cache lines 18.33% 100%

Validation:

  • Full ECS suite with coverage: 199 suites / 1205 tests passed, all coverage gates passed, about 8m57s in Node 20 with native canvas/headless-gl and Xvfb. The previous batch's two sorting timeouts passed in this full run.
  • Chromium filter-raster regression passed. Browser checks are separate from Jest coverage.
  • Full repository ESLint, browser TypeScript project, and a targeted TypeScript project for the new unit tests passed.
  • New test/config/changeset formatting and git diff --check passed.

Baseline is merged master 00deb2bf. Coverage numbers are from local full-package reports; Coveralls updates after merge and CI. See docs/ecs-test-coverage.md for scope, counts, gates, reproduction commands, and the next atlas/image/batch lifecycle priorities. Includes patch changesets for ECS and device-api; no package publication.

@xiaoiver
xiaoiver merged commit 8d4ffbb into master Oct 9, 2026
13 of 15 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