Skip to content

fix(adapters): log that HTTP is live while SSL is still provisioning - #625

Open
Devenio wants to merge 1 commit into
oblien:mainfrom
Devenio:fix/ssl-http-live-log
Open

fix(adapters): log that HTTP is live while SSL is still provisioning#625
Devenio wants to merge 1 commit into
oblien:mainfrom
Devenio:fix/ssl-http-live-log

Conversation

@Devenio

@Devenio Devenio commented Aug 18, 2026

Copy link
Copy Markdown

Summary

When a custom-domain route is registered, the deploy log now says the site is live on HTTP while the certificate is still being issued (HTTPS in ~1 min), instead of a silent ~1 minute HTTPS gap that operators filed as broken SSL.

Motivation

A new project's route is registered with tls: true, but nginx only emits the 443 block once the cert exists (route.tls && certsExist(domain)). The pipeline is correct — cert lands, vhost re-renders, HTTPS works — but during that ~1 minute window the site answers HTTP and nothing (or a bootstrap self-signed cert) on HTTPS. Issuance is best-effort by design (domains never fail a deploy), which is why the silence was the bug: two people reported it as broken SSL. Documented in TODO.md under “SSL provisioning is invisible in the deploy log.”

Related issue

None

Changes

  • packages/adapters — After registerRoute, if provisionSsl && ssl, log Route live on HTTP for ${hostname} — provisioning the certificate, HTTPS in ~1 min, then call provisionCert as before. No log when provisionSsl is off.
  • apps/api — Same wording on the compose static-service path that duplicated the SSL step outside registerResolvedRoutes. Issuance stays best-effort: a failed cert never fails the deploy.

Verification

$ bunx vitest run src/runtime/route-registration.test.ts
# cwd: packages/adapters

 RUN  v4.0.18

 ✓ src/runtime/route-registration.test.ts (13 tests) 11ms

 Test Files  1 passed (1)
      Tests  13 passed (13)

$ bun run --cwd packages/adapters lint
$ tsc --noEmit
# exit 0

The new describe registerResolvedRoutes — SSL provisioning is visible in the deploy log:

  • fails without the log line (asserts the HTTP-live message after registerRoute, then provisionCert)
  • does not log HTTPS in ~1 min and does not call provisionCert when provisionSsl is off

Before: deploy log showed Checking SSL for example.com... (or nothing on first compose deploys) while HTTPS was still dead. After: the log states HTTP is live and HTTPS is coming in ~1 min; existing SSL certificate active / Action Required lines still fire when the cert lands or fails.

Checklist

  • One change per PR — one bug, or one agreed feature, with nothing unrelated bundled in
  • The diff is scoped — no reformatting or lint fixes on lines I wasn't otherwise changing
  • A test fails without this change and passes with it (or I explained above why there isn't one)
  • bun run --cwd packages/adapters lint and the route-registration tests pass locally (full bun run test not re-run; this PR does not touch the dashboard)
  • I understand every line of this diff and can explain it in review

The 443 block is only emitted once the cert exists, so operators saw a ~1 min HTTPS gap and filed it as broken SSL. Issuance is best-effort by design; the silence was the bug.

Co-authored-by: Cursor <cursoragent@cursor.com>
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