diff --git a/src/pages/ForAgentsPage.test.tsx b/src/pages/ForAgentsPage.test.tsx index 2f74822..5e1b7fe 100644 --- a/src/pages/ForAgentsPage.test.tsx +++ b/src/pages/ForAgentsPage.test.tsx @@ -42,6 +42,20 @@ describe('ForAgentsPage', () => { expect(cta).toBeTruthy() }) + it('playground response sample matches the real /db/new wire shape (2026-06-11 display-detail audit)', () => { + renderPage() + const text = document.body.textContent ?? '' + // The page promises "what hits the wire — no mocks": the public host is + // pg.instanode.dev (POSTGRES_PUBLIC_HOST) — "shared-1.instanode.dev" + // never existed — and role/db names use the provisioner's canonical + // usr_/db_ prefixes. /db/new returns 201 (synchronous), not 200. + expect(text).toContain('@pg.instanode.dev:5432') + expect(text).not.toContain('shared-1.instanode.dev') + expect(text).toContain('postgres://usr_') + expect(text).not.toContain('"res_') + expect(text).toContain('201 · 1.4s · application/json') + }) + it('copies the command and flips the button label to "copied"', async () => { copyMock.mockResolvedValue(true) renderPage() diff --git a/src/pages/ForAgentsPage.tsx b/src/pages/ForAgentsPage.tsx index 84f600d..51d4bf6 100644 --- a/src/pages/ForAgentsPage.tsx +++ b/src/pages/ForAgentsPage.tsx @@ -67,10 +67,16 @@ const PLAYGROUND_CURL = `curl -X POST https://api.instanode.dev/db/new \\ // provisioning response (CLAUDE.md convention #11) — a caller that omits // `env` lands in `development`, the lowest-stakes bucket. The earlier // sample dropped it, so the page misrepresented the wire shape. +// Display-detail accuracy (2026-06-11): the page promises "what hits the +// wire — no mocks", so the shapes must match prod: `token` is a UUID +// (openapi DBProvisionResponse format:uuid, not the old fabricated +// "res_…"), the public host is pg.instanode.dev (POSTGRES_PUBLIC_HOST; +// "shared-1.instanode.dev" never existed), and role/db names follow the +// provisioner's canonical usr_{token[:12]}/db_{token[:12]} scheme. const PLAYGROUND_RESPONSE = `{ "ok": true, - "token": "res_2RtL9k4mP", - "connection_url": "postgres://u_3jX:••••@shared-1.instanode.dev:5432/db_2rtL9k4mp", + "token": "9b2f61ce-4a3d-4e8b-b150-7c2f0a4d9e21", + "connection_url": "postgres://usr_9b2f61ce4a3d:••••@pg.instanode.dev:5432/db_9b2f61ce4a3d", "tier": "anonymous", "env": "development", "limits": { "storage_mb": 10, "connections": 2 }, @@ -172,7 +178,9 @@ export function ForAgentsPage() {
{highlightJson(PLAYGROUND_RESPONSE)}
diff --git a/src/pages/MarketingPage.test.tsx b/src/pages/MarketingPage.test.tsx
index 454534e..20086fc 100644
--- a/src/pages/MarketingPage.test.tsx
+++ b/src/pages/MarketingPage.test.tsx
@@ -88,26 +88,60 @@ describe('MarketingPage — homepage nav drift (T18 P1-2)', () => {
})
describe('MarketingPage — claim consistency (T18 P1-4 / P1-6)', () => {
- it("'Seven services' headline matches the MCP tools card (both say seven, listing webhook)", () => {
+ it('services headline + MCP tools card count match the rendered SERVICES cards (registry-derived, not hand-typed)', () => {
const { container } = render(