Skip to content

Document 404 responses for unpublished hosts - #84

Open
batuhan wants to merge 2 commits into
mainfrom
fix/undeployed-host-status
Open

batuhan wants to merge 2 commits into
mainfrom
fix/undeployed-host-status

Conversation

@batuhan

@batuhan batuhan commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Unpublished hostnames and strictest-safety removals return 404 with X-Spacefast-Undeployed: 1. Explain how the marker or response body distinguishes these responses from a missing page on a published site. Coordinate publication with the runtime behavior change.

Validation: generated-reference verification, strict typecheck, link validation, full build, docs tests, composed-site audit, route verification, public-safety verification, and prose verification.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Documentation
    • Clarified that unpublished Spaces and unrouted hostnames return 404 responses, distinguishable from missing pages on published sites by a response header. The response body and cache behavior remain unchanged.

@indent

indent Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Issues

1 potential issue found:

  • Docs describe a 404 plus X-Spacefast-Undeployed: 1 for unpublished hosts, but the runtime on monorepo main still returns 503 with no header. The change is spacefast/monorepo#4402, still open, so merging this first publishes behavior that isn't live.
    Found by Indent Review Agent

↑ Select any checkbox above to have Indent auto-fix the issue

1 issue already resolved
  • In limits.mdx, "Both return 404 with X-Spacefast-Undeployed: 1" is ambiguous and can be read as covering the 451 and no-longer-available pages, which don't carry the header. Name the subject explicitly. (fixed by commit 0c400e0)
    Found by Indent Review Agent

CI Checks

All required CI checks passed on 0c400e0.

Review agents

Select any unchecked box below to run or rerun that agent.

Found issues (1)
  • Indent Review Agent · Fine once monorepo#4402 ships the 404
Full results

Indent Review Agent

  • Summary: Fine once monorepo#4402 ships the 404
  • Last ran on commit: 0c400e0e
  • Latest result
    {
      "summary": "Fine once monorepo#4402 ships the 404",
      "findings": []
    }

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b06a0a6e-14c9-4878-8dae-5c5f6c3b4239

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 815fb838-f6de-4118-8e14-2eab27b1c52c
Commits

Reviewing files that changed from the base of the PR and between 968ada9 and 42d63d4.

Files selected for processing: 2
  • content/(reference)/limits.mdx
  • content/(serve)/urls.mdx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The serving and reference documentation now describe 404 responses for unpublished or unrouted Spaces. The documentation specifies the X-Spacefast-Undeployed: 1 header and describes how the response differs from a missing page on a published site.

Changes: Unpublished Space responses

Layer / File(s) Summary
Document unpublished response behavior
content/(serve)/urls.mdx, content/(reference)/limits.mdx
The serving documentation describes a 404 response for unrouted hostnames and Spaces that have never published. The reference documentation describes the strictest-safety response as 404 and specifies the undeployed response header. Both document the unpublished response body; the serving documentation also retains the Cache-Control: no-store header. The reference documentation clarifies that legal-removal and no-longer-available pages are customizable.

Priority: Pending latest changes

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: alexanderaidun-a8c

Merge Risk: Minimal · up to 42d63

No actionable defect is established in the supplied documentation change.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: documenting 404 responses for unpublished hosts.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread content/(serve)/urls.mdx
## Hostnames that do not serve

A request to a hostname Spacefast does not route, or to a Space that has never published, answers `503` with `Cache-Control: no-store` and the body `This space hasn't been published yet.` It is deliberately not a 404, so a monitoring check can tell "nothing here yet" apart from "this page is missing".
A request to a hostname Spacefast does not route, or to a Space that has never published, answers `404` with `Cache-Control: no-store` and the body `This space hasn't been published yet.` The response includes `X-Spacefast-Undeployed: 1`. Use that header or the body to tell "nothing here yet" apart from a missing page on a published site.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Bug · Docs describe 404 behavior that production doesn't ship yet

Production runtime on monorepo main still returns 503 for unpublished hosts (_stattic_undeployed_action in runtime/engine/runtime/serve.php) and for the strictest-safety tombstone (runtime/engine/shared/artifacts.php), and nothing sets X-Spacefast-Undeployed. The change to 404 plus the header is spacefast/monorepo#4402, still open. If this merges first, monitors keyed on the header or a 404 will misread real 503 responses. Merge only after #4402 is deployed, or list it as a dependency in the description.

The same applies to the limits.mdx table row and paragraph.

Found by Indent Review Agent

Comment thread content/(reference)/limits.mdx Outdated
@batuhan

batuhan commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

@indent please review this PR and commit fixes for them as well

@indent

indent Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Review done, one fix pushed in 0c400e0.

  • Fixed: the limits.mdx sentence that began "Both return 404…" now names its subject, "The strictest-safety response and a never-published host both return 404 with X-Spacefast-Undeployed: 1…". Before, it could be read as covering the 451 and no-longer-available pages, which don't carry the header.
  • Not fixed: the docs describe a 404 and the header, but the runtime on spacefast/monorepo main still returns 503 with no header. The change that switches it is https://github.com/spacefast/monorepo/pull/4402, still open when I checked. Merge this PR only after #4402 is deployed. Merging it first would send users and monitors looking for a marker that live hosts don't send. I left the docs text as is, since the fix is merge order.

This branch was successfully deployed

1 active deployment
preview/fix/undeployed-host-status — 0c400e0e Deployed Oct 24, 2026 by spacefast[bot]
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