Repository navigation
Commit 44a5011
fix(services): in-system copy says "this system" or drops the noun, not "this environment" (cloud#3002 ruling A) (#24407)
Fixes #24368
Clause-②: no
Basis: copy only. Every HTTP status, error code, settings key and
response shape stays as it was. Only the human-readable text moves.
## What changed
This PR covers the `domain:services` part of the census on the card:
`plugin-auth`, `plugin-security` and `service-settings`. Each string
follows the rule in triage `6252585695`, the one `6250167038` set out
for objectstack-ai/cloud#3002 ruling A. "Made here, not from a package"
becomes "authored in this system". "The system the caller is in" drops
the noun, or says "this system" when the noun is the subject of the
sentence. A deployment or configuration scope keeps its word. The other
lanes went to #24404 (`cloud-connection`, `mcp`), #24405
(`platform-objects`) and #24406 (`packages/spec`). This PR does not
touch them.
Lines are on `3777e26dc`. They are the same lines as on `d79dc4883`,
because every edit replaces one line with one line.
### The strings the claim lists
| # | Site | Before | After | Sense, and the reading it gets |
|:--|:--|:--|:--|:--|
| 1 | `plugin-auth/src/audience-posture.ts:476`,
`SELF_REGISTRATION_CLOSED` (sign-up refusal) | "Self-registration is
closed on this environment (audience posture invite_only). …" |
"Self-registration is closed (audience posture invite_only). …" | The
system the caller is in. The noun is dropped. |
| 2 | `audience-posture.ts:487`, `EMAIL_DOMAIN_NOT_ALLOWED` |
"Self-registration on this environment is limited to approved email
domains, …" | "Self-registration is limited to approved email domains,
…" | The same. The noun is dropped. |
| 3 | `auth-manager.ts:2527`, `403 ENV_ACCESS_DENIED` (the
`/oauth2/authorize` gate) | "You are not authorized to sign in to this
environment." | **kept** | A deployment addressed from outside. See
"Kept, and why" below. |
| 4 | `auth-plugin.ts:3505`, OAuth self-service `503
SERVICE_UNAVAILABLE` | "OIDC provider is not enabled on this
environment" | "OIDC provider is not enabled" | The system the caller is
in. The noun is dropped, as in the runtime's "MCP server is not
enabled". |
| 5 | `last-admin-guard.ts:893`, maxScan overflow refusal | "… or raise
the guard's maxScan if this environment really is that large." | "… if
this system really is that large." | The system the caller is in. The
noun is the subject, so it reads "this system". |
| 6 | `last-admin-guard.ts:1278`, the walled-posture remedy appended to
both emptiness refusals | "… will NOT give this environment an
administrator. …" | "… will NOT give this system an administrator. …" |
In-system, so "this system". The same clause opens "This deployment runs
a WALLED tenancy posture". That noun is a configuration scope and keeps
its word. |
| 7 | `last-admin-guard.ts:1304`, refusal when `admin_full_access` is
switched off | "Refusing this …: this environment recognises NO
administrator because its …" | "… this system recognises NO
administrator because its …" | In-system, so "this system". |
| 8 | `last-admin-guard.ts:1354`, refusal for dangling grants |
"Refusing this …: this environment recognises NO administrator, and this
is not …" | "… this system recognises NO administrator, and this is not
…" | In-system, so "this system". |
| 9 | `last-admin-guard.ts:1510`, a `logger.warn` line (the user-row
halves) | "[LastAdminGuard] refused a … that would have left this
environment with no unbanned administrator (target: …)" | "… left this
system with no unbanned administrator (target: …)" | A log line,
changed. An operator reads it, but its noun means the system's
administrator population, the same thing the refusal thrown next to it
tells the caller. It is not a deployment or configuration scope, and
triage counted it in the in-system set. So it follows the refusal, and
says "this system" so the two lines read alike. |
| 10 | `register-sso-provider.ts:385`, `400
DOMAIN_VERIFICATION_DISABLED` | "Domain verification is not enabled for
this environment (set OS_SSO_DOMAIN_VERIFICATION)." | "Domain
verification is not enabled (set OS_SSO_DOMAIN_VERIFICATION)." | The
system the caller is in. The noun is dropped, as the runtime half did
for the switched-off MCP 404. The switch stays named. |
| 11 | `plugin-security/src/packaged-permission-set-lock.ts:337`–`:338`,
`PackagedPermissionSetLockedError` diagnostic `message` (`403
NOT_OVERRIDABLE`) | "… is declared by package '…' and is locked in this
environment — editing it here would silently fork it …" | "… is declared
by package '…' and is locked — editing it here would silently fork it …"
| In-system. The noun is dropped, because the "here" that follows
already says where. `userMessage` is unchanged. |
| 12 | `packaged-permission-set-lock.ts:363`,
`PackagedPermissionSetProvenanceUnknownError` diagnostic `message` | "…
cannot be saved right now: this environment could not determine whether
…" | "… this system could not determine whether …" | The noun is the
subject, so it reads "this system". Its `userMessage` already says "the
system couldn't confirm". |
| 13 | `service-settings/src/manifests/auth.manifest.ts:92`,
Authentication › Audience group help | "Who may become a user of this
environment's apps. …" | "Who may become a user of this system's apps.
…" | In-system: an admin reads this in Setup. Later in the same text,
"unless the deployment turns it off" names the configuration scope and
keeps its word. |
| 14 | `manifests/mail.manifest.ts:58`, Mail › Provider group help |
"Choose how this environment sends outbound email." | "Choose how this
system sends outbound email." | In-system, so "this system". |
| 15 | `manifests/sms.manifest.ts:22`, SMS › Provider group help |
"Choose how this environment sends outbound SMS." | "Choose how this
system sends outbound SMS." | In-system, so "this system". |
| 16 | `translations/en.ts:27`,
`settings.mail.groups.provider.description` | as row 14 | as row 14 |
The bundle copy of row 14. |
| 17 | `translations/en.ts:139`,
`settings.auth.groups.audience.description` | as row 13 | as row 13 |
The bundle copy of row 13. |
### Three strings the census missed, read and changed in place
The census grepped one line at a time. These three split the phrase
across a string concatenation (`… this ` + `environment …`), so it never
saw them. A multiline search found them in the same file and in the same
functions as rows 9 and 7–8. I changed them under os-dev's bounded
in-place rule, because all four of its conditions hold: they are the
same defect class, the fix is mechanical and the rule above fixes its
shape, the claim already names this file, and the same gates verify
them. In the two refusals, "administer the environment" in the same
sentence follows too, so neither sentence names the system twice in two
ways.
| # | Site | Before | After |
|:--|:--|:--|:--|
| 18 | `last-admin-guard.ts:1516`–`:1519`, the user-row refusal thrown
right after row 9's warning | "… that is the last administrator this
environment has that is not already banned, … would leave nobody able to
administer the environment or restore anyone's access …" | "… this
system has … administer the system or restore anyone's access …" |
| 19 | `last-admin-guard.ts:1612`–`:1613`, a `logger.warn` line (the
standing halves), the twin of row 9 | "… that would have left this
environment with no unbanned administrator (losing: …)" | "… left this
system with no unbanned administrator (losing: …)" |
| 20 | `last-admin-guard.ts:1619`–`:1624`, the standing refusal | "… who
is the last administrator this environment has that is not already
banned. … nobody would be able to administer the environment …" | "…
this system has … administer the system …" |
### The other locales of rows 13–15
`zh-CN`, `ja-JP` and `es-ES` carry the same three keys. The only change
is the noun, which now uses the spellings the console's locale packs
already use under the same ruling (objectstack-ai/objectui PR 12959 and
PR 12962: zh 本系统, ja このシステム, es este sistema). No other word in those
translations changed.
| Key | zh-CN | ja-JP | es-ES |
|:--|:--|:--|:--|
| `settings.mail.groups.provider.description` | 选择此环境如何发送邮件。 →
选择本系统如何发送邮件。 | この環境の送信方法を選択します。 → このシステムの送信方法を選択します。 | … correo saliente
este entorno. → … correo saliente este sistema. |
| `settings.sms.groups.provider.description` | 选择此环境如何发送外发短信。 →
选择本系统如何发送外发短信。 | この環境が送信 SMS を… → このシステムが送信 SMS を… | Elige cómo envía
este entorno los SMS salientes. → … este sistema … |
| `settings.auth.groups.audience.description` (first sentence) |
谁可以成为本环境应用的用户。 → 谁可以成为本系统应用的用户。 | この環境のアプリの… → このシステムのアプリの… | … de las
aplicaciones de este entorno. → … de este sistema. |
`en.ts` has no `settings.sms` namespace. In English, the SMS help comes
from the manifest literal (row 15). This PR does not add the key.
## Kept, and why
- **`auth-manager.ts:2527`** (row 3). This refusal exists only where the
host sets `oidcAuthorizeGate`. The option's contract
(`auth-manager.ts:726`–`:735`) calls it the "OIDC OP authorization gate
(cloud-as-IdP app-assignment)". The cloud control plane uses it so that
"a cloud user may only obtain a code for an env client … of an org they
belong to". It also says: "Unset (open editions / self-host …) = allow".
Nothing in this repository sets the option. Only
`oidc-authorize-env-gate.dogfood.test.ts` installs one, as a fixture. So
the text is shown by the cloud, acting as OIDC provider, to a cloud user
who is already signed in, and its noun names the environment that user
asked to sign in to. That is the deployment addressed from outside,
where triage keeps the cloud noun (its reason for `cli`). "This system"
would tell that user they may not sign in to the cloud itself. Dropping
the noun would tell an already signed-in user they may not sign in. The
census counted this string in-system from a code reading, so I report
the different reading here and in the report rather than choosing
silently.
- `last-admin-guard.ts:1300` and `:1350`: two `logger.warn` lines,
"refused a … in an environment whose …" and "… in an environment with no
administrator that is NOT a fresh install". They use an indefinite "an
environment" to describe a state, not "this environment". They are not
in the census and not in this card's phrase. Noted only.
- Source comments: every `*` / `//` hit of the phrase in the three
packages.
- `plugin-security/src/__tests__/legacy-catalog-objects.testkit.ts:366`:
a test fixture that freezes a retired object's field description.
- Release-owned history: `plugin-auth/CHANGELOG.md` (`:610`, `:14237`);
`.changeset/pre/22463-sso-domain-verification-unknown-provider.md:9`,
which quotes the old 400 as its "Before"; and
`content/docs/releases/v17/17-3.mdx` (`:18`, `:183`, concept prose "an
environment's apps").
- The other environment nouns in the `service-settings` locales are
configuration scope and keep their words: the env-var source label,
"deploy env vars take precedence", "production environment", "regulated
environments", the per-environment storage prefix.
## Readers of the changed strings, measured
`git grep` over the whole tree (packages, docs, `docs/qa`,
`content/docs`, skills, examples, `.changeset`) for each string's
fragments, plus the sibling objectui checkout at `2ec9e2a`:
- Tests pin only substrings that survive the change: `/recognises NO
administrator/` (`last-admin-guard.test.ts:1979`, `:2098`), `/last
administrators?/i` in 46 `toThrow` / `toMatch` assertions across the
`last-admin-guard*` and `grant-readers-*` suites, `'Self-registration is
closed'` (`audience-posture.test.ts:606`, and a not-contain at
`audience-bootstrap-seam.test.ts:185`), and the lock errors' class plus
the set name, package id and reason in `message`
(`packaged-permission-set-lock.test.ts:229`–`:272`). No test pins the
changed noun, so no pin moved and no new prose was copied into a test.
- `oidc-authorize-env-gate.dogfood.test.ts:271` pins the code
`ENV_ACCESS_DENIED`. That string is kept anyway.
- No consumer parses the text. The console maps sign-up refusals by
`code` (objectui `signUpRefusalMessages.ts`), and it reads Settings help
from the shipped bundles.
- No `docs/qa/platform-checklist` item, doc page or skill quotes any of
these strings.
## Mechanism hypotheses from the dispatch, measured
- **Line positions on `d79dc4883`: confirmed.** All 17 listed sites sit
at the lines the claim gives.
- **The re-grep reconciliation:** the one-line grep finds 16 of the 17
listed sites and nothing else. The 17th,
`packaged-permission-set-lock.ts:337`–`:338`, splits the phrase across
two lines, and the census listed it as a range. The multiline search for
a split phrase finds that one and three more strings, rows 18–20, which
the list missed. After this PR, the only non-comment, non-test hit of
`this environment` in the three packages is row 3, and the split-phrase
search finds none.
- **"Move the other locales with `check:i18n` /
`check:i18n-stale-fill`": falsified.** Both gates walk the generated
`*.generated.ts` bundle sets that `i18n-extract.config.ts` configs
produce. `service-settings` has no extract config, and its four locale
files are hand-written. At `3777e26dc`, `check:i18n` reports "OK (10
package(s) …)" and `check:i18n-stale-fill` reports "scanned 11 bundle
set(s)". Neither log names `service-settings`. So no repo tool moves
these values. The route the ruling intends is the noun swap above, in
the ruling's own per-locale spellings, not a new translation. Its
coverage guard, `settings-translation-coverage.test.ts`, checks presence
only and stays green.
## Verification (head `3777e26dc`, on `d79dc4883`; `origin/main` had not
moved)
All builds and tests ran through `scripts/pm/os-verify-lock.sh`.
- `turbo run build --filter=!@objectstack/docs --concurrency=2`: "Tasks:
76 successful, 76 total" (3 cached). `VERDICT command-exit 0`.
- `@objectstack/plugin-auth`: `vitest run --maxWorkers=2` reported "Test
Files 163 passed (163) · Tests 3145 passed | 10 skipped (3155)".
`typecheck` exited 0 (tsc, the examples project, and
`check:test-typecheck`: "10 file(s) / 88 error(s) / 23 pinned
signature(s) held").
- `@objectstack/plugin-security`: reported "Test Files 187 passed (187)
· Tests 3738 passed | 45 skipped (3783)". `typecheck` exited 0 (tsc, the
scripts project, and `check:test-typecheck`: "0 file(s) / 0 error(s)").
- `@objectstack/service-settings`: reported "Test Files 51 passed (51) ·
Tests 881 passed (881)". `typecheck` (`tsc --noEmit`) exited 0.
- Gates: `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` (no paths) derived 67 commands from the 13
changed paths. All 67 ran after the final commit, each exit code
captured before any pipe, and all 67 exited 0. `--ran`: "Run
reconciliation — 67 derived, 67 run, 0 NOT-MEASURED, 0 UNRUN." Selected
verdict lines: `check:doc-authoring` "19057 customer-facing string(s) …
clean"; `check:nul-bytes` "OK (scanned 12249 text file(s) …)";
`check-empty-changeset` "1 declaring changeset(s) added";
`check-adr-0087-registration` "this PR adds no declared-breaking
changeset"; `check:dual-build-cjs-loads` "111 … 69 …" entries/packages,
over its floors.
- `pnpm exec eslint --no-inline-config` over the 12 changed `.ts` files:
exit 0, no output.
- No ablation. The change is copy, and no test pins the changed noun.
- `.changeset/24368-services-this-system-copy.md`: `patch` on
`@objectstack/plugin-auth`, `@objectstack/plugin-security` and
`@objectstack/service-settings`, all three published (`files: dist,
README.md, CHANGELOG.md`). It starts with `Clause-②: no`.
## Acceptance notes
- Sibling lanes that carry the same sentence:
`packages/spec/src/system/auth-config.zod.ts:401` has the audience
sentence ("Who may become a user of this environment's apps") as a TSDoc
comment. It is a comment, so the census left it out, and it sits in
#24406's lane. If #24406 reaches it, the two should read alike.
- objectstack-ai/objectui, for `repo:objectui`, at `2ec9e2a`:
`apps/console/src/pages/auth/__tests__/registerRefusalCodes-10998.test.tsx:47`–`:54`
and
`packages/app-shell/src/console/auth/__tests__/registerRefusalCodes-11030.test.tsx:47`–`:56`
restate rows 1–2's old server message "as the audience gate sends it",
as a fake-server fixture. They do not parse it and stay green. Once this
lands, the fixture is out of date, not broken.
- Row 3 is the one string this PR reads differently from the census. If
the seat rules it in-system after all, the change is one line,
`auth-manager.ts:2527`, and no test reads its prose.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Nk17Z26X5DB59iQztDBADH)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 31e7d0b commit 44a5011
13 files changed
Lines changed: 60 additions & 31 deletions
File tree
- .changeset
- packages
- plugins
- plugin-auth/src
- plugin-security/src
- services/service-settings/src
- manifests
- translations
| 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 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
| 476 | + | |
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
| 487 | + | |
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3502 | 3502 | | |
3503 | 3503 | | |
3504 | 3504 | | |
3505 | | - | |
| 3505 | + | |
3506 | 3506 | | |
3507 | 3507 | | |
3508 | 3508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
893 | | - | |
| 893 | + | |
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
| |||
1275 | 1275 | | |
1276 | 1276 | | |
1277 | 1277 | | |
1278 | | - | |
| 1278 | + | |
1279 | 1279 | | |
1280 | 1280 | | |
1281 | 1281 | | |
| |||
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
1304 | | - | |
| 1304 | + | |
1305 | 1305 | | |
1306 | 1306 | | |
1307 | 1307 | | |
| |||
1351 | 1351 | | |
1352 | 1352 | | |
1353 | 1353 | | |
1354 | | - | |
| 1354 | + | |
1355 | 1355 | | |
1356 | 1356 | | |
1357 | 1357 | | |
| |||
1507 | 1507 | | |
1508 | 1508 | | |
1509 | 1509 | | |
1510 | | - | |
| 1510 | + | |
1511 | 1511 | | |
1512 | 1512 | | |
1513 | 1513 | | |
1514 | 1514 | | |
1515 | 1515 | | |
1516 | 1516 | | |
1517 | | - | |
| 1517 | + | |
1518 | 1518 | | |
1519 | | - | |
| 1519 | + | |
1520 | 1520 | | |
1521 | 1521 | | |
1522 | 1522 | | |
| |||
1610 | 1610 | | |
1611 | 1611 | | |
1612 | 1612 | | |
1613 | | - | |
| 1613 | + | |
1614 | 1614 | | |
1615 | 1615 | | |
1616 | 1616 | | |
1617 | 1617 | | |
1618 | 1618 | | |
1619 | 1619 | | |
1620 | | - | |
| 1620 | + | |
1621 | 1621 | | |
1622 | 1622 | | |
1623 | 1623 | | |
1624 | | - | |
| 1624 | + | |
1625 | 1625 | | |
1626 | 1626 | | |
1627 | 1627 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
| 337 | + | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
0 commit comments