Skip to content

Commit 2969466

Browse files
committed
docs: name the two published pages this door's pins protect (#17672)
Comment-only, on the pin file. The docs-drift advisory on the PR surfaced two pages that bear on this diff, both re-read on the branch: - `content/docs/api/client-sdk.mdx` already documents `VALIDATION_ERROR` / 400 for "a repeated query parameter", so the door contradicted a published page for as long as it answered 404 — a stronger justification than the precedent alone, and nothing to edit there. - `content/docs/kernel/contracts/metadata-service.mdx` states that a missing id on this route answers `404 RESOURCE_NOT_FOUND` with the message `Package 'ID' not found`. Both halves are already asserted here; the comment names the page so the pin says what it protects. No release-owned page is touched. Claude-Session: https://claude.ai/code/session_01TSf4DV7ziu4V5j73e46b7c Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4f53078 commit 2969466

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

packages/runtime/src/domains/packages-get-version-scope.test.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,13 @@ describe('#17416 GET /packages/:id — ?version= scopes the read', () => {
171171
// ⛔ The id 404 is NOT re-worded by the version scope: a package that
172172
// is not here cannot be "at the wrong version".
173173
expect(r.response?.body?.error?.message).toBe(`Package 'com.absent.pkg' not found`);
174-
// [#17672] The second genuine not-found, pinned on its code too.
174+
// [#17672] The second genuine not-found, pinned on its code too —
175+
// and this pair is a PUBLISHED sentence, not only an internal one:
176+
// `content/docs/kernel/contracts/metadata-service.mdx`'s route table
177+
// says of `GET /api/v1/packages/:id` that «a missing id answers
178+
// `404 RESOURCE_NOT_FOUND`, message `Package 'ID' not found`». Both
179+
// halves are asserted here, so moving either turns this red instead
180+
// of silently falsifying that page.
175181
expect(r.response?.body?.error?.code).toBe('RESOURCE_NOT_FOUND');
176182
});
177183

@@ -235,7 +241,12 @@ describe('#17416 GET /packages/:id — ?version= scopes the read', () => {
235241
expect(r.status).toBe(400);
236242
// ADR-0112 NESTED body, and the standard catalog's member for 400 —
237243
// derived by `buildApiError` from the status, so nothing in
238-
// `packages/spec` moved for it.
244+
// `packages/spec` moved for it. It is also the answer a PUBLISHED
245+
// page already documented for this exact condition:
246+
// `content/docs/api/client-sdk.mdx`'s error table gives
247+
// `VALIDATION_ERROR` / 400 for «The request was refused before any
248+
// record was validated — a repeated query parameter, …». This door
249+
// contradicted that page for as long as it answered `404`.
239250
expect(r.body?.error?.code).toBe('VALIDATION_ERROR');
240251
expect(r.body?.error?.httpStatus).toBe(400);
241252
expect(r.body?.success).toBe(false);

0 commit comments

Comments
 (0)