docs(book): fix drifted source links in the count group-by chapters#3974
docs(book): fix drifted source links in the count group-by chapters#3974shumkov wants to merge 1 commit into
Conversation
The v3.1-dev -> v4.0-dev retarget carried these links verbatim, but a few targets had drifted before the rename and point at moved/renamed code (surfaced by reviewers on the retarget PR): - count-index-group-by-examples.md: the group_by surface-validation link pointed at drive_document_count_query/validate.rs, which no longer exists; validation now lives in DriveDocumentCountQuery::detect_mode (mode_detection.rs). There is no 'group_by_*' builder family — the group-by modes route to distinct_count_path_query and carrier_aggregate_count_path_query; the closing prose is corrected too. - count-index-group-by-examples.md: the bench series is query_g1..g8 (it skips g6), not query_g1..g6. - document-count-trees.md: read_primary_key_count_tree moved from drive_dispatcher.rs to executors/total.rs (and dropped the inaccurate Drive:: qualifier). Docs-only; each symbol/path verified against the tree at the branch tip. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
📖 Book Preview built successfully. Download the preview from the workflow artifacts. Updated at 2026-07-01T08:47:21.312Z |
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 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 |
|
✅ Review complete (commit 7967488) |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Docs-only PR fixing drifted source links in two book chapters. Verified PR head 7967488 diff contains only the two markdown files; Codex's blocking Cargo.toml finding is a false positive (the rust-dashcore bump landed in already-merged #3973 and is on master, not in this PR's delta). Codex's docs suggestion is technically valid — the rewritten line points readers to detect_mode as the group_by surface validator, but detect_mode already receives a derived CountMode; the raw group_by shape is mapped to CountMode upstream in drive-abci's compute_aggregate_mode_and_check_limit — kept as a non-blocking suggestion.
🟡 1 suggestion(s)
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `book/src/drive/count-index-group-by-examples.md`:
- [SUGGESTION] book/src/drive/count-index-group-by-examples.md:38: group_by surface validation link points one layer too deep
The rewritten sentence sends readers to `DriveDocumentCountQuery::detect_mode` for the dispatcher's group_by surface validation, but `detect_mode(where_clauses, mode: CountMode, prove)` already receives a derived `CountMode` (Aggregate / GroupByIn / GroupByRange / GroupByCompound) — the raw request-level `group_by` shape is validated and mapped to `CountMode` upstream in drive-abci's `compute_aggregate_mode_and_check_limit`. `detect_mode` still validates the (mode, where, prove) tuple, so the current wording is not wrong, but since this PR is specifically correcting drifted source references, it's worth distinguishing the two layers so readers land on the code that actually inspects `group_by`.
| ## Queries in this Chapter | ||
|
|
||
| All proof-size and behaviour numbers below come from the same bench helper (`report_group_by_matrix`) as chapter 29's. The dispatcher's group_by surface validation lives in [`validate_count_query_groupby_against_index`](https://github.com/dashpay/platform/blob/v4.0-dev/packages/rs-drive/src/query/drive_document_count_query/validate.rs); the per-mode path-query builders sit in [`packages/rs-drive/src/query/drive_document_count_query/path_query.rs`](https://github.com/dashpay/platform/blob/v4.0-dev/packages/rs-drive/src/query/drive_document_count_query/path_query.rs)'s `group_by_*` family. | ||
| All proof-size and behaviour numbers below come from the same bench helper (`report_group_by_matrix`) as chapter 29's. The dispatcher's group_by surface validation lives in [`DriveDocumentCountQuery::detect_mode`](https://github.com/dashpay/platform/blob/v4.0-dev/packages/rs-drive/src/query/drive_document_count_query/mode_detection.rs); the per-mode path-query builders sit in [`packages/rs-drive/src/query/drive_document_count_query/path_query.rs`](https://github.com/dashpay/platform/blob/v4.0-dev/packages/rs-drive/src/query/drive_document_count_query/path_query.rs) (the group-by modes route to `distinct_count_path_query` and `carrier_aggregate_count_path_query`). |
There was a problem hiding this comment.
🟡 Suggestion: group_by surface validation link points one layer too deep
The rewritten sentence sends readers to DriveDocumentCountQuery::detect_mode for the dispatcher's group_by surface validation, but detect_mode(where_clauses, mode: CountMode, prove) already receives a derived CountMode (Aggregate / GroupByIn / GroupByRange / GroupByCompound) — the raw request-level group_by shape is validated and mapped to CountMode upstream in drive-abci's compute_aggregate_mode_and_check_limit. detect_mode still validates the (mode, where, prove) tuple, so the current wording is not wrong, but since this PR is specifically correcting drifted source references, it's worth distinguishing the two layers so readers land on the code that actually inspects group_by.
| All proof-size and behaviour numbers below come from the same bench helper (`report_group_by_matrix`) as chapter 29's. The dispatcher's group_by surface validation lives in [`DriveDocumentCountQuery::detect_mode`](https://github.com/dashpay/platform/blob/v4.0-dev/packages/rs-drive/src/query/drive_document_count_query/mode_detection.rs); the per-mode path-query builders sit in [`packages/rs-drive/src/query/drive_document_count_query/path_query.rs`](https://github.com/dashpay/platform/blob/v4.0-dev/packages/rs-drive/src/query/drive_document_count_query/path_query.rs) (the group-by modes route to `distinct_count_path_query` and `carrier_aggregate_count_path_query`). | |
| All proof-size and behaviour numbers below come from the same bench helper (`report_group_by_matrix`) as chapter 29's. The v1 query handler maps the request's `group_by` shape to `CountMode` in [`compute_aggregate_mode_and_check_limit`](https://github.com/dashpay/platform/blob/v4.0-dev/packages/rs-drive-abci/src/query/document_query/v1/compute_aggregate_mode_and_check_limit/v0/mod.rs), then Drive validates and routes the `(CountMode, where, prove)` tuple in [`DriveDocumentCountQuery::detect_mode`](https://github.com/dashpay/platform/blob/v4.0-dev/packages/rs-drive/src/query/drive_document_count_query/mode_detection.rs); the per-mode path-query builders sit in [`packages/rs-drive/src/query/drive_document_count_query/path_query.rs`](https://github.com/dashpay/platform/blob/v4.0-dev/packages/rs-drive/src/query/drive_document_count_query/path_query.rs) (the group-by modes route to `distinct_count_path_query` and `carrier_aggregate_count_path_query`). |
source: ['codex']
Issue being fixed or feature implemented
Follow-up to #3972 (the merged
v3.1-dev → v4.0-devbranch retarget). That PR faithfully swapped the branch name in everybook/source link, but reviewers (thepastaclaw,Claudius-Maginificent) noticed a few of those links had drifted before the rename — they point at code that has since moved or been renamed (one link 404s). Keeping #3972 a clean mechanical rename, the content fixes land here.What was done?
All targets verified against the current
v4.0-devtree:count-index-group-by-examples.mddrive_document_count_query/validate.rsno longer exists; validation now lives inDriveDocumentCountQuery::detect_mode(mode_detection.rs).group_by_*builder family — the group-by modes route todistinct_count_path_query/carrier_aggregate_count_path_query. Corrected on the "Queries in this Chapter" line and in the closing prose.query_g1_* … query_g8_*(it skipsg6), not… query_g6_*.document-count-trees.mdread_primary_key_count_treemoved fromdrive_dispatcher.rstoexecutors/total.rs; also dropped the inaccurateDrive::qualifier.Out of scope (per the reviewer discussion on #3972): converting branch links to commit-ID permalinks — that's a broader docs-link policy question, not this focused fix.
How Has This Been Tested?
detect_mode(mode_detection.rs:85),distinct_count_path_query/carrier_aggregate_count_path_query(path_query.rs),read_primary_key_count_tree(executors/total.rs:89), and that the bench definesquery_g1..g8with nog6.Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit