fix(runtime): preserve deterministic context identity

This commit is contained in:
morluto
2026-07-24 14:40:29 +00:00
parent 1bd65f68bc
commit 9bd2ac590c
4 changed files with 24 additions and 8 deletions
@@ -40,7 +40,8 @@ export const readinessFinding = (
export const readinessFindingOrder = (
left: ReadinessFinding,
right: ReadinessFinding,
): number =>
`${left.stage_id}:${left.code}:${left.detail}`.localeCompare(
`${right.stage_id}:${right.code}:${right.detail}`,
);
): number => {
const leftKey = `${left.stage_id}:${left.code}:${left.detail}`;
const rightKey = `${right.stage_id}:${right.code}:${right.detail}`;
return leftKey < rightKey ? -1 : leftKey > rightKey ? 1 : 0;
};