[PR #3940] [CLOSED] fix(javascript): preserve proven WebSocket endpoint identities #5968

Closed
opened 2026-10-31 01:10:49 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3940
Author: @Afloat16
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: fix/qualified-websocket-endpoints


📝 Commits (10+)

  • 0ff9a86 fix(javascript): recognize qualified global WebSocket endpoints
  • 1d4f80a fix(javascript): preserve proven WebSocket constructor bindings
  • 8441d14 fix(javascript): preserve captured WebSocket source variants
  • cca08ff fix(javascript): distinguish WebSocket execution phases
  • 078a204 fix(javascript): retain WebSocket initialization frame ordering
  • 47cb738 fix(javascript): preserve WebSocket suspension and ws export semantics
  • f75c6e1 fix(javascript): reject overwritten CommonJS WebSocket exports
  • 1b848c0 fix(javascript): preserve conditional and sequence execution phases
  • f7fb803 fix(javascript): retain constructor captures before loop writes
  • 641db34 fix(javascript): honor socket continuation and capture boundaries

📊 Changes

46 files changed (+25348 additions, -1591 deletions)

View changed files

➕ src/domain/javascript/javascriptActivationReview.test.ts (+1959 -0)
📝 src/domain/javascript/javascriptAstValues.ts (+345 -1)
📝 src/domain/javascript/javascriptCommonJsExportReceivers.ts (+4 -3)
➕ src/domain/javascript/javascriptGeneratorConsumerPhases.ts (+1176 -0)
📝 src/domain/javascript/javascriptMemberMutationCoverage.test.ts (+18 -2)
➕ src/domain/javascript/javascriptPromiseChainWaits.test.ts (+118 -0)
📝 src/domain/javascript/javascriptSemanticAmbientWrites.test.ts (+198 -8)
📝 src/domain/javascript/javascriptSemanticAmbientWrites.ts (+297 -43)
📝 src/domain/javascript/javascriptSemanticAnalysis.conditional_write.test.ts (+11 -0)
📝 src/domain/javascript/javascriptSemanticAnalysis.promise_ownership.test.ts (+54 -0)
📝 src/domain/javascript/javascriptSemanticAnalysis.require_links.test.ts (+29 -0)
📝 src/domain/javascript/javascriptSemanticAnalysis.ts (+105 -31)
📝 src/domain/javascript/javascriptSemanticAnalysisSteps.test.ts (+43 -0)
📝 src/domain/javascript/javascriptSemanticEvaluationOrder.ts (+239 -11)
➕ src/domain/javascript/javascriptSemanticExpressionResults.ts (+323 -0)
📝 src/domain/javascript/javascriptSemanticGetterResults.ts (+183 -1)
➕ src/domain/javascript/javascriptSemanticImportOrigin.ts (+265 -0)
➕ src/domain/javascript/javascriptSemanticLiteralProjection.ts (+356 -0)
📝 src/domain/javascript/javascriptSemanticMemberMutations.ts (+111 -134)
📝 src/domain/javascript/javascriptSemanticMutationInitializers.test.ts (+80 -0)

...and 26 more files

📄 Description

Qualified global WebSocket calls, stable constructor captures and exact runtime ws imports now retain endpoint literals through both source consumers. The shared identity proof also covers canonical CommonJS require("ws"), TypeScript import-equals, exact global destructuring and later outer captures read from deferred function bodies. Shadowed, reassigned, conditional, cyclic, wildcard/default and visibly overwritten identities remain unresolved. Direct literal call/new and .call/.apply invocations retain eager initialization-order checks; genuinely deferred function and .bind captures remain supported.

The branch incorporates main cb18d4c9 and uses its shared lazy binding index for ambient writes and lexical references. Erased import-equals declarations retain lexical shadowing without inventing a runtime module origin.

Validation: the latest pre-fix source lane reports 8 failures and 73 passes (seven missing real constructor forms and one type-only false positive); after the correction, 139 focused source/filesystem-graph tests and 205 related import/provenance tests pass. Graph assertions verify endpoint values, mechanisms and exact file/source ranges. Three immediate-invocation controls separately failed on the unpublished candidate and now pass; exact checks against the new dist return no endpoints. Independent VM controls raise ReferenceError before any inert constructor call, while two deferred controls construct the dummy once after initialization. Official compile:termux, locked TypeScript 6 JavaScript typechecking at 3 GiB, lint, knip, metadata, architecture guards, test discovery, changed-file formatting and pre-commit checks pass.

The native TypeScript 7 gate cannot run on this host without /proc/self/exe. Complete compiled CLI/MCP inspection, real WebSocket/browser or third-party target execution and a fresh completed-workflow performance/token comparison were not established; no runtime-invocation or speedup claim is made.

Refs https://github.com/morluto/rea/discussions/3847, candidate 17.

Execution-phase follow-up

cca08ff gives the shared constructor proof one execution-phase owner. Runtime-transparent wrappers and immediately invoked bind results stay eager. Instance-field values and generator bodies are deferred; static fields, computed keys and immediately invoked parameter defaults stay eager. Completed straight-line awaits establish a separate continuation; conditional or nested-function awaits do not establish suspension. Ordering still applies within the same continuation. Sibling suspension facts are indexed once per analysis.

The validation counts above describe revision 8441d145. For this revision, 267 tests across nine related files pass. The two files containing the new regressions produce 14 failures and 98 passes on unchanged 8441d145. Twelve independent VM controls pass using an inert constructor and no network. Official compile:termux, locked TypeScript 6 checking at 3 GiB, lint/module boundaries, knip, metadata, architecture, test discovery, changed-file formatting and pre-commit checks pass.

The standard npm run check remains blocked by the native compiler's unavailable /proc/self/exe. Compiled CLI analysis also fails on an unrelated single-global-constructor control: this host's process.memoryUsage() raises ENOENT at uv_resident_set_memory. Complete CLI/MCP and live browser/socket coverage therefore remain unverified. This is static identity analysis, not proof of invocation or a complete interprocedural execution model.

Current review follow-up

f7fb803 is the current revision. Shared execution frames retain local initializer order across suspension; completed invocation arguments and class keys/static initialization precede instance fields and constructor bodies. Direct generator next calls remain eager until suspension. Branches inherit completed test/left-operand suspension without promoting conditional body awaits; only final sequence operands supply immediate callees, including through syntax wrappers.

Cached CommonJS ws identities now consume the existing shared write proof at the actual selected-member capture point. Aliases, self references, unknown keys and mutators cannot preserve an overwritten constructor. Earlier constructor captures, earlier uses, untouched exports and copies remain distinct. A later loop write is ordered after a capture that finishes before the entire loop, while captures inside repeating code and effects across function boundaries remain unresolved.

The counts above describe earlier revisions. The selected current source/filesystem-graph and import/mutation lanes pass 474 tests across 15 files. The final three regression files report 8 failures and 188 passes on unchanged 1b848c0, then 196 passes with this correction. Fifteen inert VM controls, 19 exact compiled-module controls and a separate 13-case loop/capture review pass. Official compile:termux, locked TypeScript 6 at 3 GiB, lint/module boundaries, knip, metadata, architecture guards, test discovery and pre-commit checks pass.

The standard native gate remains blocked by unavailable /proc/self/exe. Previously recorded full CLI/MCP, live-target and completed-workflow performance gaps remain unverified. These static/module/VM controls do not establish runtime invocation or a complete interprocedural execution model.

Continuation and import follow-up

Commit 641db3408e corrects the shared constructor/execution proof: synchronous delegated yields no longer imply suspension; mandatory loop tests and earlier array elements carry suspension; directly awaiting callers retain local initialization order; switch-case captures must belong to the selected case; sequence captures follow only their resulting value; fulfilled literal import("ws") origins retain exact default/named exports. Both source consumers use these owned facts; filesystem graph regressions preserve endpoint/source provenance.

Validation on Node 24.18.0 / npm 11.16.0: the identical final two-file regression selection has 18 failures / 201 passes on unchanged f7fb803, then 219 passes after the fix. The related 15-file selection passes 696 tests. A separate 19-case inert VM/compiled-module comparison passes; the locked ws 8.21.0 namespace/default/named identities were inspected without creating a socket, and three compiled dynamic-import cases pass. Ordinary yield and async delegation controls remain supported; unknown synchronous delegates remain conservative.

compile:termux, the locked TypeScript 6 --noEmit check (3 GiB heap), lint/module boundaries, knip, metadata, architecture, test discovery, changed-file formatting and pre-commit checks pass. Native npm run check remains unavailable because /proc/self/exe is absent; full-repository formatting also encounters worker uv_resident_set_memory errors on unrelated HTML files. The minimal compiled CLI and real stdio MCP global-WebSocket controls both return artifact_operation_failed/io; an independent process.memoryUsage() probe raises ENOENT/uv_resident_set_memory. Complete public-workflow acceptance is therefore not established. No host shims, live sockets, browser/provider or performance claims. Repository CI still requires maintainer approval.

Stable promise-result follow-up

Commit efa64b02c1 shares exact stable-result identity between Promise provenance, awaited import origins and the execution proof. The definitions pass retains await sites for a lazy per-source reverse index; no consumer adds another AST scan. Execution frames retain their actual evaluation/wait point and compare the nearest shared lexical activation, so initialization before an aliased wait remains distinct from initialization after it. Ordered object evaluation includes computed keys, data values and spreads, but not method bodies. The superseded recursive Promise resolver is removed; unstable/cyclic/projected identities remain unresolved.

On Node 24.18.0 / npm 11.16.0, the identical three-file regression selection has 15 failures / 265 passes on unchanged 641db34, then 280 passes after correction. Related source/filesystem/Promise lanes pass 809 tests across 18 files (794 in 17 files plus 15 call-semantics tests). 20 independent inert ESM/compiled-module cases pass, including top-level await, wait-before/after initialization, shadowing, object evaluation and pending imports; dynamic module controls use self-authored SyntheticModules, not real sockets/providers.

compile:termux, locked TypeScript 6 --noEmit at 3 GiB, lint/module boundaries, knip, metadata, architecture, discovery, changed-file formatting and pre-commit checks pass. The standard npm run check still fails at the native compiler's unavailable /proc/self/exe. Fresh minimal compiled CLI and real stdio MCP controls still return artifact_operation_failed/io; complete public-workflow acceptance remains unverified. No host shims or live sockets were used. Current-head repository CI requires maintainer approval.

Source-analysis cost sample (not end-to-end performance)

Same 79,871-byte input, 100 promise aliases and 2,000 endpoints, with identical endpoint-output SHA-256 before/after. One first analysis after imports: 253.1 → 266.3 ms elapsed, 569.1 → 614.1 ms process CPU. Median of three warm analyses: 161.7 → 158.7 ms elapsed, 307.5 → 292.8 ms process CPU. Startup/import time, peak process-family memory and model tokens were not measured; host RSS is unavailable and no model was invoked. This small sample establishes neither an end-to-end speedup nor a latency guarantee.

Reached-wait and expression-result follow-up

Commit ffca5293e3 admits a wait constraint only through a syntax-proven unconditional path. All await sites remain retained; possible/skipped waits are not promoted to blocking proof. Shared control-flow ownership handles literal branches/short circuits, loop-entry uncertainty and preceding definite exits, with cached statement prefixes. One optional-chain rule now serves assignment indexing and evaluation order; the old private call rule is removed. Member operands carry completed suspension without promoting skipped keys. The ambient identity owner accepts optional global captures under the same shadow/write checks, and outward exact-result following includes plain assignment RHS values while stored results remain deferred.

On Node 24.18.0 / npm 11.16.0, the identical three-file regression selection has 16 failures / 260 passes on unchanged efa64b0, then 276 passes after correction. 872 tests across 19 related files pass. 24 independent inert ESM/compiled-module controls pass, covering skipped/proven waits, member operands, inherited optional short circuits, optional ambient captures and immediate/stored assignment results. Filesystem graph assertions preserve the endpoint/file/source provenance. These controls use no live socket or provider.

compile:termux, locked TypeScript 6 --noEmit at 3 GiB, lint/module boundaries, knip, metadata, architecture, discovery, changed-file formatting and pre-commit checks pass. Fresh native npm run check still fails because /proc/self/exe is unavailable. Minimal compiled CLI and real stdio MCP global-constructor controls still return artifact_operation_failed/io; complete public-workflow acceptance and full repository CI are not established. No host shims or complete interprocedural/runtime-execution claim.

Source-analysis cost sample, excluding startup/imports

Same 79,871-byte, 100-alias/2,000-endpoint task and identical endpoint-output SHA-256. One first call: 226.2 → 253.4 ms elapsed, 556.3 → 541.3 ms process CPU. Median of three warm calls: 136.0 → 127.6 ms elapsed, 286.8 → 240.8 ms process CPU. Peak process-family memory and model tokens were unmeasured (host RSS unavailable; no model invocation). This small source-module sample establishes no end-to-end speedup or latency guarantee.

Mandatory operands and exact projection follow-up

Commit d628f06600 unifies syntax-proven branch/assignment operands for reached-wait and continuation proofs. Arithmetic/bitwise assignments retain mandatory RHS waits; only logical assignments can short-circuit. Literal selected branches carry suspension, and optional calls always evaluate the callee without promoting skipped arguments. Import-equals member paths use the shared CommonJS write proof, including indexed direct-origin writes. Fresh literal array/object projections retain exact constructor captures; ambiguous spreads/defaults and mutable aliased arrays remain unresolved.

On pinned Node 24.18.0 / npm 11.16.0, the identical final source/filesystem regression selection has 25 failures / 285 passes on unchanged ffca529, then 310 passes after correction. 913 tests across 19 related files and 32 independent inert ESM/TypeScript-erased VM controls pass. Filesystem assertions retain endpoint/file/source provenance. No real ws package, socket, browser or provider is invoked by these controls.

Official compile:termux, locked TypeScript 6 --noEmit at 3 GiB, lint/module boundaries (0 errors; 1,467 warnings), knip, metadata, architecture, discovery, changed-file formatting and pre-commit checks pass. Fresh standard npm run check still fails because the native compiler requires unavailable /proc/self/exe. Minimal compiled CLI and real stdio MCP controls still return artifact_operation_failed/io; complete public-workflow acceptance and repository CI are not established. No host shim or complete interprocedural/runtime-execution claim.

Comparable source-analysis cost sample, not end-to-end performance

Same 79,871-byte input, 100 aliases and 2,000 endpoints; endpoint-output SHA-256 remains identical. First call after imports: 217.2 → 216.4 ms elapsed, 497.9 → 496.9 ms process CPU. Median of three warm calls: 121.8 → 136.9 ms elapsed, 246.5 → 253.1 ms CPU. Startup/imports, peak process-family memory and model tokens are unmeasured (host RSS unavailable; no model invocation). This small source-module sample supports no speedup or latency guarantee.

Main synchronization and projection/tag follow-up

fbb76e3 integrates main 461eb1612. The two conflicts retain main's shared branch/delayed-field facts and the existing capture-before-loop rule. Optional-chain interpretation now has one owner in semantic evaluation order; the superseded private/AST-value copy is removed. The merge control passes 326 tests across four selected files.

d90dce7 preserves numeric iteration versus string property projections, literal template-tag invocation phases, ordered substitutions and explicit for-of/for-in RHS awaits. One exact-result operand owner now serves constructor captures, Promise results and outward invocation following. Ambiguous containers, compound-assignment results and skipped bodies remain unresolved.

On pinned Node 24.18.0 / npm 11.16.0, the identical final two-file source/filesystem regression selection has 22 failures / 317 passes on unchanged d628f06, then 339 passes after correction. 964 tests across 20 related files and 30 independent inert ESM/TypeScript-erased VM controls pass, retaining endpoint/file/source provenance. No real ws package, socket, browser or provider is used.

Official compile:termux, locked TypeScript 6 --noEmit at 3 GiB, lint/module boundaries (0 errors; 1,502 warnings), knip, metadata, architecture, test discovery, ten-file formatting and pre-commit checks pass. Fresh standard npm run check still fails at the native compiler's unavailable /proc/self/exe. Minimal compiled CLI and real stdio MCP controls both still return artifact_operation_failed/io; complete public-workflow acceptance and repository CI are not established. No host shims or complete iterator/interprocedural/runtime-execution claim.

Source-analysis cost sample, including main synchronization

Same 79,871-byte input, 100 aliases, 2,000 endpoints and identical endpoint-output SHA-256, comparing compiled d628f06 with the synchronized/fixed tree. First call after imports: 315.8 → 242.4 ms elapsed, 641.8 → 525.1 ms process CPU. Median of three warm calls: 255.1 → 151.6 ms elapsed, 377.8 → 319.8 ms CPU. Startup/imports, peak process-family memory and model tokens are unmeasured (host RSS unavailable; no model invocation). This small shared-host sample includes upstream changes and supports no isolated speedup or latency guarantee.

Binding events and structured-continuation follow-up

eed85d4 synchronizes main d52a48847. The conflict resolution retains main's path-aware ambient API checks, constructor projections and shared static-key interpretation; the merge-only control passes 357 tests across four files.

ed932a6 addresses the eight new review comments through shared producing facts: declaration binding events rather than RHS spelling; implicit async-iteration waits; mandatory do/while, no-catch try/finalizer and body-before-update phases; RHS-before-pattern evaluation with conditional defaults; and selected literal-value captures before later export writes. Cached jump facts use shared AST traversal. Both source consumers and filesystem endpoint/file/line provenance are covered. Break/continue bypasses, abrupt entry to finally, catch paths, skipped defaults and namespace-versus-constructor copies remain conservative. No complete iterator/interprocedural execution claim.

Pinned Node 24.18.0 / npm 11.16.0: the identical two-file regression selection has 17 failures / 352 passes on the synchronized merge-only tree, then 369 passes after correction. 994 tests across 20 related files and 30 independent inert ESM/compiled-source controls pass, without a live socket, ws package or provider. The unsynchronized d90dce7 control has one additional upstream metadata-test mismatch, not counted as this fix.

Official compile:termux, locked TypeScript 6 --noEmit (3 GiB), lint/module boundaries (0 errors; 1,523 warnings), knip, metadata, architecture, test discovery, changed-file formatting and staged pre-commit checks pass. Fresh npm run check fails at the native compiler's missing /proc/self/exe; minimal real CLI and stdio MCP controls both return artifact_operation_failed/io. Full public-workflow acceptance and current-head repository CI are not established. No host shims.

Comparable source-analysis cost sample, including upstream synchronization

Same 79,871-byte input, 100 aliases, 2,000 endpoints and identical endpoint-output SHA-256, comparing compiled d90dce7 with the synchronized/fixed tree. First call after imports: 274.4 → 204.5 ms elapsed, 541.5 → 477.7 ms process CPU. Median of three warm calls: 217.0 → 132.4 ms elapsed, 393.6 → 239.2 ms CPU. Startup/imports, peak process-family memory and model tokens are unmeasured (host RSS unavailable; no model invoked). This small shared-host sample includes upstream changes and supports no isolated speedup or latency guarantee.

Owned waits and exact-result paths

a94383f integrates main 1bd5c5c87. The conflicts preserve both iteration-cardinality facts and this PR's await/binding facts. Main's partial-network request path now consumes the same proven WebSocket identity rather than suppressing bound constructors by spelling. The merge control passes 403 tests across five files. Main's existing nested-statement effect-order fix (1b9b725) is retained, not duplicated.

4965352 addresses the remaining new review findings at their owners: exact-result normalization in ambient writes and literal projections; conditional waits coupled to their direct producer; shared CommonJS self-member normalization; switch-discriminant, optional-child and update-operand phases; and cached nonthrowing-prefix proof before finalizer entry. Both source consumers and filesystem endpoint/file/line provenance agree. Ambiguous containers, independently created promises with skipped waits, conditional case bodies and potentially earlier throws remain conservative; no complete exception/iterator/interprocedural execution claim.

Pinned Node 24.18.0 / npm 11.16.0: the identical two-file selection has 24 failures / 386 passes on the synchronized pre-fix tree, then 410 passes after correction. 1,054 tests across 23 related files and 34 independent inert ESM/compiled-source controls pass without live sockets, ws-package execution or providers.

Official compile:termux, locked TypeScript 6 --noEmit (3 GiB), lint/module boundaries (0 errors; 1,532 warnings), knip, metadata, architecture, discovery, ten-file formatting and staged pre-commit checks pass. Fresh native npm run check still fails at missing /proc/self/exe. Minimal real CLI and stdio MCP controls still return artifact_operation_failed/io; full public-workflow acceptance and current-head repository CI are not established. No host shims.

Comparable source-analysis cost sample, including upstream synchronization

Same 79,871-byte input, 100 aliases, 2,000 endpoints and identical endpoint-output SHA-256, comparing compiled ed932a6 with the synchronized/fixed tree. First call after imports: 267.5 → 251.3 ms elapsed, 569.3 → 564.5 ms process CPU. Median of three warm calls: 146.7 → 152.4 ms elapsed, 252.7 → 276.0 ms CPU. Startup/imports, peak process-family memory and model tokens are unmeasured (host RSS unavailable; no model invoked). This small shared-host sample includes upstream changes and supports no isolated speedup or latency guarantee.

Current revision: selected values and reachable waits

Synchronized main 42fc6c53a in 7df379c; 016a22d addresses the nine new inline findings and the rebound-import finding. Shared owners now preserve initialized promise aliases and branch-local producer/wait coupling, dead jump prefixes, literal allocation effects at binding events, iterator uncertainty, construction context, and logical-assignment/switch-case continuation. Disposing declarations remain potentially throwing. Both source consumers use these facts; the filesystem graph retains source ranges. Cross-activation alias order and unsupported effects remain conservative rather than inferred exact.

  • 1,149 tests across 25 related files pass. The final two-file regression selection has 25 failures / 417 passes on the synchronized pre-fix tree and 442 passes after the fix; it includes 32 new source-consumer cases plus ten filesystem fixtures.
  • 34 independent inert runtime controls pass against the compiled analyzer, using local constructors and no sockets/network/provider. Import-equals mutation controls use TypeScript 6 CommonJS/ES5 output; target-fixture typechecking and real ws behavior are unverified.
  • Official JavaScript fallback compilation, TypeScript 6 tsc --noEmit, lint (0 errors; existing warnings), knip, staged formatting/lint, metadata, module/architecture boundaries and discovery of all 1,400 test files pass.
  • npm run check was attempted and remains blocked by this host's missing /proc/self/exe and RSS support (uv_resident_set_memory). Fresh real CLI and SDK/MCP calls reach analyze_javascript_application but return artifact_operation_failed / io; neither end-to-end acceptance nor the native gate is claimed passed. Current-head repository CI still requires maintainer approval.

Cost sample: identical 79,871-byte source, 100 promise aliases, 2,000 endpoints and identical SHA-256 output. Previous-head → synchronized/fixed first-after-import analysis: 206.1 → 450.1 ms wall, 487.6 → 606.0 ms process CPU; three warm runs average 132.7 → 163.0 ms wall and 259.0 → 286.6 ms CPU. This single shared-host sample includes upstream synchronization and concurrent work; no speedup is claimed. Startup/import cost, model tokens and peak process-family memory remain unmeasured (RSS unavailable); no model was invoked by the fixture. Indexing allocation effects is selected only for literal constructor projections and retained per analysis.

Latest revision: literal-caller blocking waits

f3c7e53 addresses the subsequent outer-promise/IIFE review. Alias initialization and constructor capture now share one nearest-activation order proof. Non-recursive direct frames preserve invocation bounds while the wait index verifies mandatory reachability through each literal caller; the previous duplicate same-owner-only proof is removed. Unawaited/optional wrappers and uninitialized aliases remain distinct. Source tests declare module syntax to distinguish top-level await from a script call named await; explicit .mjs graph controls retain endpoint/source provenance. No general interprocedural execution claim.

Latest validation: 1,158 tests / 25 files, 43 independent inert runtime controls (the earlier 34 rerun plus nine literal-caller controls), official JavaScript fallback compilation, TypeScript 6 --noEmit, lint (0 errors; existing warnings), knip, metadata, module/architecture boundaries, 1,400-file test discovery, formatting and staged checks pass. The same two-file selection has 6 failures / 445 passes on 016a22d, then 451 passes after correction. Nonblocking runtime cases explicitly delay and settle the owned input after initialization. Fresh real CLI/MCP controls still return artifact_operation_failed/io; complete public-workflow and native acceptance remain unavailable under the previously recorded host restrictions. Repository CI is pending/approval-gated, not claimed passed.

Comparable source-module sample against compiled 016a22d: identical 79,871-byte / 100-alias / 2,000-endpoint input and output SHA-256. First-after-import wall/CPU: 450.1/606.0 → 407.9/751.8 ms; three warm runs average 163.0/286.6 → 197.0/393.6 ms. This shared-host sample includes concurrent work and supports no speedup claim. Startup/import cost, model tokens and peak process-family memory remain unmeasured; no model/provider/network operation is performed by these controls. Await facts remain indexed once per parsed source.

Latest revision: selected invocation phases

8d8688c addresses the five subsequent findings. The shared exact-result owner exposes literal-selected conditional/logical results; fresh literal methods use one final-own-member selector; ImportExpression operands preserve source/options order; producer/wait coupling retains a shared case's reachable statement list; direct legacy decorator invocation follows class preparation while preserving generator/deferred phases. Method decorator metadata is evaluated with its class, including suspension from computed keys. Unknown selections remain unresolved; this does not establish a complete interprocedural execution model.

Latest validation: 1,192 tests across 25 related files and 74 independent inert runtime controls pass (43 previous controls rerun plus 31 new controls). The identical two-file regression selection has 23 failures / 462 passes on f3c7e53, then 485 passes after correction, including 34 new cross-consumer cases and eight filesystem fixtures with source evidence. Dynamic-import controls use owned SyntheticModules only; decorators use TypeScript 6 legacy-decorator output. No socket, network or real-provider behavior is claimed.

Official JavaScript fallback compilation, TypeScript 6 --noEmit, lint (0 errors; existing warnings), knip, metadata, module/architecture boundaries, discovery of all 1,400 test files and six-file formatting/staged checks pass. Standard npm run check remains blocked by unavailable /proc/self/exe; full formatting workers also encounter this host's RSS limitation. Fresh real CLI and SDK/MCP controls still return artifact_operation_failed/io. Native and complete public-workflow acceptance remain unverified; repository CI requires separate approval and is not claimed passed.

Source-analysis cost sample against compiled f3c7e53: identical 79,871-byte / 100-alias / 2,000-endpoint input and identical output SHA-256. First-after-import wall/CPU: 227.9/523.4 → 248.4/516.3 ms; three warm runs average 141.0/261.9 → 157.2/286.6 ms. This shared-host sample includes concurrent work; no speedup claim. Startup/import cost, model tokens and peak process-family memory are unmeasured (RSS unavailable); the controls invoke no model/provider/network operation.

Exact promise results and class/JSX phases (2026-10-16)

50ec82f integrates main 2c7583599. 666fca1 addresses seven remaining review findings. Promise/import and constructor identity share fresh-literal projection, capture order and iteration/effect facts; awaited-result indexes invalidate when those facts change. Direct zero-argument literal returns preserve the original promise identity. Fresh static method selection respects the methods-before-fields phase. Ordinary/private/auto-accessor fields share timing, with auto-accessor syntax enabled at the parser boundary. Ordered JSX operands, reachable labeled prefixes and safe awaited abrupt exits feed the existing continuation owner. Unknown getters, iteration, returns and earlier throwing/jump paths remain conservative.

  • 2,462 related tests / 81 files pass. The identical final three-file regression selection reports 28 failures / 499 passes before these corrections, then 527 passes; 35 new cross-consumer cases and seven graph fixtures retain endpoint/source provenance. The seven canonical findings all fail on the synchronized pre-fix tree; the auto-accessor example first fails at parsing.
  • 35 independent compiled-analyzer checks and 32 inert VM runtime comparisons pass. Three unknown/deferred static cases are intentionally not equated with execution. Dynamic imports use owned SyntheticModules; JSX/auto-accessors use TypeScript 6 ES2022/React output. No real socket/provider coverage is established.
  • Official compile:termux, locked TypeScript 6 --noEmit (4 GiB), lint (0 errors; existing warnings), knip after compilation, metadata, module/architecture guards, 1,414-file test discovery and 12-file formatting pass.
  • Fresh npm run check fails at the native compiler's missing /proc/self/exe; full-repository formatting workers fail at uv_resident_set_memory. Fresh minimal compiled CLI and real SDK stdio MCP controls still return artifact_operation_failed/io. Native/full public-workflow acceptance and current-head repository CI are not established.

Comparable source-module cost sample against the synchronized pre-fix tree, using the same TSX loader and identical 103,845-byte / 100-alias / 2,000-endpoint input and output SHA-256: first-after-import wall/CPU 136.2/260.6 → 133.4/258.6 ms; three warm calls average 80.4/151.5 → 80.4/145.5 ms. This small shared-host sample supports no end-to-end speedup claim. Startup/import cost, peak process-family memory and model tokens remain unmeasured.

Current revision — 2026-10-16

e2edaa4934 addresses seven further review findings after synchronizing main d72d856f: assignment completion, computed-key binding order, global self-reference reads, caught-prefix waits, with-body suspension, iterable spread and asynchronous disposal. Related tests: 2,551 passed / 83 files. Identical regression files: 18 failed / 560 passed before, 578 passed after. Fresh compiled controls: 35 passed; independent inert execution controls: 34 passed.

Current validation, cost sample and coverage limits. The public CLI and real SDK stdio MCP still return artifact_operation_failed/io in this host. Native check is blocked by missing /proc/self/exe; whole-repository formatting encounters host RSS errors. These gates and the full public workflow are not claimed as passing.

Current revision — scope exit and producer order

89771c4d25 addresses seven new findings after synchronizing main 781d5751: disposal at block exit, producer-relative caught prefixes, outer assignment invocation, iteration-head TDZ, destructuring iteration, selected case tests and optional invocation arguments. Related tests: 2,585 passed / 83 files. Identical regression files: 17 failed / 595 passed before, 612 passed after. Compiled controls: 34 passed; independent inert execution controls: 32 passed.

Current verification and measured costs. Standard check/check:fast remain blocked by missing /proc/self/exe. Fresh public CLI and real SDK stdio MCP still return artifact_operation_failed/io. Native disposal and the full public workflow are not claimed as verified.

Current revision — consumed prefixes and settlement

5684e2bf64 addresses seven further findings after synchronizing main fe2a398d: per-resume pattern work, getter read/write roles, sequence-prefix completion, optional-call argument prefixes, conditional wait bypasses, async Promise settlement dependencies and resumed generator delegation. Related tests: 2,633 passed / 83 files. Identical three-file regressions: 23 failed / 673 passed before, 696 passed after. Compiled controls: 45 passed; inert runtime controls: 45 passed, including five explicitly unexecuted metadata cases; three native Promise identity/adoption controls passed.

Current verification, measured costs and limits. Standard check/check:fast remain blocked by missing /proc/self/exe. Fresh public CLI and SDK stdio MCP still return artifact_operation_failed/io; the complete public workflow is not claimed as passing.

Latest execution-phase validation (2026-10-16, d7319e2)

Synchronized main 180ba03bf; fixed immediate sequence-call ordering, nested consumed patterns, fresh setters, hoisted prefix reads and mandatory scope-exit suspension. Detailed results and remaining limits.

  • Same final two regression files: 33 failures / 681 passes before, 714 passes after. Related selection: 2,690 tests / 83 files pass.
  • Fresh compiled analysis and independent inert execution: 57 controls each; three dormant-body metadata cases do not execute the body. Disposal uses TypeScript 6 ES2022 output.
  • Fallback compile, TypeScript 6, lint/module boundaries, knip, metadata, architecture/discovery, six-file formatting and actual pre-commit pass.
  • Standard native check remains blocked by missing /proc/self/exe; fresh public CLI and real SDK stdio MCP still return artifact_operation_failed/io. No complete end-to-end or performance improvement is claimed.

Latest literal-consumer validation (2026-10-16, db493a7e)

Six additional review findings are corrected through shared invocation, optional-chain, mutation-aware slot and consumed-pattern owners. Both source consumers request the required effect facts. Detailed results and limits.

  • Identical final source/filesystem selection: 32 failures / 732 passes before, 764 passes after. Related tests: 2,740 / 83 files pass.
  • Fresh compiled analysis and independent inert execution: 50 controls each, four explicitly metadata-only. Fallback build, TypeScript 6, lint/module boundaries, knip, metadata, architecture/discovery, formatting and actual pre-commit pass.
  • Standard native check remains blocked by missing /proc/self/exe; fresh public CLI/SDK stdio MCP still return artifact_operation_failed/io.
  • Comparable source-only sample is slower with required effect indexing; no performance improvement or complete public-workflow acceptance is claimed.

Latest review follow-up

3ef19f9a synchronizes main, addresses five new inline reports (four shared semantic problems), and narrows caller-query caching. Final validation: 2,908 related tests / 84 files; 28 compiled and inert-runtime controls, with public CLI/MCP and native-gate limits recorded in the verification report. Current-head CI/review remains pending.

Latest consumer-route validation

49c2748b addresses nine new inline findings and synchronizes main, including its existing firmware assertion correction. Related tests: 2,939 / 84 files; identical regressions: 21 failures before, 823 passes after. Verification, CI diagnosis, measured costs and remaining limits. New-head CI/review is pending.

Update fe669378: fixed reached optional-argument waits and generator return/throw operand phases. 2,951 related tests pass; identical regression files change from 5 failures / 830 passes to 835 passes. Validation and limits. Prior-head CI is green; current-head CI is pending.

CI follow-up: fe669378 fails the existing main admission-cancellation assertion tracked in #4610; independently reproduced on main 0c7b6d83. CI evidence. Latest review reports no new blocking finding. Full CI remains unqualified.

Synchronization e885899a integrates main 4e14452d, upstream cancellation/cleanup repairs and the subsequent shared AST helper conflict resolution. 3,064 related tests pass; the previously failing admission assertion passes in isolation. Current validation and limits, including unavailable local CLI/MCP acceptance. New-head CI/review remains separate and pending.

Execution-order repair 424304c5 addresses immediate returned-call activation, nullish nested-pattern failure and mandatory do-while test waits. 3,080 related tests pass; identical final two-file regressions improve from 10 failures to 851 passes. Validation and remaining local native/CLI/MCP limits. Current-head CI 39022589477 passed; the latest review confirms the three findings are addressed with no new blocking issue. Local verification limits above remain unchanged.

Author readiness

Human owner: @Afloat16

  • 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.

Maintainer blocker verification

The first remediation pass paginated 283 threads and checked the 65 previously unresolved findings against their replies, reachable fixes and current producers. After merging main 3dbe314, 13 focused source/filesystem files passed 1,724 tests and check:fast. This was aggregate regression evidence, not 65 new runtime reproductions.

Follow-up commit dc6b4ad51 fixes the callback Cartesian scan with parameter-owned supplier indexing and identity-based candidate deduplication; selects the actual later destructured getter property; and links a stored generator iterator only to a unique immutable array-pattern consumer. Relevant String iterator mutations now make nested completion unproven, and ambient-effect additions invalidate pattern-wait facts. Native-iterator positives and the throwing-iterator counterexample are both covered. The early callback-alias reviewer example already reaches the correct later socket through the existing initialization/admission phase; its regression is retained without a redundant supplier guard.

The latest focused domain suite passed 39 tests, the compiled filesystem boundary passed its integration case, and check:fast passed on Node 24.18.0/npm 11.16.0. A single completed 100-callback source-analysis sample retained all endpoints: inner elapsed 258.7 ms before / 35.0 ms after; process max RSS 168,181,760 / 145,260,544 bytes. These are noisy single samples, not process-family peaks or a guaranteed speedup; whole CLI/MCP, agent-token and provider costs were not measured.

The long Promise-chain follow-up is fixed in 4f2a24e0a: iterative ancestry proofs are cached only after mutation facts finish indexing. Exact callee ownership resolves first, then nested call/new-expression subtrees are pruned from the immediate-caller walk, avoiding repeated scans of every prior chain receiver. The paired 4,000-link source on the original 45a40a3 head reproduced RangeError in recursive nativePromiseChainParent; the new head completes with the expected endpoint and explicit partial limitations.

Current validation passed 87 domain tests (including the 4,000-link regression), the compiled filesystem case and check:fast, on pinned Node 24. In single paired source-analysis samples, 2,000 links took 12.30s before / 1.00s after and 3,000 took 23.44s / 1.40s. The failing 4,000-link baseline used 7.60s user CPU and 492,503,040-byte process max RSS; the completed new task took 2.21s analysis, 2.81s user CPU and 305,774,592-byte process max RSS. Failure and success are not equivalent completed tasks; the completed 2k/3k pairs support the performance comparison. These are single host samples, not portable speedup guarantees. Cold/warm separation, agent tokens, full CLI/MCP latency and process-family peak memory remain unmeasured. No real browser/socket/provider workflow was run in this remediation pass.

Current follow-up evidence

The author's follow-up 60c063fce descends from both remediation commits. Independent source review verified the new shared consumer-order/iterator/getter refinements preserve the five addressed findings. On this exact live head, 132 domain tests, the compiled filesystem boundary case and check:fast passed using Node 24.18.0/npm 11.16.0. The earlier performance measurements above are pinned to their stated baseline/fix heads, not re-labelled as measurements of this later author commit. No target/provider execution was performed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3940 **Author:** [@Afloat16](https://github.com/Afloat16) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/qualified-websocket-endpoints` --- ### 📝 Commits (10+) - [`0ff9a86`](https://github.com/morluto/rea/commit/0ff9a86ad1da4b8af6af1696613a70b2fac7b251) fix(javascript): recognize qualified global WebSocket endpoints - [`1d4f80a`](https://github.com/morluto/rea/commit/1d4f80af05c63a82a94a5c6c4fb76b056181cb80) fix(javascript): preserve proven WebSocket constructor bindings - [`8441d14`](https://github.com/morluto/rea/commit/8441d14569ab1aaa9ecf39ceff9045afc307653d) fix(javascript): preserve captured WebSocket source variants - [`cca08ff`](https://github.com/morluto/rea/commit/cca08ffee2b2fde6d53a5ef8bc8ffda2f8526038) fix(javascript): distinguish WebSocket execution phases - [`078a204`](https://github.com/morluto/rea/commit/078a20453f7fe88a96096a5e8e43a5ac0ab6d17f) fix(javascript): retain WebSocket initialization frame ordering - [`47cb738`](https://github.com/morluto/rea/commit/47cb738d2192d5af360040a50883302e4bb638d6) fix(javascript): preserve WebSocket suspension and ws export semantics - [`f75c6e1`](https://github.com/morluto/rea/commit/f75c6e1223a2e6214a493f4717b0d1b0a896d009) fix(javascript): reject overwritten CommonJS WebSocket exports - [`1b848c0`](https://github.com/morluto/rea/commit/1b848c072cfb91b93495940ab320a7948241f781) fix(javascript): preserve conditional and sequence execution phases - [`f7fb803`](https://github.com/morluto/rea/commit/f7fb8039c8959d2ccc16fc79444ebd148a7d3559) fix(javascript): retain constructor captures before loop writes - [`641db34`](https://github.com/morluto/rea/commit/641db3408e48db04c4ceb2202cc7ae89c2e8bd65) fix(javascript): honor socket continuation and capture boundaries ### 📊 Changes **46 files changed** (+25348 additions, -1591 deletions) <details> <summary>View changed files</summary> ➕ `src/domain/javascript/javascriptActivationReview.test.ts` (+1959 -0) 📝 `src/domain/javascript/javascriptAstValues.ts` (+345 -1) 📝 `src/domain/javascript/javascriptCommonJsExportReceivers.ts` (+4 -3) ➕ `src/domain/javascript/javascriptGeneratorConsumerPhases.ts` (+1176 -0) 📝 `src/domain/javascript/javascriptMemberMutationCoverage.test.ts` (+18 -2) ➕ `src/domain/javascript/javascriptPromiseChainWaits.test.ts` (+118 -0) 📝 `src/domain/javascript/javascriptSemanticAmbientWrites.test.ts` (+198 -8) 📝 `src/domain/javascript/javascriptSemanticAmbientWrites.ts` (+297 -43) 📝 `src/domain/javascript/javascriptSemanticAnalysis.conditional_write.test.ts` (+11 -0) 📝 `src/domain/javascript/javascriptSemanticAnalysis.promise_ownership.test.ts` (+54 -0) 📝 `src/domain/javascript/javascriptSemanticAnalysis.require_links.test.ts` (+29 -0) 📝 `src/domain/javascript/javascriptSemanticAnalysis.ts` (+105 -31) 📝 `src/domain/javascript/javascriptSemanticAnalysisSteps.test.ts` (+43 -0) 📝 `src/domain/javascript/javascriptSemanticEvaluationOrder.ts` (+239 -11) ➕ `src/domain/javascript/javascriptSemanticExpressionResults.ts` (+323 -0) 📝 `src/domain/javascript/javascriptSemanticGetterResults.ts` (+183 -1) ➕ `src/domain/javascript/javascriptSemanticImportOrigin.ts` (+265 -0) ➕ `src/domain/javascript/javascriptSemanticLiteralProjection.ts` (+356 -0) 📝 `src/domain/javascript/javascriptSemanticMemberMutations.ts` (+111 -134) 📝 `src/domain/javascript/javascriptSemanticMutationInitializers.test.ts` (+80 -0) _...and 26 more files_ </details> ### 📄 Description Qualified global WebSocket calls, stable constructor captures and exact runtime ws imports now retain endpoint literals through both source consumers. The shared identity proof also covers canonical CommonJS require("ws"), TypeScript import-equals, exact global destructuring and later outer captures read from deferred function bodies. Shadowed, reassigned, conditional, cyclic, wildcard/default and visibly overwritten identities remain unresolved. Direct literal call/new and .call/.apply invocations retain eager initialization-order checks; genuinely deferred function and .bind captures remain supported. The branch incorporates main cb18d4c9 and uses its shared lazy binding index for ambient writes and lexical references. Erased import-equals declarations retain lexical shadowing without inventing a runtime module origin. Validation: the latest pre-fix source lane reports 8 failures and 73 passes (seven missing real constructor forms and one type-only false positive); after the correction, 139 focused source/filesystem-graph tests and 205 related import/provenance tests pass. Graph assertions verify endpoint values, mechanisms and exact file/source ranges. Three immediate-invocation controls separately failed on the unpublished candidate and now pass; exact checks against the new dist return no endpoints. Independent VM controls raise ReferenceError before any inert constructor call, while two deferred controls construct the dummy once after initialization. Official compile:termux, locked TypeScript 6 JavaScript typechecking at 3 GiB, lint, knip, metadata, architecture guards, test discovery, changed-file formatting and pre-commit checks pass. The native TypeScript 7 gate cannot run on this host without /proc/self/exe. Complete compiled CLI/MCP inspection, real WebSocket/browser or third-party target execution and a fresh completed-workflow performance/token comparison were not established; no runtime-invocation or speedup claim is made. Refs https://github.com/morluto/rea/discussions/3847, candidate 17. ### Execution-phase follow-up [cca08ff](https://github.com/Afloat16/rea/commit/cca08ffee2b2fde6d53a5ef8bc8ffda2f8526038) gives the shared constructor proof one execution-phase owner. Runtime-transparent wrappers and immediately invoked bind results stay eager. Instance-field values and generator bodies are deferred; static fields, computed keys and immediately invoked parameter defaults stay eager. Completed straight-line awaits establish a separate continuation; conditional or nested-function awaits do not establish suspension. Ordering still applies within the same continuation. Sibling suspension facts are indexed once per analysis. The validation counts above describe revision 8441d145. For this revision, 267 tests across nine related files pass. The two files containing the new regressions produce 14 failures and 98 passes on unchanged 8441d145. Twelve independent VM controls pass using an inert constructor and no network. Official compile:termux, locked TypeScript 6 checking at 3 GiB, lint/module boundaries, knip, metadata, architecture, test discovery, changed-file formatting and pre-commit checks pass. The standard npm run check remains blocked by the native compiler's unavailable /proc/self/exe. Compiled CLI analysis also fails on an unrelated single-global-constructor control: this host's process.memoryUsage() raises ENOENT at uv_resident_set_memory. Complete CLI/MCP and live browser/socket coverage therefore remain unverified. This is static identity analysis, not proof of invocation or a complete interprocedural execution model. ### Current review follow-up [f7fb803](https://github.com/Afloat16/rea/commit/f7fb8039c8959d2ccc16fc79444ebd148a7d3559) is the current revision. Shared execution frames retain local initializer order across suspension; completed invocation arguments and class keys/static initialization precede instance fields and constructor bodies. Direct generator next calls remain eager until suspension. Branches inherit completed test/left-operand suspension without promoting conditional body awaits; only final sequence operands supply immediate callees, including through syntax wrappers. Cached CommonJS ws identities now consume the existing shared write proof at the actual selected-member capture point. Aliases, self references, unknown keys and mutators cannot preserve an overwritten constructor. Earlier constructor captures, earlier uses, untouched exports and copies remain distinct. A later loop write is ordered after a capture that finishes before the entire loop, while captures inside repeating code and effects across function boundaries remain unresolved. The counts above describe earlier revisions. The selected current source/filesystem-graph and import/mutation lanes pass 474 tests across 15 files. The final three regression files report 8 failures and 188 passes on unchanged 1b848c0, then 196 passes with this correction. Fifteen inert VM controls, 19 exact compiled-module controls and a separate 13-case loop/capture review pass. Official compile:termux, locked TypeScript 6 at 3 GiB, lint/module boundaries, knip, metadata, architecture guards, test discovery and pre-commit checks pass. The standard native gate remains blocked by unavailable /proc/self/exe. Previously recorded full CLI/MCP, live-target and completed-workflow performance gaps remain unverified. These static/module/VM controls do not establish runtime invocation or a complete interprocedural execution model. ### Continuation and import follow-up Commit 641db3408e48db04c4ceb2202cc7ae89c2e8bd65 corrects the shared constructor/execution proof: synchronous delegated yields no longer imply suspension; mandatory loop tests and earlier array elements carry suspension; directly awaiting callers retain local initialization order; switch-case captures must belong to the selected case; sequence captures follow only their resulting value; fulfilled literal `import("ws")` origins retain exact default/named exports. Both source consumers use these owned facts; filesystem graph regressions preserve endpoint/source provenance. Validation on Node 24.18.0 / npm 11.16.0: the identical final two-file regression selection has **18 failures / 201 passes on unchanged f7fb803**, then **219 passes after the fix**. The related 15-file selection passes **696 tests**. A separate **19-case inert VM/compiled-module comparison** passes; the locked ws 8.21.0 namespace/default/named identities were inspected without creating a socket, and three compiled dynamic-import cases pass. Ordinary yield and async delegation controls remain supported; unknown synchronous delegates remain conservative. `compile:termux`, the locked TypeScript 6 `--noEmit` check (3 GiB heap), lint/module boundaries, knip, metadata, architecture, test discovery, changed-file formatting and pre-commit checks pass. Native `npm run check` remains unavailable because `/proc/self/exe` is absent; full-repository formatting also encounters worker `uv_resident_set_memory` errors on unrelated HTML files. The minimal compiled CLI and real stdio MCP global-WebSocket controls both return `artifact_operation_failed/io`; an independent `process.memoryUsage()` probe raises `ENOENT/uv_resident_set_memory`. Complete public-workflow acceptance is therefore **not established**. No host shims, live sockets, browser/provider or performance claims. Repository CI still requires maintainer approval. ### Stable promise-result follow-up Commit efa64b02c1ef87945f578f5e363cbd64cec932e8 shares exact stable-result identity between Promise provenance, awaited import origins and the execution proof. The definitions pass retains await sites for a lazy per-source reverse index; no consumer adds another AST scan. Execution frames retain their actual evaluation/wait point and compare the nearest shared lexical activation, so initialization before an aliased wait remains distinct from initialization after it. Ordered object evaluation includes computed keys, data values and spreads, but not method bodies. The superseded recursive Promise resolver is removed; unstable/cyclic/projected identities remain unresolved. On Node 24.18.0 / npm 11.16.0, the identical three-file regression selection has **15 failures / 265 passes on unchanged 641db34**, then **280 passes after correction**. Related source/filesystem/Promise lanes pass **809 tests across 18 files** (794 in 17 files plus 15 call-semantics tests). **20 independent inert ESM/compiled-module cases** pass, including top-level await, wait-before/after initialization, shadowing, object evaluation and pending imports; dynamic module controls use self-authored SyntheticModules, not real sockets/providers. `compile:termux`, locked TypeScript 6 `--noEmit` at 3 GiB, lint/module boundaries, knip, metadata, architecture, discovery, changed-file formatting and pre-commit checks pass. The standard `npm run check` still fails at the native compiler's unavailable `/proc/self/exe`. Fresh minimal compiled CLI and real stdio MCP controls still return `artifact_operation_failed/io`; complete public-workflow acceptance remains unverified. No host shims or live sockets were used. Current-head repository CI requires maintainer approval. <details><summary>Source-analysis cost sample (not end-to-end performance)</summary> Same 79,871-byte input, 100 promise aliases and 2,000 endpoints, with identical endpoint-output SHA-256 before/after. One first analysis after imports: 253.1 → 266.3 ms elapsed, 569.1 → 614.1 ms process CPU. Median of three warm analyses: 161.7 → 158.7 ms elapsed, 307.5 → 292.8 ms process CPU. Startup/import time, peak process-family memory and model tokens were not measured; host RSS is unavailable and no model was invoked. This small sample establishes neither an end-to-end speedup nor a latency guarantee. </details> ### Reached-wait and expression-result follow-up Commit ffca5293e39803bbd102c9c8d9739a073939643f admits a wait constraint only through a syntax-proven unconditional path. All await sites remain retained; possible/skipped waits are not promoted to blocking proof. Shared control-flow ownership handles literal branches/short circuits, loop-entry uncertainty and preceding definite exits, with cached statement prefixes. One optional-chain rule now serves assignment indexing and evaluation order; the old private call rule is removed. Member operands carry completed suspension without promoting skipped keys. The ambient identity owner accepts optional global captures under the same shadow/write checks, and outward exact-result following includes plain assignment RHS values while stored results remain deferred. On Node 24.18.0 / npm 11.16.0, the identical three-file regression selection has **16 failures / 260 passes on unchanged efa64b0**, then **276 passes after correction**. **872 tests across 19 related files** pass. **24 independent inert ESM/compiled-module controls** pass, covering skipped/proven waits, member operands, inherited optional short circuits, optional ambient captures and immediate/stored assignment results. Filesystem graph assertions preserve the endpoint/file/source provenance. These controls use no live socket or provider. `compile:termux`, locked TypeScript 6 `--noEmit` at 3 GiB, lint/module boundaries, knip, metadata, architecture, discovery, changed-file formatting and pre-commit checks pass. Fresh native `npm run check` still fails because `/proc/self/exe` is unavailable. Minimal compiled CLI and real stdio MCP global-constructor controls still return `artifact_operation_failed/io`; complete public-workflow acceptance and full repository CI are not established. No host shims or complete interprocedural/runtime-execution claim. <details><summary>Source-analysis cost sample, excluding startup/imports</summary> Same 79,871-byte, 100-alias/2,000-endpoint task and identical endpoint-output SHA-256. One first call: 226.2 → 253.4 ms elapsed, 556.3 → 541.3 ms process CPU. Median of three warm calls: 136.0 → 127.6 ms elapsed, 286.8 → 240.8 ms process CPU. Peak process-family memory and model tokens were unmeasured (host RSS unavailable; no model invocation). This small source-module sample establishes no end-to-end speedup or latency guarantee. </details> ### Mandatory operands and exact projection follow-up Commit d628f06600110a4e17e84254f33e3b2d67bafbed unifies syntax-proven branch/assignment operands for reached-wait and continuation proofs. Arithmetic/bitwise assignments retain mandatory RHS waits; only logical assignments can short-circuit. Literal selected branches carry suspension, and optional calls always evaluate the callee without promoting skipped arguments. Import-equals member paths use the shared CommonJS write proof, including indexed direct-origin writes. Fresh literal array/object projections retain exact constructor captures; ambiguous spreads/defaults and mutable aliased arrays remain unresolved. On pinned Node 24.18.0 / npm 11.16.0, the identical final source/filesystem regression selection has **25 failures / 285 passes on unchanged ffca529**, then **310 passes after correction**. **913 tests across 19 related files** and **32 independent inert ESM/TypeScript-erased VM controls** pass. Filesystem assertions retain endpoint/file/source provenance. No real ws package, socket, browser or provider is invoked by these controls. Official `compile:termux`, locked TypeScript 6 `--noEmit` at 3 GiB, lint/module boundaries (0 errors; 1,467 warnings), knip, metadata, architecture, discovery, changed-file formatting and pre-commit checks pass. Fresh standard `npm run check` still fails because the native compiler requires unavailable `/proc/self/exe`. Minimal compiled CLI and real stdio MCP controls still return `artifact_operation_failed/io`; complete public-workflow acceptance and repository CI are not established. No host shim or complete interprocedural/runtime-execution claim. <details><summary>Comparable source-analysis cost sample, not end-to-end performance</summary> Same 79,871-byte input, 100 aliases and 2,000 endpoints; endpoint-output SHA-256 remains identical. First call after imports: 217.2 → 216.4 ms elapsed, 497.9 → 496.9 ms process CPU. Median of three warm calls: 121.8 → 136.9 ms elapsed, 246.5 → 253.1 ms CPU. Startup/imports, peak process-family memory and model tokens are unmeasured (host RSS unavailable; no model invocation). This small source-module sample supports no speedup or latency guarantee. </details> ### Main synchronization and projection/tag follow-up [fbb76e3](https://github.com/Afloat16/rea/commit/fbb76e3fcc30318aa7e5a06c695716d7bdc1d5a9) integrates main 461eb1612. The two conflicts retain main's shared branch/delayed-field facts and the existing capture-before-loop rule. Optional-chain interpretation now has one owner in semantic evaluation order; the superseded private/AST-value copy is removed. The merge control passes 326 tests across four selected files. [d90dce7](https://github.com/Afloat16/rea/commit/d90dce75501f0e463b7fa223fd787c7a6a858639) preserves numeric iteration versus string property projections, literal template-tag invocation phases, ordered substitutions and explicit for-of/for-in RHS awaits. One exact-result operand owner now serves constructor captures, Promise results and outward invocation following. Ambiguous containers, compound-assignment results and skipped bodies remain unresolved. On pinned Node 24.18.0 / npm 11.16.0, the identical final two-file source/filesystem regression selection has **22 failures / 317 passes on unchanged d628f06**, then **339 passes after correction**. **964 tests across 20 related files** and **30 independent inert ESM/TypeScript-erased VM controls** pass, retaining endpoint/file/source provenance. No real ws package, socket, browser or provider is used. Official `compile:termux`, locked TypeScript 6 `--noEmit` at 3 GiB, lint/module boundaries (0 errors; 1,502 warnings), knip, metadata, architecture, test discovery, ten-file formatting and pre-commit checks pass. Fresh standard `npm run check` still fails at the native compiler's unavailable `/proc/self/exe`. Minimal compiled CLI and real stdio MCP controls both still return `artifact_operation_failed/io`; complete public-workflow acceptance and repository CI are not established. No host shims or complete iterator/interprocedural/runtime-execution claim. <details><summary>Source-analysis cost sample, including main synchronization</summary> Same 79,871-byte input, 100 aliases, 2,000 endpoints and identical endpoint-output SHA-256, comparing compiled d628f06 with the synchronized/fixed tree. First call after imports: 315.8 → 242.4 ms elapsed, 641.8 → 525.1 ms process CPU. Median of three warm calls: 255.1 → 151.6 ms elapsed, 377.8 → 319.8 ms CPU. Startup/imports, peak process-family memory and model tokens are unmeasured (host RSS unavailable; no model invocation). This small shared-host sample includes upstream changes and supports no isolated speedup or latency guarantee. </details> ### Binding events and structured-continuation follow-up [eed85d4](https://github.com/Afloat16/rea/commit/eed85d471e921a7fc631ee67a66146430f248b87) synchronizes main d52a48847. The conflict resolution retains main's path-aware ambient API checks, constructor projections and shared static-key interpretation; the merge-only control passes 357 tests across four files. [ed932a6](https://github.com/Afloat16/rea/commit/ed932a63f7d7c107c996239b01c23df1e00d1b4b) addresses the eight new review comments through shared producing facts: declaration binding events rather than RHS spelling; implicit async-iteration waits; mandatory do/while, no-catch try/finalizer and body-before-update phases; RHS-before-pattern evaluation with conditional defaults; and selected literal-value captures before later export writes. Cached jump facts use shared AST traversal. Both source consumers and filesystem endpoint/file/line provenance are covered. Break/continue bypasses, abrupt entry to finally, catch paths, skipped defaults and namespace-versus-constructor copies remain conservative. No complete iterator/interprocedural execution claim. Pinned Node 24.18.0 / npm 11.16.0: the identical two-file regression selection has **17 failures / 352 passes on the synchronized merge-only tree**, then **369 passes after correction**. **994 tests across 20 related files** and **30 independent inert ESM/compiled-source controls** pass, without a live socket, ws package or provider. The unsynchronized d90dce7 control has one additional upstream metadata-test mismatch, not counted as this fix. Official `compile:termux`, locked TypeScript 6 `--noEmit` (3 GiB), lint/module boundaries (0 errors; 1,523 warnings), knip, metadata, architecture, test discovery, changed-file formatting and staged pre-commit checks pass. Fresh `npm run check` fails at the native compiler's missing `/proc/self/exe`; minimal real CLI and stdio MCP controls both return `artifact_operation_failed/io`. Full public-workflow acceptance and current-head repository CI are not established. No host shims. <details><summary>Comparable source-analysis cost sample, including upstream synchronization</summary> Same 79,871-byte input, 100 aliases, 2,000 endpoints and identical endpoint-output SHA-256, comparing compiled d90dce7 with the synchronized/fixed tree. First call after imports: 274.4 → 204.5 ms elapsed, 541.5 → 477.7 ms process CPU. Median of three warm calls: 217.0 → 132.4 ms elapsed, 393.6 → 239.2 ms CPU. Startup/imports, peak process-family memory and model tokens are unmeasured (host RSS unavailable; no model invoked). This small shared-host sample includes upstream changes and supports no isolated speedup or latency guarantee. </details> ### Owned waits and exact-result paths [a94383f](https://github.com/Afloat16/rea/commit/a94383f868ae9d98ec5437d26c414b2f9e229ae3) integrates main 1bd5c5c87. The conflicts preserve both iteration-cardinality facts and this PR's await/binding facts. Main's partial-network request path now consumes the same proven WebSocket identity rather than suppressing bound constructors by spelling. The merge control passes **403 tests across five files**. Main's existing nested-statement effect-order fix (1b9b725) is retained, not duplicated. [4965352](https://github.com/Afloat16/rea/commit/49653525cc6fab144e3aa93c585aa35dccb113a4) addresses the remaining new review findings at their owners: exact-result normalization in ambient writes and literal projections; conditional waits coupled to their direct producer; shared CommonJS self-member normalization; switch-discriminant, optional-child and update-operand phases; and cached nonthrowing-prefix proof before finalizer entry. Both source consumers and filesystem endpoint/file/line provenance agree. Ambiguous containers, independently created promises with skipped waits, conditional case bodies and potentially earlier throws remain conservative; no complete exception/iterator/interprocedural execution claim. Pinned Node 24.18.0 / npm 11.16.0: the identical two-file selection has **24 failures / 386 passes on the synchronized pre-fix tree**, then **410 passes after correction**. **1,054 tests across 23 related files** and **34 independent inert ESM/compiled-source controls** pass without live sockets, ws-package execution or providers. Official `compile:termux`, locked TypeScript 6 `--noEmit` (3 GiB), lint/module boundaries (0 errors; 1,532 warnings), knip, metadata, architecture, discovery, ten-file formatting and staged pre-commit checks pass. Fresh native `npm run check` still fails at missing `/proc/self/exe`. Minimal real CLI and stdio MCP controls still return `artifact_operation_failed/io`; full public-workflow acceptance and current-head repository CI are not established. No host shims. <details><summary>Comparable source-analysis cost sample, including upstream synchronization</summary> Same 79,871-byte input, 100 aliases, 2,000 endpoints and identical endpoint-output SHA-256, comparing compiled ed932a6 with the synchronized/fixed tree. First call after imports: 267.5 → 251.3 ms elapsed, 569.3 → 564.5 ms process CPU. Median of three warm calls: 146.7 → 152.4 ms elapsed, 252.7 → 276.0 ms CPU. Startup/imports, peak process-family memory and model tokens are unmeasured (host RSS unavailable; no model invoked). This small shared-host sample includes upstream changes and supports no isolated speedup or latency guarantee. </details> ### Current revision: selected values and reachable waits Synchronized main `42fc6c53a` in [7df379c](https://github.com/Afloat16/rea/commit/7df379c06aede9e0b7418515c4291e47062203d3); [016a22d](https://github.com/Afloat16/rea/commit/016a22d92761125f94792a9168ee7d2858f3a84f) addresses the nine new inline findings and the rebound-import finding. Shared owners now preserve initialized promise aliases and branch-local producer/wait coupling, dead jump prefixes, literal allocation effects at binding events, iterator uncertainty, construction context, and logical-assignment/switch-case continuation. Disposing declarations remain potentially throwing. Both source consumers use these facts; the filesystem graph retains source ranges. Cross-activation alias order and unsupported effects remain conservative rather than inferred exact. - 1,149 tests across 25 related files pass. The final two-file regression selection has 25 failures / 417 passes on the synchronized pre-fix tree and 442 passes after the fix; it includes 32 new source-consumer cases plus ten filesystem fixtures. - 34 independent inert runtime controls pass against the compiled analyzer, using local constructors and no sockets/network/provider. Import-equals mutation controls use TypeScript 6 CommonJS/ES5 output; target-fixture typechecking and real `ws` behavior are unverified. - Official JavaScript fallback compilation, TypeScript 6 `tsc --noEmit`, lint (0 errors; existing warnings), knip, staged formatting/lint, metadata, module/architecture boundaries and discovery of all 1,400 test files pass. - `npm run check` was attempted and remains blocked by this host's missing `/proc/self/exe` and RSS support (`uv_resident_set_memory`). Fresh real CLI and SDK/MCP calls reach `analyze_javascript_application` but return `artifact_operation_failed` / `io`; neither end-to-end acceptance nor the native gate is claimed passed. Current-head repository CI still requires maintainer approval. Cost sample: identical 79,871-byte source, 100 promise aliases, 2,000 endpoints and identical SHA-256 output. Previous-head → synchronized/fixed first-after-import analysis: 206.1 → 450.1 ms wall, 487.6 → 606.0 ms process CPU; three warm runs average 132.7 → 163.0 ms wall and 259.0 → 286.6 ms CPU. This single shared-host sample includes upstream synchronization and concurrent work; no speedup is claimed. Startup/import cost, model tokens and peak process-family memory remain unmeasured (RSS unavailable); no model was invoked by the fixture. Indexing allocation effects is selected only for literal constructor projections and retained per analysis. ### Latest revision: literal-caller blocking waits [f3c7e53](https://github.com/Afloat16/rea/commit/f3c7e5308028b3c120861faa9fe6d7ffb818227f) addresses the subsequent outer-promise/IIFE review. Alias initialization and constructor capture now share one nearest-activation order proof. Non-recursive direct frames preserve invocation bounds while the wait index verifies mandatory reachability through each literal caller; the previous duplicate same-owner-only proof is removed. Unawaited/optional wrappers and uninitialized aliases remain distinct. Source tests declare module syntax to distinguish top-level await from a script call named `await`; explicit `.mjs` graph controls retain endpoint/source provenance. No general interprocedural execution claim. Latest validation: **1,158 tests / 25 files**, **43 independent inert runtime controls** (the earlier 34 rerun plus nine literal-caller controls), official JavaScript fallback compilation, TypeScript 6 `--noEmit`, lint (0 errors; existing warnings), knip, metadata, module/architecture boundaries, 1,400-file test discovery, formatting and staged checks pass. The same two-file selection has **6 failures / 445 passes on 016a22d**, then **451 passes after correction**. Nonblocking runtime cases explicitly delay and settle the owned input after initialization. Fresh real CLI/MCP controls still return `artifact_operation_failed/io`; complete public-workflow and native acceptance remain unavailable under the previously recorded host restrictions. Repository CI is pending/approval-gated, not claimed passed. Comparable source-module sample against compiled 016a22d: identical 79,871-byte / 100-alias / 2,000-endpoint input and output SHA-256. First-after-import wall/CPU: 450.1/606.0 → 407.9/751.8 ms; three warm runs average 163.0/286.6 → 197.0/393.6 ms. This shared-host sample includes concurrent work and supports no speedup claim. Startup/import cost, model tokens and peak process-family memory remain unmeasured; no model/provider/network operation is performed by these controls. Await facts remain indexed once per parsed source. ### Latest revision: selected invocation phases [8d8688c](https://github.com/Afloat16/rea/commit/8d8688cdc80305a0beb8547c2bb1b9a2b8f94090) addresses the five subsequent findings. The shared exact-result owner exposes literal-selected conditional/logical results; fresh literal methods use one final-own-member selector; ImportExpression operands preserve source/options order; producer/wait coupling retains a shared case's reachable statement list; direct legacy decorator invocation follows class preparation while preserving generator/deferred phases. Method decorator metadata is evaluated with its class, including suspension from computed keys. Unknown selections remain unresolved; this does not establish a complete interprocedural execution model. Latest validation: **1,192 tests across 25 related files** and **74 independent inert runtime controls** pass (43 previous controls rerun plus 31 new controls). The identical two-file regression selection has **23 failures / 462 passes on f3c7e53**, then **485 passes** after correction, including 34 new cross-consumer cases and eight filesystem fixtures with source evidence. Dynamic-import controls use owned SyntheticModules only; decorators use TypeScript 6 legacy-decorator output. No socket, network or real-provider behavior is claimed. Official JavaScript fallback compilation, TypeScript 6 `--noEmit`, lint (0 errors; existing warnings), knip, metadata, module/architecture boundaries, discovery of all 1,400 test files and six-file formatting/staged checks pass. Standard `npm run check` remains blocked by unavailable `/proc/self/exe`; full formatting workers also encounter this host's RSS limitation. Fresh real CLI and SDK/MCP controls still return `artifact_operation_failed/io`. Native and complete public-workflow acceptance remain unverified; repository CI requires separate approval and is not claimed passed. Source-analysis cost sample against compiled f3c7e53: identical 79,871-byte / 100-alias / 2,000-endpoint input and identical output SHA-256. First-after-import wall/CPU: 227.9/523.4 → 248.4/516.3 ms; three warm runs average 141.0/261.9 → 157.2/286.6 ms. This shared-host sample includes concurrent work; no speedup claim. Startup/import cost, model tokens and peak process-family memory are unmeasured (RSS unavailable); the controls invoke no model/provider/network operation. ### Exact promise results and class/JSX phases (2026-10-16) [50ec82f](https://github.com/Afloat16/rea/commit/50ec82fa6f9eb44d113d499f093073d8d3cb56e2) integrates main `2c7583599`. [666fca1](https://github.com/Afloat16/rea/commit/666fca131fe0e7e3a2b0ed0218be40086f6c511c) addresses seven remaining review findings. Promise/import and constructor identity share fresh-literal projection, capture order and iteration/effect facts; awaited-result indexes invalidate when those facts change. Direct zero-argument literal returns preserve the original promise identity. Fresh static method selection respects the methods-before-fields phase. Ordinary/private/auto-accessor fields share timing, with auto-accessor syntax enabled at the parser boundary. Ordered JSX operands, reachable labeled prefixes and safe awaited abrupt exits feed the existing continuation owner. Unknown getters, iteration, returns and earlier throwing/jump paths remain conservative. - **2,462 related tests / 81 files pass.** The identical final three-file regression selection reports **28 failures / 499 passes before these corrections**, then **527 passes**; 35 new cross-consumer cases and seven graph fixtures retain endpoint/source provenance. The seven canonical findings all fail on the synchronized pre-fix tree; the auto-accessor example first fails at parsing. - **35 independent compiled-analyzer checks and 32 inert VM runtime comparisons pass.** Three unknown/deferred static cases are intentionally not equated with execution. Dynamic imports use owned SyntheticModules; JSX/auto-accessors use TypeScript 6 ES2022/React output. No real socket/provider coverage is established. - Official `compile:termux`, locked TypeScript 6 `--noEmit` (4 GiB), lint (0 errors; existing warnings), knip after compilation, metadata, module/architecture guards, 1,414-file test discovery and 12-file formatting pass. - Fresh `npm run check` fails at the native compiler's missing `/proc/self/exe`; full-repository formatting workers fail at `uv_resident_set_memory`. Fresh minimal compiled CLI and real SDK stdio MCP controls still return `artifact_operation_failed/io`. Native/full public-workflow acceptance and current-head repository CI are **not established**. Comparable source-module cost sample against the synchronized pre-fix tree, using the same TSX loader and identical 103,845-byte / 100-alias / 2,000-endpoint input and output SHA-256: first-after-import wall/CPU **136.2/260.6 → 133.4/258.6 ms**; three warm calls average **80.4/151.5 → 80.4/145.5 ms**. This small shared-host sample supports no end-to-end speedup claim. Startup/import cost, peak process-family memory and model tokens remain unmeasured. ### Current revision — 2026-10-16 e2edaa493479193e07b3c15e2fe9b1e2b438f5a7 addresses seven further review findings after synchronizing main d72d856f: assignment completion, computed-key binding order, global self-reference reads, caught-prefix waits, with-body suspension, iterable spread and asynchronous disposal. Related tests: 2,551 passed / 83 files. Identical regression files: 18 failed / 560 passed before, 578 passed after. Fresh compiled controls: 35 passed; independent inert execution controls: 34 passed. [Current validation, cost sample and coverage limits](https://github.com/morluto/rea/pull/3940#issuecomment-6211192121). The public CLI and real SDK stdio MCP still return artifact_operation_failed/io in this host. Native check is blocked by missing /proc/self/exe; whole-repository formatting encounters host RSS errors. These gates and the full public workflow are not claimed as passing. ### Current revision — scope exit and producer order 89771c4d25eedac918bfb629008f1bd1fee10af3 addresses seven new findings after synchronizing main 781d5751: disposal at block exit, producer-relative caught prefixes, outer assignment invocation, iteration-head TDZ, destructuring iteration, selected case tests and optional invocation arguments. Related tests: 2,585 passed / 83 files. Identical regression files: 17 failed / 595 passed before, 612 passed after. Compiled controls: 34 passed; independent inert execution controls: 32 passed. [Current verification and measured costs](https://github.com/morluto/rea/pull/3940#issuecomment-6212897924). Standard check/check:fast remain blocked by missing /proc/self/exe. Fresh public CLI and real SDK stdio MCP still return artifact_operation_failed/io. Native disposal and the full public workflow are not claimed as verified. ### Current revision — consumed prefixes and settlement 5684e2bf6484c53b47edff4732e4a92b232544c1 addresses seven further findings after synchronizing main fe2a398d: per-resume pattern work, getter read/write roles, sequence-prefix completion, optional-call argument prefixes, conditional wait bypasses, async Promise settlement dependencies and resumed generator delegation. Related tests: 2,633 passed / 83 files. Identical three-file regressions: 23 failed / 673 passed before, 696 passed after. Compiled controls: 45 passed; inert runtime controls: 45 passed, including five explicitly unexecuted metadata cases; three native Promise identity/adoption controls passed. [Current verification, measured costs and limits](https://github.com/morluto/rea/pull/3940#issuecomment-6215170242). Standard check/check:fast remain blocked by missing /proc/self/exe. Fresh public CLI and SDK stdio MCP still return artifact_operation_failed/io; the complete public workflow is not claimed as passing. ### Latest execution-phase validation (2026-10-16, d7319e2) Synchronized main `180ba03bf`; fixed immediate sequence-call ordering, nested consumed patterns, fresh setters, hoisted prefix reads and mandatory scope-exit suspension. [Detailed results and remaining limits](https://github.com/morluto/rea/pull/3940#issuecomment-6217251737). - Same final two regression files: 33 failures / 681 passes before, 714 passes after. Related selection: 2,690 tests / 83 files pass. - Fresh compiled analysis and independent inert execution: 57 controls each; three dormant-body metadata cases do not execute the body. Disposal uses TypeScript 6 ES2022 output. - Fallback compile, TypeScript 6, lint/module boundaries, knip, metadata, architecture/discovery, six-file formatting and actual pre-commit pass. - Standard native check remains blocked by missing `/proc/self/exe`; fresh public CLI and real SDK stdio MCP still return `artifact_operation_failed/io`. No complete end-to-end or performance improvement is claimed. ### Latest literal-consumer validation (2026-10-16, db493a7e) Six additional review findings are corrected through shared invocation, optional-chain, mutation-aware slot and consumed-pattern owners. Both source consumers request the required effect facts. [Detailed results and limits](https://github.com/morluto/rea/pull/3940#issuecomment-6219578251). - Identical final source/filesystem selection: 32 failures / 732 passes before, 764 passes after. Related tests: 2,740 / 83 files pass. - Fresh compiled analysis and independent inert execution: 50 controls each, four explicitly metadata-only. Fallback build, TypeScript 6, lint/module boundaries, knip, metadata, architecture/discovery, formatting and actual pre-commit pass. - Standard native check remains blocked by missing `/proc/self/exe`; fresh public CLI/SDK stdio MCP still return `artifact_operation_failed/io`. - Comparable source-only sample is slower with required effect indexing; no performance improvement or complete public-workflow acceptance is claimed. ### Latest review follow-up 3ef19f9a synchronizes main, addresses five new inline reports (four shared semantic problems), and narrows caller-query caching. Final validation: 2,908 related tests / 84 files; 28 compiled and inert-runtime controls, with public CLI/MCP and native-gate limits recorded in [the verification report](https://github.com/morluto/rea/pull/3940#issuecomment-6221677872). Current-head CI/review remains pending. ### Latest consumer-route validation 49c2748b addresses nine new inline findings and synchronizes main, including its existing firmware assertion correction. Related tests: 2,939 / 84 files; identical regressions: 21 failures before, 823 passes after. [Verification, CI diagnosis, measured costs and remaining limits](https://github.com/morluto/rea/pull/3940#issuecomment-6223614883). New-head CI/review is pending. Update fe669378: fixed reached optional-argument waits and generator return/throw operand phases. 2,951 related tests pass; identical regression files change from 5 failures / 830 passes to 835 passes. [Validation and limits](https://github.com/morluto/rea/pull/3940#issuecomment-6225415745). Prior-head CI is green; current-head CI is pending. CI follow-up: fe669378 fails the existing main admission-cancellation assertion tracked in #4610; independently reproduced on main 0c7b6d83. [CI evidence](https://github.com/morluto/rea/pull/3940#issuecomment-6226886385). Latest review reports no new blocking finding. Full CI remains unqualified. Synchronization e885899a integrates main 4e14452d, upstream cancellation/cleanup repairs and the subsequent shared AST helper conflict resolution. 3,064 related tests pass; the previously failing admission assertion passes in isolation. [Current validation and limits](https://github.com/morluto/rea/pull/3940#issuecomment-6231422921), including unavailable local CLI/MCP acceptance. New-head CI/review remains separate and pending. Execution-order repair 424304c5 addresses immediate returned-call activation, nullish nested-pattern failure and mandatory do-while test waits. 3,080 related tests pass; identical final two-file regressions improve from 10 failures to 851 passes. [Validation and remaining local native/CLI/MCP limits](https://github.com/morluto/rea/pull/3940#issuecomment-6232477822). Current-head [CI 39022589477](https://github.com/morluto/rea/actions/runs/39022589477) passed; the latest review confirms the three findings are addressed with no new blocking issue. Local verification limits above remain unchanged. ## Author readiness Human owner: @Afloat16 - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. <!-- maintainer-blocker-review --> ### Maintainer blocker verification The first remediation pass paginated 283 threads and checked the 65 previously unresolved findings against their replies, reachable fixes and current producers. After merging main `3dbe314`, 13 focused source/filesystem files passed 1,724 tests and `check:fast`. This was aggregate regression evidence, not 65 new runtime reproductions. Follow-up commit `dc6b4ad51` fixes the callback Cartesian scan with parameter-owned supplier indexing and identity-based candidate deduplication; selects the actual later destructured getter property; and links a stored generator iterator only to a unique immutable array-pattern consumer. Relevant String iterator mutations now make nested completion unproven, and ambient-effect additions invalidate pattern-wait facts. Native-iterator positives and the throwing-iterator counterexample are both covered. The early callback-alias reviewer example already reaches the correct later socket through the existing initialization/admission phase; its regression is retained without a redundant supplier guard. The latest focused domain suite passed 39 tests, the compiled filesystem boundary passed its integration case, and `check:fast` passed on Node 24.18.0/npm 11.16.0. A single completed 100-callback source-analysis sample retained all endpoints: inner elapsed 258.7 ms before / 35.0 ms after; process max RSS 168,181,760 / 145,260,544 bytes. These are noisy single samples, not process-family peaks or a guaranteed speedup; whole CLI/MCP, agent-token and provider costs were not measured. The long Promise-chain follow-up is fixed in `4f2a24e0a`: iterative ancestry proofs are cached only after mutation facts finish indexing. Exact callee ownership resolves first, then nested call/new-expression subtrees are pruned from the immediate-caller walk, avoiding repeated scans of every prior chain receiver. The paired 4,000-link source on the original `45a40a3` head reproduced `RangeError` in recursive `nativePromiseChainParent`; the new head completes with the expected endpoint and explicit partial limitations. Current validation passed 87 domain tests (including the 4,000-link regression), the compiled filesystem case and `check:fast`, on pinned Node 24. In single paired source-analysis samples, 2,000 links took 12.30s before / 1.00s after and 3,000 took 23.44s / 1.40s. The failing 4,000-link baseline used 7.60s user CPU and 492,503,040-byte process max RSS; the completed new task took 2.21s analysis, 2.81s user CPU and 305,774,592-byte process max RSS. Failure and success are not equivalent completed tasks; the completed 2k/3k pairs support the performance comparison. These are single host samples, not portable speedup guarantees. Cold/warm separation, agent tokens, full CLI/MCP latency and process-family peak memory remain unmeasured. No real browser/socket/provider workflow was run in this remediation pass. <!-- current-blocker-followup --> ### Current follow-up evidence The author's follow-up `60c063fce` descends from both remediation commits. Independent source review verified the new shared consumer-order/iterator/getter refinements preserve the five addressed findings. On this exact live head, 132 domain tests, the compiled filesystem boundary case and `check:fast` passed using Node 24.18.0/npm 11.16.0. The earlier performance measurements above are pinned to their stated baseline/fix heads, not re-labelled as measurements of this later author commit. No target/provider execution was performed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi changed title from [PR #3940] fix(javascript): preserve proven WebSocket endpoint identities to [PR #3940] [CLOSED] fix(javascript): preserve proven WebSocket endpoint identities 2026-11-01 21:16:48 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5968
No description provided.