From fc9f58199b80af73b69391732b6874dad73518c1 Mon Sep 17 00:00:00 2001 From: vitaliytv Date: Mon, 27 Jul 2026 17:07:41 +0300 Subject: [PATCH] =?UTF-8?q?fix(rust):=20pin=20mt-core/llm-cascade=20git=20?= =?UTF-8?q?deps=20=E2=80=94=20owner=20build=20was=20broken?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both `mt-core` (app/src-tauri, owner/src-tauri) and `llm-cascade` (owner/owner-llm) depended on unpinned git sources. Both upstream repos were restructured since: - nitra/mt split into a spec-only repo (nitra/mt) plus an implementation repo (nitra/mt-rust) — mt-core moved to the latter. HEAD of nitra/mt no longer has any Cargo.toml at all, so any fresh git fetch that didn't hit Cargo.lock's pinned SHA resolved straight to a broken checkout: `could not find Cargo.toml in .../checkouts/...`. - llm-cascade was renamed to llm-lib inside nitra/7n-rules (crate moved from llm-lib/crates/llm-cascade to llm-lib/crates/llm-lib). This has been silently breaking owner's DMG build in CI for a while — every recent release-owner.yml run failed at this exact step, and no owner release since owner-v0.15.0 has shipped a working artifact. Fix: point both git deps at their new homes with an explicit `rev` (matching the existing tauri-plugin-agent convention in app/src-tauri/Cargo.toml), so resolution no longer depends on what happens to be at the remote's default-branch HEAD. owner-llm keeps consuming the renamed crate under its old local name via Cargo's `package = "llm-lib"` alias — no source changes needed, `llm_cascade::` call sites are untouched. Verified: `cargo check --workspace` clean, `cargo test -p owner-llm` 6/6 passing. --- .cspell.json | 3 +++ Cargo.lock | 30 ++++++++++++++++++++++++------ app/.changes/260727-1445.md | 5 +++++ app/src-tauri/Cargo.toml | 2 +- owner/.changes/260727-1446.md | 5 +++++ owner/owner-llm/Cargo.toml | 2 +- owner/src-tauri/Cargo.toml | 2 +- 7 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 app/.changes/260727-1445.md create mode 100644 owner/.changes/260727-1446.md diff --git a/.cspell.json b/.cspell.json index 6509d4e..7c33d7b 100644 --- a/.cspell.json +++ b/.cspell.json @@ -67,6 +67,7 @@ "автовизначити", "Автоміграція", "Агрегуюча", + "алісить", "апдейтер", "апдейтера", "артефакта", @@ -130,6 +131,7 @@ "краш", "крейт", "крейта", + "крейтів", "крейтом", "крейту", "леджер", @@ -191,6 +193,7 @@ "пропсом", "пуші", "ранів", + "резолвилась", "релізні", "релізній", "рендер", diff --git a/Cargo.lock b/Cargo.lock index 00d586c..5671737 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2439,12 +2439,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" [[package]] -name = "llm-cascade" -version = "0.1.0" -source = "git+https://github.com/nitra/7n-rules.git#c47c5248ecb45cd076dbc2558e3c2d04f010ddfe" +name = "llm-lib" +version = "0.2.3" +source = "git+https://github.com/nitra/7n-rules.git?rev=cdc1441ea8fd4822b41f884a1675e2c105d984c3#cdc1441ea8fd4822b41f884a1675e2c105d984c3" dependencies = [ "agent-client-protocol", "genai", + "reqwest 0.12.28", "serde", "serde_json", "thiserror 1.0.69", @@ -2524,6 +2525,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2570,8 +2581,8 @@ dependencies = [ [[package]] name = "mt-core" -version = "0.1.0" -source = "git+https://github.com/nitra/mt.git#03050b869db4828b351defe639b6d09a1c963b4c" +version = "0.1.5" +source = "git+https://github.com/nitra/mt-rust.git?rev=7f82b456c51f32ed640a54f9db5e50b6674dd687#7f82b456c51f32ed640a54f9db5e50b6674dd687" dependencies = [ "chrono", "serde", @@ -3213,7 +3224,7 @@ dependencies = [ name = "owner-llm" version = "0.1.0" dependencies = [ - "llm-cascade", + "llm-lib", "tokio", ] @@ -3785,6 +3796,7 @@ dependencies = [ "js-sys", "log", "mime", + "mime_guess", "percent-encoding", "pin-project-lite", "quinn", @@ -5749,6 +5761,12 @@ dependencies = [ "unic-common", ] +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + [[package]] name = "unicode-ident" version = "1.0.24" diff --git a/app/.changes/260727-1445.md b/app/.changes/260727-1445.md new file mode 100644 index 0000000..1b4a6e7 --- /dev/null +++ b/app/.changes/260727-1445.md @@ -0,0 +1,5 @@ +--- +bump: patch +section: Fixed +--- +`mt-core` git-залежність (`app/src-tauri/Cargo.toml`) вказувала на `nitra/mt.git` без закріпленого `rev` — репозиторій розділили на спеку (`nitra/mt`) і реалізацію (`nitra/mt-rust`), і незакріплена залежність час від часу резолвилась у поточний HEAD `nitra/mt`, де Rust-крейтів більше немає (`could not find Cargo.toml`). Перенесено на `nitra/mt-rust.git` із закріпленим `rev`. diff --git a/app/src-tauri/Cargo.toml b/app/src-tauri/Cargo.toml index babd28b..29f7c32 100644 --- a/app/src-tauri/Cargo.toml +++ b/app/src-tauri/Cargo.toml @@ -39,7 +39,7 @@ tauri-plugin-agent = { git = "https://github.com/nitra/tauri-components", rev = serde = { version = "1", features = ["derive"] } serde_json = "1" uuid = { version = "1", features = ["v4"] } -mt-core = { git = "https://github.com/nitra/mt.git" } +mt-core = { git = "https://github.com/nitra/mt-rust.git", rev = "7f82b456c51f32ed640a54f9db5e50b6674dd687" } notify = "8" tauri-plugin-mcp-bridge = "0.12.0" tauri-plugin-process = "2.3.1" diff --git a/owner/.changes/260727-1446.md b/owner/.changes/260727-1446.md new file mode 100644 index 0000000..591bcce --- /dev/null +++ b/owner/.changes/260727-1446.md @@ -0,0 +1,5 @@ +--- +bump: patch +section: Fixed +--- +Дві незакріплені git-залежності ламали збірку owner CI (`could not find Cargo.toml` / `no matching package named llm-cascade found`): `mt-core` (`owner/src-tauri/Cargo.toml`) перенесено на `nitra/mt-rust.git` із закріпленим `rev` (crate-реалізація виїхала з `nitra/mt`, який лишився лише спекою); `llm-cascade` (`owner/owner-llm/Cargo.toml`) перейменували на `llm-lib` у `nitra/7n-rules` — залежність тепер явно алісить `package = "llm-lib"` із закріпленим `rev`, публічний API (`llm_cascade::…`) у коді owner-llm не змінювався. diff --git a/owner/owner-llm/Cargo.toml b/owner/owner-llm/Cargo.toml index 6ff9303..ca4d92d 100644 --- a/owner/owner-llm/Cargo.toml +++ b/owner/owner-llm/Cargo.toml @@ -5,7 +5,7 @@ description = "Agent/LLM-логіка owner — тонкі функції пов edition = "2021" [dependencies] -llm-cascade = { git = "https://github.com/nitra/7n-rules.git" } +llm-cascade = { package = "llm-lib", git = "https://github.com/nitra/7n-rules.git", rev = "cdc1441ea8fd4822b41f884a1675e2c105d984c3" } [dev-dependencies] tokio = { version = "1", features = ["rt-multi-thread", "macros"] } diff --git a/owner/src-tauri/Cargo.toml b/owner/src-tauri/Cargo.toml index b0a3c2d..9351602 100644 --- a/owner/src-tauri/Cargo.toml +++ b/owner/src-tauri/Cargo.toml @@ -20,7 +20,7 @@ tauri-plugin-notification = "2" tauri-plugin-opener = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" -mt-core = { git = "https://github.com/nitra/mt.git" } +mt-core = { git = "https://github.com/nitra/mt-rust.git", rev = "7f82b456c51f32ed640a54f9db5e50b6674dd687" } owner-llm = { path = "../owner-llm" } notify = "8" chrono = "0.4"