From 5ea60b67c592f7a92877e97b8f91189f8058b08c Mon Sep 17 00:00:00 2001 From: Szabo Bogdan Date: Tue, 10 Nov 2026 07:32:50 +0100 Subject: [PATCH 1/5] A role word speaks while its chunk is live, so a re-push that changes a value reads back only the new one (#1450) Signed-off-by: Bogdan Szabo --- crates/utopia-core/src/models.rs | 2 + crates/utopia-server/src/api/mcp_tests.rs | 3 +- .../src/api/sources_statements_tests.rs | 36 ++ crates/utopia-store/src/graph.rs | 39 ++- crates/utopia-store/src/materialize.rs | 21 +- crates/utopia-store/src/record_axis.rs | 55 +++ .../a_bound_statement_becomes_a_typed_fact.rs | 12 +- ...ole_word_moves_onto_its_evidence_chunks.rs | 5 +- ...pen_statement_keeps_the_documents_words.rs | 323 +++++++++++++++++- ...ole-word-speaks-while-its-chunk-is-live.md | 2 +- docs/design/ledger.md | 2 +- web/src/api.ts | 2 + web/src/docs/mcp.md | 4 +- 13 files changed, 473 insertions(+), 33 deletions(-) diff --git a/crates/utopia-core/src/models.rs b/crates/utopia-core/src/models.rs index a5036d33d..fc2bf6834 100644 --- a/crates/utopia-core/src/models.rs +++ b/crates/utopia-core/src/models.rs @@ -676,6 +676,8 @@ pub struct StatementQualifier { pub value: Option, pub entity_id: Option, pub entity_name: Option, + /// 说这个值的那几块(0070):两块活着的块说法不同,各自一条 + pub chunk_ids: Vec, } /// 一次 OWL 导入的记录。原文按内容寻址存在 blob 里,这行只是账。 diff --git a/crates/utopia-server/src/api/mcp_tests.rs b/crates/utopia-server/src/api/mcp_tests.rs index d92916da3..08ef1921b 100644 --- a/crates/utopia-server/src/api/mcp_tests.rs +++ b/crates/utopia-server/src/api/mcp_tests.rs @@ -1028,7 +1028,8 @@ async fn entity_facts_reads_back_a_statements_role_words() -> anyhow::Result<()> .unwrap(); assert_eq!( fact["statement_qualifiers"], - json!([{"role":"lines","value":{"value":"10-42"},"entity_id":null,"entity_name":null}]) + json!([{"role":"lines","value":{"value":"10-42"},"entity_id":null,"entity_name":null, + "chunk_ids":[f.chunk]}]) ); f.clean().await } diff --git a/crates/utopia-server/src/api/sources_statements_tests.rs b/crates/utopia-server/src/api/sources_statements_tests.rs index ce1085d7f..44daaf5f7 100644 --- a/crates/utopia-server/src/api/sources_statements_tests.rs +++ b/crates/utopia-server/src/api/sources_statements_tests.rs @@ -437,6 +437,42 @@ async fn a_second_push_under_the_same_identity_updates_in_place() -> anyhow::Res f.cleanup().await } +/// 0070 的例子:再推一次把 `lines` 从 40-52 改成 58-70,读回来只有新的范围 +#[tokio::test] +async fn a_re_push_that_moves_lines_to_58_70_reads_back_only_58_70() -> anyhow::Result<()> { + let Some(f) = Fixture::new().await? else { + return Ok(()); + }; + for lines in ["40-52", "58-70"] { + let mut body = observation("08:14:03", "kitchen table"); + body["s"][0][5] = json!({ "lines": lines }); + let (status, body) = f.push(f.source, &f.token, &body).await?; + assert_eq!(status, StatusCode::OK, "{body}"); + let doc = documents::find_by_external_key(&f.pool, f.source, "statements:obs-000412") + .await? + .expect("the push has a document"); + crate::pipeline::process_document(&f.state, doc.id).await?; + let proposer = Proposer { + user_id: None, + token_id: None, + }; + crate::extraction::extract_document(&f.state, doc.id, proposer).await?; + } + let (cup,): (Uuid,) = + sqlx::query_as("SELECT id FROM entities WHERE kb_id = $1 AND canonical_name = 'cup-7'") + .bind(f.kb) + .fetch_one(&f.pool) + .await?; + let (_, facts) = utopia_store::graph::entity_detail(&f.pool, f.kb, cup, None, None).await?; + let said: Vec<_> = facts + .iter() + .flat_map(|x| &x.statement_qualifiers) + .map(|q| (q.role.as_str(), q.value.clone())) + .collect(); + assert_eq!(said, vec![("lines", Some(json!("58-70")))]); + f.cleanup().await +} + /// 门口的拒绝走到 HTTP 是 422(`AppError::Validation`,与 `api` 推送被拒时同一个码), /// 并且这次推送留在 run 历史里;`api` 来源不认这条路由(404),钥匙不对是 401 #[tokio::test] diff --git a/crates/utopia-store/src/graph.rs b/crates/utopia-store/src/graph.rs index 02632074f..23de9f06c 100644 --- a/crates/utopia-store/src/graph.rs +++ b/crates/utopia-store/src/graph.rs @@ -237,10 +237,11 @@ pub async fn add_statement_qualifier( } /// 一批开放陈述各自的角色词属性,按事实 id 取回;实体那一格连上显示名。 -/// 同一个值记在几块上只返回一次 +/// 只取 `as_of` 时刻说话的行(0070 决定 2、3);同一个值记在几块上返回一次,带上那几块 pub async fn statement_qualifiers_for( pool: &PgPool, fact_ids: &[Uuid], + as_of: Option>, ) -> AppResult>> { let mut out: HashMap> = HashMap::new(); if fact_ids.is_empty() { @@ -253,23 +254,37 @@ pub async fn statement_qualifiers_for( value: Option, entity_id: Option, entity_name: Option, + chunk_ids: Vec, } - let rows: Vec = sqlx::query_as( - "SELECT DISTINCT q.fact_id, q.role, q.value, q.entity_id, e.canonical_name AS entity_name + let as_of_param = as_of.map(|_| 2); + let sql = format!( + "WITH rw_f AS (SELECT rw_ee.fact_id, {ends} FROM {evidence} + WHERE rw_ee.fact_id = ANY($1) GROUP BY rw_ee.fact_id) + SELECT q.fact_id, q.role, q.value, q.entity_id, e.canonical_name AS entity_name, + array_agg(q.chunk_id ORDER BY q.chunk_id) AS chunk_ids FROM statement_qualifiers q + LEFT JOIN rw_f ON rw_f.fact_id = q.fact_id + JOIN chunks rw_c ON rw_c.id = q.chunk_id + JOIN documents rw_d ON rw_d.id = rw_c.document_id LEFT JOIN entities e ON e.id = q.entity_id - WHERE q.fact_id = ANY($1) - ORDER BY q.fact_id, q.role", - ) - .bind(fact_ids) - .fetch_all(pool) - .await?; - for r in rows { + WHERE q.fact_id = ANY($1) AND {speaks} + GROUP BY q.fact_id, q.role, q.value, q.entity_id, e.canonical_name + ORDER BY q.fact_id, q.role, chunk_ids", + ends = crate::record_axis::role_word_fact_ends(as_of_param), + evidence = crate::record_axis::ROLE_WORD_EVIDENCE, + speaks = crate::record_axis::role_word_speaks_given("rw_c", "rw_d", "rw_f", as_of_param), + ); + let mut query = sqlx::query_as::<_, Row>(&sql).bind(fact_ids); + if let Some(at) = as_of { + query = query.bind(at); + } + for r in query.fetch_all(pool).await? { out.entry(r.fact_id).or_default().push(StatementQualifier { role: r.role, value: r.value, entity_id: r.entity_id, entity_name: r.entity_name, + chunk_ids: r.chunk_ids, }); } Ok(out) @@ -1519,7 +1534,7 @@ async fn edges_among( let ids: Vec = edges.iter().map(|x| x.id).collect(); let (mut typed, mut worded) = tokio::try_join!( fact_qualifiers_for(pool, &ids), - statement_qualifiers_for(pool, &ids) + statement_qualifiers_for(pool, &ids, as_of) )?; for x in edges.iter_mut() { x.qualifiers = typed.remove(&x.id).unwrap_or_default(); @@ -1868,7 +1883,7 @@ pub async fn entity_detail( let ids: Vec = facts.iter().map(|x| x.id).collect(); let (mut typed, mut worded) = tokio::try_join!( fact_qualifiers_for(pool, &ids), - statement_qualifiers_for(pool, &ids) + statement_qualifiers_for(pool, &ids, as_of) )?; for x in facts.iter_mut() { x.qualifiers = typed.remove(&x.id).unwrap_or_default(); diff --git a/crates/utopia-store/src/materialize.rs b/crates/utopia-store/src/materialize.rs index 855f1da6a..f00036102 100644 --- a/crates/utopia-store/src/materialize.rs +++ b/crates/utopia-store/src/materialize.rs @@ -208,8 +208,8 @@ async fn materialize_in_tx( AND b.relation_type_id = t.predicate_id AND ((b.direction = 'forward' AND t.subject_id = s.subject_id) OR (b.direction = 'reverse' AND t.subject_id = s.object_id)) - AND NOT EXISTS (SELECT 1 FROM statement_qualifiers q - WHERE q.fact_id = s.id AND q.role = 'mood'))" + AND {NO_MOOD})", + NO_MOOD = no_mood_spoken(), )) .persistent(false) .bind(kb_id) @@ -274,8 +274,7 @@ async fn materialize_in_tx( WHERE s.kb_id = $1 AND s.layer = 'open' AND s.invalidated_at IS NULL AND b.status = 'bound' AND (b.direction = 'forward' OR s.object_id IS NOT NULL) - AND NOT EXISTS (SELECT 1 FROM statement_qualifiers q - WHERE q.fact_id = s.id AND q.role = 'mood') + AND {NO_MOOD} -- 勘误撤过的(陈述, 属性)不再算(0044 决定 7):撤销要站得住 AND NOT EXISTS (SELECT 1 FROM errata_actions ea WHERE ea.statement_id = s.id AND ea.predicate_id = b.relation_type_id @@ -283,7 +282,8 @@ async fn materialize_in_tx( AND NOT EXISTS (SELECT 1 FROM typed_fact_sources src JOIN facts t ON t.id = src.fact_id WHERE src.statement_id = s.id AND t.invalidated_at IS NULL AND t.predicate_id = b.relation_type_id) - ORDER BY s.id" + ORDER BY s.id", + NO_MOOD = no_mood_spoken(), )) .persistent(false) .bind(kb_id) @@ -562,7 +562,7 @@ async fn imply_in_tx( AND pr.reading = r.reading AND pr.phrase = {TEXT} WHERE r.kb_id = $1 AND r.status = 'approved' AND r.trigger = 'phrase' AND {RULE_MATCH} - AND NOT EXISTS (SELECT 1 FROM statement_qualifiers q WHERE q.fact_id = s.id AND q.role = 'mood') + AND {NO_MOOD} AND (r.reading IS NULL OR pr.entity_id IS NOT NULL OR pr.value IS NOT NULL) AND NOT EXISTS (SELECT 1 FROM errata_actions ea WHERE ea.statement_id = s.id AND ea.predicate_id = r.conclude_property_id @@ -572,6 +572,7 @@ async fn imply_in_tx( ORDER BY s.id", TEXT = crate::implication_rules::object_text_sql(), RULE_MATCH = crate::implication_rules::RULE_MATCH, + NO_MOOD = no_mood_spoken(), )) .persistent(false) .bind(kb_id) @@ -835,6 +836,14 @@ fn attribute_value(raw: &Value, datatype: Option<&str>, unit: Option<&str>) -> O Some(out) } +/// 陈述 `s` 没有一个说着话的 `mood`(0070 决定 2):重推丢掉了 mood,旧块上的 mood 就不再拦着 +fn no_mood_spoken() -> String { + format!( + "NOT EXISTS (SELECT 1 FROM statement_qualifiers q WHERE q.fact_id = s.id AND q.role = 'mood' AND {})", + crate::record_axis::role_word_speaks_now("q") + ) +} + /// 类别词的归一(同 type_bindings):这里要在 SQL 里对上实体的 specific_type fn kind_word_sql(col: &str) -> String { format!("lower(btrim(regexp_replace({col}, '\\s+', ' ', 'g')))") diff --git a/crates/utopia-store/src/record_axis.rs b/crates/utopia-store/src/record_axis.rs index 01387f075..51576b8ff 100644 --- a/crates/utopia-store/src/record_axis.rs +++ b/crates/utopia-store/src/record_axis.rs @@ -102,6 +102,61 @@ pub fn chunk_live_at(alias: &str, as_of: Option) -> String { } } +/// 一条事实的证据,选成 `rw_ee`(证据)、`rw_ec`(块)、`rw_ed`(文档),供 [`role_word_fact_ends`] 聚合 +pub const ROLE_WORD_EVIDENCE: &str = "fact_evidence rw_ee + JOIN chunks rw_ec ON rw_ec.id = rw_ee.chunk_id + JOIN documents rw_ed ON rw_ed.id = rw_ec.document_id"; + +/// 按事实聚合 [`ROLE_WORD_EVIDENCE`]:T 时刻有没有活块(`any_live`),T 时刻已有的块里 +/// 最晚的终点(`last_end`)。块的终点是 `superseded_at` 与文档 `deleted_at` 里早的那个 +pub fn role_word_fact_ends(as_of: Option) -> String { + format!( + "bool_or({} AND {}) AS any_live, + max(least(rw_ec.superseded_at, rw_ed.deleted_at)) FILTER (WHERE {}) AS last_end", + chunk_live_at("rw_ec", as_of), + document_live_at("rw_ed", as_of), + chunk_existed_at("rw_ec", as_of), + ) +} + +fn chunk_existed_at(alias: &str, as_of: Option) -> String { + match as_of { + None => "true".into(), + Some(param) => format!("{alias}.created_at <= coalesce(${param}, now())"), + } +} + +/// 角色词在 T 时刻替它的事实说话吗(0070 决定 2、3),给定它那块 `c`、那块的文档 `d` +/// 和它事实的 [`role_word_fact_ends`] 一行 `f`。 +/// +/// 它那块与那块的文档在 T 时刻都还活着,就说话;活着的几块值不同,都说话。 +/// 事实在 T 时刻一块活证据都没有时,最后到头的那几块说话(同一时刻到头的都算), +/// 只看 T 时刻已有的块。每条事实的证据只聚合一次:重推几百次的陈述不按行重扫 +pub fn role_word_speaks_given(c: &str, d: &str, f: &str, as_of: Option) -> String { + format!( + "(({c_live} AND {d_live}) + OR (NOT {f}.any_live AND {existed} + AND least({c}.superseded_at, {d}.deleted_at) = {f}.last_end))", + c_live = chunk_live_at(c, as_of), + d_live = document_live_at(d, as_of), + existed = chunk_existed_at(c, as_of), + ) +} + +/// `statement_qualifiers`:这一行 `q` 此刻说话吗,[`role_word_speaks_given`] 的单行形状。 +/// 只在写入口用,所以不带 T;别名都带 `rw_` 前缀,不和调用方的撞 +pub fn role_word_speaks_now(q: &str) -> String { + format!( + "EXISTS (SELECT 1 FROM chunks rw_c JOIN documents rw_d ON rw_d.id = rw_c.document_id + CROSS JOIN LATERAL (SELECT {ends} FROM {evidence} + WHERE rw_ee.fact_id = {q}.fact_id) rw_f + WHERE rw_c.id = {q}.chunk_id AND {speaks})", + ends = role_word_fact_ends(None), + evidence = ROLE_WORD_EVIDENCE, + speaks = role_word_speaks_given("rw_c", "rw_d", "rw_f", None), + ) +} + /// `entity_merges`:这次合并在 T 时刻**生效着**吗(0019 第二刀 / #336)。 /// /// 实体身上没有记录轴——`merged_into` 只说合并发生过,不说何时。时刻在这张表上, diff --git a/crates/utopia-store/tests/store/a_bound_statement_becomes_a_typed_fact.rs b/crates/utopia-store/tests/store/a_bound_statement_becomes_a_typed_fact.rs index 401688e46..cb26cc6dd 100644 --- a/crates/utopia-store/tests/store/a_bound_statement_becomes_a_typed_fact.rs +++ b/crates/utopia-store/tests/store/a_bound_statement_becomes_a_typed_fact.rs @@ -5,7 +5,8 @@ //! place) 绑到 headquartered_in:算出一条类型化行,谓词是它,证据与限定抄过来, //! `from_statement_id` 指回陈述;再跑一遍什么都不动;带 mood 的陈述不算;另一份文档 //! 的同一句并进同一行(两条来源、两条证据),它说的另一个 since 不跟进来,行只读建行那条的,它说的 until 行还没有、跟进来;作废其中一条陈述,行还在、来源少一条; -//! 绑定翻成 reverse,旧行作废、新行主宾对调;绑定改成 none,行作废、不再补。 +//! 绑定翻成 reverse,旧行作废、新行主宾对调;绑定改成 none,行作废、不再补; +//! 带 mood 的陈述重推、新块不再说 mood,就成一行。 //! //! 没有 `UTOPIA_DATABASE_URL` 时跳过而不是失败。自建自拆,绝不碰已有的库。 @@ -287,6 +288,15 @@ async fn a_bound_statement_becomes_a_typed_fact() -> anyhow::Result<()> { .await?; assert_eq!(materialize(&pool, kb).await?, Outcome { retired: 1, added: 0, merged: 0, implied: 0, corrected: 0, conflicts: 0 }); assert_eq!(utopia_store::materialize::count(&pool, kb).await?, 0); + + // 带 mood 的那条重推、新块不再说 mood:旧块上的 mood 不再拦着,它成一行(0070 决定 2) + sqlx::query("UPDATE chunks SET superseded_at = now() WHERE id = $1") + .bind(planned_chunk) + .execute(&pool) + .await?; + evidence_of(planned, "bakery-plan-2.txt").await?; + assert_eq!(materialize(&pool, kb).await?.added, 1); + assert_eq!(utopia_store::materialize::count(&pool, kb).await?, 1); anyhow::Ok(()) } .await; diff --git a/crates/utopia-store/tests/store/a_role_word_moves_onto_its_evidence_chunks.rs b/crates/utopia-store/tests/store/a_role_word_moves_onto_its_evidence_chunks.rs index ce8188f40..3360cd3a8 100644 --- a/crates/utopia-store/tests/store/a_role_word_moves_onto_its_evidence_chunks.rs +++ b/crates/utopia-store/tests/store/a_role_word_moves_onto_its_evidence_chunks.rs @@ -208,10 +208,11 @@ async fn role_words_move_onto_every_evidence_chunk_and_leave_a_purged_fact() -> expected, "每块证据一行,没有证据的已失效事实一行不留" ); - let read = utopia_store::graph::statement_qualifiers_for(&pool, &[stated]).await?; + let read = utopia_store::graph::statement_qualifiers_for(&pool, &[stated], None).await?; assert_eq!( serde_json::to_value(&read[&stated])?, - serde_json::json!([{ "role": "lines", "value": "40-52", "entity_id": null, "entity_name": null }]) + serde_json::json!([{ "role": "lines", "value": "40-52", "entity_id": null, + "entity_name": null, "chunk_ids": [ledger.live_chunk] }]) ); pool.close().await; drop_scratch(&name).await; diff --git a/crates/utopia-store/tests/store/an_open_statement_keeps_the_documents_words.rs b/crates/utopia-store/tests/store/an_open_statement_keeps_the_documents_words.rs index 46983265b..34b292cf5 100644 --- a/crates/utopia-store/tests/store/an_open_statement_keeps_the_documents_words.rs +++ b/crates/utopia-store/tests/store/an_open_statement_keeps_the_documents_words.rs @@ -4,6 +4,7 @@ //! 空谓词的读路径(图、实体面板、邻域、路径、导出)要按短语显示它;同一句话再听到 //! 一次是同一行、证据累积;它的短语永远不出现在等着被采纳的说法里;角色词属性与 //! 时间词各自取得回来;证据带着引文在块里的偏移;库拒绝没有短语的开放行。 +//! 角色词只在它那块活着时说话,没有活块时最后被取代的那块说话(0070)。 //! //! 没有 `UTOPIA_DATABASE_URL` 时跳过而不是失败。自建自拆,绝不碰已有的库。 @@ -24,7 +25,7 @@ struct Fixture { chunk_b: Uuid, } -async fn seed(pool: &PgPool) -> anyhow::Result { +async fn seed(pool: &PgPool, org_name: &str) -> anyhow::Result { let (org, ws, kb) = (Uuid::now_v7(), Uuid::now_v7(), Uuid::now_v7()); let etype = Uuid::now_v7(); let (acme, beta) = (Uuid::now_v7(), Uuid::now_v7()); @@ -36,19 +37,19 @@ async fn seed(pool: &PgPool) -> anyhow::Result { ); sqlx::query("INSERT INTO organizations (id, name) VALUES ($1, $2)") .bind(org) - .bind(ORG) + .bind(org_name) .execute(pool) .await?; sqlx::query("INSERT INTO workspaces (id, org_id, name) VALUES ($1, $2, $3)") .bind(ws) .bind(org) - .bind(ORG) + .bind(org_name) .execute(pool) .await?; sqlx::query("INSERT INTO knowledge_bases (id, workspace_id, name) VALUES ($1, $2, $3)") .bind(kb) .bind(ws) - .bind(ORG) + .bind(org_name) .execute(pool) .await?; sqlx::query("INSERT INTO entity_types (id, kb_id, key, label) VALUES ($1, $2, 'org', '组织')") @@ -119,7 +120,7 @@ async fn an_open_statement_shows_under_its_phrase_and_reuses_its_row() -> anyhow .bind(ORG) .execute(&pool) .await?; - let f = seed(&pool).await?; + let f = seed(&pool, ORG).await?; let run = async { // 1. 落一条开放陈述:Acme —acquired→ Beta,短语照写、谓词为空、没有 valid_* @@ -199,7 +200,8 @@ async fn an_open_statement_shows_under_its_phrase_and_reuses_its_row() -> anyhow let amount = |q: &[utopia_core::models::StatementQualifier]| { serde_json::to_value(q).unwrap() == serde_json::json!([{ "role": "amount", - "value": { "value": "$1.2 billion" }, "entity_id": null, "entity_name": null }]) + "value": { "value": "$1.2 billion" }, "entity_id": null, "entity_name": null, + "chunk_ids": [f.chunk_a] }]) }; assert!( amount(&e.statement_qualifiers), @@ -310,7 +312,7 @@ async fn an_open_statement_shows_under_its_phrase_and_reuses_its_row() -> anyhow assert!(created && other != fact); // 4. 角色词属性与时间词各自取得回来 - let qualifiers = graph::statement_qualifiers_for(&pool, &[fact]).await?; + let qualifiers = graph::statement_qualifiers_for(&pool, &[fact], None).await?; let q = &qualifiers[&fact]; assert_eq!(q.len(), 1); assert_eq!(q[0].role, "amount"); @@ -352,7 +354,7 @@ async fn an_open_statement_shows_under_its_phrase_and_reuses_its_row() -> anyhow .is_err() ); graph::add_statement_qualifier(&pool, fact, f.chunk_a, "buyer", None, Some(f.acme)).await?; - let q = &graph::statement_qualifiers_for(&pool, &[fact]).await?[&fact]; + let q = &graph::statement_qualifiers_for(&pool, &[fact], None).await?[&fact]; let buyer = q.iter().find(|x| x.role == "buyer").unwrap(); assert_eq!(buyer.entity_id, Some(f.acme)); assert_eq!(buyer.entity_name.as_deref(), Some("Acme")); @@ -417,3 +419,308 @@ async fn an_open_statement_shows_under_its_phrase_and_reuses_its_row() -> anyhow .await?; run } + +/// 一条陈述,两块都是它的证据;每块记下自己说的角色词 +async fn stated(pool: &PgPool, f: &Fixture, words: &[(Uuid, &str, &str)]) -> anyhow::Result { + let (fact, _) = graph::insert_open_statement( + pool, + f.kb, + f.acme, + "covers", + FactObject::Entity(f.beta), + None, + 0.9, + ) + .await?; + for chunk in [f.chunk_a, f.chunk_b] { + graph::add_evidence(pool, fact, chunk, None, None).await?; + } + for (chunk, role, value) in words { + graph::add_statement_qualifier( + pool, + fact, + *chunk, + role, + Some(&serde_json::json!(value)), + None, + ) + .await?; + } + Ok(fact) +} + +async fn supersede(pool: &PgPool, chunk: Uuid, at: &str) -> anyhow::Result<()> { + sqlx::query("UPDATE chunks SET superseded_at = $2::timestamptz WHERE id = $1") + .bind(chunk) + .bind(at) + .execute(pool) + .await?; + Ok(()) +} + +/// 现在说话的角色词:(角色, 值, 说它的块) +async fn speaking( + pool: &PgPool, + fact: Uuid, +) -> anyhow::Result)>> { + let read = graph::statement_qualifiers_for(pool, &[fact], None).await?; + Ok(read + .get(&fact) + .into_iter() + .flatten() + .map(|q| { + ( + q.role.clone(), + q.value.clone().unwrap_or_default(), + q.chunk_ids.clone(), + ) + }) + .collect()) +} + +/// 每个测试自己的组织:建库、跑完、拆掉 +async fn with_fixture(org_name: &str, run: F) -> anyhow::Result<()> +where + F: FnOnce(PgPool, Fixture) -> Fut, + Fut: std::future::Future>, +{ + let Some(url) = utopia_store::test_db::url() else { + return Ok(()); + }; + let pool = PgPool::connect(&url).await?; + let clean = |pool: PgPool| async move { + sqlx::query("DELETE FROM organizations WHERE name = $1") + .bind(org_name) + .execute(&pool) + .await + }; + clean(pool.clone()).await?; + let f = seed(&pool, org_name).await?; + let outcome = run(pool.clone(), f).await; + clean(pool).await?; + outcome +} + +fn lines(value: &str, chunk: Uuid) -> (String, serde_json::Value, Vec) { + ("lines".into(), serde_json::json!(value), vec![chunk]) +} + +#[tokio::test] +async fn a_superseded_chunk_stops_speaking_once_a_live_chunk_says_58_70() -> anyhow::Result<()> { + with_fixture("role-word-superseded-test", |pool, f| async move { + let fact = stated( + &pool, + &f, + &[(f.chunk_a, "lines", "40-52"), (f.chunk_b, "lines", "58-70")], + ) + .await?; + supersede(&pool, f.chunk_a, "2026-03-01").await?; + assert_eq!( + speaking(&pool, fact).await?, + vec![lines("58-70", f.chunk_b)] + ); + Ok(()) + }) + .await +} + +#[tokio::test] +async fn two_live_chunks_that_disagree_both_speak_with_their_chunk() -> anyhow::Result<()> { + with_fixture("role-word-disagree-test", |pool, f| async move { + let fact = stated( + &pool, + &f, + &[(f.chunk_a, "lines", "40-52"), (f.chunk_b, "lines", "58-70")], + ) + .await?; + assert_eq!( + speaking(&pool, fact).await?, + vec![lines("40-52", f.chunk_a), lines("58-70", f.chunk_b)] + ); + Ok(()) + }) + .await +} + +#[tokio::test] +async fn a_status_the_live_chunk_does_not_repeat_is_gone() -> anyhow::Result<()> { + with_fixture("role-word-dropped-test", |pool, f| async move { + let fact = stated( + &pool, + &f, + &[ + (f.chunk_a, "lines", "40-52"), + (f.chunk_a, "status", "failing"), + (f.chunk_b, "lines", "58-70"), + ], + ) + .await?; + supersede(&pool, f.chunk_a, "2026-03-01").await?; + assert_eq!( + speaking(&pool, fact).await?, + vec![lines("58-70", f.chunk_b)] + ); + Ok(()) + }) + .await +} + +#[tokio::test] +async fn a_stale_statement_shows_58_70_from_its_last_superseded_chunk() -> anyhow::Result<()> { + with_fixture("role-word-stale-test", |pool, f| async move { + let fact = stated( + &pool, + &f, + &[(f.chunk_a, "lines", "40-52"), (f.chunk_b, "lines", "58-70")], + ) + .await?; + supersede(&pool, f.chunk_a, "2026-03-01").await?; + supersede(&pool, f.chunk_b, "2026-04-01").await?; + assert_eq!( + speaking(&pool, fact).await?, + vec![lines("58-70", f.chunk_b)] + ); + Ok(()) + }) + .await +} + +#[tokio::test] +async fn a_deleted_documents_chunk_is_dated_by_its_deleted_at() -> anyhow::Result<()> { + with_fixture("role-word-deleted-test", |pool, f| async move { + let fact = stated( + &pool, + &f, + &[(f.chunk_a, "lines", "40-52"), (f.chunk_b, "lines", "58-70")], + ) + .await?; + supersede(&pool, f.chunk_a, "2026-03-01").await?; + sqlx::query("UPDATE documents SET deleted_at = now() WHERE kb_id = $1") + .bind(f.kb) + .execute(&pool) + .await?; + assert_eq!( + speaking(&pool, fact).await?, + vec![lines("58-70", f.chunk_b)] + ); + Ok(()) + }) + .await +} + +#[tokio::test] +async fn a_restored_document_lets_its_live_chunk_speak_58_70_alone_again() -> anyhow::Result<()> { + with_fixture("role-word-restored-test", |pool, f| async move { + let fact = stated( + &pool, + &f, + &[(f.chunk_a, "lines", "40-52"), (f.chunk_b, "lines", "58-70")], + ) + .await?; + supersede(&pool, f.chunk_a, "2026-03-01").await?; + let deleted_at = |at: Option<&'static str>| { + sqlx::query("UPDATE documents SET deleted_at = $2::timestamptz WHERE kb_id = $1") + .bind(f.kb) + .bind(at) + .execute(&pool) + }; + // 删在取代之前:两块同一刻到头,都说话 + deleted_at(Some("2026-02-01")).await?; + assert_eq!( + speaking(&pool, fact).await?, + vec![lines("40-52", f.chunk_a), lines("58-70", f.chunk_b)] + ); + deleted_at(None).await?; + assert_eq!( + speaking(&pool, fact).await?, + vec![lines("58-70", f.chunk_b)] + ); + Ok(()) + }) + .await +} + +#[tokio::test] +async fn a_stale_read_as_of_february_shows_40_52_before_the_latest_chunk_existed( +) -> anyhow::Result<()> { + with_fixture("role-word-stale-as-of-test", |pool, f| async move { + let fact = stated( + &pool, + &f, + &[(f.chunk_a, "lines", "40-52"), (f.chunk_b, "lines", "58-70")], + ) + .await?; + sqlx::raw_sql(&format!( + "UPDATE documents SET created_at = '2026-01-01' WHERE kb_id = '{kb}'; + UPDATE chunks SET created_at = '2026-01-01', superseded_at = '2026-02-01' + WHERE id = '{a}'; + UPDATE chunks SET created_at = '2026-03-01', superseded_at = '2026-04-01' + WHERE id = '{b}';", + kb = f.kb, + a = f.chunk_a, + b = f.chunk_b, + )) + .execute(&pool) + .await?; + let as_of = "2026-02-15T00:00:00Z".parse::>()?; + let read = graph::statement_qualifiers_for(&pool, &[fact], Some(as_of)).await?; + assert_eq!( + read[&fact] + .iter() + .map(|q| q.value.clone()) + .collect::>(), + vec![Some(serde_json::json!("40-52"))] + ); + Ok(()) + }) + .await +} + +#[tokio::test] +async fn a_read_as_of_february_shows_40_52_said_before_the_march_push() -> anyhow::Result<()> { + with_fixture("role-word-as-of-test", |pool, f| async move { + let fact = stated( + &pool, + &f, + &[(f.chunk_a, "lines", "40-52"), (f.chunk_b, "lines", "58-70")], + ) + .await?; + sqlx::raw_sql(&format!( + "UPDATE entities SET created_at = '2026-01-01' WHERE kb_id = '{kb}'; + UPDATE documents SET created_at = '2026-01-01' WHERE kb_id = '{kb}'; + UPDATE facts SET recorded_at = '2026-01-01' WHERE id = '{fact}'; + UPDATE chunks SET created_at = '2026-01-01', superseded_at = '2026-03-01' + WHERE id = '{a}'; + UPDATE chunks SET created_at = '2026-03-01' WHERE id = '{b}';", + kb = f.kb, + a = f.chunk_a, + b = f.chunk_b, + )) + .execute(&pool) + .await?; + let read_at = |as_of: Option<&str>| { + let pool = pool.clone(); + let as_of = as_of.map(|t| t.parse::>().unwrap()); + async move { + let (_, facts) = graph::entity_detail(&pool, f.kb, f.acme, None, as_of).await?; + let row = facts + .into_iter() + .find(|x| x.id == fact) + .expect("the statement"); + anyhow::Ok( + row.statement_qualifiers + .into_iter() + .map(|q| q.value) + .collect::>(), + ) + } + }; + assert_eq!( + read_at(Some("2026-02-01T00:00:00Z")).await?, + vec![Some(serde_json::json!("40-52"))] + ); + assert_eq!(read_at(None).await?, vec![Some(serde_json::json!("58-70"))]); + Ok(()) + }) + .await +} diff --git a/docs/decisions/0070-a-role-word-speaks-while-its-chunk-is-live.md b/docs/decisions/0070-a-role-word-speaks-while-its-chunk-is-live.md index 9abc926cd..14f6683b7 100644 --- a/docs/decisions/0070-a-role-word-speaks-while-its-chunk-is-live.md +++ b/docs/decisions/0070-a-role-word-speaks-while-its-chunk-is-live.md @@ -1,6 +1,6 @@ # 0070 · A role word speaks while its chunk is live -- **Status**: In progress · 2026-10-25 · [#1267](https://github.com/deeplethe/utopia/issues/1267) · decision 1 built (migration 0121) · open: decisions 2 to 4 +- **Status**: In progress · 2026-10-25 · [#1267](https://github.com/deeplethe/utopia/issues/1267) · decision 1 built (migration 0121), decisions 2 and 3 built (`record_axis::role_word_speaks_given`, the three `mood` checks included) · open: decision 4 - **Written**: 2026-10-16 (conventions in the [README](README.md)) - **Related**: [0037](0037-a-relation-carries-its-own-attributes.md) decided that a qualifier is not part of a fact's identity and that the first value stays; [0044](0044-the-ontology-is-a-view-over-what-documents-say.md) owns the open statement and the role words on it; [0054](0054-a-source-may-push-statements-in-the-open-contract.md) decision 7 is the re-push that supersedes a chunk; migration `0061` created `statement_qualifiers`; [0048](0048-provenance-references-stay-inside-the-knowledge-base.md) gets one more edge to keep inside the base; [0019](0019-the-second-clock-can-be-rewound.md) is the record axis `as_of` reads on; [#1267](https://github.com/deeplethe/utopia/issues/1267), [#1272](https://github.com/deeplethe/utopia/issues/1272) diff --git a/docs/design/ledger.md b/docs/design/ledger.md index ab78135d3..35e684a20 100644 --- a/docs/design/ledger.md +++ b/docs/design/ledger.md @@ -36,7 +36,7 @@ declared attribute for typed rows, converted by the attribute's datatype, the un text (`$4 billion` becomes 4000000000 with unit `$`) and the declared unit only when the text carries none; a qualifier is not part of the edge's identity; every superseding writer copies qualifiers with the evidence [0037, #731]. Entity detail, graph edges and the MCP `entity_facts` -tool return both: typed ones in `qualifiers`, role words in `statement_qualifiers` [#1267]. +tool return both: typed ones in `qualifiers`, role words in `statement_qualifiers`, each with the live chunks that say it [#1267, 0070]. `time_mentions (fact, chunk, text, char_start)` hold verbatim time words [#731]. Names are value facts on `known_as` [0041]. `entities.description` marks a described, unnamed thing [#731]. diff --git a/web/src/api.ts b/web/src/api.ts index 65c5d15c0..0d94044a5 100644 --- a/web/src/api.ts +++ b/web/src/api.ts @@ -1123,6 +1123,8 @@ export interface StatementQualifier { value: unknown | null; entity_id: string | null; entity_name: string | null; + /** 说这个值的那几块(0070):两块活着的块说法不同,各自一条 */ + chunk_ids: string[]; } export interface EntityFact { diff --git a/web/src/docs/mcp.md b/web/src/docs/mcp.md index 3f2eded6b..e8958e7e1 100644 --- a/web/src/docs/mcp.md +++ b/web/src/docs/mcp.md @@ -143,7 +143,9 @@ unaccepted predicate name; it does **not** mean the fact is derived. `qualifier_type_id`, `key`, `label`, raw `value`, `entity_id`, and `entity_name`. `statement_qualifiers[]` holds the document's own role words for the statement (such as `amount` or `lines`), which are not declared attributes: each has `role`, -raw `value`, `entity_id`, and `entity_name`. +raw `value`, `entity_id`, `entity_name`, and the `chunk_ids` that say it. Only +chunks live at the read's time speak, so a re-pushed value replaces the old one; +two live chunks that disagree give two entries. A `derived_facts[]` entry contains `id`, `subject_id`, `subject`, `predicate_id`, `predicate`, `object_id`, `object`, raw `object_value`, `rule`, `rule_name`, From 4eb477e08cca17bb644bf4af2973e39e31696b65 Mon Sep 17 00:00:00 2001 From: Daniel <118035379+Floating-Y@users.noreply.github.com> Date: Tue, 10 Nov 2026 14:49:42 +0800 Subject: [PATCH 2/5] A source's queued status and its sync job commit together, so a failed job insert no longer leaves the source stuck as queued (#1451) Signed-off-by: Floating-Y <118035379+Floating-Y@users.noreply.github.com> Co-authored-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com> --- .../src/api/google_drive_routes.rs | 8 +- .../src/api/google_drive_routes_tests.rs | 121 ++++++++++++++++++ .../utopia-server/src/api/sources_routes.rs | 16 +-- crates/utopia-server/src/main.rs | 18 +-- crates/utopia-store/src/sources.rs | 40 +++++- 5 files changed, 164 insertions(+), 39 deletions(-) diff --git a/crates/utopia-server/src/api/google_drive_routes.rs b/crates/utopia-server/src/api/google_drive_routes.rs index 12efe9740..717898445 100644 --- a/crates/utopia-server/src/api/google_drive_routes.rs +++ b/crates/utopia-server/src/api/google_drive_routes.rs @@ -469,13 +469,7 @@ pub async fn select( ) .await?; if !body.folders.is_empty() { - let _ = utopia_store::sources::mark_queued(&state.pool, source_id).await; - utopia_store::jobs::enqueue( - &state.pool, - "sync_source", - json!({ "source_id": source_id }), - ) - .await?; + utopia_store::sources::enqueue_sync_after_config_change(&state.pool, source_id).await?; } state.emit_source(kb_id); let _ = utopia_store::audit::record( diff --git a/crates/utopia-server/src/api/google_drive_routes_tests.rs b/crates/utopia-server/src/api/google_drive_routes_tests.rs index d4f8d7b65..504fc8378 100644 --- a/crates/utopia-server/src/api/google_drive_routes_tests.rs +++ b/crates/utopia-server/src/api/google_drive_routes_tests.rs @@ -2,7 +2,10 @@ //! 测试环境没配 OAuth 客户端:过了所有关卡的回调停在「没配置」,不会去敲 Google use super::*; use crate::auth::SessionOrToken; +use axum::body::{to_bytes, Body}; +use axum::http::{Request, StatusCode}; use std::sync::Arc; +use tower::ServiceExt; use utopia_core::models::User; struct Fixture { @@ -115,6 +118,124 @@ impl Fixture { .await? .config) } + + async fn sync_http(&self) -> anyhow::Result<(StatusCode, Value)> { + let token = crate::auth::issue_token(&self.state, self.connector.id)?; + let response = super::super::router(self.state.clone(), &Default::default()) + .oneshot( + Request::post(format!( + "/api/v1/kbs/{}/sources/{}/sync", + self.kb, self.source + )) + .header("Authorization", format!("Bearer {token}")) + .body(Body::empty())?, + ) + .await?; + let status = response.status(); + let bytes = to_bytes(response.into_body(), 1 << 20).await?; + Ok((status, serde_json::from_slice(&bytes)?)) + } + + async fn sync_state(&self) -> anyhow::Result<(String, i64)> { + Ok(sqlx::query_as( + "SELECT last_sync_status, + (SELECT count(*) FROM jobs WHERE kind = 'sync_source' + AND payload->>'source_id' = sources.id::text) + FROM sources WHERE id = $1", + ) + .bind(self.source) + .fetch_one(&self.pool) + .await?) + } + + async fn choose_folder(&self, id: &str) -> ApiResult> { + select( + State(self.state.clone()), + AuthUser(self.connector.clone()), + Path((self.kb, self.source)), + Json(SelectBody { + folders: vec![FolderEntry { + id: id.into(), + name: id.into(), + }], + }), + ) + .await + } + + async fn reject_sync_jobs(&self, reject: bool) -> anyhow::Result<()> { + // 名称和拒绝条件都限定到本测试的来源,清理不会删除其他测试的注入器。 + let guard = format!("test_reject_source_sync_{}", self.source.simple()); + let sql = if reject { + format!( + "CREATE FUNCTION {guard}() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN + IF NEW.kind = 'sync_source' AND NEW.payload->>'source_id' = '{}' + THEN RAISE EXCEPTION 'test source sync insert failure'; END IF; + RETURN NEW; END $$; + CREATE TRIGGER {guard} BEFORE INSERT ON jobs + FOR EACH ROW EXECUTE FUNCTION {guard}();", + self.source + ) + } else { + format!("DROP TRIGGER IF EXISTS {guard} ON jobs; DROP FUNCTION IF EXISTS {guard}();") + }; + sqlx::raw_sql(&sql).execute(&self.pool).await?; + Ok(()) + } +} + +#[tokio::test] +async fn source_sync_enqueue_manual_failure_rolls_back_and_can_retry() -> anyhow::Result<()> { + let Some(fx) = Fixture::new().await? else { + return Ok(()); + }; + fx.reject_sync_jobs(true).await?; + // 检查失败也先清理触发器,避免把故障注入留在共享测试库里。 + let result = async { + let (status, body) = fx.sync_http().await?; + anyhow::ensure!(status == StatusCode::INTERNAL_SERVER_ERROR, "{body}"); + let state = fx.sync_state().await?; + anyhow::ensure!(state == ("never".into(), 0), "{state:?}"); + Ok::<(), anyhow::Error>(()) + } + .await; + fx.reject_sync_jobs(false).await?; + result?; + + let (status, body) = fx.sync_http().await?; + assert_eq!(status, StatusCode::OK, "{body}"); + assert_eq!(body["queued"], true); + assert_eq!(fx.sync_state().await?, ("queued".into(), 1)); + Ok(()) +} + +#[tokio::test] +async fn source_sync_enqueue_drive_failure_keeps_config_but_rolls_back_queue() -> anyhow::Result<()> +{ + let Some(fx) = Fixture::new().await? else { + return Ok(()); + }; + fx.reject_sync_jobs(true).await?; + let result = async { + anyhow::ensure!(matches!( + fx.choose_folder("saved-folder").await, + Err(ApiErr(AppError::Db(_))) + )); + anyhow::ensure!(fx.config().await?["folders"][0]["id"] == "saved-folder"); + let state = fx.sync_state().await?; + anyhow::ensure!(state == ("never".into(), 0), "{state:?}"); + Ok::<(), anyhow::Error>(()) + } + .await; + fx.reject_sync_jobs(false).await?; + result?; + + let _ = fx + .choose_folder("saved-folder") + .await + .map_err(|ApiErr(error)| error)?; + assert_eq!(fx.sync_state().await?, ("queued".into(), 1)); + Ok(()) } fn denied_code(result: ApiResult) -> Option<&'static str> { diff --git a/crates/utopia-server/src/api/sources_routes.rs b/crates/utopia-server/src/api/sources_routes.rs index b5bfb6131..b2cf7b226 100644 --- a/crates/utopia-server/src/api/sources_routes.rs +++ b/crates/utopia-server/src/api/sources_routes.rs @@ -155,13 +155,7 @@ pub async fn create( .await?; // 拉取型来源建好立即同步一次(有配置即产出,无需等下一个调度周期) if matches!(source.kind.as_str(), "url" | "rss" | "custom") { - let _ = utopia_store::sources::mark_queued(&state.pool, source.id).await; - utopia_store::jobs::enqueue( - &state.pool, - "sync_source", - json!({ "source_id": source.id }), - ) - .await?; + utopia_store::sources::enqueue_sync(&state.pool, source.id).await?; } // api 来源:生成专属推送密钥(此后可随时经 get_token 查看) let mut ingest_token: Option = None; @@ -410,14 +404,8 @@ pub async fn sync_now( ) -> ApiResult> { require_kb(&state, &user, kb_id, Role::Editor).await?; source_in_kb(&state, kb_id, source_id).await?; - let queued = utopia_store::sources::mark_queued(&state.pool, source_id).await?; + let queued = utopia_store::sources::enqueue_sync(&state.pool, source_id).await?; if queued { - utopia_store::jobs::enqueue( - &state.pool, - "sync_source", - json!({ "source_id": source_id }), - ) - .await?; state.emit_source(kb_id); } Ok(Json(json!({ "queued": queued }))) diff --git a/crates/utopia-server/src/main.rs b/crates/utopia-server/src/main.rs index 3c01813d4..8b1339e8f 100644 --- a/crates/utopia-server/src/main.rs +++ b/crates/utopia-server/src/main.rs @@ -233,20 +233,10 @@ async fn main() -> anyhow::Result<()> { match utopia_store::sources::due_sources(&sched_state.pool).await { Ok(due) => { for s in due { - match utopia_store::sources::mark_queued(&sched_state.pool, s.id).await { - Ok(true) => { - if let Err(e) = utopia_store::jobs::enqueue( - &sched_state.pool, - "sync_source", - serde_json::json!({ "source_id": s.id }), - ) - .await - { - tracing::warn!(source_id = %s.id, error = %e, "同步任务入队失败"); - } - } - Ok(false) => {} - Err(e) => tracing::warn!(source_id = %s.id, error = %e, "标记入队失败"), + if let Err(e) = + utopia_store::sources::enqueue_sync(&sched_state.pool, s.id).await + { + tracing::warn!(source_id = %s.id, error = %e, "同步任务入队失败"); } } } diff --git a/crates/utopia-store/src/sources.rs b/crates/utopia-store/src/sources.rs index 14c1fe9c4..0e9345622 100644 --- a/crates/utopia-store/src/sources.rs +++ b/crates/utopia-store/src/sources.rs @@ -1,7 +1,7 @@ //! 摄入来源仓储:"来源即文件夹"——source 是容器,挂着它摄入的文档,可定时同步。 use chrono::{DateTime, Utc}; -use sqlx::PgPool; +use sqlx::{PgPool, Postgres, Transaction}; use utopia_core::models::{Role, Source, SourceKind, SourceView, SyncRun, SOURCE_SECRET_KEYS}; use utopia_core::{secrets, AppError, AppResult}; use uuid::Uuid; @@ -379,14 +379,46 @@ pub async fn due_sources(pool: &PgPool) -> AppResult> { .collect()) } -/// 标记入队(幂等:已在队列/运行中则返回 false,避免重复入队)。 -pub async fn mark_queued(pool: &PgPool, id: Uuid) -> AppResult { +/// 状态、任务和 worker 通知一起提交;已在队列/运行中则返回 false。 +pub async fn enqueue_sync(pool: &PgPool, id: Uuid) -> AppResult { + let mut tx = pool.begin().await?; + let queued = mark_queued_tx(&mut tx, id).await?; + if queued { + crate::jobs::enqueue_with_max_attempts_tx( + &mut tx, + "sync_source", + serde_json::json!({ "source_id": id }), + 3, + ) + .await?; + } + tx.commit().await?; + Ok(queued) +} + +/// 换了 Drive 文件夹,即使旧同步正在运行,也要再排一次读取新配置。 +/// 配置由调用方先保存;这里只保证状态和后续任务一起提交。 +pub async fn enqueue_sync_after_config_change(pool: &PgPool, id: Uuid) -> AppResult<()> { + let mut tx = pool.begin().await?; + mark_queued_tx(&mut tx, id).await?; + crate::jobs::enqueue_with_max_attempts_tx( + &mut tx, + "sync_source", + serde_json::json!({ "source_id": id }), + 3, + ) + .await?; + tx.commit().await?; + Ok(()) +} + +async fn mark_queued_tx(tx: &mut Transaction<'_, Postgres>, id: Uuid) -> AppResult { let res = sqlx::query( "UPDATE sources SET last_sync_status = 'queued' WHERE id = $1 AND last_sync_status NOT IN ('queued', 'running')", ) .bind(id) - .execute(pool) + .execute(&mut **tx) .await?; Ok(res.rows_affected() > 0) } From 196f6602c7d506c126405ece55cbfdd176deccfb Mon Sep 17 00:00:00 2001 From: Rudy Mizrahi Celekli <47457359+rudycelekli@users.noreply.github.com> Date: Tue, 10 Nov 2026 01:55:35 -0500 Subject: [PATCH 3/5] A number attribute matches a rule's "is one of" set, so a reading stored as 3.0 is one of {3} (#1403) * A number attribute matches a rule's "is one of" set, so a reading stored as 3.0 is one of {3} Signed-off-by: Rudy Celekli * Set membership compares numbers as numbers when both sides parse, so a set written [3.0] still holds a reading of 3, and ADR 0029 says so Signed-off-by: Rudy Celekli * A set written [3.0] still matches a reading of 3.0, which the membership test now checks beside integer 3 Signed-off-by: Rudy Celekli Co-authored-by: Cursor --------- Signed-off-by: Rudy Celekli Co-authored-by: Cursor Co-authored-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com> --- crates/utopia-reason/src/rules.rs | 60 +++++++++++++++++-- docs/decisions/0029-a-rule-may-say-or-once.md | 2 +- 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/crates/utopia-reason/src/rules.rs b/crates/utopia-reason/src/rules.rs index 9fe26860f..224714cfc 100644 --- a/crates/utopia-reason/src/rules.rs +++ b/crates/utopia-reason/src/rules.rs @@ -670,15 +670,13 @@ fn satisfies(c: &Condition, value: &serde_json::Value, bound: &HashMap !value.is_null(), // 值不在集合里就算满足;**没有值不算**——那是「没记」,不是「不是它」 - (Op::NotIn, Operand::Set(set)) => { - !value.is_null() && text(value).is_some_and(|v| !set.iter().any(|s| s == &v)) - } + (Op::NotIn, Operand::Set(set)) => !value.is_null() && in_set(value, set) == Some(false), (Op::Gt, Operand::Num(n)) => num(value).is_some_and(|v| v > *n), (Op::Gte, Operand::Num(n)) => num(value).is_some_and(|v| v >= *n), (Op::Lt, Operand::Num(n)) => num(value).is_some_and(|v| v < *n), (Op::Lte, Operand::Num(n)) => num(value).is_some_and(|v| v <= *n), (Op::Between, Operand::Range(lo, hi)) => num(value).is_some_and(|v| v >= *lo && v <= *hi), - (Op::In, Operand::Set(set)) => text(value).is_some_and(|s| set.iter().any(|x| x == &s)), + (Op::In, Operand::Set(set)) => in_set(value, set) == Some(true), // op 与操作数形状对不上:库里的 CHECK 挡了大部分,剩下的当不满足 _ => false, } @@ -695,6 +693,23 @@ fn num(v: &serde_json::Value) -> Option { } } +/// 集合成员(0029)。读数与集合里的一项都读得出数时按数比:数值属性存成 f64, +/// 读回来是 `3.0`,集合里写的是 `3`;写成 `[3.0]` 的集合存的又是 "3.0"。按字比 +/// 两头总有一头对不上。别的照旧按字面比。读数连字面都没有时是 `None` +fn in_set(value: &serde_json::Value, set: &[String]) -> Option { + let v = text(value)?; + let n = match value { + serde_json::Value::Number(n) => n.as_f64(), + serde_json::Value::String(s) => s.trim().parse::().ok(), + _ => None, + } + .filter(|n| n.is_finite()); + Some( + set.iter() + .any(|x| x == &v || n.is_some_and(|n| x.trim().parse::().is_ok_and(|x| x == n))), + ) +} + /// 类别。数字与布尔也转成字面形态参与集合比较,理由同上。 fn text(v: &serde_json::Value) -> Option { match v { @@ -1148,6 +1163,43 @@ mod tests { assert_eq!(hits.len(), 1); } + /// 数值属性的读数存成 f64:`3` 存进去读出来是 `3.0`,「属于 {3}」照样要命中 + #[test] + fn a_stored_number_is_one_of_the_numbers_in_the_set() { + let rule = BusinessRule { + id: id(90), + join_predicate: None, + conclusion: Conclusion::Typing { + class: "Grade3".into(), + }, + conditions: vec![Condition { + group: 0, + side: Side::X, + predicate: id(10), + op: Op::In, + operand: Operand::Set(vec!["3".into()]), + }], + }; + let facts = vec![fact(1, 50, 10, json!(3.0))]; + let spans = HashMap::from([(id(1), (None, None))]); + let (hits, _) = evaluate(std::slice::from_ref(&rule), &facts, &spans, &[]); + assert_eq!(hits.len(), 1); + // `parse_operand` 把 `[3.0]` 存成 "3.0":读数 3.0 仍在其中,整数 3 也在其中 + let mut rule = rule; + rule.conditions[0].operand = Operand::Set(vec!["3.0".into()]); + let facts = vec![fact(1, 50, 10, json!(3.0))]; + let (hits, _) = evaluate(std::slice::from_ref(&rule), &facts, &spans, &[]); + assert_eq!(hits.len(), 1); + let facts = vec![fact(1, 50, 10, json!(3))]; + let (hits, _) = evaluate(std::slice::from_ref(&rule), &facts, &spans, &[]); + assert_eq!(hits.len(), 1); + // 不是数的照旧按字面比 + rule.conditions[0].operand = Operand::Set(vec!["3".into()]); + let facts = vec![fact(1, 50, 10, json!("三"))]; + let (hits, _) = evaluate(&[rule], &facts, &spans, &[]); + assert!(hits.is_empty()); + } + /// 阈值抬高到读数之上,同一份数据就不再命中——降/升阈值重跑是 0021 的验收项 #[test] fn raising_the_threshold_clears_the_hit() { diff --git a/docs/decisions/0029-a-rule-may-say-or-once.md b/docs/decisions/0029-a-rule-may-say-or-once.md index a574f2d5a..d4ef9ff79 100644 --- a/docs/decisions/0029-a-rule-may-say-or-once.md +++ b/docs/decisions/0029-a-rule-may-say-or-once.md @@ -44,7 +44,7 @@ The rule reads as one sentence in the table — `A and B or C` — because it is ## Open - **Chaining is a separate question** (#477): a rule still cannot read what another rule concluded, and this record does not change that. The two are independent — this one is the shape of one rule, that one is how rules feed each other. -- **Set membership is still literal.** `in` and `not_in` compare strings exactly, so the same category in another language does not match. 0021 left this open and it stays open. +- **Set membership is still literal.** `in` and `not_in` compare strings exactly, so the same category in another language does not match. 0021 left this open and it stays open. The one exception is numbers: when both the reading and a set item parse as numbers they compare as numbers, so a reading stored as `3.0` is one of `{3}`, and a reading of `3` is one of a set written `[3.0]`. ## Status history From daeba7583b52d3f1265e091bd20b016596e96c84 Mon Sep 17 00:00:00 2001 From: Rudy Mizrahi Celekli <47457359+rudycelekli@users.noreply.github.com> Date: Tue, 10 Nov 2026 02:02:17 -0500 Subject: [PATCH 4/5] A cron weekday written as a number reads as standard cron, so 1-5 syncs Monday to Friday instead of Sunday to Thursday (#1399) * A cron weekday written as a number reads as standard cron, so 1-5 syncs Monday to Friday instead of Sunday to Thursday Signed-off-by: Rudy Celekli * A source saved with numeric weekdays is also scheduled by standard cron, so a stored 1-5 stops running Sunday to Thursday Signed-off-by: Rudy Celekli --------- Signed-off-by: Rudy Celekli Co-authored-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com> --- crates/utopia-store/src/sources.rs | 83 ++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 5 deletions(-) diff --git a/crates/utopia-store/src/sources.rs b/crates/utopia-store/src/sources.rs index 0e9345622..1c3dce25e 100644 --- a/crates/utopia-store/src/sources.rs +++ b/crates/utopia-store/src/sources.rs @@ -21,15 +21,18 @@ pub fn creatable_kinds() -> Vec<&'static str> { /// 校验并规范化标准 5 段 cron 表达式(内部用 cron crate 的 6 段:补秒位)。 pub fn validate_cron(expr: &str) -> AppResult { - let normalized = expr.split_whitespace().collect::>().join(" "); - let fields = normalized.split(' ').count(); - if fields != 5 { + let mut fields: Vec = expr.split_whitespace().map(str::to_string).collect(); + if fields.len() != 5 { return Err(AppError::invalid_detail( "bad_cron_fields", "Cron expression must have 5 fields (minute hour day month weekday)", - format!("got {fields}"), + format!("got {}", fields.len()), )); } + if let Some(names) = weekday_names(&fields[4]) { + fields[4] = names; + } + let normalized = fields.join(" "); use std::str::FromStr; cron::Schedule::from_str(&format!("0 {normalized}")).map_err(|e| { AppError::invalid_detail("bad_cron", "Invalid cron expression", e.to_string()) @@ -37,6 +40,43 @@ pub fn validate_cron(expr: &str) -> AppResult { Ok(normalized) } +/// 星期那一段的数字按标准 cron 读(0–7,0 与 7 都是周日),存成名字。 +/// +/// cron crate 的数字星期是 Quartz 那一套,1 是周日:照 Advanced 旁边链着的 crontab.guru +/// 写 `1-5`,同步落在周日到周四,`0` 则被当成越界拒掉。名字两边读法一样,存下来的 +/// 表达式也就没有歧义。没有数字、或读不懂的写法原样交给 cron crate 去校验 +fn weekday_names(field: &str) -> Option { + if !field.bytes().any(|b| b.is_ascii_digit()) { + return None; + } + let mut days = [false; 7]; + for part in field.split(',') { + let (range, step) = match part.split_once('/') { + Some((range, step)) => (range, step.parse::().ok().filter(|s| *s > 0)?), + None => (part, 1), + }; + let (from, to) = match range.split_once('-') { + _ if range == "*" => (0, 6), + Some((from, to)) => (from.parse().ok()?, to.parse().ok()?), + None => { + let day = range.parse().ok()?; + (day, day) + } + }; + if from > to || to > 7 { + return None; + } + for day in (from..=to).step_by(step) { + days[day % 7] = true; + } + } + let names = [1, 2, 3, 4, 5, 6, 0] + .into_iter() + .filter(|d| days[*d]) + .map(|d| ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][d]); + Some(names.collect::>().join(",")) +} + pub const RSS_CONTENT_MODE_KEY: &str = "content_mode"; pub const RSS_FULL_CONTENT_MODE: &str = "full_new_items"; @@ -72,7 +112,14 @@ pub fn rss_full_content_enabled(kind: &str, config: &serde_json::Value) -> AppRe /// cron 的下一次触发时刻(服务器本地时区)。 fn cron_next_after(expr: &str, after: DateTime) -> Option> { use std::str::FromStr; - let schedule = cron::Schedule::from_str(&format!("0 {expr}")).ok()?; + // 改成存名字之前保存的来源,表达式里还是数字星期:同样按标准 cron 读, + // 不然存着 `1-5` 的来源照旧周日到周四同步 + let mut fields: Vec<&str> = expr.split_whitespace().collect(); + let names = fields.get(4).copied().and_then(weekday_names); + if let Some(names) = &names { + fields[4] = names; + } + let schedule = cron::Schedule::from_str(&format!("0 {}", fields.join(" "))).ok()?; let local_after = after.with_timezone(&chrono::Local); schedule .after(&local_after) @@ -647,6 +694,32 @@ mod tests { assert!(validate_cron("0 0 0 0 0 0").is_err()); // 6 段 } + #[test] + fn cron_weekday_numbers_read_as_standard_cron() { + // crontab.guru 的 1-5 是周一到周五;cron crate 的数字星期却从周日 = 1 数起 + assert_eq!( + validate_cron("0 9 * * 1-5").unwrap(), + "0 9 * * Mon,Tue,Wed,Thu,Fri" + ); + assert_eq!(validate_cron("0 9 * * 0").unwrap(), "0 9 * * Sun"); + assert_eq!(validate_cron("0 9 * * 5-7").unwrap(), "0 9 * * Fri,Sat,Sun"); + } + + #[test] + fn a_source_saved_with_weekday_numbers_runs_on_standard_cron_days() { + use chrono::TimeZone; + // 2026-10-31 是周六;`1-5` 的下一次是周一,不是周日 + let saturday = chrono::Local + .with_ymd_and_hms(2026, 10, 31, 12, 0, 0) + .unwrap() + .with_timezone(&Utc); + let monday = chrono::Local + .with_ymd_and_hms(2026, 11, 2, 9, 0, 0) + .unwrap() + .with_timezone(&Utc); + assert_eq!(cron_next_after("0 9 * * 1-5", saturday), Some(monday)); + } + #[test] fn cron_next_computes() { let after = chrono::Utc::now(); From e8103d29f29f81ae3c7b8f3ad2a8dcdc6baa66fa Mon Sep 17 00:00:00 2001 From: WaylandYang <145302500+WaylandYang@users.noreply.github.com> Date: Tue, 10 Nov 2026 15:17:14 +0800 Subject: [PATCH 5/5] The rustls and vite patch bumps that landed on main are on dev too (#1486) * Bump rustls from 0.23.45 to 0.23.46 (#1473) Bumps [rustls](https://github.com/rustls/rustls) from 0.23.45 to 0.23.46. - [Release notes](https://github.com/rustls/rustls/releases) - [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md) - [Commits](https://github.com/rustls/rustls/compare/v/0.23.45...v/0.23.46) --- updated-dependencies: - dependency-name: rustls dependency-version: 0.23.46 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump vite from 6.4.3 to 6.4.5 in /web (#1475) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.4.3 to 6.4.5. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v6.4.5/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v6.4.5/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 6.4.5 dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] Signed-off-by: Wayland Yang Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: WaylandYang Co-authored-by: Claude Opus 5.5 --- Cargo.lock | 4 +- web/package.json | 2 +- web/pnpm-lock.yaml | 281 +++++++++++++++++++++++++-------------------- 3 files changed, 159 insertions(+), 128 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1d1f08d4e..497d01e91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3893,9 +3893,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.45" +version = "0.23.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" dependencies = [ "aws-lc-rs", "once_cell", diff --git a/web/package.json b/web/package.json index 7a0e73fe6..535758402 100644 --- a/web/package.json +++ b/web/package.json @@ -49,7 +49,7 @@ "@vitejs/plugin-react": "^4.3.4", "tailwindcss": "^4.0.0", "typescript": "^5.7.2", - "vite": "^6.0.0", + "vite": "^6.4.5", "vitest": "5.0.0" } } diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index e7bd451f9..781445196 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -92,7 +92,7 @@ importers: version: 0.5.20(tailwindcss@4.3.3) '@tailwindcss/vite': specifier: ^4.0.0 - version: 4.3.3(vite@6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0)) + version: 4.3.3(vite@6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0)) '@types/node': specifier: ^26.3.0 version: 26.3.0 @@ -104,7 +104,7 @@ importers: version: 19.3.0(@types/react@19.3.0) '@vitejs/plugin-react': specifier: ^4.3.4 - version: 4.7.0(vite@6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0)) + version: 4.7.0(vite@6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0)) tailwindcss: specifier: ^4.0.0 version: 4.3.3 @@ -112,11 +112,11 @@ importers: specifier: ^5.7.2 version: 5.9.3 vite: - specifier: ^6.0.0 - version: 6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0) + specifier: ^6.4.5 + version: 6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0) vitest: specifier: 5.0.0 - version: 5.0.0(@types/node@26.3.0)(vite@6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0)) + version: 5.0.0(@types/node@26.3.0)(vite@6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0)) packages: @@ -1185,128 +1185,133 @@ packages: '@rolldown/pluginutils@1.0.0-beta.27': resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==} - '@rollup/rollup-android-arm-eabi@4.63.0': - resolution: {integrity: sha512-70TeIFezKKy65LgAVyQh+w94/gjWhvPWaLaGGeMEgVrPkQhuj/M5bAYYZzIFUj9Y69oHyTm5Um/R6gcLh4A8JA==} + '@rollup/rollup-android-arm-eabi@4.67.4': + resolution: {integrity: sha512-/v/pUAPOcwp+r1Hjjdg0cBV1TE89CzGKrKh2FgkIQw2QBcIMmVPOCSfuOZStCn4Xh/98HXfo/ht6ztcssctPNg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.63.0': - resolution: {integrity: sha512-YC86tYIHK6M1IV+wbzO+Bxk8RCBr6ZyWYgWxUCzaZD8mc8rrFoIJDNzDrkHBYRc/wKdrsIXmm6/F7NzrAO+OrA==} + '@rollup/rollup-android-arm64@4.67.4': + resolution: {integrity: sha512-6tmmB/P52Vt167FXXEw5auiEUgTtZz7aqUgWHqYXToIUE0HFDY6fTdAyeekjjsNk6O/8dtpSKtClxSj1mMneKQ==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.63.0': - resolution: {integrity: sha512-oI+ECtUcli0y0fi4xpW82GdPIXdTkI8G8DSjG2LRuw09fPAGykaWYH/hXxiKuTxiAjiPSTIIuYUqof5Z2hShWw==} + '@rollup/rollup-android-x64@4.67.4': + resolution: {integrity: sha512-8Z9Q4RmotVmuL4llOvqX814JNiOK1oqoBv+glG5KbpRfUiypqzz2/fxIzK4Pq129l4dT5a8Gszmpc0/XPYoFuQ==} + cpu: [x64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.67.4': + resolution: {integrity: sha512-pnq6hssxTtwuRAl6Kdi/+IDY+b1IhkUetjhUkdLAAJCssjfqtL2Oqy/FXJVJFtAWOu1oRlArIvf0Yk1O92x2HQ==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.63.0': - resolution: {integrity: sha512-NwV+1s7TiKrMe4owHyKB/dTLD7ZJD0YEBEhIz+hvav1Cu1GReJjF+rsdNwjzENQeIAbE/CoNiaAc5Vz2h5DPAA==} + '@rollup/rollup-darwin-x64@4.67.4': + resolution: {integrity: sha512-BeIrGZvHMVdJg/N+ohZfFywG/gF41684YhDj2wBvouj7m9ziP1tZDUNwzXRiDY+3WIKngaC4hiUBqVtBPGP5og==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.63.0': - resolution: {integrity: sha512-tWtHBTu5gOPK4u4Urtk4qAHW3zZ9rQAmbssO8gp7ELvGTGI3aCiq6NqyTQ0PCIg7KbHJF2UkGDDs77YZGxfjCA==} + '@rollup/rollup-freebsd-arm64@4.67.4': + resolution: {integrity: sha512-fRFX/oqNg/g780DKoS8RIfYcZD59Ru5O/bSeK1N7gQljBFrTxJY/q5EX4eMs5SrJf32VgVBVVYCdfPpzAwPPnQ==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.63.0': - resolution: {integrity: sha512-2qPoJiwTvtHQ27NnYvTnsgk8laXWYuVmNESG8WFZBcEPKLfZ3I27qBJarjVRQtwGeYyRfq5ZowHXih9lm2BItw==} + '@rollup/rollup-freebsd-x64@4.67.4': + resolution: {integrity: sha512-bSrBRopG1q+0RuOsW0NtYTtIODlvNA3T3ebx5WnQVdSxWIoXFmj+rZdHUHdSLgFdZ5M6VGmekYE7r4RMGQXjfg==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.63.0': - resolution: {integrity: sha512-FQwsTRvLNuHoTdICABJQfbPUSEueISGmnpT06tXTMpfprf5NiKLSXKA0A+w45wJnCmZAnzgqBwbt6ARFuyOi5w==} + '@rollup/rollup-linux-arm-gnueabihf@4.67.4': + resolution: {integrity: sha512-L8IvdrJVtl65g1ozwDSyjGPG+FmibhCdFUwmqTItJLw0S3+Oj4QzFs7rfgTUiK7rsPjkCLdG1/GApFxoynXFJQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.63.0': - resolution: {integrity: sha512-BBVTXziw8mY1a4ZbWME9tZyfzqXCDPqaC7Z3heQ29p5dkvXzwL0NwelO8zLa8c3RBKvl3YTuSnBgsBhYBtwjIw==} + '@rollup/rollup-linux-arm-musleabihf@4.67.4': + resolution: {integrity: sha512-h7PcoQOzC31jshNpQ48J0akB9tsghjkSjSl5AZ6XsVGTxVsln7t7C4SQyw62tNVSaz2SeHgk4VT2ELbL17BSHQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.63.0': - resolution: {integrity: sha512-w2Iyy9+RqKwx3d9qWMKsJg0FfRBsY0/pXNv0mCQ3ueRvJI6+QAScfD4nrMlzFLs2HNVW6Ew+mtZfDl9b7Ew5/Q==} + '@rollup/rollup-linux-arm64-gnu@4.67.4': + resolution: {integrity: sha512-KSPuOBNHoOl7AsVjeY1KZci8+0up0U4TFAHU5IzBYN8P+Z6cB9DZq28+JQycZW7f6WLLa/tSzhV7Rdy95bVi+g==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.63.0': - resolution: {integrity: sha512-YK++KtrFRHYE0P6/RtYEAy9t8F37znP+K03RrIuLPYOL6SVlObRumf/0OE4V/h63xL9DwkWbNssZfmA9hawuDA==} + '@rollup/rollup-linux-arm64-musl@4.67.4': + resolution: {integrity: sha512-0E/mKmVk1PlQeQYygIwQm0jlwjANTzGSiNBMPrFx+rdFGFj/2Axh4p6XwcrystQIqXZVudTaGsdbDpzYgJ4wSA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loong64-gnu@4.63.0': - resolution: {integrity: sha512-aBfOG6fP7YkkPmTqPwufRJeFyz7WPpECv9XNbnsk9+vg7rxdih0lbtEel7jcRng4LZrrmU3FfitCFyEj4BWDWg==} + '@rollup/rollup-linux-loong64-gnu@4.67.4': + resolution: {integrity: sha512-Fvw7dOSc2Sa9UOipRZVI0zOgdLCzsjVyD/6JuHXzUHTXFu7mMgmeX/0/bCVBIut1dz+nWz3pV4WpS/Qg0XVnxw==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-loong64-musl@4.63.0': - resolution: {integrity: sha512-LGaHEOeHNAag9VuS1Crs5DFg4RrU9MPi2nVnNJk9DTePx/B6RRYKVmrIXt2h7YOJlwjaFJ6lwtFDliZxScTLrQ==} + '@rollup/rollup-linux-loong64-musl@4.67.4': + resolution: {integrity: sha512-jzxbVHaE7V3F+P0wEK7UydQtvv7Twfdtx58jI5/3VRx1jJxyrn+qFwfXmqjVFxPhBl+zjaRs+ZJMFJw7vdHaQA==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.63.0': - resolution: {integrity: sha512-jClvk+J0FC3b7Udvegiw5/4hErbHtmsNsQgENnKXDWtNCJXsJYZH5WURvu7imDOO38xYml24eeh5x3A04ppwCw==} + '@rollup/rollup-linux-ppc64-gnu@4.67.4': + resolution: {integrity: sha512-fhtrzp9p4GjEJVaigaap9g6X9nP6xgJtKiLLXSDgpE18HXufA5aqfltGn+KAqMtVZReJZfOrXm//y5YSA9BWbA==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-ppc64-musl@4.63.0': - resolution: {integrity: sha512-0OJlaGK+8+B777Ql5okIpD7ua5Ro9+VB9Ve0OKa28OQJZ1RbuUBVNHK/e3pr4BROqsyPl1JrPO1ZxJseCNffcA==} + '@rollup/rollup-linux-ppc64-musl@4.67.4': + resolution: {integrity: sha512-uynaF7IUHwAckV0S+yC1f5esy9gB+aqCBsPH5BOck32TYdCuAn2lVG5tvUcFnEsrviGEmRZxE1NHSOieUPYJEg==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.63.0': - resolution: {integrity: sha512-Ygsx+HoNH7afwi1bTIXbnTvVnsO+zurPLSYxybV1hHFVU72OWOCl6v05ql/z0hkpAPx+DK7Kn9Bi7MayCcjLTA==} + '@rollup/rollup-linux-riscv64-gnu@4.67.4': + resolution: {integrity: sha512-uaqRFdfb8eIa2bVHN/FE3ndCvR0zV2xv0AwjCfxrqSu6l6fp/54VhjfhslKlf2RIik9L1jwlt4E56PeVX6tQtQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.63.0': - resolution: {integrity: sha512-pDQxtMGb+OvG3fLwR2OkZlSd47hW+kWg4BYMG/++sR6RqorQccwPTDsxda5hPwiIeIErAnCF9ma3SAU06bdQtQ==} + '@rollup/rollup-linux-riscv64-musl@4.67.4': + resolution: {integrity: sha512-JZRow7kmxUDEASnxHuVG5itTm+nTXi9BQUABcVUnUEngC+OPwMrpx1uJ9hIA/v+IcAEBL52ktCSPXk5OJn9Jqg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.63.0': - resolution: {integrity: sha512-0BnUG9mS8I4SSHr3XsxVhuCMEiu+rX61xxZF5vujso4LaiAGFZFxvDjg6Xn6tLPNTUAfuCvQYas4LMQMVsKRSQ==} + '@rollup/rollup-linux-s390x-gnu@4.67.4': + resolution: {integrity: sha512-rdrh4e+Lq9fCNKoDPaCqeHXbQCe7yl77Ukl45tlSClwYdZ1gpFGZz1XLJdYtY++FRlfL5aHvb6/0n3GDW/Nxsw==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.63.0': - resolution: {integrity: sha512-Adu/VttB1dpPNW+FEacrZ+xVm9tFty84+RrFzsqlFaPxoJB+9XXyDGtp5dCOoBwGBIEVH0To7lExFXEx0BIF4A==} + '@rollup/rollup-linux-x64-gnu@4.67.4': + resolution: {integrity: sha512-wL7MS4r0fYcxluF3ne2plofHZiB/LsqNCnyaUlyiKpAJLb6agPSFz7DEFCfkonWAZXMrLwCmC08b2ZEnEdJkog==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.63.0': - resolution: {integrity: sha512-NQ3bDvjUbFKmP23671xUlXtKmqVsUBd6M4PQCvbmNtOy06hnQIdKHy8oG/6S3R/S6He1JgPk6A5VT+prAJMYEw==} + '@rollup/rollup-linux-x64-musl@4.67.4': + resolution: {integrity: sha512-4H0XHfd2VufGjX7NjUyeue78sD0bRIoKSGjGqO+F5nSvL6jN48NAU7esdmtFEYxZXwObLtt3MJ/kHS0jASMW3g==} cpu: [x64] os: [linux] - '@rollup/rollup-openbsd-x64@4.63.0': - resolution: {integrity: sha512-u2eDAl4+0aFvA13GxlGBtTI3SS3sdgwgtV0HyjZ0QaQVCgNE+jqNGey+GtxWiq+wxr/UycAx/OnfJzApCFamvA==} + '@rollup/rollup-openbsd-x64@4.67.4': + resolution: {integrity: sha512-osRHQbE55pZpCLetpMsFmhkapyZnAUH73qRKMh+npi3boUom6u6hdaTTPSxlInXxwJHsn9r2uDhdz0V7Yoxx2A==} cpu: [x64] os: [openbsd] - '@rollup/rollup-openharmony-arm64@4.63.0': - resolution: {integrity: sha512-XvRb5vfW3wAZQ+ZUG21AnHHDKtNcw99eigzEhjr//NZ3u7SoBaPP0seSc7FgP7p1epAEdAoZckMW9WY/+4w70w==} + '@rollup/rollup-openharmony-arm64@4.67.4': + resolution: {integrity: sha512-95+exYEyOwrZePsE0czi4q7X5lxKPa21+lmyAZlwbYENITQ0Unk4HAQAFp/p+KhXBHBx9mUABXRYjOC5A1wY3Q==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.63.0': - resolution: {integrity: sha512-iZPmniy4kNBf5yo2RezbkYNNK5HPbXE9+g+twnbqSng7dtLEJy1SKoxiE/ni4FDacjyuZpEeb9U054N4EoKHYw==} + '@rollup/rollup-win32-arm64-msvc@4.67.4': + resolution: {integrity: sha512-FOXOcKhNQpO4Po+Ynan6IbtM67SrXZbgpRJWVYwz53CT5veI7sVzDwVBmWS65N5Imv+wK3SVhIPAl+C5DXXNCg==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.63.0': - resolution: {integrity: sha512-mFBBd+LF37fnE8JnYUOH+imj0aPFPK30vpar4ehJkgnLj9sZn8ZxiRENmLtgIwxK7TC8klF6N57fxdNBwQoqOA==} + '@rollup/rollup-win32-ia32-msvc@4.67.4': + resolution: {integrity: sha512-cklKh0gJOkAZQcWziQa3hrjxZKN+PCHZ7SPTyGJDAiBVr05ZXlEjGFCG7zFJMaVibxsmzAe1FimN4u/HBns9+Q==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.63.0': - resolution: {integrity: sha512-ujeqEY3B+zbGn3Z4Q03cUBG/LGWnBJncVT36WER31LcOsQk9+1dmINKKtvmmfChUvRbK1G0R8OhMWFgHgaZtAw==} + '@rollup/rollup-win32-x64-gnu@4.67.4': + resolution: {integrity: sha512-AegwxJPc9bvUp8fQtlsUHkFMOMkGylWU7glyL+YD4vwG+QaYoGXYLSsQoeTD7kvoLZrVlMWNVhTg1dedY5C1VQ==} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.63.0': - resolution: {integrity: sha512-hncn90N4sOky0L2LKE5oESKLbxCPeVo4eLA2LSMoDzM+879ml4WSr+Rr4DWknNIVVvS1Hirkc9hx02W6YxS8rQ==} + '@rollup/rollup-win32-x64-msvc@4.67.4': + resolution: {integrity: sha512-RJZnrwTWj7Iq2ooBwoGbDdC65tDwYawneGcAfFMJqVUrRZMcskka6nTkBpXR/47G7kzn3EW2qupExnaBy11vwg==} cpu: [x64] os: [win32] @@ -1486,6 +1491,9 @@ packages: '@types/estree-jsx@1.0.5': resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} + '@types/estree@1.0.10': + resolution: {integrity: sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==} + '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} @@ -2595,6 +2603,11 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + negotiator@1.1.0: resolution: {integrity: sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==} engines: {node: '>=18'} @@ -2740,6 +2753,10 @@ packages: resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==} engines: {node: ^10 || ^12 || >=14} + postcss@8.5.32: + resolution: {integrity: sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==} + engines: {node: ^10 || ^12 || >=14} + powershell-utils@0.1.0: resolution: {integrity: sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==} engines: {node: '>=20'} @@ -2878,8 +2895,8 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.63.0: - resolution: {integrity: sha512-T5vnZ2y4QqC3/4P+w2+JO+Q/OVdnPsv4XcSYJYMEn0R9/jjl5AgLwO9LAZMzP2lN71O6pypn91rB7lDstUkfrQ==} + rollup@4.67.4: + resolution: {integrity: sha512-Lsv3oKcz5jgOQJej/p7nfwbVEdAbDT+z6OPf/SCdI+nF+q2ENp0pTKT35ZwXAmH8g45mfrIiJeEyAqKYSYoL9Q==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3197,8 +3214,8 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite@6.4.3: - resolution: {integrity: sha512-NTKlcQjlAK7MlQoyb6LgaqHc8sso/pVyUJYWMws3jg21uTJw/LddqIFPcPqP6PzpgbIcZyKI85sFE4HBrQDA8A==} + vite@6.4.5: + resolution: {integrity: sha512-4enwjFfi4IwtEh0w+jPzpLVOFQiPHmmzPxcHXQOyEur47o6u0jE573DmGpjA+7irXoMLYRZD5ZaFUEneS3abPg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -4447,79 +4464,82 @@ snapshots: '@rolldown/pluginutils@1.0.0-beta.27': {} - '@rollup/rollup-android-arm-eabi@4.63.0': + '@rollup/rollup-android-arm-eabi@4.67.4': + optional: true + + '@rollup/rollup-android-arm64@4.67.4': optional: true - '@rollup/rollup-android-arm64@4.63.0': + '@rollup/rollup-android-x64@4.67.4': optional: true - '@rollup/rollup-darwin-arm64@4.63.0': + '@rollup/rollup-darwin-arm64@4.67.4': optional: true - '@rollup/rollup-darwin-x64@4.63.0': + '@rollup/rollup-darwin-x64@4.67.4': optional: true - '@rollup/rollup-freebsd-arm64@4.63.0': + '@rollup/rollup-freebsd-arm64@4.67.4': optional: true - '@rollup/rollup-freebsd-x64@4.63.0': + '@rollup/rollup-freebsd-x64@4.67.4': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.63.0': + '@rollup/rollup-linux-arm-gnueabihf@4.67.4': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.63.0': + '@rollup/rollup-linux-arm-musleabihf@4.67.4': optional: true - '@rollup/rollup-linux-arm64-gnu@4.63.0': + '@rollup/rollup-linux-arm64-gnu@4.67.4': optional: true - '@rollup/rollup-linux-arm64-musl@4.63.0': + '@rollup/rollup-linux-arm64-musl@4.67.4': optional: true - '@rollup/rollup-linux-loong64-gnu@4.63.0': + '@rollup/rollup-linux-loong64-gnu@4.67.4': optional: true - '@rollup/rollup-linux-loong64-musl@4.63.0': + '@rollup/rollup-linux-loong64-musl@4.67.4': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.63.0': + '@rollup/rollup-linux-ppc64-gnu@4.67.4': optional: true - '@rollup/rollup-linux-ppc64-musl@4.63.0': + '@rollup/rollup-linux-ppc64-musl@4.67.4': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.63.0': + '@rollup/rollup-linux-riscv64-gnu@4.67.4': optional: true - '@rollup/rollup-linux-riscv64-musl@4.63.0': + '@rollup/rollup-linux-riscv64-musl@4.67.4': optional: true - '@rollup/rollup-linux-s390x-gnu@4.63.0': + '@rollup/rollup-linux-s390x-gnu@4.67.4': optional: true - '@rollup/rollup-linux-x64-gnu@4.63.0': + '@rollup/rollup-linux-x64-gnu@4.67.4': optional: true - '@rollup/rollup-linux-x64-musl@4.63.0': + '@rollup/rollup-linux-x64-musl@4.67.4': optional: true - '@rollup/rollup-openbsd-x64@4.63.0': + '@rollup/rollup-openbsd-x64@4.67.4': optional: true - '@rollup/rollup-openharmony-arm64@4.63.0': + '@rollup/rollup-openharmony-arm64@4.67.4': optional: true - '@rollup/rollup-win32-arm64-msvc@4.63.0': + '@rollup/rollup-win32-arm64-msvc@4.67.4': optional: true - '@rollup/rollup-win32-ia32-msvc@4.63.0': + '@rollup/rollup-win32-ia32-msvc@4.67.4': optional: true - '@rollup/rollup-win32-x64-gnu@4.63.0': + '@rollup/rollup-win32-x64-gnu@4.67.4': optional: true - '@rollup/rollup-win32-x64-msvc@4.63.0': + '@rollup/rollup-win32-x64-msvc@4.67.4': optional: true '@sec-ant/readable-stream@0.4.1': {} @@ -4604,12 +4624,12 @@ snapshots: postcss-selector-parser: 6.0.10 tailwindcss: 4.3.3 - '@tailwindcss/vite@4.3.3(vite@6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0))': + '@tailwindcss/vite@4.3.3(vite@6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0))': dependencies: '@tailwindcss/node': 4.3.3 '@tailwindcss/oxide': 4.3.3 tailwindcss: 4.3.3 - vite: 6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0) + vite: 6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0) '@tanstack/history@1.162.1': {} @@ -4685,7 +4705,9 @@ snapshots: '@types/estree-jsx@1.0.5': dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 + + '@types/estree@1.0.10': {} '@types/estree@1.0.9': {} @@ -4719,7 +4741,7 @@ snapshots: '@ungap/structured-clone@1.3.4': {} - '@vitejs/plugin-react@4.7.0(vite@6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0))': + '@vitejs/plugin-react@4.7.0(vite@6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0))': dependencies: '@babel/core': 7.29.7 '@babel/plugin-transform-react-jsx-self': 7.29.7(@babel/core@7.29.7) @@ -4727,18 +4749,18 @@ snapshots: '@rolldown/pluginutils': 1.0.0-beta.27 '@types/babel__core': 7.20.5 react-refresh: 0.17.0 - vite: 6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0) + vite: 6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0) transitivePeerDependencies: - supports-color - '@vitest/mocker@5.0.0(vite@6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0))': + '@vitest/mocker@5.0.0(vite@6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0))': dependencies: '@jridgewell/trace-mapping': 0.3.31 '@vitest/spy': 5.0.0 estree-walker: 3.0.3 magic-string: 1.2.3 optionalDependencies: - vite: 6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0) + vite: 6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0) '@vitest/spy@5.0.0': {} @@ -5065,7 +5087,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 etag@1.8.1: {} @@ -5919,6 +5941,8 @@ snapshots: nanoid@3.3.18: {} + nanoid@3.3.20: {} + negotiator@1.1.0: dependencies: content-type: 2.1.0 @@ -6064,6 +6088,12 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.2 + postcss@8.5.32: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.2.2 + powershell-utils@0.1.0: {} powershell-utils@0.2.1: {} @@ -6280,36 +6310,37 @@ snapshots: reusify@1.1.0: {} - rollup@4.63.0: + rollup@4.67.4: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 optionalDependencies: '@napi-rs/lzma-linux-x64-gnu': 1.5.1 - '@rollup/rollup-android-arm-eabi': 4.63.0 - '@rollup/rollup-android-arm64': 4.63.0 - '@rollup/rollup-darwin-arm64': 4.63.0 - '@rollup/rollup-darwin-x64': 4.63.0 - '@rollup/rollup-freebsd-arm64': 4.63.0 - '@rollup/rollup-freebsd-x64': 4.63.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.63.0 - '@rollup/rollup-linux-arm-musleabihf': 4.63.0 - '@rollup/rollup-linux-arm64-gnu': 4.63.0 - '@rollup/rollup-linux-arm64-musl': 4.63.0 - '@rollup/rollup-linux-loong64-gnu': 4.63.0 - '@rollup/rollup-linux-loong64-musl': 4.63.0 - '@rollup/rollup-linux-ppc64-gnu': 4.63.0 - '@rollup/rollup-linux-ppc64-musl': 4.63.0 - '@rollup/rollup-linux-riscv64-gnu': 4.63.0 - '@rollup/rollup-linux-riscv64-musl': 4.63.0 - '@rollup/rollup-linux-s390x-gnu': 4.63.0 - '@rollup/rollup-linux-x64-gnu': 4.63.0 - '@rollup/rollup-linux-x64-musl': 4.63.0 - '@rollup/rollup-openbsd-x64': 4.63.0 - '@rollup/rollup-openharmony-arm64': 4.63.0 - '@rollup/rollup-win32-arm64-msvc': 4.63.0 - '@rollup/rollup-win32-ia32-msvc': 4.63.0 - '@rollup/rollup-win32-x64-gnu': 4.63.0 - '@rollup/rollup-win32-x64-msvc': 4.63.0 + '@rollup/rollup-android-arm-eabi': 4.67.4 + '@rollup/rollup-android-arm64': 4.67.4 + '@rollup/rollup-android-x64': 4.67.4 + '@rollup/rollup-darwin-arm64': 4.67.4 + '@rollup/rollup-darwin-x64': 4.67.4 + '@rollup/rollup-freebsd-arm64': 4.67.4 + '@rollup/rollup-freebsd-x64': 4.67.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.67.4 + '@rollup/rollup-linux-arm-musleabihf': 4.67.4 + '@rollup/rollup-linux-arm64-gnu': 4.67.4 + '@rollup/rollup-linux-arm64-musl': 4.67.4 + '@rollup/rollup-linux-loong64-gnu': 4.67.4 + '@rollup/rollup-linux-loong64-musl': 4.67.4 + '@rollup/rollup-linux-ppc64-gnu': 4.67.4 + '@rollup/rollup-linux-ppc64-musl': 4.67.4 + '@rollup/rollup-linux-riscv64-gnu': 4.67.4 + '@rollup/rollup-linux-riscv64-musl': 4.67.4 + '@rollup/rollup-linux-s390x-gnu': 4.67.4 + '@rollup/rollup-linux-x64-gnu': 4.67.4 + '@rollup/rollup-linux-x64-musl': 4.67.4 + '@rollup/rollup-openbsd-x64': 4.67.4 + '@rollup/rollup-openharmony-arm64': 4.67.4 + '@rollup/rollup-win32-arm64-msvc': 4.67.4 + '@rollup/rollup-win32-ia32-msvc': 4.67.4 + '@rollup/rollup-win32-x64-gnu': 4.67.4 + '@rollup/rollup-win32-x64-msvc': 4.67.4 fsevents: 2.3.3 router@2.2.0: @@ -6658,13 +6689,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite@6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0): + vite@6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0): dependencies: esbuild: 0.25.12 fdir: 6.5.0(picomatch@4.0.7) picomatch: 4.0.7 - postcss: 8.5.26 - rollup: 4.63.0 + postcss: 8.5.32 + rollup: 4.67.4 tinyglobby: 0.2.17 optionalDependencies: '@types/node': 26.3.0 @@ -6672,10 +6703,10 @@ snapshots: jiti: 2.7.0 lightningcss: 1.32.0 - vitest@5.0.0(@types/node@26.3.0)(vite@6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0)): + vitest@5.0.0(@types/node@26.3.0)(vite@6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0)): dependencies: '@types/chai': 5.2.3 - '@vitest/mocker': 5.0.0(vite@6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0)) + '@vitest/mocker': 5.0.0(vite@6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0)) chai: 6.2.2 es-module-lexer: 2.3.2 expect-type: 1.4.0 @@ -6686,7 +6717,7 @@ snapshots: tinybench: 6.1.4 tinyexec: 1.3.0 tinyglobby: 0.2.17 - vite: 6.4.3(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0) + vite: 6.4.5(@types/node@26.3.0)(jiti@2.7.0)(lightningcss@1.32.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 26.3.0