Skip to content

Status pages: withErrorPage 503→500 regression and RFC-0043 deviations (follow-up to #162) #167

Closed

Description

@Madraka

Follow-ups to RFC-0043 PR 1 (#162) from the adversarial review; none is in a release yet (status pages ship with 0.6.4). Fold them into RFC-0043 PR 2 or a small fix(astro-renderer) PR before the next tag.

Medium

  1. withErrorPage turns the starter's own not-published 503 into a 500 error page with a false error log (packages/astro-renderer/src/cloudflare-entry.ts:181-183): the 5xx→error rewrite catches every 5xx the theme returns, including the 503 the starter sends for an unpublished site when the request reaches Astro. Only rewrite thrown errors / 500s, or let a response marked by the renderer (x-cloudhal-status) through.

Low (RFC-0043 deviations)

  1. A store read failure before rendering answers 500 error without Retry-After, not 503 unavailable with Retry-After: 300, while /__cloudhal/health treats the same failure as 503 (runtime-workerd.ts:189-190).
  2. The error page is always English and never shows the site name, even when the site is already loaded (cloudflare-entry.ts:175); use the site's locale and name when they are known.
  3. An invalid preview token on a feed, sitemap or JSON path still serves the published content (cloudflare-entry.ts:665), and the preview-link failure reason is still echoed on machine and media paths (runtime-workerd.ts:341), contrary to Decision 12.
  4. docs/adr/0012-cloudflare-deployment.md:15 still says invalid preview tokens fall back to the published page.
  5. Translation docs: the status catalog (packages/astro-renderer/src/status-strings/) is missing from .agents/skills/translate/SKILL.md:16, DESIGN.md §1, the Weblate guide and ADR-0034, which still describe the exchange as Studio-only.
  6. RFC-0043 §1.9: say that health answers a short-cached 404 on a host that maps to no site (RFC-0034 §4), not {ok,state}.

Done when

  • 1–4 have unit cases in packages/astro-renderer/test (the 503 path through withErrorPage, the store failure, the locale/site name, the machine-path token).
  • 5–7 docs updated. pnpm check green.

Source: adversarial review run after the 0.6.3 release (178 agents, 47 confirmed findings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions