[PR #2761] [MERGED] fix(javascript): exclude TypeScript this annotations from runtime parameters #5373

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2761
Author: @xu91102
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: fix/typescript-this-runtime-parameters


📝 Commits (10+)

  • 2d5c282 fix(javascript): exclude TypeScript this annotations from runtime parameters
  • 8546442 test(javascript): assert exact typed argument bindings
  • 1efd275 test(apple): keep dyld slice regression portable
  • 42e91c7 chore: merge upstream CI baseline fixes
  • ed4643b fix(process): report no remaining time after a provider deadline fires
  • 49baffa chore: reconcile upstream bridge and deadline changes
  • 4f43d7b chore: integrate upstream validation fixes
  • 7b52486 fix(javascript): sync runtime parameter fix with captured main
  • 9d1b98b fix(ci): restore descriptor and fixture validation
  • d133cee fix(ci): preserve scoped fixtures and verifier contracts

📊 Changes

23 files changed (+309 additions, -166 deletions)

View changed files

📝 native/windows/README.md (+3 -1)
📝 scripts/verify-windows-native-inspection.mjs (+18 -4)
📝 src/domain/android/androidAnalysis.ts (+1 -1)
📝 src/domain/javascript/electronWrappedCallPaths.ts (+4 -1)
📝 src/domain/javascript/javascriptAstFingerprint.ts (+7 -8)
📝 src/domain/javascript/javascriptAstValues.ts (+8 -0)
📝 src/domain/javascript/javascriptBootstrap.ts (+7 -4)
📝 src/domain/javascript/javascriptModuleInterop.ts (+3 -2)
📝 src/domain/javascript/javascriptSemanticAnalysis.ts (+4 -3)
📝 src/domain/javascript/javascriptSemanticCallResolution.ts (+7 -3)
📝 src/domain/javascript/javascriptSemanticFingerprints.ts (+2 -1)
📝 src/domain/javascript/javascriptSemanticIterationSources.ts (+3 -1)
📝 src/domain/javascript/javascriptStaticAnalysisBundler.ts (+2 -1)
📝 src/domain/javascript/javascriptStaticAnalysisHelpers.ts (+2 -1)
📝 src/domain/javascript/javascriptSymbolicBindings.ts (+3 -4)
📝 src/ghidra/GhidraAnalysisSeeds.test.ts (+1 -14)
➕ src/ghidra/GhidraInstallation.fixture.ts (+16 -0)
📝 src/ghidra/GhidraLanguageOverride.test.ts (+1 -16)
📝 src/ghidra/GhidraMipsProfile.test.ts (+15 -17)
📝 src/ghidra/GhidraPowerPcProfile.test.ts (+9 -16)

...and 3 more files

📄 Description

TypeScript's this pseudo-parameter is erased before runtime calls. REA counted it as an argument, shifting recovered positional values, parameter ownership and function fingerprints. One shared runtime-parameter owner removes that erased slot while retaining original AST nodes and source ranges.

Fixes #2570

The existing public CLI/stdio MCP scenario compares actual TypeScript compilation and Node output, then checks exact runtime argument bindings, ordinary/rest/destructured parameters and function length. It reuses the owned process fixture and deadline/cleanup supervision. Integration preserves recursive Electron bridge identity, monotonic deadlines and caller-scoped Linux controls; production observation still inspects full /proc and rejects unknown caller-owned processes.

The related CI repairs retain their existing owners:

  • Browser verifier helpers parse direct endpoint input using listBrowserTargetsInputSchema; public CLI/MCP strings and the provider contract are retained.
  • Windows conformance checks retained directory identity across NTFS rename instead of asserting that a DELETE-sharing handle forbids rename. Retry and environment teardown must remove the original renamed inode and preserve a replacement at the original path. Admission caching and controlled disposition failures remain; production C++/loader are unchanged. Corrected Windows execution still requires exact-head CI.
  • Upstream integration retains both intents in the artifact-comparison conflict: the new fragment-integrity grouping and APK/ZIP coverage, all prior completeness/citation/tampering assertions and timeouts. Upstream also supersedes the single-use CIL table extraction with its own grouped tests; that redundant helper is removed while all ten rows and malformed/negative-zero assertions remain. Those two files now exactly match accepted main.
  • The integrated upstream message-completeness test actually failed because it expected numeric generation order instead of the producer's canonical sorted set. The minimal correction still asserts all 100 exact messages in canonical order; production sorting, byte budget, required/omitted-message controls and huge-string tests are unchanged.
  • Earlier e07ad PR CI (synthetic merge bc6a0e4 against main 3cb9d61) Docs Generation failed on a missing Turkish README Rust-guide link. Its full job log identifies that exact mismatch. Accepted main adds the existing guide row/link; the final merged bytes pass the unchanged documentation checker and all five README conformance tests.

Validation for f026d21af126c66d60cad6b959212d656e8f4405 (ordinary merge retains e07ad918 and integrates main 49e73fc03bec57c6a881a863a6c922d0f69017e7):

  • macOS arm64, pinned Node 24.18.0: 73 selected files, 72 passed / one Linux-only file skipped; 1443 tests passed / 3 conditional skips. This covers the existing public compiler/Node/CLI/MCP parameter workflow, affected semantic consumers, empty-name imports, APK/ZIP evidence, deadlines, CI policy/cache controls and browser URL sanitization. The initial one-test failure is preserved separately from the final passing result.
  • All six npm run check tasks and module/architecture guards pass. Discovery finds all 1129 files exactly once; this is not execution of all files. npm run docs:check and its five conformance tests pass. Independent local Standards/Spec review passes on the final frozen contribution and merge; ordinary commit/push preserve its bytes.
  • Fresh actual Chrome 154.0.8037.98 runtime and source-map workflows pass through public CLI/MCP on these final bytes, including four public compiler-point cases and all four nested offsets using esbuild 0.25.10. The intentional interrupted-control case still reports unconfirmed cleanup and is not relabeled as confirmed.
  • Earlier isolated Linux arm64 validation passed 71 tests and rejected an actual same-caller-UID non-dumpable process; that historical result does not certify this commit's GitHub Linux x64 lane. New Windows NTFS conformance was not executed on this macOS host.

Exact-head GitHub CI, including Windows, remains a separate required result and is pending. Cancelled/superseded old CI is not a pass. Public schemas and caller-selected source identities are preserved. Real native Ghidra/Hopper/IDA, installed-package and target-execution workflows were not run.


🔄 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/2761 **Author:** [@xu91102](https://github.com/xu91102) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/typescript-this-runtime-parameters` --- ### 📝 Commits (10+) - [`2d5c282`](https://github.com/morluto/rea/commit/2d5c282d1b2a541dddc7461f0ceee155e7103ce3) fix(javascript): exclude TypeScript this annotations from runtime parameters - [`8546442`](https://github.com/morluto/rea/commit/8546442671317613107d4062a136f8f02be3d7fc) test(javascript): assert exact typed argument bindings - [`1efd275`](https://github.com/morluto/rea/commit/1efd2759032c98639ce15edc61e875fdf09dd4e8) test(apple): keep dyld slice regression portable - [`42e91c7`](https://github.com/morluto/rea/commit/42e91c7acbf38817a208ee1c50f0d32bd5f709f5) chore: merge upstream CI baseline fixes - [`ed4643b`](https://github.com/morluto/rea/commit/ed4643b7bd1b911741673a61a1d12e9fd754c421) fix(process): report no remaining time after a provider deadline fires - [`49baffa`](https://github.com/morluto/rea/commit/49baffad6d7d465702ee34c2be856482f1f8a03a) chore: reconcile upstream bridge and deadline changes - [`4f43d7b`](https://github.com/morluto/rea/commit/4f43d7b3a9b2a218aec6443c465407d9a1acb399) chore: integrate upstream validation fixes - [`7b52486`](https://github.com/morluto/rea/commit/7b5248643d5fb21cfa02fa17de1717dba9cb6d73) fix(javascript): sync runtime parameter fix with captured main - [`9d1b98b`](https://github.com/morluto/rea/commit/9d1b98bed14edd2c76bcb1f7d82548f8f1d0c47e) fix(ci): restore descriptor and fixture validation - [`d133cee`](https://github.com/morluto/rea/commit/d133cee6272e6bcbc6b04d0f7c89b5b8ac5b1c23) fix(ci): preserve scoped fixtures and verifier contracts ### 📊 Changes **23 files changed** (+309 additions, -166 deletions) <details> <summary>View changed files</summary> 📝 `native/windows/README.md` (+3 -1) 📝 `scripts/verify-windows-native-inspection.mjs` (+18 -4) 📝 `src/domain/android/androidAnalysis.ts` (+1 -1) 📝 `src/domain/javascript/electronWrappedCallPaths.ts` (+4 -1) 📝 `src/domain/javascript/javascriptAstFingerprint.ts` (+7 -8) 📝 `src/domain/javascript/javascriptAstValues.ts` (+8 -0) 📝 `src/domain/javascript/javascriptBootstrap.ts` (+7 -4) 📝 `src/domain/javascript/javascriptModuleInterop.ts` (+3 -2) 📝 `src/domain/javascript/javascriptSemanticAnalysis.ts` (+4 -3) 📝 `src/domain/javascript/javascriptSemanticCallResolution.ts` (+7 -3) 📝 `src/domain/javascript/javascriptSemanticFingerprints.ts` (+2 -1) 📝 `src/domain/javascript/javascriptSemanticIterationSources.ts` (+3 -1) 📝 `src/domain/javascript/javascriptStaticAnalysisBundler.ts` (+2 -1) 📝 `src/domain/javascript/javascriptStaticAnalysisHelpers.ts` (+2 -1) 📝 `src/domain/javascript/javascriptSymbolicBindings.ts` (+3 -4) 📝 `src/ghidra/GhidraAnalysisSeeds.test.ts` (+1 -14) ➕ `src/ghidra/GhidraInstallation.fixture.ts` (+16 -0) 📝 `src/ghidra/GhidraLanguageOverride.test.ts` (+1 -16) 📝 `src/ghidra/GhidraMipsProfile.test.ts` (+15 -17) 📝 `src/ghidra/GhidraPowerPcProfile.test.ts` (+9 -16) _...and 3 more files_ </details> ### 📄 Description TypeScript's `this` pseudo-parameter is erased before runtime calls. REA counted it as an argument, shifting recovered positional values, parameter ownership and function fingerprints. One shared runtime-parameter owner removes that erased slot while retaining original AST nodes and source ranges. Fixes #2570 The existing public CLI/stdio MCP scenario compares actual TypeScript compilation and Node output, then checks exact runtime argument bindings, ordinary/rest/destructured parameters and function length. It reuses the owned process fixture and deadline/cleanup supervision. Integration preserves recursive Electron bridge identity, monotonic deadlines and caller-scoped Linux controls; production observation still inspects full /proc and rejects unknown caller-owned processes. The related CI repairs retain their existing owners: - Browser verifier helpers parse direct endpoint input using `listBrowserTargetsInputSchema`; public CLI/MCP strings and the provider contract are retained. - Windows conformance checks retained directory identity across NTFS rename instead of asserting that a DELETE-sharing handle forbids rename. Retry and environment teardown must remove the original renamed inode and preserve a replacement at the original path. Admission caching and controlled disposition failures remain; production C++/loader are unchanged. Corrected Windows execution still requires exact-head CI. - Upstream integration retains both intents in the artifact-comparison conflict: the new fragment-integrity grouping and APK/ZIP coverage, all prior completeness/citation/tampering assertions and timeouts. Upstream also supersedes the single-use CIL table extraction with its own grouped tests; that redundant helper is removed while all ten rows and malformed/negative-zero assertions remain. Those two files now exactly match accepted main. - The integrated upstream message-completeness test actually failed because it expected numeric generation order instead of the producer's canonical sorted set. The minimal correction still asserts all 100 exact messages in canonical order; production sorting, byte budget, required/omitted-message controls and huge-string tests are unchanged. - Earlier `e07ad` PR CI (synthetic merge `bc6a0e4` against main `3cb9d61`) Docs Generation failed on a missing Turkish README Rust-guide link. Its full job log identifies that exact mismatch. Accepted main adds the existing guide row/link; the final merged bytes pass the unchanged documentation checker and all five README conformance tests. Validation for `f026d21af126c66d60cad6b959212d656e8f4405` (ordinary merge retains `e07ad918` and integrates main `49e73fc03bec57c6a881a863a6c922d0f69017e7`): - macOS arm64, pinned Node 24.18.0: 73 selected files, 72 passed / one Linux-only file skipped; 1443 tests passed / 3 conditional skips. This covers the existing public compiler/Node/CLI/MCP parameter workflow, affected semantic consumers, empty-name imports, APK/ZIP evidence, deadlines, CI policy/cache controls and browser URL sanitization. The initial one-test failure is preserved separately from the final passing result. - All six `npm run check` tasks and module/architecture guards pass. Discovery finds all 1129 files exactly once; this is not execution of all files. `npm run docs:check` and its five conformance tests pass. Independent local Standards/Spec review passes on the final frozen contribution and merge; ordinary commit/push preserve its bytes. - Fresh actual Chrome 154.0.8037.98 runtime and source-map workflows pass through public CLI/MCP on these final bytes, including four public compiler-point cases and all four nested offsets using esbuild 0.25.10. The intentional interrupted-control case still reports unconfirmed cleanup and is not relabeled as confirmed. - Earlier isolated Linux arm64 validation passed 71 tests and rejected an actual same-caller-UID non-dumpable process; that historical result does not certify this commit's GitHub Linux x64 lane. New Windows NTFS conformance was not executed on this macOS host. Exact-head GitHub CI, including Windows, remains a separate required result and is pending. Cancelled/superseded old CI is not a pass. Public schemas and caller-selected source identities are preserved. Real native Ghidra/Hopper/IDA, installed-package and target-execution workflows were not run. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:06:08 +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#5373
No description provided.