Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
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. |
|
Superseded by the combined release-quality PR #2196 so these related fixes can be reviewed together. |
| // An overlong label is a malformed Census response, not a candidate with no usable | ||
| // position: refuse it whole rather than shorten or substitute its matched address. |
There was a problem hiding this comment.
Comment overstates the behaviour (Quality, confidence: high). The check sits after the MAX_RESULTS cap in the loop above. An overlong label among the entries past the cap is never inspected: it is counted in found.limited and the answer is accepted. "Refuse it whole" is only true for labels read before the cap.
Suggested wording that matches the code:
| // An overlong label is a malformed Census response, not a candidate with no usable | |
| // position: refuse it whole rather than shorten or substitute its matched address. | |
| // An overlong label is a malformed Census response, not a candidate with no usable | |
| // position: refuse the whole answer rather than shorten or substitute its matched address. | |
| // Only the entries read before the cap are checked; withheld ones are counted, not inspected. |
The cap-ordering case is also untested: the test near line 480 only puts the overlong label at position 1. Per AGENTS.md this is a wording point, so it can wait for the release quality pass if the author prefers; the current text is still inaccurate.
| /// Records the address and reach observed by trusted in-process transport/UI code. The | ||
| /// observed peer can be local even when the address's spelling looks public; this does not | ||
| /// narrow a previous origin. Never use document data as the observed reach. |
There was a problem hiding this comment.
Nit (Quality, confidence: high). This is a constructor, so "this does not narrow a previous origin" has no previous origin to refer to. The PR's point is that it is not a narrowing operation, so saying so with the right method is clearer:
| /// Records the address and reach observed by trusted in-process transport/UI code. The | |
| /// observed peer can be local even when the address's spelling looks public; this does not | |
| /// narrow a previous origin. Never use document data as the observed reach. | |
| /// Records the address and reach observed by trusted in-process transport/UI code. The | |
| /// observed peer can be local even when the address's spelling looks public. This is not a | |
| /// narrowing operation: use `narrow_reach` to lower an existing origin's reach. Never use | |
| /// document data as the observed reach. |
Optional, and it can wait for the release quality pass.
Code reviewBugs: None found. The PR changes only doc comments and one comment line in Security: None found. No code changed. Performance: None found. Quality:
AGENTS.md: No violations. The PR is documentation only, so no tests, schema, i18n or ribbon rules apply. Already raised: 0. Change sizeCompared with main (merge base ce40749 to PR head 10f66ba), the whole PR.
|
Summary
Clarify that
Origin::with_observed_reachrecords trusted transport/UI observations and can differ from address spelling; it is not a narrowing operation. Document why an overlong Census matched-address label rejects the response rather than becoming a skipped candidate.Deferred review points: observed reach, Census response policy.
Testing
Documentation comments only; runtime behavior is unchanged.
cargo fmt --all --checkandgit diff --checkpass. Long-running workspace tests are not awaited before submission, as requested.UI evidence
No visible UI change.