Repository navigation
Rust authentication docs and examples match stored-login behavior - #2097
Conversation
An empty API key continues credential discovery. Explain profile precedence and token renewal in the packaged guides. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…de 401 Keep the explicit-scope profile snippet instead of advertising the existing scope-free example. Describe changed-token retries for route requests. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
zlareb1
left a comment
There was a problem hiding this comment.
No blocking findings. I checked the documented credential precedence, server binding and renewal against the builder and the operation and route clients. The examples use the supported profile flag and builder methods.
…iguration Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Authenticated memory.get requires a namespace; the token resolves only the org. Read LOOM_NAMESPACE and reject missing or blank values before loading credentials. Regression tests check the outgoing request and configuration errors. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com> (cherry picked from commit a687861) Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
The profile supplies the server and tokens; the memory lookup still needs an addressed namespace. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
|
@zlareb1 This PR now includes the stored-login example repair at 506628c and its runnable command at afaf45f. On Rust 1.85.1, all targets/features pass 650 tests with eight existing ignored tests; all ten doctests pass. Documentation checks pass 291 tests. Clippy, API docs, package dry-run and archive verification pass; fresh independent review found no defects in the four-file diff. The title and body describe the expanded scope. Hosted Actions need maintainer approval, and the website reference remains scheduled for after the crate release. Please recheck afaf45f. |
zlareb1
left a comment
There was a problem hiding this comment.
Pinned Biome rejects the same assertion in Chat.test.tsx on the PR merge and clean main. The check passes with the formatting repair. PR job · Main job · Repair #2107
zlareb1
left a comment
There was a problem hiding this comment.
The stored-login example requires a namespace and sends it with the profile token. The two example tests pass. The authentication guide matches credential discovery, server binding and token renewal in the SDK.
Related: #1935
Changelog category
Changelog entry
Rust authentication documentation describes stored credential discovery and renewal. The stored-login example reads an explicit namespace so its authenticated memory lookup succeeds.
Why
An empty API key does not disable stored credential discovery. The README needs to describe credential precedence, server binding and token replacement on HTTP 401. The
renew_loginexample also passes an empty namespace tomemory.get, which requires an addressed namespace.Scope and risk
The packaged SDK README, example guide,
renew_login.rsand its regression tests change. The example readsLOOM_NAMESPACEand rejects missing or blank values before loading credentials. A stored-login HTTP fixture verifies the selected namespace, memory key and Authorization header.The SDK authentication implementation and wire contracts remain unchanged. The website reference will be updated after crate 0.1.2 is published.
Compatibility, rollout and rollback
renew_loginrequires a nonblankLOOM_NAMESPACE.Tests
Validation after synchronizing with main at
dea732eb8:.venv/bin/python -m pytest tests/unit/test_doc_links.py tests/unit/test_public_copy.py -q: 291 passed.cargo +1.85.1 fmt --all -- --checkpasses.cargo +1.85.1 test --locked --all-targets --all-features: 650 passed, zero failed, eight existing ignored tests.cargo +1.85.1 test --locked --doc --all-features: 10 passed, zero failed.CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback; the local lockfile is not committed.cargo +1.85.1 clippy --locked --all-targets --all-features -- -D warningspasses.RUSTDOCFLAGS="-D warnings".cargo +1.85.1 publish --locked --all-features --dry-runpasses without publishing. The package verifier confirms the archive matches headafaf45f13, including the example and regression tests.afaf45f13found no defects. The two Rust regressions and scoped README link/public-copy checks independently pass.afaf45f13reportaction_requiredand need maintainer approval before execution.AI assistance in the code
AI-generated (TRAE): an agent wrote the documentation, example repair and regression tests, checked the credential behavior, and ran the checks listed above.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist