Repository navigation
PERCENTRANK: match Excel significance limits - #2980
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Update significance handling crates/functions/src/stat/descriptive.rs |
percentrank_impl returns #DIV/0! when significance is at least 309. For significance 15 and above, it formats the rank to 15 significant digits instead of truncating it. |
Verify and document parity crates/functions/src/stat/tests.rs, docs/function-parity.md |
Tests cover significance values 14, 15, 16, 308, 309, and 400 across PERCENTRANK variants. The parity document records the Excel 16.0 behavior and its revision date. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: aiongg, dylanmtaylor
Merge Risk: 
Minimal · up to 3de6c
-
No actionable merge-blocking risk remains in the reviewed changes.
Security architecture risk: 
Minimal · up to 3de6c
-
The changes affect numerical precision and significance errors without adding callable functions, privileges, external access, or shared-state transitions. No introduced or worsened security risk was identified in the changed behavior.
Retained concerns
No architecture-level concerns identified.Security review details
-
Security Blast Radius
- inferred — The direct behavioral exposure remains calculations invoking the three existing PERCENTRANK names. No expanded caller authority or resource scope was identified in the base-to-head comparison; downstream numerical consumers can receive different results or errors.
Trust Boundaries and Controls
- inferred — Even when worksheet arguments are attacker-controlled, the changed branches affect a numeric result or cell error rather than forwarding input to a privileged sink. Existing invocation reachability is unchanged. This conclusion is limited to the inspected library boundary, not an assessment of host-side sandboxing.
-
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
⚔️ Resolve merge conflicts: 💡
-
- Resolve merge conflict in branch
gc-fix-2657-percentrank
- Resolve merge conflict in branch
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
- Mode: Continue automatically
- Reviewed files: 3
- Waived: $0.75 (charged $0.00)
- View usage details
Note
This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.
Comment @coderabbitai help to get the list of available commands.
|
Landed in main (67e39fa). Thank you for the contribution, @Harrison-Booth, and for splitting and following up on the review! |
Matches Excel 16.0 for PERCENTRANK, PERCENTRANK.INC and PERCENTRANK.EXC significance edge cases: significance 309 and above returns
#DIV/0!; significance 15–308 returns 15 significant digits rounded. Adds adocs/function-parity.mdrow and regression coverage, including significance 14, 15, 16, 308 and 309.Verification: Expected results come from the Excel 16.0 COM observations documented in the original combined PR.
cargo fmt --checkpassed locally. Per task instructions, Rust tests were not run locally; fork CI runs them.🤖 Generated with Claude Code
Summary by CodeRabbit
PERCENTRANKresults for high significance values: significance 309 and above now returns#DIV/0!.PERCENTRANKvariants.