Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

fix(process): expose launcher identity mismatch

morluto62ac73cdd79b
diff --git a/src/process/ProcessOwnership.ts b/src/process/ProcessOwnership.ts
index bdaff58b4..0f501234a 100644
--- a/src/process/ProcessOwnership.ts
+++ b/src/process/ProcessOwnership.ts
@@ -322,7 +322,7 @@ const launcherIdentityFailure = (
ownership.expectedCommand !== undefined &&
!matchesOwnedProcessCommand(launcher.command, ownership.expectedCommand)
)
- return "owned launcher command identity did not match";
+ return `owned launcher command identity did not match (observed=${launcher.command}; expected=${ownership.expectedCommand})`;
return null;
};
@@ -477,7 +477,7 @@ export const observeOwnedProcessLineage = async (
)
return unavailableLineage(
ownership,
- "owned launcher command identity did not match",
+ `owned launcher command identity did not match (observed=${launcher.command}; expected=${ownership.expectedCommand})`,
);
const descendants = descendantsOf(launcher.pid, processes);
for (const member of [launcher, ...descendants]) {
diff --git a/tests/processOwnership.test.ts b/tests/processOwnership.test.ts
index d3bf6d655..6cca3295d 100644
--- a/tests/processOwnership.test.ts
+++ b/tests/processOwnership.test.ts
@@ -522,7 +522,8 @@ describe("owned process-group cleanup", () => {
),
).toEqual({
cleaned: false,
- reason: "owned launcher command identity did not match",
+ reason:
+ "owned launcher command identity did not match (observed=fixture; expected=/owned/hopper)",
});
expect(signalGroup).not.toHaveBeenCalled();
});