Skip to content

docs(consensus): fix stale module-example paths and declare them non-code - #579

Merged
nh13 merged 1 commit into
mainfrom
nh/docs-consensus-examples
Jul 18, 2026
Merged

nh13 merged 1 commit into
mainfrom
nh/docs-consensus-examples

Conversation

@nh13

@nh13 nh13 commented Jul 12, 2026 •

Copy link
Copy Markdown
Member

Closes the last "ungated doc claim" from the audit (task-list T5).

Problem

The //! module-doc walkthroughs in fgumi-consensus (base_builder, caller, codec_caller, duplex_caller) were fenced ```rust,ignore — rendered as Rust but never compiled — and had rotted: they import from the old monolith path fgumi_lib::consensus::... (the crate is now fgumi_consensus) and reference the renamed vanilla_consensus_caller module (now vanilla_caller). Readers were shown import paths that don't exist, with no gate to catch it. #574 explicitly deferred these because its rustdoc gate doesn't cover ignore blocks.

Fix

These are genuine teaching sketches (undefined context vars, elided bodies, trait-shape skeletons), so they can't compile without gutting their clarity. Rather than leave them masquerading as verified Rust:

  • corrected the crate paths (fgumi_consensus::…) and the vanilla_caller rename, including the prose "See Also" cross-references, so what's shown is accurate; and
  • changed the fences to ```text, honestly declaring them illustrative rather than as Rust the gates would be expected to verify.

This is the "declare as non-code" side of the fix — the principled resolution for examples that legitimately can't be compiled. (Full #-hidden compilable doctests are possible but would clutter the teaching examples with boilerplate; deferred as optional.)

Verification

RUSTDOCFLAGS="-D warnings" cargo doc -p fgumi-consensus produces the identical error set as pristine main — i.e. this PR introduces zero new rustdoc warnings. The crate's remaining broken intra-doc links (rejected_reads/take_rejected_reads) are fixed by the sibling PR #574; once #573/#574/this all land, the crate doc-builds clean under the rustdoc gate.

Summary by CodeRabbit

  • Documentation
    • Updated consensus module examples to use current public crate paths.
    • Corrected references to the vanilla caller in related documentation.
    • Improved example formatting and highlighting for clearer presentation.

@nh13
nh13 temporarily deployed to github-actions July 12, 2026 00:36 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 14690703-7bd8-4dc7-b531-9e7403aa66ea

📥 Commits

Reviewing files that changed from the base of the PR and between 084588b and 7a247a6.

📒 Files selected for processing (4)
  • crates/fgumi-consensus/src/base_builder.rs
  • crates/fgumi-consensus/src/caller.rs
  • crates/fgumi-consensus/src/codec_caller.rs
  • crates/fgumi-consensus/src/duplex_caller.rs

Walkthrough

Updated consensus crate documentation examples to use fgumi_consensus paths, changed Rust examples to text fences, and renamed vanilla_consensus_caller references to vanilla_caller. Runtime logic and public APIs are unchanged.

Changes

Consensus documentation

Layer / File(s) Summary
Documentation examples and references
crates/fgumi-consensus/src/{base_builder,caller,codec_caller,duplex_caller}.rs
Documentation imports now use fgumi_consensus paths, examples use text fences, and See Also entries reference vanilla_caller.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately summarizes the documentation-only changes to stale module-example paths and non-code fences.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nh/docs-consensus-examples

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.99%. Comparing base (c94348f) to head (7a247a6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #579      +/-   ##
==========================================
+ Coverage   92.96%   92.99%   +0.03%     
==========================================
  Files         167      167              
  Lines      103266   103266              
==========================================
+ Hits        96000    96034      +34     
+ Misses       7266     7232      -34     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nh13
nh13 force-pushed the nh/docs-consensus-examples branch from c69253d to 084588b Compare July 16, 2026 20:26
@nh13
nh13 temporarily deployed to github-actions July 16, 2026 20:26 — with GitHub Actions Inactive
@nh13

nh13 commented Jul 18, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nh13
nh13 force-pushed the nh/docs-consensus-examples branch from 084588b to bdeede0 Compare July 18, 2026 14:58
@nh13
nh13 temporarily deployed to github-actions July 18, 2026 14:58 — with GitHub Actions Inactive
@nh13

nh13 commented Jul 18, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…non-code

The `//!` module-doc walkthroughs in base_builder/caller/codec_caller/duplex_caller
were fenced ```rust,ignore` — rendered as Rust but never compiled — and had rotted:
they imported from the old monolith path `fgumi_lib::consensus::...` (the crate is
now `fgumi_consensus`) and referenced the since-renamed `vanilla_consensus_caller`
module (now `vanilla_caller`). So they showed readers import paths that don't exist,
with nothing to catch it.

These are genuine teaching sketches — undefined context vars (`reads`, `options`,
`output`, ...), elided bodies, trait-shape skeletons — so they can't be compiled
without gutting their clarity. Rather than leave them masquerading as verified Rust:
- correct the crate paths (`fgumi_consensus::...`) and the `vanilla_caller` rename,
  including the prose "See Also" cross-references, so what's shown is accurate; and
- change the fences to ```text`, honestly declaring them as illustrative rather
  than as Rust the doctest/rustdoc gates would be expected to check.

Verified: introduces zero new rustdoc warnings vs main (the crate's remaining
broken intra-doc links are fixed by the sibling PR #574).
@nh13
nh13 force-pushed the nh/docs-consensus-examples branch from bdeede0 to 7a247a6 Compare July 18, 2026 15:09
@nh13
nh13 temporarily deployed to github-actions July 18, 2026 15:09 — with GitHub Actions Inactive
@nh13
nh13 merged commit 5accbbc into main Jul 18, 2026
11 checks passed
@nh13
nh13 deleted the nh/docs-consensus-examples branch July 18, 2026 15:13
@nh13 nh13 mentioned this pull request Jul 18, 2026

This branch was previously deployed

1 inactive deployment
github-actions — 7a247a6d Deployed Jul 18, 2026 by nh13 via coverage #2691
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