mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 17:28:08 +00:00
fix(javascript): preserve candidate trace ambiguity
This commit is contained in:
1 parent
b3939ea9ff
commit
8678b57b5e
3 files changed
+35
No files matched your search
@@ -25,6 +25,7 @@ export interface JavaScriptSemanticQueryAssessmentInput {
|
||||
readonly hasExpectation: boolean;
|
||||
readonly frontier: readonly JavaScriptSemanticQueryFrontier[];
|
||||
readonly unknowns: readonly JavaScriptSemanticGraphUnknown[];
|
||||
readonly candidateRelations: number;
|
||||
}
|
||||
|
||||
/** Status, coverage, limits, and limitations derived from one traversal. */
|
||||
@@ -62,6 +63,7 @@ const queryCoverage = (
|
||||
: input.frontier.length > 0
|
||||
? "truncated"
|
||||
: input.unknowns.length > 0 ||
|
||||
input.candidateRelations > 0 ||
|
||||
input.graph.coverage.status !== "complete"
|
||||
? "partial"
|
||||
: "complete",
|
||||
@@ -75,6 +77,7 @@ const queryStatus = (
|
||||
if (input.frontier.length > 0) return "truncated";
|
||||
if (input.unknowns.length > 0 || input.graph.coverage.status !== "complete")
|
||||
return "partial";
|
||||
if (input.candidateRelations > 0) return "ambiguous";
|
||||
if (
|
||||
input.totalSeeds === 0 ||
|
||||
(input.hasExpectation && input.expectedMatches === 0)
|
||||
@@ -104,6 +107,11 @@ const queryLimitations = (
|
||||
: [
|
||||
"Relevant dynamic, unsupported, incomplete, or ambiguous semantics remain unknown.",
|
||||
]),
|
||||
...(input.candidateRelations === 0
|
||||
? []
|
||||
: [
|
||||
"Candidate relations remain ambiguous and do not establish a resolved semantic path.",
|
||||
]),
|
||||
]);
|
||||
|
||||
const uniqueSorted = (values: readonly string[]): string[] =>
|
||||
|
||||
Reference in new issue
Block a user