Systems and records
Dataset refresh acceptance validation: checks a botched refresh fails
By SourceX Editorial · Updated
10 sections
Short answer
Dataset refresh acceptance validation should keep two lanes apart: invariants that must hold, such as previously delivered keys, each series' first and last period and period alignment, and changes that must be disclosed, such as revisions to history and shifts in the newest period. Replayed on public GDP file versions, row counts and headline figures passed a refresh that put 37% of values on the wrong year; boundary and key checks caught it.
Checklist
Dataset refresh acceptance
Key takeaways
- A refresh can match the corrected file's row count, entity count and year range exactly and still be wrong in 37% of its rows, as a public GDP file showed in October 2024.
- Headline totals and rank correlations passed that broken refresh; checks on per-series boundaries, delivered keys and period alignment failed it.
- Revising delivered history is normal: in a six-month GDP refresh, 95.5% of overlapping values moved by 1% or less, and recent years were revised about three times as often as older ones.
- Set tolerances from your own clean refreshes and by record age, and send borderline flags to review instead of rejecting automatically.
- Keep every accepted release retrievable so earlier evaluation results can be reproduced and revisions disclosed rather than silently absorbed.
What should a dataset refresh acceptance test prove?
It should prove that the new release continues the old one: the same entities under the same keys, the same periods in the same places and the same definitions, so that a metric computed on either release means the same thing. It should also surface what really changed, without treating every change as a defect.
That gives the test two lanes. The hold-steady lane holds invariants, and a breach fails the refresh unless a coded explanation comes with it. The disclose lane holds changes a buyer must see, such as revisions to history, new entities, renamed labels and shifts in the newest period, and a breach there produces a report, not a rejection.
Many refresh checks in practice watch volume. Deequ, an open-source data quality library, documents anomaly detection that compares a stored metric with its past values, and its worked example flags a dataset whose row count more than doubled from one day to the next. Volume checks are worth keeping, but the case below shows a defect that left volume exactly where it should be.
A public replay: what happened to one GDP file on 20 October 2024
The datasets/gdp repository on GitHub publishes World Bank GDP in current U.S. dollars as one CSV file keyed by country code and year, rebuilt by a script from the World Bank indicator NY.GDP.MKTP.CD. Its git history keeps every version of that file, so each refresh can be replayed against the one it replaced.
On 20 October 2024 a refresh extended the file from 2016 to 2023, and the next day a commit described as updating the dataset with correct data replaced it. Comparing the two shows what went wrong: 5,192 of 13,979 rows, 37.1%, held a value that belonged to a different year. Series that should begin after 1960 had been moved to begin in 1960; 119 of the 124 such series line up exactly with the corrected file once shifted back.
From the outside, the broken file looked right. It had the same 13,979 rows, the same 262 codes and the same 1960 to 2023 range as the corrected file. Series that genuinely start in 1960, the United States among them, were untouched, and the 2023 world total matched the corrected file exactly.
The table replays six checks on three refreshes: the January 2018 refresh against the July 2017 file it replaced, and both October 2024 files against the January 2018 file:
| Check | Jan 2018 refresh | 20 Oct 2024 refresh (broken) | 21 Oct 2024 fix |
|---|---|---|---|
| Row count | 11,507 (prior file 11,542) | 13,979 | 13,979 |
| Rank correlation of 2015 values (Spearman) | 0.9999 | 0.998 | 0.998 |
| Previously delivered keys missing | 61 of 11,542 | 1,452 of 11,507 | 321 of 11,507 |
| Series starting in 1960 | 132 of 256 | 262 of 262 | 138 of 262 |
| Series ending before the latest year | 20 of 256 | 128 of 262 | 29 of 262 |
| Series whose best alignment shift is not zero | 1 of 254 | 137 of 245 testable (9 more could not be aligned within 15 years) | 42 of 254 |
Why did counts and headline numbers pass a broken release?
Each of them was computed over the whole file or over complete series, and the defect lived in the incomplete ones. Row count, code count and year range only see the outline of a file. The United States and the world total start in 1960, so the shift never reached them. Even the cross-country rank correlation for 2015 stayed at 0.998, because 131 of the 150 series still holding a 2015 value start in 1960 and were never shifted.
That is the trap inside the advice to check stable metrics: a stable metric is evidence only about the records that feed it. Pick anchors that cover the parts of a dataset most likely to break, such as short series, late-starting accounts or recently migrated entities, and not only the largest and oldest.
What failed the broken file were structural checks run series by series. All 262 series began in 1960, against 132 of 256 in the file it replaced. In the broken file, 128 series stopped before 2023, against 29 in the fix, and 1,452 previously delivered code-year values were gone, against 321. A per-series alignment search found 137 of the 245 testable series matched the prior file better after moving one or more years, and 9 more could not be aligned within 15 years at all.
Which invariants should a refresh hold, and how is each one tested?
Four invariants carry most of the protection, and each has a test short enough to automate:
- Key continuity: every key delivered before is still present, or its removal carries a reason code. Judge the missing share against clean refreshes; the six-month GDP refresh lost 61 of 11,542 keys, about 0.5%.
- Boundary profile: each series keeps its first and last period unless a reason is recorded, and the number of series starting at the first period and ending at the last stays close to the prior release.
- Period alignment: for each series, the shift that best matches the prior release is zero. Search a window of shifts and send any series whose best match sits elsewhere to review, by name.
- Anchor equivalence: chosen anchor metrics, such as a reference model's score on a frozen overlap slice, stay inside a margin agreed before the refresh. Require the whole confidence interval to sit inside the margin; a difference that is merely not significant passes noisy releases, because noise widens intervals.
How much revision of already-delivered history is normal?
More than a strict equality test allows, and it is not spread evenly. In the six-month GDP refresh from July 2017 to January 2018, 68.1% of the 11,481 overlapping values were identical, 95.5% moved by 1% or less and 88 values, 0.8%, moved by more than 10%.
Recent periods moved most. Values for 2010 and later were revised by more than 1% in 11.0% of cases, against 3.3% for 1960 to 1989 and 3.4% for 1990 to 2009. Across the longer gap from January 2018 to the corrected October 2024 file, 18.3% of overlapping values moved by more than 10%, which would fail any tolerance tuned on a six-month cycle.
The World Bank's data help desk gives the reasons: most revisions reflect improved estimates as collection methods get better and newer surveys arrive, data judged no longer robust may be deleted, and users are advised to work from the latest edition instead of filling gaps from older ones. Countries also revise their own national accounts, usually by small amounts as information arrives during the year and occasionally through larger comprehensive revisions.
Business records behave the same way. Late payments, reopened cases, merged accounts and corrected stage dates rewrite history that was already delivered. Set tolerances by record age from your own refresh history, and widen them for gaps longer than the cycle they were tuned on.
How do you expose real change without failing the refresh?
Put real change in a disclosure that travels with the release: a vintage diff of revised history, a register of renamed and new entities, and a comparison of the newest period with the one before it. None of these should block acceptance on its own; all of them should be impossible to miss.
The GDP replay supplies an example of each. Between the January 2018 and October 2024 files, five codes kept their key but changed their name, including Swaziland to Eswatini, Turkey to Turkiye and Czech Republic to Czechia, and six codes were new. A refresh joined on names would have split those five series in two; joined on the stable code, they stay whole and the renaming becomes one line in the disclosure.
Official data producers show two disciplined ways to absorb level changes. The Bureau of Labor Statistics wedges each annual benchmark correction to its payroll employment estimates back across the months since the previous benchmark, on the assumption that the error built up at a steady rate, so no break appears at the seam. The Philadelphia Fed keeps every vintage of its macroeconomic data, calling the data available on each date a vintage and the collection a real-time data set, so a past result can be recomputed on the numbers that existed when it was produced.
For an AI dataset the second habit is the cheap one. Keep each accepted release retrievable, record which release every evaluation used, and old scores stay reproducible even after history has been revised.
The two-lane acceptance sheet
Use the sheet as the acceptance clause in a refresh agreement. Each line names its lane and the evidence that should arrive with the release:
At a glance
The two-lane acceptance sheet
- Hold, shape: row, entity and period counts within the range implied by the added periods. Necessary, never sufficient.
- Hold, key continuity: previously delivered keys that are missing, as a count and a share, each with a reason code, compared with clean refreshes.
- Hold, boundary profile: series starting at the first period and ending at the last, against the prior release, plus a list of every series whose first or last period moved.
- Hold, alignment: the best-match shift of each series against the prior release; any nonzero shift goes to review with the series named.
- Hold, anchor equivalence: margins set in advance for anchor metrics on a frozen overlap slice, including at least one anchor built from short or late-starting series.
- Disclose, revisions: revised values by record age and size band, in a machine-readable diff between releases.
- Disclose, entities and labels: new, retired and renamed entities, joined on stable keys, with a crosswalk.
- Disclose, newest-period shift: category mix, base rates and volumes in the new period beside the previous one.
- Keep, versions: the prior release stays retrievable, and every evaluation result records which release it used.
When should a refresh deliberately break comparability?
When the task itself changed. If newer records follow a new policy, a new outcome definition or a new system whose fields mean something else, forcing them to match the old release would hide a real change behind a passing test.
Declare a new baseline then, instead of bending tolerances. Version the label and policy rules, deliver an overlap window rebuilt under both versions where the source allows it, and mark old scores as comparable only on records decided under the old rules. From that point the acceptance test runs against the new baseline.
The opposite mistake also happens: calling a defect a change in the world. The October 2024 GDP file looked like a sweeping revision of history until the alignment check showed that the values had simply moved to other years.
What the GDP replay cannot tell you
It is one public macroeconomic file, not business records, chosen because its full version history is public and anyone can rerun the checks. Only four of its versions matter here, and two of them sit about six years apart, a long gap for tuning tolerances.
The alignment search also raises false alarms when revisions are large. Against the January 2018 file it flagged 42 series in the corrected 2024 file, half of them (21 of 42) with a one-year shift, which is what a level revision close to one year's growth looks like. In the six-month refresh its single flag was San Marino, whose series grew from 10 to 18 years and was revised by a median of 42.5%. Flags belong in review, not automatic rejection.
Freshness needs its own check. The repository's README says the file is regenerated each month, yet its content has not changed since 21 October 2024 apart from a May 2026 line-ending fix, and its latest year is still 2023. SourceX has not published refresh acceptance results for licensed datasets; this article publishes the method and a public replay.
Writing the acceptance test into a data request
State both lanes in the request, before the first delivery, so the first refresh is judged against agreed rules rather than against whatever the first file happened to look like.
With SourceX, a dataset is sourced after a buyer asks for it, and the request is where the buyer describes scope, volume, format, language, timing and licensing needs. Naming the stable keys, the anchor metrics and their margins, the tolerance by record age and the disclosures expected with each refresh gives the supplying business something concrete to prepare for, and gives both sides the same yardstick when the second delivery arrives.
Frequently asked questions
What is the difference between refresh validation and refresh acceptance?
Validation checks that a release is sound on its own terms: files parse, fields have the right types and counts add up. Acceptance asks whether the release is a comparable continuation of the previous one, which takes comparisons across releases: keys, series boundaries, period alignment and anchor metrics.
Should a refresh that revises historical records be rejected?
Usually not. Revisions are normal when late events arrive or estimates improve; in a six-month public GDP refresh, 4.5% of overlapping values moved by more than 1%. Reject when revisions break an invariant or exceed the tolerance for their record age without explanation, and disclose the rest.
How can tolerances be set before any refresh history exists?
Use the first two deliveries to set them: re-extract an overlap window in the second delivery and measure how much already-delivered history moved. Until then, send every breach to review instead of rejecting automatically, and tighten the rules once a few clean refreshes give you a baseline.
Which metric shows that two dataset releases are still comparable?
No single metric does. Rank correlations and headline totals can stay steady while part of the data is broken, as the October 2024 GDP file showed with a 2015 rank correlation of 0.998. Pair anchor metrics with per-series structure checks and an alignment test.
Why keep old dataset versions after accepting a refresh?
So earlier results can be reproduced and revisions disclosed. Without the prior release, nobody can tell whether a score moved because the model changed or because the history underneath it was rewritten.
Sources
- The datasets/gdp repository's version history of World Bank GDP data supplies every replay figure in this article, including the 20 October 2024 refresh and its next-day fix. Source
- Deequ's anomaly detection compares a stored data quality metric with its past values, with an example that flags a row count that more than doubled. Source
- The World Bank attributes most revisions to improved estimates, may delete data no longer judged robust and advises using the latest edition. Source
- National accounts revisions are usually small as information arrives during the year, with occasional larger comprehensive revisions. Source
- BLS wedges benchmark revisions back linearly, assuming estimation error accumulated at a steady rate since the last benchmark. Source
- The Philadelphia Fed's real-time data set keeps each dated vintage of macroeconomic data. Source
Tell us what data you need
Share scope, volume, format, timing and licensing needs. Datasets are sourced on request.