fix(android): support owned JADX stdio on Windows (#1276)

Support owned JADX stdio on Windows x64, preserve protocol input errors through cancellation, and verify native stdin and Android CLI/MCP lifecycle on the real Windows host.

Closes #1262
This commit is contained in:
Ysopwnable
2026-10-09 20:34:42 +08:00
committed by GitHub
parent b71a591a60
commit 636b245f1b
21 changed files with 954 additions and 49 deletions
+18 -1
View File
@@ -7,7 +7,7 @@ import {
type WindowsNativeLoadHost,
} from "./WindowsNativeLoader.js";
const fixture = () => {
const fixture = (protocolStdin?: boolean) => {
const bytes = Buffer.alloc(128);
bytes.write("MZ");
bytes.writeUInt32LE(64, 0x3c);
@@ -51,6 +51,7 @@ const fixture = () => {
privateDacl: true,
atomicJobAssignment: true,
killOnOwnerClose: true,
...(protocolStdin === undefined ? {} : { protocolStdin }),
}),
};
},
@@ -59,6 +60,22 @@ const fixture = () => {
};
describe("packaged Windows native admission", () => {
it.each([true, false])(
"preserves protocol stdin capability %s alongside existing job controls",
(protocolStdin) => {
const value = fixture(protocolStdin);
expect(loadWindowsNativeAuthority(value.host)).toMatchObject({
available: true,
authority: {
inspection: {
protocolStdin,
atomicJobAssignment: true,
killOnOwnerClose: true,
},
},
});
},
);
it("loads only after compatibility and digest checks, preserving producer identity", () => {
const value = fixture();
expect(loadWindowsNativeAuthority(value.host)).toMatchObject({