Skip to content

docs(rpc): add DESCRIPTION to remaining small-module RPC methods#7209

Open
LesnyRumcajs wants to merge 1 commit into
mainfrom
misc-rpc-descs
Open

docs(rpc): add DESCRIPTION to remaining small-module RPC methods#7209
LesnyRumcajs wants to merge 1 commit into
mainfrom
misc-rpc-descs

Conversation

@LesnyRumcajs

@LesnyRumcajs LesnyRumcajs commented Jun 19, 2026

Copy link
Copy Markdown
Member

Summary of changes

Changes introduced in this pull request:

  • added descriptions to all other smaller modules

Reference issue to close (if applicable)

Closes #6460

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

Summary by CodeRabbit

  • Documentation
    • RPC API methods now include human-readable descriptions explaining their functionality across authentication, beacon, common, market, multisig, node, and sync modules
    • Enhanced API reference material providing developers with clearer method behavior and usage information

@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner June 19, 2026 16:15
@LesnyRumcajs LesnyRumcajs requested review from akaladarshi and hanabi1224 and removed request for a team June 19, 2026 16:15
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds DESCRIPTION associated constants (Option<&'static str>) to 15 RPC method implementations across 7 files: auth.rs (AuthNew, AuthVerify), beacon.rs (BeaconGetEntry), common.rs (Session, Version, Shutdown, StartTime), market.rs (MarketAddBalance), msig.rs (MsigGetAvailableBalance, MsigGetPending, MsigGetVested, MsigGetVestingSchedule), node.rs (NodeStatus), and sync.rs (SyncCheckBad, SyncMarkBad).

Changes

RPC Method DESCRIPTION Constants

Layer / File(s) Summary
DESCRIPTION constants across all RPC methods
src/rpc/methods/auth.rs, src/rpc/methods/beacon.rs, src/rpc/methods/common.rs, src/rpc/methods/market.rs, src/rpc/methods/msig.rs, src/rpc/methods/node.rs, src/rpc/methods/sync.rs
Adds const DESCRIPTION: Option<&'static str> to 15 RpcMethod implementations: AuthNew, AuthVerify, BeaconGetEntry, Session, Version, Shutdown, StartTime, MarketAddBalance, MsigGetAvailableBalance, MsigGetPending, MsigGetVested, MsigGetVestingSchedule, NodeStatus, SyncCheckBad, and SyncMarkBad. No handler logic, types, or permissions are modified.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

RPC

Suggested reviewers

  • sudo-shashank
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding DESCRIPTION fields to RPC methods in smaller modules (auth, beacon, common, market, msig, node, sync).
Linked Issues check ✅ Passed The PR successfully adds DESCRIPTION constants to 13 RPC methods across 7 modules as required by issue #6460: auth.rs (2), beacon.rs (1), common.rs (4), market.rs (1), msig.rs (4), node.rs (1), sync.rs (2).
Out of Scope Changes check ✅ Passed All changes are tightly scoped to adding DESCRIPTION constants to RPC method implementations, directly addressing issue #6460 with no unrelated modifications.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #6460

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch misc-rpc-descs
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch misc-rpc-descs

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

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.37%. Comparing base (17098fb) to head (d91973c).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
Files with missing lines Coverage Δ
src/rpc/methods/auth.rs 33.33% <ø> (ø)
src/rpc/methods/beacon.rs 81.81% <ø> (ø)
src/rpc/methods/common.rs 57.14% <ø> (ø)
src/rpc/methods/market.rs 0.00% <ø> (ø)
src/rpc/methods/msig.rs 72.22% <ø> (ø)
src/rpc/methods/node.rs 0.00% <ø> (ø)
src/rpc/methods/sync.rs 72.22% <ø> (ø)

... and 14 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17098fb...d91973c. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/rpc/methods/sync.rs
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Admin;
const DESCRIPTION: Option<&'static str> =
Some("Marks the block with the given CID as bad in the bad-block cache.");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the cache from here, should we also add use with caution like lotus ?.

@LesnyRumcajs LesnyRumcajs Jun 19, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the cache from here

why?

should we also add use with caution like lotus ?.

This method requires admin permissions, it's inherently supposed to be used with caution.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Just because it is user facing, so user shouldn't care if there is cache or something else, that's why.

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.

Add DESCRIPTION to all RPC methods

2 participants