From cff19151befc3536f2e650bca0c92de99d94166d Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 17 Aug 2026 11:16:05 +0200 Subject: [PATCH] chore(drive): record the pinned deployment-logs HTTP contract The platform endpoint shipped (prisma/pdp-control-plane#4886): plain GET returns one NDJSON page ending in a terminal record with a resume cursor. Updates the S8 deferred entry so the service-logs follow-up slice can start from the pinned contract. Signed-off-by: willbot Signed-off-by: Will Madden --- .drive/projects/prisma-cli-v8/deferred.md | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.drive/projects/prisma-cli-v8/deferred.md b/.drive/projects/prisma-cli-v8/deferred.md index f192994f..cfe5ec8f 100644 --- a/.drive/projects/prisma-cli-v8/deferred.md +++ b/.drive/projects/prisma-cli-v8/deferred.md @@ -317,6 +317,32 @@ CLI does not do, and each restarts as engine work if wanted: plan raised dissolved on investigation: `composer log` attaches to the local dev daemon's streams, a `service deployment logs` would read the platform endpoint — different data, no shared subgroup. + + **UNBLOCKED (2026-08-17): the platform endpoint is merged and the + contract is pinned** (prisma/pdp-control-plane#4886). Shape, as + agreed under R-S8-5 and refined by the operator: + - `GET /v1/deployments/{deploymentId}/logs` on the management API, + normal Authorization header, addressable through the generated + `@prisma/management-api-sdk` after the next management-api + production deploy (the SDK regenerates on deploy). + - A plain GET is a **finite page read**, not a held-open stream: the + server drains the requested window and closes. Response is + `application/x-ndjson`, one record per line, record shapes exactly + as the old WebSocket contract: `type: "log"` + (`text`/`byteStart`/`byteEnd`) and `type: "terminal"`. The last + line is always a terminal; on the caught-up case it is + `kind: "end"`, `code: "end"`, `retryable: true`, with `cursor` as + the next page's starting point. + - Query params: `tail=N` (last N lines for a first page, default + 100), `from_start=true`, `cursor=` to continue a + chain. Page again from each terminal's `cursor`. + - There is no `follow` param on HTTP; the same path with an + `Upgrade: websocket` header is the live tail, which stays the + shelved engine-transport question. The `build logs` consumer shape + (`parseAs: "stream"`, read lines until the terminal record) works + unchanged for one page; "follow" behavior, if wanted now, is a + page loop on `cursor` with a client-side delay. + The command can come off the shelf once the deploy lands. - **The e2e suite should assert the real service-id prefix.** D2 wrote `e2e/service.e2e.ts` without credentials to run it, so it asserts only that `service create` reports a non-empty id. The sibling suites assert