Skip to content

fix(core): fail closed when paint workers fail - #44

Merged
chh-ay merged 1 commit into
0.4.0from
fix/worker-renderer-fail-closed
Jul 26, 2026
Merged

fix(core): fail closed when paint workers fail#44
chh-ay merged 1 commit into
0.4.0from
fix/worker-renderer-fail-closed

Conversation

@chh-ay

@chh-ay chh-ay commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • make paint workers report ready or fatal, including fatal context loss
  • bound worker initialization with a 10-second readiness timeout and route every failure through the existing guarded canvas fallback
  • preserve renderer-owned transfer buffers from the cached-view ownership fix and cover healthy, fatal, timeout, duplicate, and destroy-before-ready lifecycles

Public API note

The worker readiness handshake requires adding ready and fatal to the existing exported WorkerAcknowledgement union. That is an additive published API change, so keeping the API baseline byte-identical was impossible. This PR regenerates the public API baseline and generated worker docs. GridEvents["renderer-fallback"], grid.ts, and paint request payloads are unchanged.

Evidence

Pre-fix reproduction: bun test packages/core/test/worker-fallback.test.ts produced 4 pass / 2 fail. Both new cases remained on rendererKind() === "worker" instead of falling back to "canvas" when getContext("2d") returned null or no readiness message arrived.

Post-fix:

  • bun test packages/core/test/worker-fallback.test.ts packages/core/test/worker-renderer.test.ts: 18 pass / 0 fail
  • bun test packages/core/test: 760 pass / 0 fail
  • bun run typecheck: pass
  • bun run api:check: pass after the required additive acknowledgement baseline/docs update
  • bun run lint: pass (existing oversized-corpus warning only)
  • bun scripts/check-import-cycles.ts: 88 modules acyclic
  • bun run changeset:ci: patch changeset accepted
  • root bun test: 1274 pass / the same 7 known baseline failures
  • browser suite: 172 pass across Chromium and Firefox; 14 WebKit launch failures because this workstation lacks libicu74/libxml2/libflite1 and interactive sudo is unavailable. Required CI remains the WebKit gate.

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sheetwrite Ready Ready Preview, Comment Jul 26, 2026 5:59pm

@chh-ay chh-ay mentioned this pull request Jul 26, 2026
36 tasks
@chh-ay
chh-ay merged commit 8457eca into 0.4.0 Jul 26, 2026
11 checks passed
@chh-ay
chh-ay deleted the fix/worker-renderer-fail-closed branch July 26, 2026 18:07
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