Repository navigation
Commit ff48407
fix(spec): in-system copy says "this system" or drops the noun, not "this environment" (cloud#3002 ruling A) (#24454)
Fixes #24406
Clause-②: no
## What this does
Published copy in `packages/spec` called the running system "this
environment". objectstack-ai/cloud#3002 ruling A, as the card quotes it,
reads each string by its sense:
- a set "made here, not from a package" reads "authored in this system";
- "the system the caller is in" drops the noun, or says "this system";
- a string that means a deployment or configuration scope keeps its
word.
This PR reads every non-test `this environment` hit in
`packages/spec/src`: `git grep -c` answers 15 on `origin/main`
`538f923cb9`, the card's sites plus the addendum's TSDoc. 11 change and
4 keep the word, each with its reason in the table. The spelling matches
what the `services` PR (#24407) and the `cloud-connection` / `mcp` PR
(#24413) landed.
Wording only. No refusal `code`, status, kind, issue path, accept set or
export moves.
## Per-string reading
All sites are under `packages/spec/src/`. Line numbers are on
`538f923cb9`; no line moves.
| site | before | after, or kept: reason |
|:--|:--|:--|
| `security/permission-set-owner-binding.ts:127`, the `packageId`
refusal on the save, restore and publish doors | "a set written into no
package is authored in this environment, which an absent `packageId`
states" | "… is authored in this system, …" (made here) |
| `security/permission.form.ts:52`, Setup help text for `packageId` |
"Leave empty for a set created in this environment." | "Leave empty for
a set authored in this system." (made here) |
| `security/permission.zod.ts:680`, the `permission.managedBy` tombstone
prescription | "and a set created in this environment carries neither."
| "and a set authored in this system carries neither." (made here) |
|
`migrations/entries/semantic/18.permission-set-managed-by-retired.ts:18`,
upgrade-guide `replacement` | "a set created in this environment carries
neither." | "a set authored in this system carries neither." (made here;
the same sentence as the tombstone) |
| `system/auth-config.zod.ts:345`, TSDoc of `AudienceConfigSchema` |
"who may become a user of an app built on this environment" | "… an app
built on this system" (the system the reader is in) |
| `system/auth-config.zod.ts:401`, TSDoc of `posture` | "Who may become
a user of this environment's apps:" | "Who may become a user of this
system's apps:" (the sentence #24407 gave Setup's Authentication group)
|
| `system/auth-config.zod.ts:417`, describe of `posture` | "Who may
self-register into this environment: invite_only …" | "Who may
self-register: invite_only …" (noun dropped, as plugin-auth's
self-registration refusals now read) |
| `system/auth-config.zod.ts:581`, TSDoc of `audience` | "who may become
a user of this environment's apps" | "who may become a user of this
system's apps" |
| `system/auth-config.zod.ts:601`, describe of `audience` | "Audience
posture: who may self-register into this environment (…)" | "Audience
posture: who may self-register (…)" (noun dropped) |
| `api/protocol.zod.ts:3373`, describe of `AiModelsResponse.models` |
"Models this environment offers" | "Models this system offers" (the
system the caller asks; it also holds for the adapter `listModels()`
fallback shape, which has no plan behind it) |
| `contracts/metadata-service.ts:393`, TSDoc of
`IMetadataService.listDiagnosed` | a consumer that renders "this
environment contains N items" | "this system contains N items" (a
rendering inside the running system) |
| `data/seed-loader.zod.ts:265`, TSDoc of `env` | "Only datasets
matching this environment are loaded." | kept: names the deployment
tier. `env` is the `prod`, `dev` or `test` enum, resolved from
`config.env` or `NODE_ENV` (`metadata-protocol`
`SeedLoader.resolveEnvConfig`) |
| `data/seed-loader.zod.ts:269`, describe of `env` | "Only load datasets
matching this environment" | kept: the same key and the same deployment
tier |
|
`migrations/entries/semantic/18.package-uninstall-environment-wide.ts:21`,
upgrade-guide `replacement` | "the uninstall removes every row bound to
the package in this environment" | kept: names the ADR-0131 D6
environment-wide scope, against the organization scope the retired
`organizationId` / `allTenants` keys named. The entry id and its
`acceptanceCriteria` say "environment-wide", and so does the runtime's
own remedy for a write sent with an organization |
| `system/environment-artifact.zod.ts:155`, TSDoc of the consent-record
key | "no consent record exists for this environment" | kept: the
environment artifact is the per-deployment envelope the control plane
assembles, and the consent record it carries is per deployment |
## Generated outputs, by their generators only
-
`content/docs/references/{api/protocol,security/permission,system/auth-config}.mdx`
come from `pnpm --filter @objectstack/spec gen:docs`, after
`check:generated` named `check:docs` as the one stale artifact (1 of
14).
-
`packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts`
comes from `node scripts/check-i18n-bundles.mjs --write`, after `pnpm
check:i18n` reported `platform-objects DRIFTED (1)`. One line moves, the
`packageId` help text. The `zh-CN`, `ja-JP` and `es-ES` bundles are
untouched, and no key is added or dropped. No
`packages/platform-objects` source file is edited.
## Tests and pins
No test in the repository pins any of the old sentences: `git grep -F`
over the tree finds each only in its source, the generated pages and
released changelogs. The tombstone test
`permission-set-managed-by-retirement.test.ts` pins the prescription
with a regex whose `.*` spans the changed clause, so no pin needed
re-truing.
## Changeset
`.changeset/24406-spec-this-system-copy.md` is a `patch` for
`@objectstack/spec` and `@objectstack/platform-objects`. Both publish:
neither sets `private`, and `src/**/*.zod.ts`, `dist` and the generated
bundle ship.
## Verification
Every reading below is at HEAD `9fcf38b94b`, the final commit, on base
`538f923cb9`. Each exit code was captured before any pipe.
- `pnpm --filter @objectstack/spec build`, through
`scripts/pm/os-verify-lock.sh`: `VERDICT command-exit 0`.
- `pnpm --filter @objectstack/spec check:generated`: "✓ All 14 generated
artifacts are up to date". Before `gen:docs` it read "✗ 1 of 14
artifact(s) stale: content/docs/references/**".
- `pnpm --filter @objectstack/spec test`: `Test Files 697 passed (697)`,
`Tests 21267 passed | 1 todo (21268)`, exit 0.
- `pnpm --filter @objectstack/spec typecheck`: exit 0.
- `pnpm --filter @objectstack/platform-objects test`: `Test Files 77
passed (77)`, `Tests 1184 passed (1184)`, exit 0.
- `pnpm --filter @objectstack/platform-objects typecheck`: exit 0, with
"check:test-typecheck: OK". This was taken after `formula`, `lint` and
`core` were rebuilt with declarations.
- `pnpm check:i18n`: before the regeneration, exit 1 with
"platform-objects DRIFTED (1)". After it, exit 0 with "OK (10 package(s)
— all bundles in sync, no undeclared authoring keys)".
- The derived gate families come from `node
scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`: 109 for this diff. The `--ran`
reconciliation answers "109 derived famil(ies) accounted for — 107 run,
2 NOT-MEASURED (2 DERIVED from a recorded exit 3)". 106 exited 0.
- NOT MEASURED: `check:skill-examples` and `check:dual-build-cjs-loads`
exited 3 (PREREQUISITE NOT MET). They read the declarations or built
output of packages outside this diff's build closure, such as
`client-react` and `studio`. CI's required jobs run them on a full
build.
- `check:dts-closure` exited 1, naming 53 packages with no `.d.ts`.
Every one of them is a package this worktree built JS-only
(`OS_SKIP_DTS=1`) so the i18n generator's CLI could run, so the reading
describes the local tree, not this diff. CI measures it on its own full
build.
- No ablation and no reverse verification: the diff changes copy only,
and no test pins the old sentences.
## Acceptance notes
These were read and are not this card's to move, being outside the
census or outside this lane. Carrier for each: none.
- `packages/client/src/index.ts:6702`, the TSDoc of `ai.models()`, and
`content/docs/api/plugin-endpoints.mdx:112`, a hand-written page listed
in `scripts/docs-audit/handwritten-docs.json`, still say "Models this
environment offers". They mirror the describe this PR moves.
- `packages/metadata/src/metadata-manager.ts:1024` carries the same
"this environment contains N items" rationale as the `IMetadataService`
TSDoc, in a comment.
- `security/permission-set-owner-binding.ts:103`, on the build and
register doors, says "environment-authored". It is outside the literal
census, and "environment-authored" is the documented name for that class
of metadata (`content/docs/permissions/*.mdx`,
`content/docs/deployment/install-modes.mdx`). So it keeps its word, as
"the environment catalog" did in the sibling PRs.
- `api/protocol.zod.ts:3359` ("the environment's plan-filtered picker
list") and `:3371` ("Whether this is the environment default") are
outside the literal census. They name the deployment's plan-scoped
allowlist and its configured default. `:3359` cites `ADR-0028`, which in
this registry is the metadata-naming ADR, not a model allowlist. The
record it means is probably a cloud one, which AGENTS.md cites as `cloud
ADR-NNNN`.
- The released `CHANGELOG.md` entries and consumed `.changeset/pre/*`
files keep the old sentences. They are release-owned.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WnW7HvfnfHbLg1fpkHX3Mu)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent ec951e2 commit ff48407
12 files changed
Lines changed: 34 additions & 17 deletions
File tree
- .changeset
- content/docs/references
- api
- security
- system
- packages
- platform-objects/src/apps/translations
- spec/src
- api
- contracts
- migrations/entries/semantic
- security
- system
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2334 | 2334 | | |
2335 | 2335 | | |
2336 | 2336 | | |
2337 | | - | |
| 2337 | + | |
2338 | 2338 | | |
2339 | 2339 | | |
2340 | 2340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3370 | 3370 | | |
3371 | 3371 | | |
3372 | 3372 | | |
3373 | | - | |
| 3373 | + | |
3374 | 3374 | | |
3375 | 3375 | | |
3376 | 3376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
0 commit comments