Skip to content

Commit a2be2ff

Browse files
committed
docs(client): packages.list says the manifest index signature is the accepted static contract
The packages.list TSDoc called the type/runtime asymmetry a known gap tracked on an open card and cited a stale stack.zod.ts line. The card was ruled the other way: the index signature on the record-stage body is the accepted static contract, the runtime Zod schema is the enforced one, and the A2 form is recorded beside RecordStagePackageBodySchema for the day the schema depth allows it. The paragraph now says so and cites the schema by name. Comment text only. Claude-Session: https://claude.ai/code/session_01QcAS3qiYYZNezaxZxaUdMV Co-authored-by: Claude <noreply@anthropic.com>
1 parent 17f1e3d commit a2be2ff

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

‎packages/client/src/index.ts‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,14 +2513,19 @@ export class ObjectStackClient {
25132513
* as either stage, which is the right answer for it — the key such a guess
25142514
* would read is not there.)
25152515
*
2516-
* ⚠️ The RUNTIME half is the strict one, and the asymmetry is a KNOWN GAP
2517-
* rather than a design: `InstalledPackageAtEitherStageSchema.safeParse()`
2518-
* refuses a `manifest` belonging to neither stage, while that same row
2519-
* COMPILES against this declaration. Tracked as #19324, whose root cause is
2520-
* the deliberate `z.ZodType<Record<string, unknown>, …>` annotation at
2521-
* `packages/spec/src/stack.zod.ts:1283` (#14513 — TS7056 and a
2522-
* declaration-chunk ceiling); ⛔ not something this declaration can fix, and
2523-
* ⛔ not a licence to relax either runtime branch to match the type.
2516+
* ⚠️ The RUNTIME half is the strict one, and the asymmetry is the ACCEPTED
2517+
* static contract, not a gap waiting to close:
2518+
* `InstalledPackageAtEitherStageSchema.safeParse()` refuses a `manifest`
2519+
* belonging to neither stage, while that same row COMPILES against this
2520+
* declaration. The index signature comes from the deliberate
2521+
* `z.ZodType<Record<string, unknown>, …>` annotation on
2522+
* `RecordStagePackageBodySchema` in `@objectstack/spec` (the #14513 pattern —
2523+
* TS7056 and a declaration-chunk ceiling), and the maintainer ruled on
2524+
* #19324 (letter 丙) to keep it: the runtime Zod schema is the enforced
2525+
* contract, so narrow by parsing, as above. The precise form, A2, is
2526+
* recorded beside `RecordStagePackageBodySchema` for the day the schema
2527+
* depth allows it. ⛔ Not something this declaration can fix, and ⛔ not a
2528+
* licence to relax either runtime branch to match the type.
25242529
*/
25252530
list: async (filters?: { status?: string; type?: string; enabled?: boolean }): Promise<{ packages: InstalledPackageAtEitherStage[]; total: number }> => {
25262531
const route = this.getRoute('packages');

0 commit comments

Comments
 (0)