Repository navigation
Commit 71fa166
fix(cloud-connection,mcp): in-system copy says "this system" or drops the noun, not "this environment" (cloud#3002 ruling A) (#24413)
Fixes #24404
Clause-②: no
Basis: copy only. Every HTTP status, error code, `details` object and
response shape is unchanged; only human-readable text moves.
## What changed
The user-facing strings in `packages/cloud-connection/src` and
`packages/mcp/src` that called the running system "this environment" now
follow objectstack-ai/cloud#3002 ruling A, as triage applied it
(`6250167038` on #24327, confirmed for this family in `6252585695` on
#24368): "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 deployment or configuration scope keeps "environment".
- `cloud-connection`: the seven `401 UNAUTHENTICATED` answers on
`/api/v1/cloud-connection/*` drop the noun. The install-local `409
RESOURCE_CONFLICT` and the unmanaged-install success `note` say "this
system".
- `mcp`: the known-partial listing warning and the Connect-an-Agent
bundle description say "this system".
- `content/docs/deployment/cloud-connection.mdx:128`: the
troubleshooting table quoted the old 401 text as what "the panel says".
It now quotes the new text.
- `marketplace-install-local-install-modes.test.ts:409` pinned the old
409 prose. It now pins the named base (`'com.example.crm-copy'`), next
to the code, status and `details` it already pinned. This is the only
prose-pinning test that moved.
- Changesets: `.changeset/24404-cloud-connection-this-system.md` and
`.changeset/24404-mcp-this-system.md`, both `patch`, both `Clause-②:
no`.
## The census, one row per string
The census covers every string literal, template literal and `+` chain
in the 28 non-test source files of the two packages whose joined text
contains "environment" (case-insensitive). It was taken by walking the
TypeScript AST, so a phrase split across a concatenation is read as one
string. Two strings here are split that way: the install-local 409 (`'…
a base authored '` + `'in this environment …'`) and the Connect-an-Agent
subtitle. Line numbers are on `origin/main` `31e7d0ba2` and are
unchanged at this head.
| site | before | after | clause / reason |
|:--|:--|:--|:--|
| `cloud-connection-plugin.ts:597` (`POST bind/start`, 401) | Sign in to
this environment to connect a cloud account. | Sign in to connect a
cloud account. | the system the caller is in: drop the noun (triage
`6252585695` names this string) |
| `cloud-connection-plugin.ts:659` (`POST bind/poll`, 401) | Sign in to
this environment. | Sign in. | same |
| `cloud-connection-plugin.ts:761` (`POST unbind`, 401) | Sign in to
this environment. | Sign in. | same |
| `cloud-connection-plugin.ts:813` (`POST install`, 401) | Sign in to
this environment to install apps. | Sign in to install apps. | same |
| `cloud-connection-plugin.ts:867` (`GET installation`, 401) | Sign in
to this environment. | Sign in. | same |
| `cloud-connection-plugin.ts:930` (`GET installed`, 401) | Sign in to
this environment. | Sign in. | same |
| `cloud-connection-plugin.ts:968` (`GET org-packages`, 401) | Sign in
to this environment. | Sign in. | same |
| `cloud-connection-plugin.ts:215` `ENVIRONMENT_NOT_FOUND_MESSAGE` (404)
| Could not resolve an environment for this request host. | kept |
configuration scope: a multi-environment runtime resolves an environment
per request host, and the sentence pairs with the code
`ENVIRONMENT_NOT_FOUND`, which is held |
| `marketplace-install-local-plugin.ts:1497` (409 `RESOURCE_CONFLICT`) |
… held by the environment base 'BASE' … | … held by the writable base
'BASE' … | "environment base" is not a documented name (zero hits in
`docs/adr`, `content/docs`, `packages/spec/src`); the docs call this
base a "writable base" (`content/docs/deployment/install-modes.mdx:132`,
the `package-lifecycle` reference) |
| `marketplace-install-local-plugin.ts:1497-1498`, same message, split
across `+` | … or a base authored in this environment … | … or a base
authored in this system … | made here, not from a package: "authored in
this system" |
| `marketplace-install-local-plugin.ts:1498`, same message | … whose
items are this environment's own metadata. | … whose items are this
system's own metadata. | the system the caller is in: "this system" |
| `marketplace-install-local-plugin.ts:2562` (200 `note`, unmanaged
install) | The package's metadata is now this environment's own, in the
base 'BASE' … | The package's metadata is now this system's own, in the
base 'BASE' … | same |
| `mcp/src/metadata-completeness.ts:47` (the `warning` on a
known-partial `list_objects` / `objectstack://objects` answer) | … this
environment declares at least that many objects, possibly more. | … this
system declares at least that many objects, possibly more. | the system
the MCP caller is in: "this system" |
| `mcp/src/connect-ui.ts:84` (UI bundle `description`) | … for
connecting MCP clients to this environment. | … for connecting MCP
clients to this system. | same |
| `mcp/src/connect-ui.ts:63-64` (Connect-an-Agent `page:header`
subtitle; split across `+`) | Give any MCP-capable AI client governed
access to this environment — every call runs … | **kept in this PR**;
chosen sentence below | coupled with
`platform-objects/src/apps/translations/en.ts:270` by a byte-identity
guard (next section) |
| `mcp/src/skill-md.ts:36-39` `OBJECTSTACK_SKILL_DESCRIPTION` | … change
data in their ObjectStack environment. | kept | a deployment addressed
from outside: the portable `SKILL.md` that an external coding agent
installs, naming the deployment it connects to by URL (the sense triage
kept for `cli`) |
| `mcp/src/skill-md.ts:62` (intro, with the deployment's label) | This
skill connects you to the **ENV** ObjectStack environment. | kept |
same; it names a deployment by its label |
| `mcp/src/skill-md.ts:63` (intro, no label) | This skill connects you
to an ObjectStack environment. | kept | same |
| `mcp/src/skill-md.ts:65` template, body | An ObjectStack environment
exposes its data objects … | kept | same |
| `mcp/src/skill-md.ts:65` template, "When to use" | … the environment
is the source of truth … | kept | same |
| `cloud-connection-route-ledger.ts:115-118` (`/status` row `note`) | …
is this environment bound to a cloud account? … | kept | not
user-visible: package-internal data for
`cloud-connection-route-ledger.conformance.test.ts`, never exported or
bundled (its header, `:55-60`). Measured: the note is in 0 of the files
in `packages/cloud-connection/dist`, while the new 401 text is in
`index.js` and `index.cjs` |
| `cloud-connection-route-ledger.ts:157-159` (`/install` row `note`) |
installs a package into this environment VIA the control plane … | kept
| same |
| `cloud-connection-route-ledger.ts:177-179` (`/installed` row `note`) |
the environment's full installed list … | kept | same; it also names the
control plane's per-environment record |
| `cloud-connection-route-ledger.ts:239-241` (`reseed-sample-data` row
`note`) | … trigger against a remote environment. | kept | same; a
deployment addressed from outside |
| `marketplace-install-local-plugin.ts:2533-2536` (`logger.info`) | …
copied into the environment base … | kept | a log line, outside this
card |
| `marketplace-install-local-plugin.ts:3709-3711` (`logger.warn`) | …
the environment's metadata is the platform operator's … | kept | a log
line, outside this card |
| `mcp/src/mcp-server-runtime.ts:905-909` (`logger.warn`) | … would
understate the environment. | kept | a log line, outside this card |
| `mcp/src/mcp-server-runtime.ts:1446-1451` (`logger.warn`, the card's
`:1448`) | … fewer than this environment declares. | kept | a log line,
outside this card |
| `telemetry-posture.ts:98` |
`OS_TELEMETRY_CLIENT_ERROR_REPORTING_ENVIRONMENT` | kept | an
environment-variable name, not copy |
Not copy, and held by this card: the error codes `ENVIRONMENT_NOT_FOUND`
(`cloud-connection-plugin.ts:532`, `:593`, `:655`, `:757`, `:805`,
`:861`, `:924`, `:962`) and `ENVIRONMENT_BIND_FAILED` (`:746`), and the
wire paths that carry `environment_id` or `/cloud/environments/`
(`:550`, `:891`, `:939`, `:978`).
Comments, not strings, so outside the census:
`marketplace-install-local-plugin.ts:201`, `mcp-http-tools.ts:94`,
`mcp-server-runtime.ts:863`, `:1558`, `:1590`, `skill-prompts.ts:61`.
The counts the dispatch asked about are lines: `git grep -c -i 'this
environment'` reads 3 in `marketplace-install-local-plugin.ts` because
`:201` is a comment and `:1498` carries the phrase twice;
`mcp-http-tools.ts` (1) and `skill-prompts.ts` (1) are comments;
`mcp-server-runtime.ts` (4) is the `:1448` log line and three comments.
The census also reads strings that a `this environment` grep cannot see:
"the environment base" (`:1497`), the route-ledger notes at `:177` and
`:239`, the `ENVIRONMENT_NOT_FOUND_MESSAGE` at `:215`, the two log lines
that say "the environment", and the five `skill-md.ts` uses.
## The coupled sentence: `connect-ui.ts:63` and `platform-objects`
`en.ts:270`
#24405 has not landed: it is open and unclaimed, and `en.ts:270` on
`origin/main` `31e7d0ba2` still reads "this environment". The sentence
chosen per the rule (the system the caller is in, "this system"):
> Give any MCP-capable AI client governed access to this system — every
call runs under the caller's own permissions and row-level security.
The plan was for whichever card lands second to match the first.
Measurement shows that cannot work.
`packages/cli/test/platform-page-i18n-parity.test.ts` holds the `en`
bundle byte-identical to the page literal, because `translatePage`
applies the `en` bundle over the literal. So neither file can change
alone: the guard goes red, and the `en` user would see no change anyway.
Measured at `9355bce52`, through `scripts/pm/os-verify-lock.sh`, with
`scripts/ablation-replace.mjs` doing the mutation and its restore:
- Control, unmutated: `pnpm --filter @objectstack/cli exec vitest run
--maxWorkers=2 test/platform-page-i18n-parity.test.ts`: "Tests 27 passed
(27)".
- `connect-ui.ts:63` alone changed to the sentence above ("anchor 1 → 0,
blob 400cf11 → d9173cb002db"), `@objectstack/mcp` rebuilt, then
`ablation-dist-preflight.mjs` ("marker present in 2 built files"):
"Tests 2 failed | 25 passed (27)". The two that failed: "keeps the en
bundle byte-identical to the metadata literals" and "holds the en bundle
in verbatim parity with the page sources".
- Restored ("blob == HEAD (400cf11) and git diff HEAD is empty"),
rebuilt, preflight `--absent` ("marker absent from all 6 built files",
"working tree clean against HEAD"): "Tests 27 passed (27)".
So the two strings must move in ONE PR. This card's hold-off keeps
`packages/platform-objects/**` out of it, so `connect-ui.ts:63` is left
unchanged here, with the sentence above named for the joint edit. #24405
remains open. The joint edit is also wider than two lines, read from
source and not measured. The `zh-CN`, `ja-JP` and `es-ES` subtitles also
say "this environment" (此环境, この環境, este entorno). Each locale records a
source hash for the key (`pages.connect_agent.subtitle` in
`*.source-hashes.ts`), and under `source-hash.ts` (#8765 Option B) a
hash that disagrees with the new `en` text serves the English source.
The same parity file's "rewrites the page:header copy end-to-end for a
non-English locale" asserts that the `zh-CN` subtitle differs from the
source. So the joint PR also owes the three translated values and their
hashes.
## Readers of the changed strings, measured
`git grep` over the whole tree (packages, `content/docs`, `docs/qa`,
skills, examples, `.changeset`), and over objectui `origin/main`
`024b7b6`, for each changed string and its fragments:
- `content/docs/deployment/cloud-connection.mdx:128` quoted the sign-in
401 text. It is updated here.
- `marketplace-install-local-install-modes.test.ts:409` pinned the 409
prose. It now pins the named base. `:321` pins the `logger.info` line,
which is not changed, and stays as it is.
- No test pins the sign-in 401 prose, the install `note`, the MCP
partial-listing sentence or the bundle description. The MCP partial
listing is discriminated by its code `SERVICE_UNAVAILABLE`, which is
unchanged.
- objectui
`packages/app-shell/src/console/marketplace/marketplaceApi.ts:32` quotes
the old 401 text in a comment. Nothing there parses it: the Cloud
Connection panel shows `body.error.message` verbatim.
- `CHANGELOG.md` entries that quote the old text are release-owned
history, left as they are.
- No consumer parses any of these texts.
## Verification
All builds and tests ran through `scripts/pm/os-verify-lock.sh` at head
`9355bce52` (the final commit):
- `pnpm exec turbo run build --filter='@objectstack/mcp...'
--filter='@objectstack/cloud-connection...'
--filter='@objectstack/platform-objects...' --concurrency=2`: "Tasks: 35
successful, 35 total".
- `pnpm --filter @objectstack/cloud-connection exec vitest run
--maxWorkers=2`: "Test Files 52 passed (52) · Tests 614 passed (614)".
- `pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2`: "Test
Files 40 passed (40) · Tests 479 passed (479)".
- `pnpm --filter @objectstack/cloud-connection typecheck`: exit 0.
- `pnpm --filter @objectstack/mcp typecheck`: exit 0 ("6 file(s) / 53
error(s) / 8 pinned signature(s) held").
Gates, run after the final commit at head `9355bce52`, each exit code
captured before any pipe:
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` (no paths) derived 95 commands from the 8
changed paths. All 95 exited 0. Two of them first answered exit 3,
PREREQUISITE NOT MET, on the closure build: `check:skill-examples` and
`check:dual-build-cjs-loads`. After `pnpm exec turbo run build
--filter='!@objectstack/docs' --concurrency=2` ("76 successful, 75
cached") they were re-run with exit 0: "262 prose examples type-check
across 3 surface(s)", and "111 published require entry point(s) across
69 package(s) load". `check:dts-closure`,
`check:sourcemap-no-sources-content`, `check:lean-entry-closure`,
`check:published-files` and `check:published-readme-links` were also
re-run on the full build, all exit 0 ("76 built package(s) swept"). The
`--ran` reconciliation: "Run reconciliation — 95 derived, 95 run, 0
NOT-MEASURED, 0 UNRUN."
- The 10 declared wide-population families, all exit 0:
`check:init-service-contract`, `check:live-db-isolation`,
`check:meta-type-normalized`, `check:optional-error-sink`,
`check:resume-authority-declared`, `check:runner-env-posture`,
`check:settings-bind-window`, `check:startup-registry-verdict`,
`check:verify-stand-in`, `check:wildcard-fallthrough`.
- The artifact-roster families whose roster sits under a changed
directory, plus the route-ledger census, all exit 0:
`check-changeset-fixed.mjs`, `check:authz-resolver`,
`check:error-code-casing`, `check:filter-alias-parity`,
`check:route-ledger-census`.
- `pnpm exec eslint --no-inline-config` over the five changed `.ts`
files: exit 0, no output.
- `test:repo` was not run locally. It belongs to CI's `Test Core`, and
this diff changes none of that project's tests.
No ablation: the change is copy, and no test pins the behaviour. The one
measurement that mutated code is the coupled-sentence guard probe above.
## Acceptance notes
- The `logger.info` line at `marketplace-install-local-plugin.ts:2534`
still says "environment base" while the 409 now says "writable base".
Log lines are outside this card. Not filed.
- The objectui comment at `marketplaceApi.ts:32` quotes the old 401
text. It is a comment, and per triage `6252585695` the objectui mirror
is a pointer, not a card here.
- `packages/plugins/plugin-auth/src/auth-manager.ts:2527` ("You are not
authorized to sign in to this environment.") sits in #24368's
`plugin-auth` scope, not this card's.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01SYEJqDL3NXxrJRBVqaMu9T)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 97cb5c5 commit 71fa166
8 files changed
Lines changed: 34 additions & 14 deletions
File tree
- .changeset
- content/docs/deployment
- packages
- cloud-connection/src
- mcp/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
659 | | - | |
| 659 | + | |
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
| |||
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
761 | | - | |
| 761 | + | |
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
813 | | - | |
| 813 | + | |
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
| |||
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
867 | | - | |
| 867 | + | |
868 | 868 | | |
869 | 869 | | |
870 | 870 | | |
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | | - | |
| 930 | + | |
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
| |||
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
968 | | - | |
| 968 | + | |
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1494 | 1494 | | |
1495 | 1495 | | |
1496 | 1496 | | |
1497 | | - | |
1498 | | - | |
| 1497 | + | |
| 1498 | + | |
1499 | 1499 | | |
1500 | 1500 | | |
1501 | 1501 | | |
| |||
2559 | 2559 | | |
2560 | 2560 | | |
2561 | 2561 | | |
2562 | | - | |
| 2562 | + | |
2563 | 2563 | | |
2564 | 2564 | | |
2565 | 2565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments