Skip to content

Document the Rust SDK and verify its distributable crate - #1477

Open
yorkhellen wants to merge 4 commits into
ClickHouse:mainfrom
yorkhellen:docs/rust-sdk-release-readiness
Open

yorkhellen wants to merge 4 commits into
ClickHouse:mainfrom
yorkhellen:docs/rust-sdk-release-readiness

Conversation

@yorkhellen

@yorkhellen yorkhellen commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry

The Rust SDK reference covers installation, identity, generated calls, blocking clients and configurable retries. CI checks the crate's independent version and verifies packaged source, metadata and license against the checkout.

Why

Readers need a reference for the Rust SDK's published API and connection settings. Checking the distributable crate against its source keeps those instructions tied to the files Cargo packages.

Scope and risk

Adds the Rust SDK reference and its documentation links, updates package coverage descriptions in the SDK READMEs, and records independent crate publication in the release-process table.

Adds a release-check helper, focused rejection tests and CI calls for the version and archive checks. The checks reject missing, changed or unexpected files, mismatched manifests, licenses, commit metadata and supplied checksums. Library target options must match the source manifest, including its default library name and path; a package-only crate type or other target option is rejected. Library target options must match the source manifest, including its default library name and path; a package-only crate type or other target option is rejected. Future changes to Cargo's archive layout may require updating the verifier.

Compatibility, rollout and rollback

  • Wire: no operations, fields or defaults change. SDK runtime behavior is unchanged.
  • Operator steps: none. Rust crate publication remains a separate owner action after a Cargo dry run.
  • Rollback: revert the documentation and archive checks; no stored data or migrations remain.

Tests

  • make format, make lint, make typecheck: passed.
  • .venv/bin/python -m pytest tests/unit/test_rust_sdk_release.py tests/unit/test_rust_sdk_ci_process.py tests/unit/test_release_prepare.py tests/unit/test_doc_links.py tests/unit/test_public_copy.py -q: 449 passed.
  • mkdocs build --strict: passed.
  • Installed the published crate in a fresh consumer project and compiled the reference snippets, README starter and disabled-retry example.
  • cargo check --locked --manifest-path sdk/rust/Cargo.toml --examples --features blocking: passed.
  • Executed all seven scenario --help commands without connection configuration: passed.
  • cargo publish --dry-run --locked --features blocking: packaged and compiled successfully; no upload.
  • Ran the archive verifier on a real Cargo package with expected commit and checksum; checked the published crate's checksum, generated files, examples and license.
  • Executed the focused pacing regression and eight probe tests: passed.
  • cargo package --locked --offline --no-verify --manifest-path sdk/rust/Cargo.toml --target-dir <temporary-directory>: created an archive accepted by the verifier. Adding crate-type = ["cdylib"] to the packaged [lib] table is rejected.
  • Seven library-target drift regressions failed before the fix and pass after it. Positive cases preserve explicitly reviewed source library options and Cargo's normalization of dot segments and repeated path separators.
  • cargo package --locked --offline --no-verify --manifest-path sdk/rust/Cargo.toml --target-dir <temporary-directory>: created an archive accepted by the verifier. Adding crate-type = ["cdylib"] to the packaged [lib] table is rejected.
  • Seven library-target drift regressions failed before the fix and pass after it. Positive cases preserve explicitly reviewed source library options and Cargo's normalization of dot segments and repeated path separators.

Service-backed memory, knowledge, code-index, task and erasure example flows were not rerun. The new reference's production URL needs verification after the page is deployed. The full unit suite and integration checks remain for CI.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (TRAE). Source inspection, package verification, snippet compilation and the checks above were used to validate the diff. A separate review of the final documentation corrections reported no findings.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Local format, lint, type checks and focused tests pass. The full make test-unit and applicable integration results are reported by CI; a full local run is not required before pushing.
  • Generated files are regenerated in this PR, not by hand: llms.txt was generated; all generator checks pass.
  • A new migration is additive and numbered after the latest on main; no merged migration is edited. No migrations changed.
  • A behaviour change to any file a plugin ships bumps both plugin manifests' version, and no other open PR uses that version. No plugin files changed.
  • The frontend builds and its tests pass, if frontend/ changed. No frontend files changed.
  • Docs describe the system as it is, and this description names operator steps and wire changes.
  • Repository text passes tests/unit/test_public_copy.py.
  • Commits are signed off (git commit -s).

Note

Low Risk
Documentation and release/CI packaging checks only; no runtime wire or server behavior changes.

Overview
Adds a Rust SDK reference (docs/reference/rust-sdk.md) and wires it into the docs index, llms.txt, and the release-process table as a crates.io publication separate from the automated PyPI/npm/MCP publish jobs.

CI now runs scripts/release/rust_sdk.py to validate the crate’s independent SemVer and, after cargo package, to verify the distributable archive against the checkout (source files, normalized Cargo.toml, LICENSE, VCS metadata, optional commit/checksum) instead of only diffing LICENSE in the shell.

Ships the verifier with focused unit tests (tests/unit/test_rust_sdk_release.py) and updates Rust SDK README/examples copy to reflect that generated APIs and examples ship on crates.io.

Reviewed by Cursor Bugbot for commit 0da630d. Bugbot is set up for automated code reviews on this repo. Configure here.

Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Document configurable retry policies and disabling retries and pacing.
Describe probe results as missing operations and request fields.
Keep the release introduction and license check title in their original form.

Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 25, 2026 4:59pm UTC
loom-telemetry Ready Ready Preview Nov 25, 2026 4:59pm UTC

Request Review

@zlareb1 zlareb1 self-assigned this Nov 25, 2026

@zlareb1 zlareb1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package verifier accepts a manifest change that breaks Rust SDK consumers. I reproduced it with a local crate fixture and an offline Cargo consumer check.

Comment thread scripts/release/rust_sdk.py Resolved
Compare library target options with the source manifest so a cdylib-only
package cannot pass verification while breaking Rust consumers.

Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Cargo removes dot segments and repeated separators from library paths.
Compare that normalized path while preserving every other target option.

Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>

@zlareb1 zlareb1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings on this head. The verifier rejects changes to the packaged library target and accepts Cargo’s normalized path. The 448 focused release and documentation tests pass, and the verifier accepts a crate packaged from this commit.

@zlareb1

zlareb1 commented Nov 25, 2026

Copy link
Copy Markdown
Member

fix the merge conflicts

This branch has not been deployed

No deployments
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.

2 participants