fix(native): bind signature observations to registered target versions (#1099)

* fix(native): bind signature observations to registered target versions

* fix(native): preserve target drift and cancellation across signature captures

* fix(native): inspect signatures from a verified byte snapshot
This commit is contained in:
morluto
2026-10-09 01:27:26 +08:00
committed by GitHub
parent acb3e0f2e5
commit c789af04b7
7 changed files with 908 additions and 36 deletions
@@ -19,6 +19,7 @@ import {
NativeFixtureRunner as FixtureRunner,
nativeFixture as fixture,
nativeMachoTarget as machoTarget,
nativeMachoTargetForFile,
} from "../../../fixtures/nativeCommands.js";
let directory: string | undefined;
@@ -242,7 +243,7 @@ describe("native macOS provider inspection", () => {
const client = new NativeMacOSProvider(
new FixtureRunner(),
"darwin",
).createClient(machoTarget(executable, app));
).createClient(await nativeMachoTargetForFile(executable, app));
const architectures = await client.execute("list_architectures", {});
expect(architectures.ok && architectures.value.result).toMatchObject({
@@ -318,10 +319,13 @@ class PrototypeEntitlementsRunner extends FixtureRunner {
describe("native signature entitlements", () => {
it("reports entitlement entries keyed __proto__ that the result omits", async () => {
directory = await createTestTempDirectory("rea-signature-entitlements-");
const executable = join(directory, "fixture");
await writeFile(executable, "fixture");
const client = new NativeMacOSProvider(
new PrototypeEntitlementsRunner(),
"darwin",
).createClient(machoTarget("/private/fixture"));
).createClient(await nativeMachoTargetForFile(executable));
const signature = await client.execute("inspect_signature", {});