mirror of
https://github.com/morluto/rea.git
synced 2026-10-27 18:05:45 +00:00
refactor: use canonical implementations and types directly
Remove forwarding wrappers and shadow aliases, migrate callers and verification scripts to their owners, and share one exhaustive semantic resource-bound projection.
This commit is contained in:
1 parent
3283a45d09
commit
765e809e36
119 files changed
+577
-629
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { canonicalDigest } from "../comparisonSemantics.js";
|
||||
import { compareCodePoints, uniqueSorted } from "../canonicalOrdering.js";
|
||||
import { digestCanonicalValue } from "../canonicalDigest.js";
|
||||
import { uniqueSorted } from "../canonicalOrdering.js";
|
||||
import { compareUnicodeCodePoints } from "../unicodeCodePointOrder.js";
|
||||
import type { Evidence } from "../evidence.js";
|
||||
import {
|
||||
createJavaScriptApplicationGraph,
|
||||
@@ -86,7 +87,7 @@ export const traceApplicationFeature = (
|
||||
};
|
||||
return applicationFeatureTraceResultSchema.parse({
|
||||
...semantic,
|
||||
trace_id: `jatr_${canonicalDigest(semantic, "Feature trace")}`,
|
||||
trace_id: `jatr_${digestCanonicalValue(semantic, "Feature trace")}`,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -126,7 +127,7 @@ const noMatchResult = (
|
||||
};
|
||||
return applicationFeatureTraceResultSchema.parse({
|
||||
...semantic,
|
||||
trace_id: `jatr_${canonicalDigest(semantic, "Feature trace")}`,
|
||||
trace_id: `jatr_${digestCanonicalValue(semantic, "Feature trace")}`,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -170,7 +171,9 @@ const terminalPaths = (
|
||||
)
|
||||
.map((node) => pathTo(node, traversal.predecessors, edgeById))
|
||||
.filter((path): path is NonNullable<typeof path> => path !== null)
|
||||
.sort((left, right) => compareCodePoints(left.path_id, right.path_id));
|
||||
.sort((left, right) =>
|
||||
compareUnicodeCodePoints(left.path_id, right.path_id),
|
||||
);
|
||||
};
|
||||
|
||||
const pathTo = (
|
||||
@@ -207,7 +210,7 @@ const pathTo = (
|
||||
};
|
||||
return {
|
||||
...semantic,
|
||||
path_id: `jatp_${canonicalDigest(semantic, "Feature trace")}`,
|
||||
path_id: `jatp_${digestCanonicalValue(semantic, "Feature trace")}`,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user