Repository navigation
Recover the 50 orphaned refresh snapshots with repeat days dropped (#222) - #228
Draft
vahid-ahmadi wants to merge 4 commits into
Draft
vahid-ahmadi wants to merge 4 commits into
vahid-ahmadi wants to merge 4 commits into
Conversation
…222) data/recover_orphaned_snapshots.py reads the octopus archive branch, takes the vintage files each orphan added, drops repeat days (fetch.same_data against the snapshot before it, keep the first), and with --apply writes the fetcher's bytes unchanged and rebuilds MANIFEST/latest. Dry run by default; identical files are "present", differing files stop the run, so re-runs add nothing. refresh.py carry now also skips a branch file whose release repeats the snapshot before it, so the bot branch cannot re-store a release under a later date after the recovery lands. No file under data/vintages/ is added by this commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Nov 6, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ne group Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi
added a commit
that referenced
this pull request
Nov 6, 2026
Merges the shared [Unreleased] anchor (84e9539) and lists every redesign-stack PR's bullets here, by PR number. The stacked PRs no longer edit CHANGELOG.md, so they stop conflicting with each other, and the pipeline stack (#221, #228) adds its entries below the separator line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Stacked on #221 (base
vahid/r5-pipeline). Recovers the daily snapshots in #222. This PR adds no file underdata/vintages/. It adds the tool and its tests; applying it is a separate step for Vahid (order below).What it does
data/recover_orphaned_snapshots.pyreadsdata/archive-orphaned-snapshots-2026-11(77f3176). Its parents after the first are the 50 orphaned bot commits.git diff-tree --diff-filter=A).fetch.same_data: observations, release stamp, next release, last period, title and units, notfetched_utc. The first day a release was seen is kept.present, so a re-run adds nothing. Different bytes stop the run. Nothing is overwritten.--applywrites each kept file byte for byte from its orphan commit, sovintageandfetched_utcare the originals. It then rebuilds MANIFEST/latest withfetch.py's own functions and fails if any tracked vintage was modified, renamed or deleted.Without
--applyit is a dry run.--against REFplans against another commit's store, and--summarywrites the table as markdown.data/refresh.pychange: the carry step now also drops a branch file whose release repeats the snapshot before it (drop_repeats). Without this, once the recovery is on main, the bot branch would carry its 5 Nov copies of releases main already holds.Dry run on the real archive (6 Nov)
50 orphan commits, 818 added vintage files.
Files to add per series (before #195): bank rate, gilt 5y/10y/20y and US 10y Treasury 48 each (daily series); US real GDP and fed funds 3 each; US CPI, payrolls, unemployment 2 each; ONS AWE, core CPI, CPI, monthly GVA, PSNB, PSND, unemployment and vacancies 2 each; ONS GDP and business investment 1 each.
A scratch apply (not pushed) gave
data/fetch.py --checkOK with 346 files across 20 series,tests/test_data_store.py2386 passed and 79 skipped, an empty MDR diff, and a re-run adding 0. The post-#195 case gave 361 files OK and 2486 passed.How it interacts with #195, and the order
Two reasons for recovering before #195:
ingest_outturns.pyreadslatest/. Recovered first, CPI 2026Q3 3.10 is recorded under vintage 2026-10-21 and GDP 2026Q2 1.37 under 2026-09-30, the first days we held them. If Refresh official data vintages #195 goes first, both are recorded under 2026-11-05. No published score changes either way, because the only scored round (29 Jul) predates both dates.After #195 still works. The script inserts files behind 5 Nov, and the gates pass.
Order for Vahid:
python3 data/recover_orphaned_snapshots.py --apply --summary recovery.md. Commit the vintages, MANIFEST and latest first, with the table in the message.python3 data/refresh.py --skip-fetch. With the vintages committed it writes no notes for about 49 back-filled dates (which would be legacy per-series pages that conflict with Redesign the static site: Autumn Budget look, one fact per home, readable layouts #200). It ingests, scores, rebuilds pages and runs every gate. Commit and open the PR as yourself so CI runs on it.Nothing is merged, no workflow has been dispatched, and no vintage is written to any branch.
Tests:
tests/test_recover_orphaned_snapshots.pyhas 11 tests. Most are pure planning tests. The rest are end to end on a synthetic repo with main, two orphans and an octopus archive: dry run writes nothing; apply writes the original bytes, passesfetch.py --checkwith an empty MDR diff, and is idempotent; a conflict is refused. There is also one test forrefresh.drop_repeats. All of them fail on #221's head, where the module and function don't exist.🤖 Generated with Claude Code