feat(edge): route PACKAGES requests to the per-R-minor slot #152

Merged
pat-s merged 4 commits from feat/per-minor-edge-routing into main 2026-08-07 14:12:22 +00:00

2026-08-07

feat(cdn): manage the edge middleware script from this repo
- add bunnynet_compute_script.rpkgs_router, sourced from edge/rpkgs-router.ts,
  so the middleware is reviewed and deployed like the rest of the config
- add the UNION_SLOTS script variable, empty until a slot carries a union index
- point the pull zone's middleware_script at the resource instead of the
  hard-coded id 29277, which the script is adopted from via tofu import
2026-08-07 14:01:11 +00:00
feat(edge): route PACKAGES requests to the per-R-minor slot
- add edge/rpkgs-router.ts, which redirects PACKAGES, PACKAGES.gz and
  PACKAGES.rds into …/src/contrib/<x.y>/ for slots listed in UNION_SLOTS
- leave tarballs alone: R keeps the pre-redirect contrib URL, so the union
  index steers per-minor tarballs with a Path field instead
- stop resolving an unidentifiable distro to a phantom linux-gnu/linux-musl
  slot and send those clients to CRAN
- mark every redirect no-store, since the target depends on the User-Agent
- cover the routing matrix in edge/rpkgs-router.test.ts, run by just edge-test
- correct the spec and plan: the union index carries Path: <x.y> on per-minor
  records, not Path: .. on flat ones
2026-08-07 14:00:14 +00:00
docs(specs): design per-R-minor routing for the CDN middleware
- record that per-minor slots are unreachable from install.packages(), with
  the measured size of the gap on alpine324 and noble
- choose a union index written by bincraft over an edge-side merge, and note
  the two experiments that decide it (Path: .. resolves, gzcon does not read
  concatenated members)
- scope the edge script to PACKAGES* only, gated on a UNION_SLOTS variable
- move the script into the repo as a bunnynet_compute_script applied by tofu
2026-08-07 13:44:15 +00:00