diff --git a/.changeset/24327-runtime-this-system-copy.md b/.changeset/24327-runtime-this-system-copy.md new file mode 100644 index 00000000000..d0bcafc6fa0 --- /dev/null +++ b/.changeset/24327-runtime-this-system-copy.md @@ -0,0 +1,16 @@ +--- +'@objectstack/runtime': patch +--- + +Clause-②: no + +Ten user-facing strings the runtime's HTTP doors answer no longer call the system the caller is in +"this environment". The permission-set clone door's success notice (`PERMISSION_SET_CLONE_NOTICE`, the +`notice` beside the copy) now says the copy is "a new permission set authored in this system", the +wording the console's clone hint uses. The other nine drop the noun: `/mcp` and `/mcp/skill` on a +deployment that opts out answer `404` "MCP server is not enabled"; a share-link request with no +share-link service answers `501` "Sharing is not configured"; and the webhook-redelivery, approval +action-page and inbound automation-hook doors answer `501` "… no webhooks service is registered." (or +approvals, or trigger-api) when the service is missing, and "… the registered webhooks service does not +implement handleRedeliver." (or `handleActionPage`, or `handleInboundHook`) when it lacks its member. +Only the human-readable text moves: every HTTP status, error code and response shape is what it was. diff --git a/docs/qa/platform-checklist/areas/ai.json b/docs/qa/platform-checklist/areas/ai.json index cbb34c2df33..fc1ea7b0bb8 100644 --- a/docs/qa/platform-checklist/areas/ai.json +++ b/docs/qa/platform-checklist/areas/ai.json @@ -147,7 +147,7 @@ ], "acceptance": [ { - "clause": "the opted-out boot answers 404 'MCP server is not enabled for this environment' on BOTH /mcp and /mcp/skill — a deliberate un-advertised surface, NOT the 501 (which means route mounted but MCP plugin missing: 'MCP server is not available')", + "clause": "the opted-out boot answers 404 'MCP server is not enabled' on /mcp/skill to any caller (the skill is public) and on /mcp to a signed-in or system caller, while an anonymous /mcp caller is refused 401 UNAUTHENTICATED before the switch is read (ADR-0138 D2) — a deliberate un-advertised surface, NOT the 501 (which means route mounted but MCP plugin missing: 'MCP server is not available')", "oracle": "api", "verify": "status + body of both routes on the disabled boot match packages/runtime/src/domains/mcp.ts (isMcpServerEnabled → 404; unresolvable mcp service → 501); record WHICH of the two refusals was observed", "evidence": "the two responses" diff --git a/packages/runtime/src/domains/approvals.ts b/packages/runtime/src/domains/approvals.ts index 67a8a4b44bf..57d3fccbaf3 100644 --- a/packages/runtime/src/domains/approvals.ts +++ b/packages/runtime/src/domains/approvals.ts @@ -113,8 +113,8 @@ export async function handleApprovalsActRequest( return { handled: true, response: deps.error( - 'Approval action pages are not available: no approvals service is registered for this ' - + 'environment. Register @objectstack/plugin-approvals to serve them.', + 'Approval action pages are not available: no approvals service is registered. ' + + 'Register @objectstack/plugin-approvals to serve them.', 501, ), }; @@ -123,8 +123,8 @@ export async function handleApprovalsActRequest( return { handled: true, response: deps.error( - 'Approval action pages are not available: the approvals service registered for this ' - + 'environment does not implement handleActionPage.', + 'Approval action pages are not available: the registered approvals service ' + + 'does not implement handleActionPage.', 501, ), }; diff --git a/packages/runtime/src/domains/automation-hooks.ts b/packages/runtime/src/domains/automation-hooks.ts index fcd9890923b..efba00b4d9d 100644 --- a/packages/runtime/src/domains/automation-hooks.ts +++ b/packages/runtime/src/domains/automation-hooks.ts @@ -123,8 +123,8 @@ export async function handleInboundHookRequest( return { handled: true, response: deps.error( - 'Inbound automation hooks are not available: no trigger-api service is registered for this ' - + 'environment. The inbound-hook trigger (@objectstack/trigger-api) serves this route through that ' + 'Inbound automation hooks are not available: no trigger-api service is registered. ' + + 'The inbound-hook trigger (@objectstack/trigger-api) serves this route through that ' + 'service; compose it on the environment that owns the flow.', 501, ), @@ -134,8 +134,8 @@ export async function handleInboundHookRequest( return { handled: true, response: deps.error( - 'Inbound automation hooks are not available: the trigger-api service registered for this ' - + 'environment does not implement handleInboundHook.', + 'Inbound automation hooks are not available: the registered trigger-api service ' + + 'does not implement handleInboundHook.', 501, ), }; diff --git a/packages/runtime/src/domains/mcp.ts b/packages/runtime/src/domains/mcp.ts index 55cde0fd74e..5d19bd3b7aa 100644 --- a/packages/runtime/src/domains/mcp.ts +++ b/packages/runtime/src/domains/mcp.ts @@ -74,7 +74,7 @@ export async function handleMcpRequest(deps: DomainHandlerDeps, body: any, conte } if (!isMcpServerEnabled()) { - return { handled: true, response: deps.error('MCP server is not enabled for this environment', 404) }; + return { handled: true, response: deps.error('MCP server is not enabled', 404) }; } const mcp: any = await deps.resolveService(context, 'mcp', context.environmentId); if (!mcp || typeof mcp.handleHttpRequest !== 'function') { @@ -161,7 +161,7 @@ export async function handleMcpRequest(deps: DomainHandlerDeps, body: any, conte */ export async function handleMcpSkillRequest(deps: DomainHandlerDeps, method: string, context: HttpProtocolContext): Promise { if (!isMcpServerEnabled()) { - return { handled: true, response: deps.error('MCP server is not enabled for this environment', 404) }; + return { handled: true, response: deps.error('MCP server is not enabled', 404) }; } if (method !== 'GET') { // Hand-rolled rather than `deps.error(...)` only because it carries an diff --git a/packages/runtime/src/domains/permission-set-clone.ts b/packages/runtime/src/domains/permission-set-clone.ts index b14e60e9f7e..707c51b1cf4 100644 --- a/packages/runtime/src/domains/permission-set-clone.ts +++ b/packages/runtime/src/domains/permission-set-clone.ts @@ -115,7 +115,7 @@ export const PERMISSION_SET_CLONE_DROPPED_KEYS: readonly string[] = Object.freez * copy grants nobody until it is given to someone. */ export const PERMISSION_SET_CLONE_NOTICE = - 'The copy is a new permission set authored in this environment, with no link to the set it was copied ' + 'The copy is a new permission set authored in this system, with no link to the set it was copied ' + 'from: changes to that set do not reach it. Not copied: delegated-admin scope (`adminScope`) and the ' + 'everyone-baseline suggestion (`isDefault`) — grant either deliberately on the copy if it needs one. ' + 'The copy is held by nobody yet: add it to a position, or assign it to users.'; diff --git a/packages/runtime/src/domains/share-links.ts b/packages/runtime/src/domains/share-links.ts index 33310b8b354..6ef20a9d1b5 100644 --- a/packages/runtime/src/domains/share-links.ts +++ b/packages/runtime/src/domains/share-links.ts @@ -171,10 +171,10 @@ async function handleShareLinksRequestBody( // a second hand-written `'shareLinks'`, copied from a constant whose own // doc-comment says "keep in sync with the SharingPlugin registration" — and a // drifted copy here resolves nothing, so every share link 501s with "Sharing - // is not configured for this environment" on an environment where it is. + // is not configured" on an environment where it is. const svc = await deps.resolveService(context, SHARE_LINK_SERVICE, context.environmentId); if (!svc) { - return { handled: true, response: deps.error('Sharing is not configured for this environment', 501) }; + return { handled: true, response: deps.error('Sharing is not configured', 501) }; } const SYSTEM_CTX = { isSystem: true, positions: [], permissions: [] } as const; diff --git a/packages/runtime/src/domains/webhooks.ts b/packages/runtime/src/domains/webhooks.ts index c920bff6c2b..00a8b3d4a06 100644 --- a/packages/runtime/src/domains/webhooks.ts +++ b/packages/runtime/src/domains/webhooks.ts @@ -117,7 +117,7 @@ export async function handleWebhooksRedeliverRequest( return { handled: true, response: deps.error( - 'Webhook redelivery is not available: no webhooks service is registered for this environment. ' + 'Webhook redelivery is not available: no webhooks service is registered. ' + '@objectstack/plugin-webhooks registers it once its redelivery veto is installed, which needs ' + 'the data engine and @objectstack/service-messaging; the boot log names the one that is missing.', 501, @@ -128,7 +128,7 @@ export async function handleWebhooksRedeliverRequest( return { handled: true, response: deps.error( - 'Webhook redelivery is not available: the webhooks service registered for this environment ' + 'Webhook redelivery is not available: the registered webhooks service ' + 'does not implement handleRedeliver.', 501, ),