Skip to content

World's first open-source enterprise world model.

A literal value reaches the adjudicator and the review card instead of a question mark (#1220)

WaylandYangb365630150a9
diff --git a/crates/utopia-server/src/namesake_scripted_cases.rs b/crates/utopia-server/src/namesake_scripted_cases.rs
index 8e245ab6..62847d6c 100644
--- a/crates/utopia-server/src/namesake_scripted_cases.rs
+++ b/crates/utopia-server/src/namesake_scripted_cases.rs
@@ -61,11 +61,9 @@ const CASES: [Case; 4] = [
// #1136: a listed case MUST fail today; every other case MUST pass. A fix removes
// the corresponding names with its code change, so success cannot silently go stale.
-const KNOWN_FAILURES: [(&str, &str); 4] = [
+const KNOWN_FAILURES: [(&str, &str); 2] = [
("resolver_passage_over_profile", "forward"),
("resolver_passage_over_profile", "reverse"),
- ("adjudicator_literal_clues_reach_request", "forward"),
- ("adjudicator_literal_clues_reach_request", "reverse"),
];
struct Step {
diff --git a/crates/utopia-store/src/resolution.rs b/crates/utopia-store/src/resolution.rs
index 9af51e4d..e9f11d59 100644
--- a/crates/utopia-store/src/resolution.rs
+++ b/crates/utopia-store/src/resolution.rs
@@ -1524,7 +1524,8 @@ async fn entity_fact_lines_many(
CROSS JOIN LATERAL (
SELECT CASE WHEN f.subject_id = requested.id THEN 'out' ELSE 'in' END AS direction,
COALESCE(r.label, f.phrase, fact_surface_predicate(f.id)) AS predicate_label,
- o.canonical_name AS other_name,
+ -- 字面值的事实没有对端实体:值本身就是这一行要说的(职位、工号),不能读成「?」
+ COALESCE(o.canonical_name, left(f.object_value->>'value', 120)) AS other_name,
f.valid_from, f.valid_to, f.confidence, f.recorded_at
FROM facts f
LEFT JOIN relation_types r ON r.id = f.predicate_id
diff --git a/crates/utopia-store/tests/store/a_review_page_is_assembled_in_batches.rs b/crates/utopia-store/tests/store/a_review_page_is_assembled_in_batches.rs
index 7449117b..197afcb5 100644
--- a/crates/utopia-store/tests/store/a_review_page_is_assembled_in_batches.rs
+++ b/crates/utopia-store/tests/store/a_review_page_is_assembled_in_batches.rs
@@ -206,7 +206,7 @@ async fn shared_sides_keep_their_summaries_and_the_page_keeps_its_order() -> any
"Knows ← Neighbor (2020-01 → 2021-02)",
"Knows → Neighbor (2020-01 → now)",
"works alongside → Neighbor",
- "Knows → ?",
+ "Knows → text",
];
for item in &all {
assert_eq!(item.score, 0.8);