chore(deps): align rusqlite 0.40 + git2 0.21 with OpenHuman host#59
Conversation
rusqlite and git2 are native `links = "…"` crates (libsqlite3-sys -> links=sqlite3, libgit2-sys -> links=git2). OpenHuman pins rusqlite =0.40.0 (bundled) and git2 0.21 (vendored-libgit2); the crate pinned rusqlite 0.32 / git2 0.19. Two versions of a links crate in one binary is a hard Cargo error, so the host could not activate its `tinycortex` dependency. Bump both to the host versions and adapt the API deltas: - rusqlite >= 0.33 dropped FromSql for usize: VectorStore::count reads COUNT(*) as i64 and converts via usize::try_from (matches the host's own fix). - git2 0.21: Tag::message() -> Result<Option<&str>>; StringArray::Iter::Item -> Result<Option<&str>>; Buf::as_str() -> Result<&str, Utf8Error>. Adapt the checkpoint tag reader, the two tag-name loops, and patch_text. cargo check --all-targets clean; diff/ledger + checkpoint tests (38) pass.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Comment |
Summary
Align the crate's native-linking dependencies with the OpenHuman host so the two can be built into one binary. This is the first required PR for the OpenHuman → TinyCortex memory migration (host tracking PR: tinyhumansai/openhuman#4516).
rusqlite0.32→0.40andgit20.19→0.21(withvendored-libgit2), matching the host pins (rusqlite = "=0.40.0",git2 = "0.21" + vendored-libgit2).Problem
rusqlite(→libsqlite3-sys,links = "sqlite3") andgit2(→libgit2-sys,links = "git2") are native-linking crates. Cargo hard-errors if two versions of the samelinkscrate appear in one dependency graph. OpenHuman pinsrusqlite =0.40.0 (bundled)andgit2 0.21 (vendored-libgit2); TinyCortex pinnedrusqlite 0.32 (bundled)/git2 0.19. With both bundling SQLite, the host could not even activate itstinycortexdependency —cargorefused to resolve the graph.Solution
rusqlite0.40:>= 0.33droppedFromSql for usize, soVectorStore::countreadsCOUNT(*)asi64and converts viausize::try_from(...).context(...)(matches OpenHuman's own fix for the same call).git20.21API deltas indiff/ledger.rs:Tag::message()→Result<Option<&str>, _>— checkpoint tag reader degrades a missing/non-UTF8 message to"".StringArray::Iter::Item→Result<Option<&str>, _>— the two tag-name loops usefilter_map(|r| r.ok().flatten()).Buf::as_str()→Result<&str, Utf8Error>—patch_textuses.ok()?.Validation
cargo check --all-targets— clean.cargo test --lib diff::— 38 passed (exercises the changed checkpoint/tag-delete/patch code).tinyhumansai/openhuman)cargo checkwithtinycortex = "0.1"active — exit 0, nomultiple packages link to native libraryerror (one bundled SQLite + one libgit2 confirmed).Notes
Keep these pins in lockstep with the host root
Cargo.tomlgoing forward — a comment inCargo.tomlrecords why. No behavior change beyond the dependency bump + API adaptation.