Skip to content

fix(javascript): exclude erased imports from runtime bindings - #6994

Merged
gensokyo-dev merged 1 commit into
mainfrom
test/worker-type-erasure-20261024
Oct 24, 2026
Merged

gensokyo-dev merged 1 commit into
mainfrom
test/worker-type-erasure-20261024

Conversation

@gensokyo-dev

@gensokyo-dev gensokyo-dev commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Problem and outcome

CI for #6988 fails the Worker URL CLI identity fixture after the TypeScript-erasure change. The old fixture expects a declaration-wide type import to shadow the ambient Worker; that expectation is stale. Independent esbuild compilation and execution also expose a real remaining defect: an inline import { type Worker } still creates a runtime semantic binding.

Filter erased specifiers at import binding creation using the existing module-declaration predicates, and remove the obsolete type-import provenance fallback. CLI and MCP reuse this semantic owner. Source type links, mixed value imports, and the existing warning about compiler-dependent module side effects remain. Correct the two Worker fixture expectations, retain every identity/assignment/namespace negative case, and assert the exact runtime binding inventory in the existing type-link regression. Two independent compiler/runtime oracles use an inert Worker recorder; they launch no Worker.

Executed validation

Pinned base 9895f1870, Node 24.22.1 / npm 11.16.0, Linux x64, two CPUs:

  • Fixture corrections alone: 1 failed / 118 passed through the compiled CLI, stdio MCP and related source checks. The inline type import is incorrectly unresolved (58.85 s wall / 86.56 s CPU / 2788.4 MiB sampled process-family RSS).
  • New binding-inventory assertion against restored base production files: 1 failed / 32 passed, precisely because Inline and Erased remain in the value binding table (2.59 s / 2.89 s CPU / 486.4 MiB). Production edits were restored afterward.
  • Fixed source: eight related files, 298 passed (4.19 s / 5.95 s CPU / 655.1 MiB).
  • Fixed compiled Worker URL suite, CLI/MCP erasure workflows and path/type source checks: four files, 119 passed (53.47 s / 75.56 s CPU / 2791.2 MiB), including both independent compiler/runtime oracles.

npm run check and git diff --check passed (25.65 s wall / 47.82 s CPU / 2658.2 MiB; 2/6 static tasks cached). npm run verify:test-discovery passed: all 2369 files discovered exactly once (1.17 s / 1.11 s CPU / 284.7 MiB). These are real REA CLI/stdio MCP runs over controlled source fixtures, with an independent compiler/runtime oracle; no browser, native provider or external model was exercised. Validation costs include setup/build where required; no speedup is claimed. Agent tokens were not measured. RSS sums descendants at 100 ms intervals and can double-count shared pages or miss brief/reparented children. Compiled checks had a 3 GiB sampled guard; source checks 1.5 GiB; commands had elapsed guards. No OOM occurred. A prior 1.5 GiB CLI diagnostic stopped before assertions and is incomplete evidence.

Scope: ordinary existing source-analysis correctness repair; no new execution authority, provider or public schema. Complete PR CI passed at exact head f1f428979: Source 17689 passed / 13 skipped; all eight built shards, static/build/docs, JavaScript recovery, Windows native build, Linux package baseline and the final required gate passed. Merged report: 32017 passed / 0 failed / 233 conditionally skipped. Codex and Greptile reviews completed without findings; there are no inline review threads. Main advanced separately with verifier ownership changes (0402012a9); post-merge main verification remains required, and is not claimed by these PR results.

Author readiness

Human owner: @gensokyo-dev

The owner explicitly delegated readiness declarations and agent-managed review. Inspection and execution were performed by Codex; no separate human inspection is claimed.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T10:59:36.022478Z f1f4289 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Excludes erased imports when bindImports creates runtime bindings and removes the obsolete provenance fallback.

  • Erased TypeScript imports no longer hide the ambient Worker.

Reviews (1) · Last reviewed commit: "fix(javascript): exclude erased imports ..." · Reviewed by Greptile

@gensokyo-dev
gensokyo-dev merged commit be2811e into main Oct 24, 2026
41 checks passed
@gensokyo-dev
gensokyo-dev deleted the test/worker-type-erasure-20261024 branch October 24, 2026 11:22
@morluto morluto mentioned this pull request Oct 25, 2026
3 tasks done
@morluto morluto added area: runtime Process capture and runtime observation bug Something isn't working labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants