Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/utopia-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ struct ManifestDataDir {
/// whose `schema_version` is greater than this (forward-incompatible) and
/// warns when older. Kept as a constant — bumping is a deliberate decision,
/// not a side effect of a code change.
const CURRENT_SCHEMA_VERSION: u32 = 70;
// 是迁移文件的**个数**,不是最大的编号(守卫 `schema_version_policy_compares_against_current`
// 按个数比):编号有空缺时两者不同——0071 由一个开放 PR 占着,0072 先落,个数是 71
const CURRENT_SCHEMA_VERSION: u32 = 71;

fn main() -> anyhow::Result<()> {
dotenvy::dotenv().ok();
Expand Down
13 changes: 12 additions & 1 deletion crates/utopia-extract/src/phrase_align.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ pub struct PropertyCandidate<'a> {
/// 定义域、值域的类键;空表示没声明
pub domains: Vec<&'a str>,
pub ranges: Vec<&'a str>,
/// 这条候选是经继承命中的:声明在祖先上,签名的类是它的子类。把依据写给模型看,
/// 不然它对着一条 domain 是 legal_entity 的属性和一个 organization 的主语会答 null
/// (#807:只在代码里放宽候选是不够的,模型得看见继承的依据)
pub via: Vec<String>,
}

/// 一条待绑定的签名:短语、两端的类、例句与引文、候选属性
Expand Down Expand Up @@ -83,7 +87,8 @@ the object is a figure, a title or a status; a few statements with that signatur
sentence it was taken from; and the candidate properties, each with its key, its label, its \
definition, its kind (a relation between two things, or an attribute whose object is a value), \
its domain and its range. A class written as \"?\" means the documents' kind word for that side \
is bound to no class yet.\n\
is bound to no class yet. A candidate marked \"fits by inheritance\" declares its domain or range on \
an ancestor of the item's class; that is a fit, not a mismatch.\n\
For each item, answer with the key of the one property that every statement of this signature \
states by that property's definition, and the direction: \"forward\" when the statement's \
subject is the property's subject, \"reverse\" when the statement's object is; or null.\n\
Expand Down Expand Up @@ -116,6 +121,9 @@ fn candidate_line(c: &PropertyCandidate<'_>) -> String {
if !c.ranges.is_empty() {
line.push_str(&format!(" · range: {}", c.ranges.join(", ")));
}
if !c.via.is_empty() {
line.push_str(&format!(" · fits by inheritance: {}", c.via.join("; ")));
}
line.push_str(&format!(" · {}", c.description));
line
}
Expand Down Expand Up @@ -244,6 +252,7 @@ mod tests {
kind: "relation",
domains: vec!["organization"],
ranges: vec!["place"],
via: Vec::new(),
},
PropertyCandidate {
key: "subsidiary_of",
Expand All @@ -252,6 +261,7 @@ mod tests {
kind: "relation",
domains: vec!["organization"],
ranges: vec!["organization"],
via: Vec::new(),
},
PropertyCandidate {
key: "revenue",
Expand All @@ -260,6 +270,7 @@ mod tests {
kind: "attribute",
domains: vec!["organization"],
ranges: vec![],
via: Vec::new(),
},
]
}
Expand Down
1 change: 1 addition & 0 deletions crates/utopia-server/src/api/review_routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,7 @@ pub async fn decide_alignment_phrase(
status: if property.is_some() { "bound" } else { "none" },
votes: &votes,
decided_by: "person",
basis: None,
},
)
.await?
Expand Down
1 change: 1 addition & 0 deletions crates/utopia-server/src/api/review_routes_phrase_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ impl Fx {
status: "undecided",
votes: &json!({}),
decided_by: "agent",
basis: None,
},
)
.await?;
Expand Down
Loading
Loading