fix(javascript): preserve effective child-process stdio options (#4336)

* fix(javascript): preserve effective child-process stdio options

* fix(javascript): retain proven callbacks and primitive stdio keys

* fix(javascript): preserve argv shapes and nullish spreads

* fix(javascript): bound callable proofs and retain exposed binding uncertainty

* test(javascript): keep callback acceptance within transport budget

* test(javascript): inspect application coverage for callback proof limits

* fix(javascript): keep spread command argument slots uncertain

* fix(javascript): bound mapped argument content proofs

* fix(javascript): distinguish erased declarations from runtime shadows

* fix(javascript): prove runtime module context before binding isolation

* fix(javascript): share erased declaration and opaque scope proofs

* fix(javascript): keep lowered enum scopes opaque

* fix(javascript): narrow stdio proofs and consolidate regressions

* perf(javascript): reuse lexical references for child shapes

* fix(javascript): retain CommonJS child argument context

* fix(javascript): keep Annex B affected child arguments unknown

* fix(javascript): recognize value import-equals runtime modules

* fix(javascript): retain exact stdio through module and primitive syntax

* fix(javascript): bound inline spread property resolution

* fix(javascript): distinguish copied methods from getters
This commit is contained in:
星闌 authored and GitHub committed 2026-10-17 15:51:55 +08:00
1 parent 0cd4eafd61
commit de9371b85d
18 files changed
+1114 -93

No files matched your search

@@ -18,6 +18,10 @@ describe("RPC object property ownership", () => {
['url: "/trpc/old", url: "/trpc/live"', "/trpc/live"],
['url: "/trpc/old", url: runtimeUrl', null],
['url: "/trpc/old", ...options', null],
[
'url: "/trpc/old", ...{helper(){},url:"/trpc/ignored",url:"/trpc/live"}',
"/trpc/live",
],
['url: "/trpc/old", [key]: runtimeUrl', null],
['url: "/trpc/old", get url() { return runtimeUrl; }', null],
['url: "/trpc/old", url() {}', null],
@@ -743,3 +747,22 @@ it("keeps existing network endpoint recognition unchanged", () => {
},
]);
});
it("keeps named spreads unknown without proving nullish aliases", () => {
expect(
rpcEndpoints(`var p=null;const root=Function("return this")();
root.p={url:"/changed"};httpLink({url:"/safe",...p});`),
).toEqual([]);
});
it("skips propertyless literal spreads while retaining string and unknown spreads", () => {
expect(
rpcEndpoints(`
httpLink({url:"/primitives",...false,...42,...1n,[void effect()]:0});
httpLink({url:"/string",..."ab"});
httpLink({url:"/unknown",...options});
`),
).toEqual([
{ kind: "network", value: "/primitives", mechanism: "trpc:link:httpLink" },
]);
});