Add audit: stats v4.0 population-regression (map vs stats population parity) - #258
Open
badjoke-lab wants to merge 1 commit into
Open
Add audit: stats v4.0 population-regression (map vs stats population parity)#258badjoke-lab wants to merge 1 commit into
badjoke-lab wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
/api/placesand/api/statswithout modifying code./api/statsaggregationstotal/breakdown/rankings/chains/matrixall reference the same WHERE/source.docs/audits/stats-v4.0-population-regression.audit.mdthat records findings and the precise commits examined.Description
docs/audits/stats-v4.0-population-regression.audit.mdthat documents the investigation, observed commits, and concrete code locations; no application code was changed.366eb16...(PR [Stats v4.0 Parity PR-1] Align stats population with map-displayable places #253) which introducedlib/stats/mapPopulation.tsand unified the map-displayable WHERE viagetMapDisplayableWhereClauses/isMapDisplayablePlace, and2f663dc...(PR Stats v4.0 parity PR-2: align verification breakdown counts and ship donut UI #254) which altered verification aggregation logic (LATERAL/subquery, normalization) and added thebreakdownfield while retaining the unified WHERE usage.WITH filtered_places AS (...)CTE built fromgetMapDisplayableWhereClauses, and identified remaining divergence vectors that can cause population mismatches: verification interpretation differences (Map usesLEFT JOIN verifications, Stats usesLEFT JOIN LATERALwith priority), and string-normalization differences foraccepted/country/city/category; also documentedstats_cacheand JSON-fallback as separate sources.Testing
Codex Task