Skip to content

test(pino): reproduce onError worker clone failure - #487

Open
islameldigwi wants to merge 2 commits into
mainfrom
codex/test-pino-onerror-worker-clone
Open

test(pino): reproduce onError worker clone failure#487
islameldigwi wants to merge 2 commits into
mainfrom
codex/test-pino-onerror-worker-clone

Conversation

@islameldigwi

Copy link
Copy Markdown
Collaborator

What changed

  • Add a focused Pino worker-transport regression test that passes an Axiom onError callback.
  • Add Pino as a development dependency of @axiomhq/pino so the public worker transport path can be exercised.

Why

Pino serializes worker transport options before loading the transport. Function-valued options are not structured-cloneable, so supplying the supported onError callback currently throws a DataCloneError before the Axiom transport starts.

This draft captures the behavior in a minimal test so a follow-up implementation can make the worker path safe without losing error handling.

Impact

There is no production behavior change in this PR. The new regression test intentionally fails until the transport handles the callback across the worker boundary.

Validation

  • pnpm --filter @axiomhq/pino typecheck — passes
  • pnpm --filter @axiomhq/pino exec vitest run test/unit/worker-transport.spec.ts — intentionally fails with DataCloneError: () => void 0 could not be cloned.

@islameldigwi
islameldigwi marked this pull request as ready for review July 31, 2026 11:08
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