ReviewOS

home-lang/home

Port Resvg bbox, crop, render, and external-buffer corpus

#295
Closed chris opened this 10 days ago ·
10 days ago

Track the contiguous Bun corpus blocker at js/third_party/resvg/bbox.test.js (position 4048).

Required parity:

  • load @resvg/resvg-js through the corpus module bridge;
  • parse SVG view boxes and preserve intrinsic width/height;
  • expose getBBox(), cropByBBox(), render(), and asPng() behavior for the copied transformed-path fixture;
  • preserve JavaScript subclass construction and methods;
  • exercise repeated PNG external-buffer creation plus GC without crashes or retained aliases;
  • emit structured causal parse/render diagnostics that identify the operation without embedding SVG source data.
10 days ago

Implemented and pushed in https://github.com/home-lang/home/commit/4ea6295f3.

Coverage now includes:

  • @resvg/resvg-js loading through the corpus module bridge;
  • SVG view-box parsing and intrinsic width/height;
  • the copied transformed heart-path bbox, stroked-use bounds, bbox cropping, width fitting, and rendered dimensions;
  • normal JavaScript subclass construction/method preservation;
  • fresh PNG buffer allocation across repeated render/GC cycles;
  • ResvgError parse/crop/render failures with stable operation-specific codes, retained causes, explicit operation frames, and no SVG source in messages or stacks.

Verification:

  • focused position 4048: 1 file, 3 passed, 0 failed/todo/unsupported/allowed-empty;
  • positions 4047–4048: 2 files, 4 passed, 0 failed/todo/unsupported/allowed-empty;
  • permanent gRPC error-stack, SQL adapter-contract, and 31-case third-party diagnostic suites all pass.

Sign in to comment on this issue.