Skip to content

Rust SDK documentation matches the published crate - #2130

Merged
zlareb1 merged 3 commits into
ClickHouse:mainfrom
yorkhellen:docs/rust-sdk-012
Dec 4, 2026
Merged

zlareb1 merged 3 commits into
ClickHouse:mainfrom
yorkhellen:docs/rust-sdk-012

Conversation

@yorkhellen

@yorkhellen yorkhellen commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Related: #52
Related: #1935
Related: #2097

This is part of issue #52. It documents the published Rust SDK capabilities; merging it does not close the issue.

Changelog category

  • Documentation

Changelog entry

Not required for documentation changes.

Why

The website says an empty API key disables authentication, but the SDK continues stored credential discovery. The website and SDK README also describe shipped APIs as available only from source. The published clickhouse-loom 0.1.2 crate includes stored-login renewal, route methods and the corrected login example, so the documentation can describe those APIs. Several introductory pages bypass the website's Rust reference.

Scope and risk

Eight documentation files change:

  • The Rust reference describes credential precedence, profile server binding, renewal failures and HTTP 401 token replacement, adds a stored-login read example and documents async and blocking route methods. Unknown-operation retry wording includes responses proving the handler never ran.
  • The SDK README removes source-only and version-specific qualifiers, installs the blocking feature from crates.io and links the stored-login example.
  • The repository guide includes the Rust SDK directory.
  • The root README, quickstart and ways-to-connect page link the website's Rust reference. The overview lists the SDK languages together without a separate Rust link. The reference index includes stored-login renewal and routes.

The SDK implementation, wire contracts and generated files remain unchanged. Editing the repository README does not replace the immutable README packaged in crate 0.1.2; that registry page changes with a subsequent crate publication.

Compatibility, rollout and rollback

  • Wire: no operations, fields or defaults change.
  • Publication: crate 0.1.2 is available on crates.io before this website update.
  • Operator steps: none.
  • Rollback: reverting restores the website text; no stored data changes.

Tests

  • make format, make lint and make typecheck pass.
  • pytest tests/unit/test_doc_links.py tests/unit/test_public_copy.py -q: 294 passed.
  • python -m scripts.codegen.docs_reference --check passes.
  • python scripts/release/rust_sdk.py check-version passes and reports 0.1.2. This validates the manifest version; no crate is republished.
  • npm --prefix docs test: 36 passed, zero failed or skipped.
  • npm --prefix docs run build passes and produces the production documentation site.
  • All eight Rust code blocks compile against registry crate 0.1.2 with the blocking feature enabled. Fragments are wrapped in a main function and supplied a client where needed.
  • An independent consumer installs crate 0.1.2 from the registry and executes async and blocking memory.get and request_json calls against a local HTTP fixture. It checks Authorization headers, memory keys, namespaces and response decoding.
  • The downloaded crate has the Cargo index checksum a02fcf3d87b3f1ddcd976946b8a66e0360e28beee2e8a837332576331a050e87 and source commit 539637796a92fbde17b759c7c448b742d36032c6. The package verifier confirms its source matches that commit.
  • A fresh independent static review of the pushed eight-file diff finds no defects. It compares all 16 top-level Rust source files with the published artifact, checks 276 link targets and verifies authentication, routes and retry wording from source. It does not run builds, runtime tests or hosted CI.
  • Server unit and integration suites remain for CI.

AI assistance in the code

  • AI-generated (TRAE): an agent edited the documentation, checked the published artifact and compiled the examples.

  • 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 documentation tests pass.
  • Generated files need no changes.
  • No migrations or plugin changes.
  • No frontend changes.
  • Docs describe published behavior and name operator steps and wire changes.
  • Repository text passes the public-copy check.
  • Commits are signed off.
  • Hosted CI passes.

Note

Low Risk
Documentation-only changes with no SDK, wire, or runtime behavior modifications.

Overview
Updates documentation only so the site and sdk/rust/README.md describe what clickhouse-loom on crates.io already ships, instead of treating stored login, route helpers, and blocking routes as source-only or misstating auth.

The Rust SDK reference now documents credential precedence (LOOM_API_KEY, loom login profiles, legacy token files), token renewal and 401 retry, and clarifies that .api_key("") does not disable profile discovery. Examples drop empty API keys for local dev; configure a team connection adds a stored-login example. Routes outside the op registry and unknown-operation retry wording match the published client. Intro pages (README, quickstart, overview, what's-included) link to docs/reference/rust-sdk.md instead of the GitHub sdk/rust/README.md. The repository guide calls out sdk/rust/; the reference index and SDK README drop version/source-only qualifiers and document renew_login.rs plus cargo add --features blocking.

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

Describe stored credential discovery and renewal, document shipped route APIs, and point introductory pages to the Rust reference.

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

vercel Bot commented Dec 4, 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 Dec 4, 2026 12:20pm UTC
loom-telemetry Ready Ready Preview Dec 4, 2026 12:20pm UTC

Request Review

@zlareb1 zlareb1 self-assigned this Dec 4, 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 reference matches the published 0.1.2 crate for credential precedence, token renewal, resends, and route calls in the async and blocking clients. The stored-login example is included in the package.

@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 new Rust SDK table row shifts protected labels in the committed translations and fails the translation gate.

Comment thread docs/development/repository-guide.md Resolved
Keep the SDK description outside the existing layout table so committed translations retain their protected cell positions.

Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
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.

The SDK guide now preserves the translated table positions. I checked credential precedence and retries against the crate source revision. All 294 documentation link and public-copy tests passed, and translation validation reported zero invalid pages.

@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 tunable constant test flags the worker approval bigint bound on the clean CI base and this merge. The same test passes with the existing bound fix. Failed job · Bound fix #2138.

@zlareb1
zlareb1 merged commit 88c8db3 into ClickHouse:main Dec 4, 2026
74 of 79 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.

2 participants