Repository navigation
docs(olai-store): rustdoc improvements + docs.rs feature build/badges - #83
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…e note Intra-doc links to `EnvelopeEncryptor` and `with_encryptor` lived in always-compiled modules but pointed at items gated behind the `encryption` feature. docs.rs builds with all features so this was masked, but a default-feature `RUSTDOCFLAGS="-D warnings" cargo doc` failed with unresolved-link errors. Convert those to plain code spans that name the `encryption` feature in prose, so docs build clean on every feature combination. Also fix a stale `FieldRole::Sensitive` doc that still described the retired side secret store; sensitive fields are now sealed into an envelope-encrypted blob stored inline on the object row. AI-assisted-by: Isaac
…sers Add a module-level overview of the dotted, backtick-escaped string form (the escaping rule the parsers implement was previously undocumented), expand the ResourceName type doc with a runnable round-trip example, document EMPTY_RESOURCE_NAME, and add `# Errors` sections and examples to FromStr, parse_column_name_list, and prefix_matches. AI-assisted-by: Isaac
roeap
force-pushed
the
docs/olai-store-rustdoc
branch
from
July 11, 2026 18:56
3d55d77 to
7878c47
Compare
…adges docs.rs builds a crate with its default features only. Since `default = []`, every `sqlite` / `postgres` / `encryption` item — `SqlStore`, `EnvelopeEncryptor`, `KeyProvider`, and friends — was absent from the published docs.rs page entirely. Add `[package.metadata.docs.rs]` to build with `all-features` and pass `--cfg docsrs`, and gate `feature(doc_cfg)` behind that cfg at the crate root so feature-gated items render an "available on crate feature X" badge. docs.rs builds on nightly, so the unstable feature is only ever touched there; stable and MSRV builds never see it (the cfg is off), and a `[lints.rust]` `check-cfg` entry keeps `docsrs` from tripping the unexpected-cfgs lint. Note: the gate is `doc_cfg`, not `doc_auto_cfg` — the latter was removed in 1.92.0 and merged into `doc_cfg` (rust-lang/rust#138907). doc_cfg is not yet stable, hence the nightly-only `docsrs` gate rather than an MSRV bump. AI-assisted-by: Isaac
roeap
force-pushed
the
docs/olai-store-rustdoc
branch
from
July 11, 2026 19:03
7b17a61 to
b1bc67b
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reviews and improves the rustdoc across the
olai-storecrate, and fixes a docs.rs build gap so the full API is actually published.Changes
docs.rs feature build + cfg badges (the impactful fix)
docs.rs builds a crate with its default features only. Since
default = [], everysqlite/postgres/encryptionitem —SqlStore,EnvelopeEncryptor,KeyProvider, and friends — was absent from the published docs.rs page entirely. Added[package.metadata.docs.rs](all-features = true,--cfg docsrs) and afeature(doc_cfg)gate behind that cfg so feature-gated items render an "available on crate feature X" badge. docs.rs builds on nightly, so the unstable feature is only ever touched there; stable/MSRV builds never see it, and a[lints.rust]check-cfgentry keepsdocsrsfrom trippingunexpected_cfgs.Note: the gate is
doc_cfg, notdoc_auto_cfg— the latter was removed in 1.92.0 and merged intodoc_cfg(rust-lang/rust#138907).doc_cfgis still unstable, so this is a nightly-onlydocsrsgate, not an MSRV bump.Feature-gated intra-doc links
Links to
EnvelopeEncryptor/with_encryptorlived in always-compiled modules but pointed atencryption-gated items, so a default-featureRUSTDOCFLAGS="-D warnings" cargo docfailed with unresolved-link errors (masked on docs.rs, which builds all features). Converted to code spans naming the feature. Docs now build clean under default,sqlite,encryption, and--all-features.Stale field-role note (
registry.rs)FieldRole::Sensitivesaid "routed to the secret store" — outdated since the inline envelope-encrypted blob. Updated.name.rsdocumentationModule-level overview of the dotted, backtick-escaped string form, a runnable round-trip example on
ResourceName, a doc forEMPTY_RESOURCE_NAME, and# Errorssections + examples onFromStr,parse_column_name_list, andprefix_matches.Also ran the humanizer patterns over the docs: no changes needed (elevated em-dash counts are legitimate technical apposition, boldface is load-bearing, no AI-vocabulary slop).
Verification
cargo doc -D warningsclean under default /encryption/sqlite/--all-featuresRUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features): compiles, and the "Available on crate featureencryption/sqlite" badges rendercargo test --doc --all-features— 9 passed (incl. 2 new doctests)cargo fmt+cargo clippy --all-features --all-targets -D warningscleanThis pull request was AI-assisted by Isaac.