镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Tests: update structuredClone nesting oracle for DOMException #80

Closed

Description

@chrisbbreuer

Introduced by c45232db (feat(dom): add DOMException; structuredClone throws DataCloneError).

Linux CI unit shard 3 now deterministically fails structured clone nesting limit is catchable because the test still requires e instanceof TypeError, while the new and intended platform behavior is a DOMException with name === "DataCloneError".

Failure: https://github.com/zig-utils/zig-js/actions/runs/29338095020/job/87102490265

Acceptance:

  • keep the nesting-limit exception catchable;
  • assert the new public contract (instanceof DOMException, name === "DataCloneError", legacy code === DOMException.DATA_CLONE_ERR);
  • do not weaken the nesting-limit boundary or revert production structuredClone behavior;
  • run the exact focused test and push as a separate conventional test commit.

Activity

  1. chrisbbreuer commented on Jul 14, 2026

    @chrisbbreuer
    MemberAuthor

    Fixed on main in 52f41b38 (test(clone): expect nesting DOMException (#80)). The nesting-limit witness now asserts the intended new platform contract: catchable DOMException, name === "DataCloneError", and code === DOMException.DATA_CLONE_ERR. Exact focused validation passed 2/2 with zero leaks; no production structured-clone behavior changed.

  2. chrisbbreuer commented on Jul 14, 2026

    @chrisbbreuer
    MemberAuthor
  3. chrisbbreuer commented on Jul 14, 2026

    @chrisbbreuer
    MemberAuthor

    Reopened: the current main run exposed a second stale oracle in the broad structuredClone unit test. Linux unit shard 1 still checks that cloning a function throws TypeError, while c45232d correctly changed that failure to a DataCloneError DOMException. I am updating the broad oracle to assert DOMException, name, and legacy code before pushing the focused follow-up.

  4. chrisbbreuer commented on Jul 14, 2026

    @chrisbbreuer
    MemberAuthor

    Follow-up pushed to main as e78ae6c. It updates the remaining broad structuredClone function-rejection oracle to require DOMException, name === DataCloneError, and code === DOMException.DATA_CLONE_ERR. Focused result: 2/2 passed, 0 leaked. New main CI: https://github.com/zig-utils/zig-js/actions/runs/29340551356

  5. chrisbbreuer commented on Jul 14, 2026

    @chrisbbreuer
    MemberAuthor

    Correction to the run link in the previous comment: the CI run for e78ae6c is https://github.com/zig-utils/zig-js/actions/runs/29339154198 (currently queued).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions