Skip to content

Deploy pipeline and provisioning runbook #32

Closed

Description

@Abuubkar

Parent

Spec: #20

What to build

The path to production, and the ordered guide for creating the accounts it depends on.

One Worker with Static Assets: prerendered pages served as assets without invoking the Worker, and the form endpoint reaching it. Pull requests get a preview URL; main deploys.

The placeholder check gates production only. The copy ships with bracketed placeholders deliberately until launch, so a blocking check on ordinary CI would leave it red for the whole build phase and train everyone to ignore it.

The provisioning runbook is ordered by dependency, each step naming what it produces and which variable it fills. One step can cause real damage in the wrong order: Email Routing must go on a subdomain, never the apex — enabling it on the apex replaces Google's MX records and breaks the client's mail.

One fact is unconfirmed and should be tested early: whether the free send lane accepts a routing subdomain as the sender domain. If not, the fallback is a paid plan — a cost change, not a redesign.

Acceptance criteria

  • Pull requests build and upload a version, producing a preview URL without touching production
  • Pushes to main build and deploy
  • The assets directory is not hand-written in Wrangler config — the Vite plugin fills it
  • A headers rule marks hashed assets immutable and leaves HTML revalidating
  • The endpoint sets its own cache headers, since the headers file does not apply to Worker responses
  • The placeholder check reports on pull requests and fails the production deploy
  • Preview builds use the production site URL so canonical marks them as duplicates
  • A runbook documents the ordered provisioning checklist, each step naming its output and variable
  • The runbook flags the apex-MX hazard prominently at the Email Routing step
  • The runbook records what can only be verified after accounts exist
  • The runbook notes that the WAF rate-limiting rule lives only in the dashboard — no code, no review, no history
  • Required secrets are declared so a deploy missing one fails loudly

Blocked by

Activity

  1. changed the title [-]Analytics[/-] [+]Deploy pipeline and provisioning runbook[/+] on Sep 5, 2026
  2. self-assigned this
    on Sep 5, 2026
  3. Abuubkar commented on Sep 5, 2026

    @Abuubkar
    OwnerAuthor

    Done on branch ticket/32-deploy.

    The gate is branch-aware, and provably works

    CI (PRs + main):      pnpm run placeholders || true     # reports
    Deploy (main only):   pnpm run placeholders             # hard gate
    

    Verified it would block a deploy today — placeholders exits 1 with 9 remaining. That is the protection #14's indexing decision actually needs, and it is real rather than aspirational.

    Keeping it off PRs matters: the copy ships with bracketed placeholders deliberately until launch, so a blocking check on ordinary CI would leave it red for the entire build phase and train everyone to ignore it.

    Preview URLs cannot compete with production

    Preview builds use the production VITE_SITE_URL, so #30's canonical tag marks every preview as a duplicate of the real page. Cheaper and more reliable than trying to keep workers.dev out of the index.

    The runbook flags what can hurt

    docs/provisioning.md, ordered by dependency, each step naming its output and variable. Three things are called out rather than buried:

    • ⚠️ Email Routing goes on a subdomain, never the apex — a callout placed before the step, because enabling it on the apex replaces Google's MX and breaks the client's mail. It is the only step here that can cause real damage in the wrong order.
    • The routing-subdomain sender is unconfirmed, flagged at the step where it must be tested. If rejected, the fallback is a /month plan — a cost change, not a redesign.
    • The WAF rate-limiting rule has no representation in this repository. No code, no review, no history, and nothing here will tell you if it is missing.

    Also documented: what already works with no accounts (everything but the network), and what is only verifiable after they exist.

    _headers marks hashed assets and fonts immutable, leaves HTML revalidating, and is confirmed copied into dist/client/. It never applies to Worker responses — the endpoint sets its own no-store.

  4. Abuubkar commented on Sep 5, 2026

    @Abuubkar
    OwnerAuthor

    Done. Placeholder gate verified to block a deploy today; runbook flags the apex-MX hazard before the step that causes it.

  5. added a commit that references this issue on Sep 5, 2026
    e698712
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready-for-agentSpec is complete and ready for an agent to implement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions