Compute remaining_path_length once per path #6871
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 279 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.337
Real PR Conversation Timeline
1 comments
"Review active on #6871"
general
weight: 0.35
SteveMacenski
<!-- Please fill out the following pull request template for non-trivial changes to help us process your PR faster and more efficiently.-->
---
Basic Info
| Info | Please fill out this column |
| ------ | ----------- |
| Ticket(s) this addresses | #6759 (part 1/2, pruning in #6872) |
| Primary OS tested on | Ubuntu 26.04 |
| Robotic platform tested on | Unit tests only |
| Does this PR contain AI generated software? | Yes, manually reviewed and tested |
| Was this PR description generated by AI software? | No |
---
Description of contribution in a few bullet points
TrackedPathstruct inControllerServerto group the path, current index, and remaining lengths together instead of keeping a separatestart_index_.set()(summed backwards from the goal) so we just do a lookup each cycle instead of runningcalculate_path_length()every time.PrunablePathin #6872 since the path handler doesn't need the lengths anyway.Description of documentation updates required from your changes
Description of how this change was tested
TrackedPathRemainingLengthtest to verify the lookup matchescalculate_path_length()and that setting a new path resets the index.colcon test --packages-select nav2_controller(all 143 tests and linters pass).---
Future work that may be required in bullet points
current_path_changes type andstart_index_is removed.For Maintainers: <!-- DO NOT EDIT OR REMOVE -->
backport-*.