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

Implement Home ScriptExecutionContext registry teardown boundary #401

Closed

Description

@chrisbbreuer

Parent: #140
Roadmap: #134

Implement the Home-only Bun__ScriptExecutionContext__removeFromContextsMapByIdentifier boundary as a real, thread-safe execution-context registry lifecycle—not a link-only stub.

Scope

  • Pin the exact Home teardown bridge and upstream ScriptExecutionContext registry contract.
  • Register stable process-wide identifiers with a resolvable live context.
  • Export lookup and identifier removal with null/unknown/idempotent behavior.
  • Automatically unregister contexts before every C-API destruction path.
  • Cover sibling isolation, explicit removal, stale IDs, natural teardown, and concurrent context lifetimes.
  • Compile, link, and run exact Home-profile evidence in Debug and ReleaseSafe.
  • Refresh ABI inventories, concise README counts, and roadmap evidence.
  • Close only after the fixing main GitHub Actions run is green.

Source contract

Home 7ed99c02, especially lang/packages/runtime/src/native/napi_weak_home_dups.cpp and its pinned upstream ScriptExecutionContext.cpp. The required behavior removes the worker context before its event loop/VM is freed so late cross-thread posts cannot resolve a dangling identifier.

Activity

  1. chrisbbreuer commented on Jul 20, 2026

    @chrisbbreuer
    MemberAuthor

    Implemented and pushed to main in e92dd31a + 0c9b3756. Evidence: focused unit test and exact Home-profile external consumer pass in Debug and ReleaseSafe; Home/Bun audits and the release-compatibility gate pass; the docs site builds 32 pages. Home moved to 425/471 (46 pending), Bun correctly remained 416/461. Awaiting the fixing main private-ABI job before closure.

  2. chrisbbreuer commented on Jul 20, 2026

    @chrisbbreuer
    MemberAuthor

    The first fixing CI run found one bookkeeping-only failure: the implemented ScriptExecutionContextIdentifier__getGlobalObject export was missing from the public extension classification. Commit 1831d7e adds the exact classification; local c-api-audit is green (117/117 public, 23 extensions, no unexpected exports). Awaiting the new main CI gate before closure.

  3. chrisbbreuer commented on Jul 20, 2026

    @chrisbbreuer
    MemberAuthor

    Closure gate is green: the exact private-abi-boundary job for main commit 7983fcab completed successfully: https://github.com/zig-utils/zig-js/actions/runs/29776746300/job/88467854285

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