You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support structured IP-derived location metadata - #50
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
JSON and JSON-stream reports omit valid client locations and numeric coordinates for legacy backends because they bypass the fallback resolution used by terminal output.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Location fields are checked for emptiness before sanitization, allowing invisible-only values to suppress valid legacy metadata or country codes and leave location output empty.
No open issues 🎉
2 previously missed issues
In code that hasn't changed since last review
Fall back when sanitized city is empty
src/defs/mod.rs:210
A top-level location: {"city":"\u200b"} is accepted as nonempty, so approximate_location() ignores valid legacy city and coordinates in rawIspInfo. Sanitization then removes the only city character, leaving no terminal location and "location":{} in JSON. Check text-field emptiness after sanitizing so this unusable object falls back to legacy metadata.
Use country code when sanitized country name is empty
src/defs/mod.rs:232
With country: "US" and countryName: "\u200b", this selects the apparently nonempty name, but the loop below removes it and never includes US. A country-only location therefore produces no terminal location despite containing a usable country code. Sanitize the name before checking emptiness, and fall back to the code when the sanitized name is empty.
Fixed both remaining sanitizer findings in commit 9764157. Top-level text fields are now sanitized before emptiness checks, so an invisible-only city falls back to legacy rawIspInfo metadata. countryName is sanitized before country selection, with country/country_code/countryCode fallback. Added focused regressions for both cases. cargo fmt --check, cargo check, cargo test, cargo clippy --all-targets --all-features -- -D warnings, and diff checks pass.
Follow-up commit 9764157 addresses the previously missed location concerns:
text fields are checked after sanitization, so invisible-only cities fall back to legacy rawIspInfo city/coordinates instead of suppressing valid fallback metadata;
sanitized countryName values now fall back to a usable country, country_code, or countryCode when the name is invisible-only; and
two focused regressions cover invisible-only city and invisible-only countryName behavior.
Validation passed with cargo fmt --check, cargo check, cargo test, cargo clippy --all-targets --all-features -- -D warnings, and git diff --check. PR 50 remains open and mergeable.
This PR adds structured approximate IP-derived location support to the Rust CLI while preserving processedString and rawIspInfo compatibility. The unresolved review thread has been resolved, validation passes (cargo fmt --check, cargo check, cargo test, strict Clippy, and git diff --check), and the PR is mergeable.
PR #50 remains open and mergeable. The latest Rust review reports no open issues, and the resolved inline thread remains resolved/outdated. No status checks are currently configured.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Critical differential tests still fail because CSV normalization and Go/Rust expectations do not correctly account for the added location columns, retained latitude, and location metadata.
PR #50 remains open and mergeable with all inline review threads resolved. No status checks are currently configured. Ready for the latest-head re-review.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The parity tests mask CSV quoting differences through reserialization and use wildcard expectations that would pass despite missing formula protection or corrupted fields.
@billmcilhargey Latest Rust CLI head ad652cd is ready for re-review. Concrete CSV parity expectations and quote-preserving measurement normalization were fixed; Rust unit/integration/parity suites and strict Clippy pass. PR remains open and mergeable.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The special_csv test fails because both CSV expectations contain two backslashes while the fixture decodes to one; the expectations need single-backslash fields while preserving the added location columns.
Resolved the final special-CSV backslash finding: the fixture decodes to one backslash, and the pinned Go/Rust parity expectations now use one backslash in the quoted/unquoted fields. The normalizer has a concrete quoting-preservation unit regression.
Validation: cargo fmt --check, cargo check, cargo test, cargo clippy --all-targets --all-features -- -D warnings, cargo build --release, git diff --check, and the 34-case local parity matrix pass. Pinned location/CSV/hostile/special parity cases pass. All latest Rust inline threads are resolved.
PR #50 remains open and mergeable; no CI status checks are currently configured. Related coordinated issue: librespeed/speedtest#881, including the Rust/Go/PHP/Desktop/Android implementation PR set. No PR or issue was merged or closed.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because an unpublished moderate-severity finding shows that normal --debug runs print each server’s approximate location twice to stderr.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
locationmetadata.Verification
cargo testContext
Tracked by librespeed/speedtest#881: which covers ISP and approximate IP-derived location metadata.