Skip to content

Commit a4cef6c

Browse files
committed
docs(spec): correct the stale cloud/environment.zod.ts attribution in the discovery-environment subset pin
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 / 776d64c) 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 <noreply@anthropic.com>
1 parent 5ed7ad9 commit a4cef6c

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎packages/spec/src/api/discovery-environment-subset.pin.test.ts‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
* | declaration | members |
1010
* |:---|:---|
1111
* | `DiscoveryEnvironmentSchema` (`api/discovery.zod.ts`) | `production` `sandbox` `development` |
12-
* | `EnvironmentTypeSchema` (`cloud/environment.zod.ts`) | those three + `test` `staging` `preview` `trial` |
12+
* | `EnvironmentTypeSchema` (`api/discovery.zod.ts`) | those three + `test` `staging` `preview` `trial` |
13+
*
14+
* Both rows name one module on purpose: #16325 removed the `./cloud` subpath
15+
* and `EnvironmentTypeSchema` moved here with its only open-source reader.
1316
*
1417
* Keeping both is the ruled outcome, not a defect: discovery answers the coarse
1518
* question ("am I talking to production?") on a machine-readable surface whose
@@ -23,8 +26,9 @@
2326
* nothing referenced one enum from the other, so a rename or a removal on the
2427
* seven-member side would leave the three-member side silently claiming a
2528
* membership it no longer has. The prose cross-references now run both ways
26-
* (`discovery.zod.ts`'s `.describe()` since #4828; `environment.zod.ts`'s JSDoc
27-
* since this pin) — and prose is unassertable, which is what this file is for.
29+
* (`DiscoveryEnvironmentSchema`'s `.describe()` since #4828;
30+
* `EnvironmentTypeSchema`'s JSDoc since this pin, carried through the move) —
31+
* and prose is unassertable, which is what this file is for.
2832
*
2933
* ⛔ Scope: this pins the RELATION only. It deliberately does not pin either
3034
* enum's exact membership — `EnvironmentTypeSchema` is free to grow a new

0 commit comments

Comments
 (0)