From a4cef6cd213a6ee1e3fabd7d0e8cd1cbd575e235 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 17 Sep 2026 04:08:56 +0000 Subject: [PATCH] docs(spec): correct the stale `cloud/environment.zod.ts` attribution in the discovery-environment subset pin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pin test's docblock told a reader that `EnvironmentTypeSchema` is declared by `cloud/environment.zod.ts`, while the file's own import 28 lines below reads `./discovery.zod`. `packages/spec/src/cloud/` was removed when the `./cloud` subpath left `@objectstack/spec` (#16325, landed by #17372 / 776d64cd3d) and the enum was re-declared in `api/discovery.zod.ts:434`, where it lives today. Two residues of that move are corrected, both prose: - the declaration table row, now naming `api/discovery.zod.ts`, with one added sentence recording why both rows name one module — so the next reader does not read the repetition as a copy-paste slip; - the reverse cross-reference note, which named the two carrier FILES; it now names the two DECLARATIONS, which is what the sentence is actually about and what survives the next move. Re-derived rather than copied forward: both member lists are unchanged and correct (`production sandbox development` / those three plus `test staging preview trial`, `discovery.zod.ts:473` and `:434`), and the two folds the docblock cites (`staging` -> `sandbox`, `test` -> `development`) match `NODE_ENV_TO_DISCOVERY_ENVIRONMENT`. No assertion, message or schema is touched. Claude-Session: https://claude.ai/code/session_01JbZnqu8bt6YqfJsr9vaFb3 Co-authored-by: Claude --- .../src/api/discovery-environment-subset.pin.test.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/spec/src/api/discovery-environment-subset.pin.test.ts b/packages/spec/src/api/discovery-environment-subset.pin.test.ts index 57bd908df34..a221bc1c63d 100644 --- a/packages/spec/src/api/discovery-environment-subset.pin.test.ts +++ b/packages/spec/src/api/discovery-environment-subset.pin.test.ts @@ -9,7 +9,10 @@ * | declaration | members | * |:---|:---| * | `DiscoveryEnvironmentSchema` (`api/discovery.zod.ts`) | `production` `sandbox` `development` | - * | `EnvironmentTypeSchema` (`cloud/environment.zod.ts`) | those three + `test` `staging` `preview` `trial` | + * | `EnvironmentTypeSchema` (`api/discovery.zod.ts`) | those three + `test` `staging` `preview` `trial` | + * + * Both rows name one module on purpose: #16325 removed the `./cloud` subpath + * and `EnvironmentTypeSchema` moved here with its only open-source reader. * * Keeping both is the ruled outcome, not a defect: discovery answers the coarse * question ("am I talking to production?") on a machine-readable surface whose @@ -23,8 +26,9 @@ * nothing referenced one enum from the other, so a rename or a removal on the * seven-member side would leave the three-member side silently claiming a * membership it no longer has. The prose cross-references now run both ways - * (`discovery.zod.ts`'s `.describe()` since #4828; `environment.zod.ts`'s JSDoc - * since this pin) — and prose is unassertable, which is what this file is for. + * (`DiscoveryEnvironmentSchema`'s `.describe()` since #4828; + * `EnvironmentTypeSchema`'s JSDoc since this pin, carried through the move) — + * and prose is unassertable, which is what this file is for. * * ⛔ Scope: this pins the RELATION only. It deliberately does not pin either * enum's exact membership — `EnvironmentTypeSchema` is free to grow a new