fix(native): preserve endpoint context in function comparisons

This commit is contained in:
morluto committed 2026-10-24 01:47:31 +08:00
1 parent 211e3533b3
commit edf7b3d32c
12 files changed
+638 -117

No files matched your search

@@ -19,7 +19,8 @@ export const functionMatch = (
): FunctionComparisonResult["function_match"] => {
const leftName = left.dossier.procedure.name;
const rightName = right.dossier.procedure.name;
const stableNames = !isAutoName(leftName) && !isAutoName(rightName);
const stableNames =
hasStableFunctionName(leftName) && hasStableFunctionName(rightName);
if (stableNames && leftName === rightName)
return {
status: "matched",
@@ -227,6 +228,10 @@ export const sorted = <T>(values: readonly T[]): readonly T[] =>
export const isAutoName = (name: string): boolean =>
/^(?:sub_[0-9a-f]+|fcn\.[0-9a-f]+|FUN_[0-9a-f]+)$/iu.test(name);
/** A display label must be nonempty before it can constrain named correspondence. */
export const hasStableFunctionName = (name: string): boolean =>
name.length > 0 && !isAutoName(name);
const parseAddress = (value: string) => {
const parsed = nativeAddressCoordinateInputSchema.safeParse(value);
return parsed.success ? parsed.data : null;