Skip to content

ci(website): print the deployed docs URL and smoke-check it#99

Merged
wmadden-electric merged 2 commits into
mainfrom
claude/docs-deploy-smoke-check
Jul 16, 2026
Merged

ci(website): print the deployed docs URL and smoke-check it#99
wmadden-electric merged 2 commits into
mainfrom
claude/docs-deploy-smoke-check

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

The deploy-docs workflow could report success while telling you nothing about where it published — and a green deploy is not a serving site. PRO-200 is exactly that failure mode: a compute service returns a successful deploy and a permanently 404ing domain. The URL is a generated service id, so without printing it a run gives no way to find what it just shipped.

Adds website/scripts/verify-deployed.ts, run as the final step of the deploy. It resolves the service through the Management API using the credentials CI already has, prints the URL (and to the run summary), then polls the landing page and a guide route until both serve the docs — failing if they never do.

Notes for the reviewer

  • The project and service names are read off module.ts / src/service.ts rather than repeated as strings here, so each name has one definition instead of a second copy to keep in sync.
  • Two matching services is a hard failure, not a guess. The API reports branchId: null for every compute service — production and stage alike — so a second one makes "which is production?" unanswerable. It prints the candidates and says how to clear them, rather than verifying the wrong environment and reporting green.
  • @prisma/management-api-sdk is a devDependency, matching examples/pn-widgets. It's CI-only and never reaches the deployed bundle (the site's runtime imports are unchanged). scripts/ is excluded from the dependency-cruiser sweep, so this doesn't touch the public-imports-only rule.

Verification

  • Ambiguity guard exercised for real: run against a workspace holding two site services, it fails with both ids listed and a non-zero exit, instead of picking one.
  • Probe logic validated against the live CI site (m2u4w6w93v8m1hkc8bdl4wzz.ewr.prisma.build): landing and /guides/getting-started both return 200 and contain the string the check looks for. That string (Prisma Composer) appears in each page's <title>, meta description and footer — all emitted by template.ts's shell, never by a guide's markdown — so editing the docs can't make this flaky.
  • Website build, all 9 tests, --frozen-lockfile, biome, typecheck, and lint:deps green.

The happy path can't be run from a laptop — the CI workspace token isn't available locally — so the first real end-to-end proof is this workflow's own run on merge.

🤖 Generated with Claude Code

The deploy workflow could report success while telling you nothing about
where it published, and a green deploy is not a serving site — PRO-200
is exactly that failure: a compute service returns a successful deploy
and a permanently 404ing domain. The URL is also a generated service id,
so without printing it a run gives no way to find what it just shipped.

Adds scripts/verify-deployed.ts, run as the last step of the deploy: it
resolves the service through the Management API with the credentials CI
already has, prints the URL (also to the run summary), then polls the
landing page and a guide route until both serve the docs, failing if they
never do.

- The app and service names come from module.ts / src/service.ts rather
  than string literals, so renaming either cannot silently break this.
- More than one matching service is a hard failure, not a guess: the API
  reports branchId: null for every compute service, production and stage
  alike, so a second one makes "which is production?" unanswerable. It
  prints the candidates and says how to clear them.
- @prisma/management-api-sdk is a devDependency, matching pn-widgets: it
  is CI-only and never reaches the deployed bundle.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@pkg-pr-new

pkg-pr-new Bot commented Jul 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@prisma/composer@99
npm i https://pkg.pr.new/@prisma/composer-prisma-cloud@99

commit: ef08028

Both comments described the code as something it is not.

The probe comment said the marker string comes from every page header.
It does not: the header renders `Prisma <span>Composer</span>`, so the
raw HTML never contains those two words together. The string it actually
matches is in the <title>, the meta description and the footer. The check
is sound and the conclusion holds — all three come from template.ts s
shell, not from a guide s markdown, so editing the docs cannot break it —
but the stated reason was wrong.

The header comment claimed reading the names off module.ts / src/service.ts
means renaming cannot "silently" break the check. Hardcoded names would
fail loudly, not silently. The actual benefit is narrower: one definition
per name instead of a second copy to keep in sync.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric wmadden-electric merged commit d57859c into main Jul 16, 2026
15 checks passed
@wmadden-electric wmadden-electric deleted the claude/docs-deploy-smoke-check branch July 16, 2026 12:45
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.

2 participants