PLAN: add repoint rule 6 — the media host is LFS-only, so a fold changes host - #50
Merged
Conversation
…ges host `media.githubusercontent.com` serves only LFS objects and returns 404 for a plain-git file, while `raw.githubusercontent.com` serves it. Both send access-control-allow-origin: *, so this is host routing rather than CORS — a different failure from rule 5, and it affects CPython consumers too. This is latent in exactly one remaining piece of work, and it would break all of it. high_dim_data tracks *.csv and *.dta under a blanket LFS rule, so all 14 consuming reads go through the media host today. The storage decision lands those six datasets here as plain git, after which the media host 404s for them — so the fold must change host as well as org and repo. A mechanical org/repo swap breaks every read. Rule 6 records the measurement, enumerates the 14 reads with file and line, and gives the acceptance grep. Phase 3 gets a matching checkbox, since that is where the work happens. Nothing in CI covers this: the strict audit's URL-form check catches only the github.com/*/raw/ form, and only in lecture-wasm (#48). Two of the 14 reads are builder notebooks the audit does not scan as data reads at all. Found while preparing the french_rev set. Context in QuantEcon/workspace-lectures#23.
There was a problem hiding this comment.
Pull request overview
Documents an additional repointing hazard in PLAN.md: the media.githubusercontent.com/media/... endpoint only serves LFS-tracked paths, so folding LFS-tracked datasets into this repo as plain-git requires updating consumers to a different host, not just a different org/repo.
Changes:
- Extend “Repoint rules” intro from five to six rules and clarify scope of rules 5–6.
- Add repoint rule 6 describing the LFS-only nature of the
media.githubusercontent.comhost, with a measured example and an acceptance grep for thehigh_dim_datafold. - Add a Phase 3 checkbox calling out the need to move all affected consuming reads off the media host during the fold.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addresses Copilot review on #50. The "Repoint rules" intro said rules 5 and 6 are "not fully enforced either" — a doubled construction, and vague where the rest of that paragraph is specific about what CI does and does not catch. Now says what CI actually covers: the github.com/*/raw/ form in lecture-wasm, and nothing else. The Phase 3 checkbox repeated the acceptance grep and both caveats already in rule 6. A grep string copied into two places drifts, and this one is load-bearing — if the copies disagree later, the checklist is what someone will act on. The box keeps the what and the why so it still means something on its own, and defers the enumerated reads, the acceptance check and the CI caveat to rule 6, which is now the single canonical place. The grep string appears once in the file. Docs only; no change to the rule's substance.
This was referenced Aug 7, 2026
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.
Records a host trap found while preparing the
french_revset. It is latent in exactly one remaining piece of work — thehigh_dim_datafold — and it would break every consuming read in it.The measurement
media.githubusercontent.com/media/<org>/<repo>/<ref>/<path>is the LFS media endpoint. It resolves only for paths LFS-tracked in that repo, and 404s for a plain-git file. Measured 2026-08-07 withcurl:raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/mpd2020.xlsxmedia.githubusercontent.com/media/QuantEcon/data-lectures/main/lectures/mpd2020.xlsxBoth hosts send
access-control-allow-origin: *, so this is host routing, not CORS. That makes it a different failure from rule 5, and unlike rule 5 it hits CPython consumers too — intro and Colab, not just the browser.Why it matters now
high_dim_datatracks*.csvand*.dtaunder a blanket LFS rule, so all 14 consuming reads go through the media host today. The storage decision lands those six datasets here as plain git (both SCF minis are under the 100 MiB blob limit), after which the media host 404s for them.So the fold must change host as well as org and repo. A mechanical org/repo swap — the obvious way to do it — breaks all 14. The rule enumerates them with file and line, 12 on the media host and 2 on the
github.com/*/raw/redirect form.The framing worth keeping: the plain-git decision does not dissolve the raw-vs-media trap for the repoint, it inverts it — from "consumers must know to use the media host" to "consumers already on it must be moved off, in the same PR as the fold."
Not covered by CI
The strict audit's URL-form check catches only the
github.com/*/raw/form, and only inlecture-wasm(#48). A media-host reference to a data-lectures path is invisible to every build and fails at read time. Two of the 14 reads are_static/…/inequality/data.ipynbbuilder notebooks, which the audit does not scan as data reads at all.Hence the acceptance grep in the rule and the matching Phase 3 checkbox:
grep -rn 'media.githubusercontent.com/media/QuantEcon/data-lectures' repos/must return nothing after the fold.Diff
Docs only — rule 6 in the "Repoint rules" section, the section's intro line updated from five rules to six, and one checkbox added to Phase 3 where the fold happens.
Context: QuantEcon/workspace-lectures#23.
🤖 Generated with Claude Code