Skip to content

docs(olai-store): rustdoc improvements + docs.rs feature build/badges - #83

Merged
roeap merged 3 commits into
mainfrom
docs/olai-store-rustdoc
Jul 11, 2026
Merged

roeap merged 3 commits into
mainfrom
docs/olai-store-rustdoc

Conversation

@roeap

@roeap roeap commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Reviews and improves the rustdoc across the olai-store crate, 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 = [], every sqlite / postgres / encryption item — 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 a feature(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-cfg entry keeps docsrs from tripping unexpected_cfgs.

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 still unstable, so this is a nightly-only docsrs gate, not an MSRV bump.

Feature-gated intra-doc links
Links to EnvelopeEncryptor / with_encryptor lived in always-compiled modules but pointed at encryption-gated items, so a default-feature RUSTDOCFLAGS="-D warnings" cargo doc failed 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::Sensitive said "routed to the secret store" — outdated since the inline envelope-encrypted blob. Updated.

name.rs documentation
Module-level overview of the dotted, backtick-escaped string form, a runnable round-trip example on ResourceName, a doc for EMPTY_RESOURCE_NAME, and # Errors sections + examples on FromStr, parse_column_name_list, and prefix_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 warnings clean under default / encryption / sqlite / --all-features
  • Simulated docs.rs build (RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features): compiles, and the "Available on crate feature encryption/sqlite" badges render
  • cargo test --doc --all-features — 9 passed (incl. 2 new doctests)
  • cargo fmt + cargo clippy --all-features --all-targets -D warnings clean

This pull request was AI-assisted by Isaac.

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

roeap added 2 commits July 11, 2026 20:56
…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
roeap force-pushed the docs/olai-store-rustdoc branch from 3d55d77 to 7878c47 Compare July 11, 2026 18:56
@roeap roeap changed the title docs(olai-store): fix feature-gated rustdoc links + document the name module docs(olai-store): rustdoc improvements + docs.rs feature build/badges Jul 11, 2026
…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
roeap force-pushed the docs/olai-store-rustdoc branch from 7b17a61 to b1bc67b Compare July 11, 2026 19:03
@roeap
roeap merged commit 798b658 into main Jul 11, 2026
13 checks passed
@roeap
roeap deleted the docs/olai-store-rustdoc branch July 11, 2026 19:04
@github-actions github-actions Bot mentioned this pull request Jul 11, 2026
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