Skip to content

chore: trim comments in src/stats - #39

Merged
BraCR10 merged 1 commit into
developmentfrom
chore/comments-stats-module
Jul 30, 2026
Merged

chore: trim comments in src/stats#39
BraCR10 merged 1 commit into
developmentfrom
chore/comments-stats-module

Conversation

@BraCR10

@BraCR10 BraCR10 commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

Trims doc comments and inline comments across the stats module (mod.rs, context.rs, disputes.rs, grid.rs, lifecycle.rs, trade_size.rs), dropping internal spec/requirement/PR references entirely. Comment-only change, no logic touched.

Removed:

  • Citations to internal spec/FR/PR/task-ID references throughout
  • Test doc comments that only restated the test function's own name

Kept (shortened where possible):

  • The longevity fallback rationale (first-order-to-now, not first-to-last)
  • The activity-consistency exact-30-calendar-day window rationale
  • The f64 precision-boundary notes for trade amounts and premiums
  • The activity grid's bounded-vs-unbounded range and snapping rules, including the
    widened-range-must-widen-the-count regression note

Test plan

  • cargo build --all-targets
  • cargo test (378 tests, unchanged count)
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo fmt --check
  • Diff limited to comment-only lines

Summary by CodeRabbit

  • Documentation
    • Clarified statistical metric descriptions, including dispute rates, trade sizes, activity consistency, grid behavior, ranking, and premium signals.
    • Improved guidance on edge cases, precision, calendar-day windows, range snapping, and empty or unavailable data.
    • Reorganized documentation for activity consistency and bond policy structures.
    • Updated test descriptions and comments for clearer, more consistent wording.

Rewrites doc comments and inline comments across the stats module to
be shorter and drop internal spec/requirement/PR references.
Comment-only change, no logic touched.
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3293cf99-6b2f-45db-a0a9-d494ab1edf31

📥 Commits

Reviewing files that changed from the base of the PR and between 7a2b695 and 2e57b16.

📒 Files selected for processing (6)
  • src/stats/context.rs
  • src/stats/disputes.rs
  • src/stats/grid.rs
  • src/stats/lifecycle.rs
  • src/stats/mod.rs
  • src/stats/trade_size.rs

Walkthrough

Documentation and explanatory test comments were revised across the statistics modules. The changes remove explicit feature references, clarify metric semantics and edge cases, and preserve all executable logic, public signatures, data structures, and test assertions.

Changes

Statistics Documentation Refresh

Layer / File(s) Summary
Context signal documentation
src/stats/context.rs
Context signal descriptions, ranking tie-breaking documentation, and related test comments were reworded without changing computations or assertions.
Dispute and metrics model documentation
src/stats/disputes.rs, src/stats/lifecycle.rs, src/stats/mod.rs
Dispute, lifecycle, activity consistency, bond policy, and related metric documentation were clarified while declarations and assertions remained unchanged.
Activity grid documentation and tests
src/stats/grid.rs
Grid range, granularity, snapping, bucket, warning, and test descriptions were rephrased without changing grid behavior.
Trade-size statistic documentation
src/stats/trade_size.rs
Trade-size applicability, precision, standard deviation, and fractional median documentation were updated without changing calculations or control flow.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit hops through comments bright,
Trimming old labels left and right.
Grids and signals now speak more clear,
While tests keep every value dear.
No logic changed beneath the prose—
Just tidier trails for paws and toes.

✨ 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 chore/comments-stats-module

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.

❤️ Share

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

@BraCR10
BraCR10 merged commit 8494c37 into development Jul 30, 2026
3 of 4 checks passed
@BraCR10
BraCR10 deleted the chore/comments-stats-module branch July 30, 2026 08:12
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