Skip to content

fix(cli): pass u64 limit/offset to regenerated client#2370

Merged
nicoloboschi merged 1 commit into
mainfrom
fix/rust-cli-u64-limit-offset
Jun 23, 2026
Merged

fix(cli): pass u64 limit/offset to regenerated client#2370
nicoloboschi merged 1 commit into
mainfrom
fix/rust-cli-u64-limit-offset

Conversation

@nicoloboschi

Copy link
Copy Markdown
Collaborator

Problem

cargo build for the Rust CLI fails on main, breaking the test-rust-cli and test-doc-examples (cli) CI jobs:

error[E0308]: arguments to this method are incorrect
  --> src/api.rs:426
note: expected `Option<u64>`, found `Option<i64>`

The generated hindsight-client was regenerated with limit/offset typed as Option<u64> (the OpenAPI spec marks them as unsigned, minimum: 0), but the hand-written api.rs wrappers still passed Option<i64>.

Fix

Cast limit/offset to u64 at each affected call site — list_documents, list_memories, list_entities, get_graph, list_tags — matching the as i64as u64 pattern already used for list_documents. No wrapper signatures or callers change.

Verification

  • cargo build — clean
  • cargo test — 57 + 24 + 11 + 7 tests pass
  • cargo fmt --check — clean

The Rust client was regenerated with limit/offset typed as Option<u64>
(unsigned, minimum 0 in the OpenAPI spec), but the api.rs wrappers still
passed Option<i64>, breaking `cargo build` (and the test-rust-cli /
test-doc-examples CI jobs). Cast the values to u64 at each call site
(list_documents, list_memories, list_entities, get_graph, list_tags),
matching the existing pattern already used for list_documents.
@nicoloboschi nicoloboschi merged commit 63a92be into main Jun 23, 2026
83 of 84 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