Skip to content

Expose DedicatedWorkerGlobalScope identity - #110

Merged
wieslawsoltes merged 1 commit into
feature/code-oss-browser-compatibilityfrom
codex/dedicated-worker-global-scope
Sep 16, 2026
Merged

wieslawsoltes merged 1 commit into
feature/code-oss-browser-compatibilityfrom
codex/dedicated-worker-global-scope

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

The packaged Code OSS 1.137.0 audit starts a Monaco module worker, but WebScene's isolated worker global still has the plain object constructor. Code OSS therefore misclassifies the realm as Node, executes import('module'), and the runtime reports the paired bare-module rejection and Monaco main-thread fallback.

This change installs the browser interface chain DedicatedWorkerGlobalScope -> WorkerGlobalScope -> EventTarget in every dedicated worker realm, with illegal constructors and the standard string tag. The Code OSS-shaped regression uses the same self.constructor.name test and intentionally selects import('module') when the worker identity is absent.

Regression evidence:

  • Prior runtime + new focused contract: 0/1 documents, 7/8 assertions; exact result message TypeError: Unable to resolve bare module specifier: module.
  • Patched runtime + focused contract: 1/1 document, 10/10 assertions.
  • Full portable native CTest: 26/26 passed in 28.12s.
  • Hybrid worker/runtime suite: passed in 1.32s, including the retained 10,000 MessagePort round-trip budget and bounded-queue checks.
  • Aureon candidate profile: 6/6 documents, 32/32 assertions.

The change is based directly on consolidation head 862c75ed and does not include Code OSS or AppScene changes. A rebuilt packaged-app run remains the final integration check for removal of the Monaco warning.

Fixes #108
Advances #81

@wieslawsoltes
wieslawsoltes merged commit bd6eba6 into feature/code-oss-browser-compatibility Sep 16, 2026
4 of 7 checks passed
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