Skip to content

fix: read nested docs URLs from canonical R2 objects - #260

Merged
hannesrudolph merged 6 commits into
mainfrom
fix/docs-r2-index-compat
Oct 3, 2026
Merged

hannesrudolph merged 6 commits into
mainfrom
fix/docs-r2-index-compat

Conversation

@hannesrudolph

Copy link
Copy Markdown
Member

R2 currently stores nested docs HTML twice, under /route and /route/index.html. Make the Worker compatible with retaining only the canonical slashless object while preserving both public URLs.

An explicit nested index request now reads the canonical object when its metadata identifies HTML, falling back to the legacy nested key when canonical HTML is absent. Requested URLs, content negotiation, caching policy, ETags and Markdown alternate links retain their existing behavior. Storage errors still propagate. This change does not omit or delete any object.

The tracked hosting runbook documents the two-stage rollout and rollback order. Duplicate retirement remains a separate change gated on the successful compatible Worker deployment, its version/commit/run receipt, and live route checks. After retirement, dual-key artifacts must be restored before rolling back to the old reader.

Validation:

  • 40 Worker tests pass, including dual, mixed, canonical-only and legacy-only object inventories; GET/HEAD, cache, ETag, Content-Type, Link, redirects, encoded/dotted/localized routes, root, 404, Markdown and static assets.
  • Full Node suite: 283 pass, 1 optional SDK skip.
  • Wrangler bundle dry-run passes (30.19 KiB).
  • Structured Autoreview: clean for Worker code and tests; the operational note was independently reviewed.

No changes to analytics, consent, workflows, permissions, publication guards or the single-writer queue.

@hannesrudolph
hannesrudolph merged commit 60a3699 into main Oct 3, 2026
5 checks passed
@hannesrudolph
hannesrudolph deleted the fix/docs-r2-index-compat branch October 3, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant