ci: deny rustdoc breakage — workspace lints + a cargo doc job - #175
Conversation
broken_intra_doc_links / private_intra_doc_links / invalid_rust_codeblocks deny + bare_urls warn at the workspace level; fix the 16 existing offenders (private or unresolved link targets downgraded to plain code spans); add a docs CI job so the class of mechanical rustdoc comments never reaches review. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughEnables workspace rustdoc lints, adds a CI ChangesRustdoc Linting Enforcement and Fixes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Without it the new cargo doc job would run but never block. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent mechanical rustdoc breakage (broken/private intra-doc links, invalid code blocks) from reaching review by enabling workspace-level rustdoc lints and adding a cargo doc CI job, plus mechanically fixing existing doc link offenders by downgrading them to code spans.
Changes:
- Add
[workspace.lints.rustdoc]configuration to deny key rustdoc breakage classes. - Add a new CI job that runs
cargo doc --workspace --no-deps --all-featureswith warnings denied. - Fix existing rustdoc offenders across several crates by replacing intra-doc links to private/unresolvable targets with code spans.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Cargo.toml |
Introduces workspace rustdoc lints to turn rustdoc breakage into build failures. |
.github/workflows/ci.yml |
Adds a dedicated cargo doc job to catch rustdoc breakage in CI. |
crates/ourios-parquet/src/writer.rs |
Replaces rustdoc links to private/unresolvable targets with code spans. |
crates/ourios-parquet/src/audit_writer.rs |
Same rustdoc-link downgrade for SUB_BATCH_ROWS. |
crates/ourios-parquet/src/audit_record_batch.rs |
Downgrades an unresolvable ReasonPayload rustdoc link to a code span. |
crates/ourios-miner/src/overflow.rs |
Downgrades a rustdoc link to docs/hazards.md to a code span to avoid rustdoc link failures. |
crates/ourios-miner/src/cluster.rs |
Downgrades rustdoc links to private TenantState / private fields to code spans. |
crates/ourios-core/src/audit.rs |
Downgrades rustdoc links to private methods/fields to code spans. |
crates/ourios-bench/src/store.rs |
Downgrades rustdoc links to private/cross-crate targets to code spans. |
.claude/settings.json |
Adds Claude tool permissions and enables a rust-analyzer plugin (not mentioned in the PR description). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/settings.json:
- Around line 5-6: The checked-in AI tool config grants broad kubectl shell
permissions via the entries "Bash(kubectl get *)" and "Bash(kubectl logs *)";
remove or replace these wildcard permissions in .claude/settings.json with
scoped commands (e.g., explicit namespaces, resource types, or parameterized
safe patterns) or remove them entirely to avoid exposing cluster data/logs.
Update the strings so they target only necessary resources (for example
"Bash(kubectl get pods -n my-namespace)" or "Bash(kubectl logs my-pod -n
my-namespace)") or delete the lines if the capability is not required.
In @.github/workflows/ci.yml:
- Around line 39-52: The docs job ("docs" / name: cargo doc) is not included in
the required aggregate CI gate (ci-success.needs), so doc failures can be
ignored; update the workflow so the "ci-success" aggregate (the job named
ci-success) lists "docs" in its needs array (or otherwise include the docs job
in the required aggregate) so the cargo doc job becomes required for ci-success
to pass; locate the job with name "docs" and the aggregate job "ci-success" and
add "docs" to ci-success's needs list.
- Around line 43-45: In the docs job, restrict GITHUB_TOKEN to read-only and
disable persisted git credentials: add a job-level permissions entry like
"permissions: contents: read" (or equivalent) and update the actions/checkout@v4
step to include "with: persist-credentials: false" so the checkout does not
leave long-lived credentials; locate the docs job and the actions/checkout@v4
step to apply these changes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 4e751aab-662d-472b-916e-b11fe44adc52
📒 Files selected for processing (10)
.claude/settings.json.github/workflows/ci.ymlCargo.tomlcrates/ourios-bench/src/store.rscrates/ourios-core/src/audit.rscrates/ourios-miner/src/cluster.rscrates/ourios-miner/src/overflow.rscrates/ourios-parquet/src/audit_record_batch.rscrates/ourios-parquet/src/audit_writer.rscrates/ourios-parquet/src/writer.rs
Remove .claude/settings.json from the branch (local permission allowlist, not PR content) + gitignore it alongside the lock file. Docs job: read-only token, no persisted credentials, and no RUSTDOCFLAGS override so bare_urls stays advisory per the workspace lint table. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dead in rendered docs (ourios-querier is a dev-dependency); rustdoc happens not to flag this one, but consistency with the 16 sibling fixes says no links to unresolvable targets. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Closes #124 (items 1 + 3).
[workspace.lints.rustdoc]:broken_intra_doc_links/private_intra_doc_links/invalid_rust_codeblocks= deny,bare_urls= warn. Propagates to all member crates via[lints] workspace = true.docsCI job:cargo doc --workspace --no-deps --all-features(no RUSTDOCFLAGS override — the workspace lint table is the single source of truth, sobare_urlsstays advisory in CI too); read-only token + no persisted credentials; gates merges viaci-success.needs.git add -A-swept local.claude/settings.jsonfrom the branch and gitignored it.NOT included: item 2 (the one CLAUDE.md §6.6 bullet,
cargo doc --workspace --no-deps --all-features) — CLAUDE.md changes go through the maintainer meta-process; flagged.Verified: cargo doc clean, full suite green, clippy/fmt/actionlint clean.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Summary by CodeRabbit
Chores
Documentation