fix(javascript): preserve semantic query identity and source coverage

This commit is contained in:
morluto committed 2026-10-24 03:00:08 +08:00
1 parent 34552ff0df
commit cf5e4f6fa3
16 files changed
+362 -51

No files matched your search

@@ -313,6 +313,24 @@ function* checkCoverageSteps(
path: ["coverage", "limits"],
message: "Truncated graph coverage must identify an effective limit",
});
if (graph.coverage.truncated && graph.coverage.status !== "partial")
context.addIssue({
code: "custom",
path: ["coverage", "status"],
message: "Truncated semantic graph coverage must be partial",
});
if (
graph.coverage.truncated &&
graph.coverage.omitted_nodes === 0 &&
graph.coverage.omitted_relations === 0 &&
omittedUnknowns.length === 0
)
context.addIssue({
code: "custom",
path: ["coverage"],
message:
"Truncated semantic graph coverage must acknowledge omitted facts",
});
const relationsByFamily = new Map(
JAVASCRIPT_SEMANTIC_RELATION_FAMILIES.map((family) => [family, 0]),
);