Skip to content

chore(deps): align rusqlite 0.40 + git2 0.21 with OpenHuman host#59

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel:chore/align-native-deps-for-openhuman
Jul 4, 2026
Merged

chore(deps): align rusqlite 0.40 + git2 0.21 with OpenHuman host#59
senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel:chore/align-native-deps-for-openhuman

Conversation

@senamakel

Copy link
Copy Markdown
Member

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).

  • Bump rusqlite 0.320.40 and git2 0.190.21 (with vendored-libgit2), matching the host pins (rusqlite = "=0.40.0", git2 = "0.21" + vendored-libgit2).
  • Adapt the API deltas the bumps introduce.

Problem

rusqlite (→ libsqlite3-sys, links = "sqlite3") and git2 (→ libgit2-sys, links = "git2") are native-linking crates. Cargo hard-errors if two versions of the same links crate appear in one dependency graph. OpenHuman pins rusqlite =0.40.0 (bundled) and git2 0.21 (vendored-libgit2); TinyCortex pinned rusqlite 0.32 (bundled) / git2 0.19. With both bundling SQLite, the host could not even activate its tinycortex dependency — cargo refused to resolve the graph.

Solution

  • rusqlite 0.40: >= 0.33 dropped FromSql for usize, so VectorStore::count reads COUNT(*) as i64 and converts via usize::try_from(...).context(...) (matches OpenHuman's own fix for the same call).
  • git2 0.21 API deltas in diff/ledger.rs:
    • Tag::message()Result<Option<&str>, _> — checkpoint tag reader degrades a missing/non-UTF8 message to "".
    • StringArray::Iter::ItemResult<Option<&str>, _> — the two tag-name loops use filter_map(|r| r.ok().flatten()).
    • Buf::as_str()Result<&str, Utf8Error>patch_text uses .ok()?.

Validation

  • cargo check --all-targets — clean.
  • cargo test --lib diff:: — 38 passed (exercises the changed checkpoint/tag-delete/patch code).
  • Host root world (tinyhumansai/openhuman) cargo check with tinycortex = "0.1" active — exit 0, no multiple packages link to native library error (one bundled SQLite + one libgit2 confirmed).

Notes

Keep these pins in lockstep with the host root Cargo.toml going forward — a comment in Cargo.toml records why. No behavior change beyond the dependency bump + API adaptation.

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.
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3b8c7a12-7adc-409c-bc5d-7f0dfe580c36

📥 Commits

Reviewing files that changed from the base of the PR and between d1a8c7b and 35f9518.

📒 Files selected for processing (3)
  • Cargo.toml
  • src/memory/diff/ledger.rs
  • src/memory/store/vectors/store.rs

Comment @coderabbitai help to get the list of available commands.

@senamakel senamakel merged commit 33dda94 into tinyhumansai:main Jul 4, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant