Skip to content

docs(tiles): clarify observed reach and malformed geocoder replies - #2191

Closed
giswqs wants to merge 1 commit into
mainfrom
sweep/tile-quality-docs-2026-11-15
Closed

giswqs wants to merge 1 commit into
mainfrom
sweep/tile-quality-docs-2026-11-15

Conversation

@giswqs

@giswqs giswqs commented Nov 15, 2026

Copy link
Copy Markdown
Member

Summary

Clarify that Origin::with_observed_reach records 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 --check and git diff --check pass. Long-running workspace tests are not awaited before submission, as requested.

UI evidence

No visible UI change.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 4ca6bf4c-ef97-49c6-a4fb-c08d5bad9935
Commits

Reviewing files that changed from the base of the PR and between ce40749 and 10f66ba.

Files selected for processing: 2

  • crates/tiles/src/address.rs
  • crates/tiles/src/geocode.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@giswqs

giswqs commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

Superseded by the combined release-quality PR #2196 so these related fixes can be reviewed together.

@giswqs giswqs closed this Nov 15, 2026
Comment on lines +258 to +259
// 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Suggested change
// 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.

Comment on lines +63 to +65
/// 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Suggested change
/// 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.

@github-actions

Copy link
Copy Markdown
Contributor

Code review

Bugs: None found. The PR changes only doc comments and one comment line in geocode.rs, so runtime behaviour is unchanged. I checked the new wording against the code.

Security: None found. No code changed.

Performance: None found.

Quality:

  • crates/tiles/src/geocode.rs:258-259: the new comment says an overlong Census label makes the whole response be refused. The check runs after the MAX_RESULTS break, so a label past the cap is counted in limited and never inspected. The response is accepted in that case. Confidence: high. Suggested wording is in the inline comment. The cap ordering is also untested: the test near line 480 only covers a label at position 1.
  • crates/tiles/src/address.rs:63-65: "this does not narrow a previous origin" refers to nothing, because this is a constructor. Naming narrow_reach as the narrowing operation reads better. Confidence: high. This is a nit that can wait for the release quality pass.

AGENTS.md: No violations. The PR is documentation only, so no tests, schema, i18n or ribbon rules apply.

Already raised: 0. prior-reviews.json has no threads. I could not check the two deferred discussions the PR body links to (PR 2128 and PR 1859), since I have no network access.

Change size

Compared with main (merge base ce40749 to PR head 10f66ba), the whole PR.

Measure Value
Files changed 2 (0 added, 2 modified, 0 removed, 0 renamed)
Size before 47.4 KB
Size after 47.7 KB
Total size change +285 B
Path Before After Change
crates/tiles/src/geocode.rs 30.4 KB 30.6 KB +192 B
crates/tiles/src/address.rs 16.9 KB 17.0 KB +93 B

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