From 2819c4b3dd9c157a6ceab53ffedb0fef1ff3d168 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 30 Jul 2026 02:39:24 +0000 Subject: [PATCH 1/2] docs(rest): correct the packages envelope suite's stale note on the code vocabulary (#3843 follow-up) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two sentences in this suite's header comment were written while #3841 was still undecided, and #3843 landed after ADR-0112 settled it. Both were left inaccurate: - "why #3841 still owns the vocabulary" — it does not; ADR-0112 (#3988) closed it and `ApiErrorSchema.code` is a closed union now. - "this module needed MINTED codes" — half true. It had nothing to carry over (its `error` strings were human messages), but only four of the codes here are registered; the three generic conditions reuse the standard catalog, which is what the ledger asks for and is the more useful thing to record. Rewritten to state the actual split and why it makes the assertions below load- bearing: an unregistered code fails parse, so `BaseResponseSchema.safeParse` is what would catch an invented one. Comment-only — no behaviour change. `package-routes.ts` already carried the corrected note; this is the test file that was missed alongside it. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01CYbS3kS8xzsHNXFTzp4e2z --- .../src/package-envelope.conformance.test.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/rest/src/package-envelope.conformance.test.ts b/packages/rest/src/package-envelope.conformance.test.ts index bd5ddb0d08..6f32b2e2fe 100644 --- a/packages/rest/src/package-envelope.conformance.test.ts +++ b/packages/rest/src/package-envelope.conformance.test.ts @@ -16,10 +16,18 @@ * res.status(400).json({ success: false, failed, cleanups }); * res.status(400).json({ success: false }); * - * i.e. a caller was told it failed and never told why. Those two are the reason - * this module needed MINTED codes rather than carried-over ones: there was - * nothing to carry. See `sendError`'s note in `package-routes.ts` for why the - * SCREAMING_SNAKE dialect was chosen and why #3841 still owns the vocabulary. + * i.e. a caller was told it failed and never told why. They are also why this + * module had no codes to carry over: its `error` strings were human messages, so + * every code here had to be chosen rather than re-spelled. + * + * ADR-0112 (#3841) settled the vocabulary, so the choice was not free. Generic + * conditions reuse the STANDARD catalog — `MISSING_REQUIRED_FIELD`, + * `RESOURCE_NOT_FOUND`, `INTERNAL_ERROR` — and only the package-specific outcomes + * are registered in `ERROR_CODE_LEDGER` (`PACKAGE_MANIFEST_INVALID`, + * `PACKAGE_PUBLISH_FAILED`, `PACKAGE_DELETE_PARTIAL`, `PACKAGE_DELETE_FAILED`); + * see `sendError`'s note in `package-routes.ts`. `ApiErrorSchema.code` is a closed + * union now, so an unregistered code fails parse — which is what makes the + * `BaseResponseSchema.safeParse` assertions below catch an invented one. * * The three bodies that already had the flag kept their payload as SIBLINGS of * it (`{ success: true, message, package }`); the assertions below pin that they From a9b4b9c72559774dc4c50a042c1da59c5803096f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 30 Jul 2026 02:42:37 +0000 Subject: [PATCH 2/2] chore(changeset): add the empty changeset the PR gate asks for (#4009) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `Check Changeset` fails any PR that adds no changeset. I had reasoned that a comment-only diff needs none — but the gate's own error message states the right escape hatch: "an empty changeset is fine for changes that release nothing". So this is empty frontmatter, not a patch bump: giving @objectstack/rest a version bump for a corrected doc comment would put a line in the CHANGELOG that consumers cannot act on. There are already several precedents in .changeset for exactly this shape (adr-0104-design-doc-only.md, adr-0110-draft-only.md, …). Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01CYbS3kS8xzsHNXFTzp4e2z --- .changeset/packages-envelope-suite-comment.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .changeset/packages-envelope-suite-comment.md diff --git a/.changeset/packages-envelope-suite-comment.md b/.changeset/packages-envelope-suite-comment.md new file mode 100644 index 0000000000..5e667e5448 --- /dev/null +++ b/.changeset/packages-envelope-suite-comment.md @@ -0,0 +1,14 @@ +--- +--- + +Comment-only correction in `packages/rest/src/package-envelope.conformance.test.ts` +(#3843 follow-up). Deliberately empty frontmatter: this releases nothing. + +Two sentences in that suite's header were written while #3841 was still undecided — +"why #3841 still owns the vocabulary" (ADR-0112 has since closed it) and "this +module needed MINTED codes" (true only of the four registered ones; the three +generic conditions reuse the standard catalog). `package-routes.ts` already carried +the corrected note; this was the test file missed beside it. + +No published behaviour, type, or wire shape changes, so there is nothing for a +consumer to read in a CHANGELOG.