Skip to content

Commit 7a3f86c

Browse files
fix: refusal and remedy copy from the v18.4.0 sweep (clone control label, short and empty unknown keys, CLI unknown command, MCP doc) (#35397)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgRuogP8Tp8XyFXLc92Bxvo6)_ repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me Fixes #33345 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:管理员改不了已安装包里的权限集时,提示里的按钮名改成界面上真实显示的「新建类似」;保存元数据被拒时,空键名不再显示成一对空引号,四五个字母的错键不再被乱猜成无关的键;命令行输错子命令时会指向对应的帮助;接入 MCP 的文档改正了撤回审批被拒时的返回码。 - 为什么做:来自上一版全面走查记下的五条提示与文档问题,其中「流程引用环境里的流程」那条此前已修好,本次核实后未改。 - 出错会怎样:只改提示文字、帮助指引和文档,什么能存、什么被拒一律不变;有问题回退本 PR 即可。 - 要你做什么:在随后的决策卡上决定,视图保存被拒时附带的那条笼统「输入无效」条目是删掉、改写还是保留。 ## What changes Five rows from the v18.4.0 sweep ledger (comment 6881136418 on #32908). Each was re-measured on `origin/main` at `c05a8a01c9`; one was already fixed and one sub-item is held for a decision. Nothing new is accepted or refused. - **Row 130, packaged permission sets (the `ITEM_LOCKED` sentence).** The save door's regime-C row (`packages/metadata-protocol/src/packaged-base-regime.ts`) and plugin-security's `NOT_OVERRIDABLE` lock refusals (`packaged-permission-set-lock.ts`: the diagnostic and both end-user texts, 11 locales) sent the admin to a "Clone" action. Measured in the console source: both entry points, Studio's Access pillar (`access-new-similar`) and Setup's permission matrix, draw `perm.clone.action`, which is "New similar" in `en` and "新建类似" in `zh`; the designer strings ship only those two, so every other language shows the English label, and a Traditional Chinese session shows the Simplified catalogue. Each text now names the control that way. The two docs pages that quote the sentence (`concepts/metadata-lifecycle.mdx`, `permissions/authorization.mdx`) follow it. - **Row 60, unknown-key refusal (`packages/spec/src/shared/suggestions.zod.ts`, `strictUnknownKeyError`).** Two of its three sub-items are fixed here: - an empty key rendered as empty backticks; it now reads "an empty key (`""`)", and no rename is guessed for it (any declared key of two letters or fewer was within budget); - below six characters the rename budget is the floor of 2, which exists for a swap of two adjacent letters; it also admitted two unrelated edits, so a removed `app.aria` was answered "Did you mean `aria` → `areas`?". A short key's guess must now be one edit away, counting an adjacent swap as one (`lable` → `label`, `aeras` → `areas`, `labl` → `label` are still offered). Keys of six characters or more are scored exactly as before. - **Held, not changed:** the sibling `{ path: '', message: 'Invalid input', code: 'invalid_union' }` entry on a view or form refusal. It is pinned as `issues[0]` by #5364's "strictly additive" rule (`protocol.save-union-issues.test.ts`), and Studio parses its exact text (`translateValidationMessage` maps "invalid input" to its localized "Invalid"). Dropping or rewording it changes a recorded envelope rule, so it goes to a decision. It is split out to its own card, #35400, nested under #33345, so this PR closes the rest of the card. - **Row 164, CLI unknown command.** `os environments frobnicate` answered `command environments:frobnicate not found` and nothing else; `os frobnicate` the same. A `command_not_found` hook (`packages/cli/src/hooks/command-not-found/point-at-help.ts`, registered in `package.json` `oclif.hooks`) keeps the hard error, exit 2 and no suggester, spells the id as typed, and ends with the help of the deepest topic or command the words reached, matching the `See more help with --help` tail a wrong flag already gets. - **Row 233, `content/docs/ai/connect-mcp.mdx`.** The recall/resubmit paragraph said anyone else is refused `FORBIDDEN`. Measured in `ApprovalService.refuseUnreadableRequest` and the approvals route's status table: a caller who cannot read the request gets `404 REQUEST_NOT_FOUND` (as for an id that names no request); one who can read it gets `403 FORBIDDEN`. The doc now says both. - **Row 108, dropped: already fixed.** The environment-only holder has had its own remedy since `40c73a8f4f` ("No package holds it, so no dependency reaches it: move the flow into …"), pinned by `[#32967] an environment-only holder` in `packages/core/src/package-scoped-resolution.test.ts`. That sentence is absent at the QA run's `ee9ad834` and present at the ledger's `87330e89`. - **Changeset** `.changeset/33345-sweep-refusal-copy.md`: `patch` on spec, metadata-protocol, plugin-security and cli. - No `docs/qa/platform-checklist/` item quotes a changed sentence: `cli.flag-command-error-ux` still holds ('command … not found', exit nonzero), and the one item naming "the Clone action" (`access-security.packaged-permission-set-lifecycle`) is retired. ## Tests Final head `111a0f32d8`. One red-then-green pin per code row, at its producer: - Row 60: `packages/spec/src/shared/strict-object.test.ts`, new top-level describe `short and empty unknown keys` (4 cases). - Row 130: `packages/plugins/plugin-security/src/packaged-permission-set-lock.test.ts`, new top-level describe (every locale of both refusals names the console label, plus the diagnostic); the exact-sentence pins in metadata-protocol and rest now read "New similar". - Row 164: `packages/cli/src/hooks/command-not-found/point-at-help.test.ts` (unit tier, 4 cases). <details><summary>Package suites (os-verify-lock, VERDICT command-exit 0, head 151b48c)</summary> - spec test: Test Files 856 passed (856), Tests 27371 passed, 1 todo; typecheck exit 0, check:test-typecheck OK - metadata-protocol test: Test Files 358 passed, 9 skipped; Tests 23218 passed, 45 skipped; typecheck exit 0 - plugin-security test: Test Files 279 passed; Tests 6997 passed, 45 skipped; typecheck exit 0 - cli unit tier: Test Files 430 passed; Tests 6144 passed; typecheck exit 0. The integration tier is CI's (no spawn entry or integration file touched). - rest: `rest-meta-packaged-action-permission-refusal.test.ts` 11 passed The head then moved by one commit (`111a0f32d8`, a module-top lint preload in one edited metadata-protocol test, which `check:test-source-alias` asked for); that file re-ran green: 54 passed. </details> <details><summary>Ablations (scripts/ablation-replace.mjs; the tests import the source by relative path, so no dist leg)</summary> - Row 164: hook returns oclif's old message, so 3 of 4 fail; restored, blob 6143c7f equals HEAD, `git diff HEAD` empty. - Row 60 screen: guess back to plain `findClosestMatches`, so the `aria` case fails (1 failed, 3 passed); restored, blob a4defaa equals HEAD. - Row 60 empty key: renderer back to backticks, so the empty-key case fails; restored, blob a4defaa equals HEAD. - Row 130: en user text back to "Clone action", so the en case fails (1 of 31); the regime row back to `"Clone"`, so 3 metadata-protocol pins fail; both restored, blob equals HEAD. </details> ## Acceptance notes - `packages/spec/src/shared/suggestions.zod.ts` is a `packages/spec/src` non-test producer, so an L2 contract record is owed before the queue. - Same family, not changed here: the `max(2, len/3)` budget is copied in `data/object.zod.ts` (`suggestKey`), `data/seed.zod.ts`, `data/field-value.zod.ts` and `data/default-value-shape.ts`, which this PR does not touch. A long retired key can still be guessed into a declared one: form `defaultSort` gets "Did you mean `defaultSort` → `defaults`?" (distance 3, budget 3). - `packages/spec/src/migrations/entries/semantic/18.security-permission-set-overlay-discard-retired.ts` still says "(the Clone action)" in a released migration note; left as released. - Live CLI output at the final build: `os frobnicate` gives "command frobnicate not found / See more help with `os --help`", exit 2; `os environments frobnicate` points at `os environments --help`, exit 2; `os plugin trust frobnicate` points at `os plugin trust --help`; `os migrate plan --frobnicate` is unchanged. ## Verification <details><summary>Gates (local, final head 111a0f3)</summary> - `dispatch-gates --commands`: 133 families derived; all 133 run, each exit 0. `--ran` reports "133 derived famil(ies) accounted for — 133 run, 0 NOT-MEASURED (a DERIVED zero …)". - `overlap-check --branch=claude/issue-33345-sweep-refusal-copy`: VERDICT clean exit 0 (origin/main, #35261, #35129, #34717 merge cleanly). - Local-only: `check:skill-frame-freshness` exit 0. `check:dev-prereqs` exit 1 because the workspace is not fully built (35 ui/example packages have no dist); that is a reading of this box, not of the diff. - Dogfood: n/a (no `!` in the title, no narrowing arm). `test:repo` and the full farm are CI's. </details> ## 席位核对 - Read first: `packages/spec/src/shared/suggestions.zod.ts` (`shortKeyScreenedGuess`, `renderUnknownKey`), `packages/cli/src/hooks/command-not-found/point-at-help.ts`, `packages/plugins/plugin-security/src/packaged-permission-set-lock.ts` (locale texts). - Two-minute check: `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/shared/strict-object.test.ts` should show the four `short and empty unknown keys` cases green. --- _Generated by [Claude Code](https://claude.ai/code/session_01Utp6CZiaBg6rk7dpy1s9Me)_ <!-- signed: repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent ee40658 commit 7a3f86c

15 files changed

Lines changed: 314 additions & 39 deletions
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/metadata-protocol': patch
4+
'@objectstack/plugin-security': patch
5+
'@objectstack/cli': patch
6+
---
7+
8+
fix: four refusals say what the author can act on — the clone control by its console label, an empty or short unknown key, and an unknown CLI command
9+
10+
Clause-②: no
11+
Metadata-protocol: none
12+
13+
Nothing new is accepted or refused; only the words change.
14+
15+
- **Packaged permission sets.** The `ITEM_LOCKED` save refusal and the `NOT_OVERRIDABLE` lock refusals sent the admin to a "Clone" action. Studio's Access pillar and Setup label that control "New similar" ("新建类似" in a Chinese session), so the diagnostic and both end-user messages, in every language they ship, now name it that way.
16+
- **Unknown keys.** A refusal naming an empty key printed it as empty backticks; it now says "an empty key (`""`)" and offers no rename. On a key of five characters or fewer, a "Did you mean" rename is offered only when the declared key is one edit away, counting a swap of two adjacent letters as one: `lable` → `label` is still offered, while a removed `aria` is no longer answered with `areas`.
17+
- **CLI.** `os <topic> <unknown>` and `os <unknown>` still exit 2 without running anything, and now name the command as typed (`command environments frobnicate not found`) and end with the help that lists the real ones (`See more help with \`os environments --help\``).

‎content/docs/ai/connect-mcp.mdx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,11 @@ can reach is the **default exposure policy (v1)**:
565565
are exposed the same way, with `ai.requiresConfirmation: true`, and forward to
566566
their approvals routes as the caller. The approval service admits the
567567
submitter, and for recalling a pending request the administrator who may
568-
override it; anyone else is refused (`FORBIDDEN`) and the request does not
569-
move. A recalled request is closed: to send the record for approval again,
568+
override it; anyone else is refused and the request does not move. A caller
569+
who cannot read the request is answered `404 REQUEST_NOT_FOUND`, exactly as
570+
for an id that names no request, so the refusal does not tell them the request
571+
exists; one who can read it (a pending approver, say) is answered
572+
`403 FORBIDDEN`. A recalled request is closed: to send the record for approval again,
570573
the agent uses the app's own submit action. Remind, request-info and comments
571574
are not exposed.
572575

‎content/docs/concepts/metadata-lifecycle.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ See [ADR-0005](https://github.com/objectstack-ai/objectstack/blob/main/docs/adr/
223223
| :--- | :--- |
224224
| `flow` | Declare an override from the base's paired `<base>.custom`, or rename it (a write from any other package is told to rename: only the pair declares an override), or switch it off (`POST /api/v1/automation/:name/toggle`, body `{enabled: false}`). The declared override is armed in the base flow's place, keeps its one activation switch, and a run suspended on the base finishes on the version it started on (ADR-0146 D9). A copy under a new name is "New similar", the clone door `POST /api/v1/automation/:name/clone` (body `{name, label}`), which the removal refusal still names. A flow that holds a credential (an inbound hook's `secret`, an `http` node's `signingSecret`) is not cloned in one step: the clone door refuses it with `409`, because a copy would share the secret, and the copy is authored as a new flow with its own. The copy is written switched off, into the source package's paired customization package `<base>.custom` (created on first use; a kernel package, of scope `system` or `cloud`, has no pair in this version, so a copy of a flow it ships answers the ensure door's `409` until the body names `package`), or into the writable package the body's optional `package` names; a flow no read-only package ships has no pair, so its clone names `package`. The answer's `packageId` says where the copy landed ([ADR-0146](https://github.com/objectstack-ai/objectstack/blob/main/docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md) D3, D4). |
225225
| `action` | Switch it off (`POST /api/v1/actions/_activation/:object/:action`, body `{enabled: false}`; `:object` is `global` for an object-less action). No clone is offered. |
226-
| `permission` | Clone it under a new name: the "Clone" action on the permission set, or the clone door `POST /api/v1/security/permission-sets/:name/clone` (body `{name, label, package?}`) with a new name. The clone door copies the whole definition from the security catalog; a copy of a packaged set lands in the package's paired `<X>.custom`, and a copy of a set a kernel package ships lands environment-wide (ADR-0146 D3/D6). |
226+
| `permission` | Clone it under a new name: the "New similar" action on the permission set, or the clone door `POST /api/v1/security/permission-sets/:name/clone` (body `{name, label, package?}`) with a new name. The clone door copies the whole definition from the security catalog; a copy of a packaged set lands in the package's paired `<X>.custom`, and a copy of a set a kernel package ships lands environment-wide (ADR-0146 D3/D6). |
227227

228228
A permission set and a position also have a switch, outside the refusal: `POST /api/v1/security/_activation/:type/:name` (`:type` = `permission` or `position`), body `{enabled: false}`, switches one off for the deployment. The refusal does not name it: a packaged position's refusal keeps the managed seal's edit remedy. The audience anchors `everyone` and `guest` are not switchable.
229229

‎content/docs/permissions/authorization.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ only what it owns:
281281
of the write: `permission` declares `allowEnvironmentOverlay: false`
282282
(ADR-0005's security row — overlays of the authorization surface would
283283
create silent privilege drift), so no environment-scope overlay is minted,
284-
and the refusal names the clone (the "Clone" action on the set, or
284+
and the refusal names the clone (the "New similar" action on the set, or
285285
`POST /api/v1/security/permission-sets/:name/clone`). Narrowing the packaged
286286
set itself takes the channel ADR-0086 two-doors always named: **edit the
287287
package and re-publish**. (ADR-0094 D5's 2026-07-14 direction — translate

‎packages/cli/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"glob": "**/*.js"
5454
},
5555
"hooks": {
56-
"preparse": "./dist/hooks/preparse/strip-arg-separator.js"
56+
"preparse": "./dist/hooks/preparse/strip-arg-separator.js",
57+
"command_not_found": "./dist/hooks/command-not-found/point-at-help.js"
5758
},
5859
"topicSeparator": " ",
5960
"topics": {
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
import { readFileSync } from 'node:fs';
4+
import { dirname, resolve } from 'node:path';
5+
import { fileURLToPath } from 'node:url';
6+
import { describe, expect, it } from 'vitest';
7+
import hook, { commandNotFoundMessage, type CommandNotFoundConfig } from './point-at-help.js';
8+
9+
const HERE = dirname(fileURLToPath(import.meta.url));
10+
const PKG = resolve(HERE, '../../../package.json');
11+
12+
/** A command table with one topic (`environments`), one nested topic and one command under a topic. */
13+
const config: CommandNotFoundConfig = {
14+
bin: 'os',
15+
topicSeparator: ' ',
16+
findTopic: (id) => ['environments', 'plugin', 'plugin:trust', 'migrate'].includes(id),
17+
findCommand: (id) => ['migrate:plan', 'dev'].includes(id),
18+
};
19+
20+
const refusal = async (id: string): Promise<any> => {
21+
try {
22+
await (hook as unknown as (opts: { id: string; config: CommandNotFoundConfig }) => Promise<unknown>)({ id, config });
23+
} catch (error) {
24+
return error;
25+
}
26+
throw new Error('expected the hook to refuse');
27+
};
28+
29+
describe('an unknown command points at the help that lists the real ones', () => {
30+
it('a topic-level unknown subcommand: the id as typed, and the topic\'s own help', async () => {
31+
const error = await refusal('environments:frobnicate');
32+
expect(error.oclif?.exit).toBe(2);
33+
expect(error.message).toBe('command environments frobnicate not found\nSee more help with `os environments --help`');
34+
});
35+
36+
it('a top-level unknown command points at the root help', async () => {
37+
const error = await refusal('frobnicate');
38+
expect(error.oclif?.exit).toBe(2);
39+
expect(error.message).toBe('command frobnicate not found\nSee more help with `os --help`');
40+
});
41+
42+
it('the deepest topic or command the typed words reached is the one named', () => {
43+
expect(commandNotFoundMessage('plugin:trust:frobnicate', config)).toContain('`os plugin trust --help`');
44+
expect(commandNotFoundMessage('migrate:plan:frobnicate', config)).toContain('`os migrate plan --help`');
45+
expect(commandNotFoundMessage('nope:frobnicate', config)).toContain('`os --help`');
46+
});
47+
48+
it('is registered as the CLI\'s command_not_found hook, from the built tree', () => {
49+
const manifest = JSON.parse(readFileSync(PKG, 'utf8'));
50+
expect(manifest.oclif.hooks.command_not_found).toBe('./dist/hooks/command-not-found/point-at-help.js');
51+
});
52+
});
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
import { Errors, type Hook } from '@oclif/core';
4+
5+
/**
6+
* An unknown command ends with a pointer to the help that lists the real ones.
7+
*
8+
* Without this hook oclif answers `os environments frobnicate` with one line,
9+
* `command environments:frobnicate not found`, and nothing else: the id in its
10+
* internal colon spelling (this CLI separates topics with a space) and no way
11+
* forward. A wrong FLAG already ends with oclif's `See more help with --help`;
12+
* a wrong command name did not, at the top level or under a topic.
13+
*
14+
* The answer is unchanged in kind — a hard error, exit 2, the command never
15+
* runs, and no guess at what was meant (this CLI ships no not-found suggester;
16+
* a typo is refused, not reinterpreted). Only the words change: the id is
17+
* spelled the way it was typed, and the pointer names the help of the deepest
18+
* topic or command the typed words did reach (`os environments --help`), or
19+
* the root's (`os --help`) when the first word is already unknown.
20+
*/
21+
22+
/** The slice of oclif's `Config` the message reads. */
23+
export interface CommandNotFoundConfig {
24+
bin: string;
25+
topicSeparator: string;
26+
findTopic(id: string): unknown;
27+
findCommand(id: string): unknown;
28+
}
29+
30+
/** The refusal's text: what was not found, then where its siblings are listed. */
31+
export function commandNotFoundMessage(id: string, config: CommandNotFoundConfig): string {
32+
const separator = config.topicSeparator || ':';
33+
const segments = id.split(':').filter((segment) => segment !== '');
34+
let reached: string[] = [];
35+
for (let length = segments.length - 1; length > 0; length -= 1) {
36+
const prefix = segments.slice(0, length).join(':');
37+
if (config.findTopic(prefix) || config.findCommand(prefix)) {
38+
reached = segments.slice(0, length);
39+
break;
40+
}
41+
}
42+
const help = [config.bin, ...reached, '--help'].join(' ');
43+
return `command ${segments.join(separator)} not found\nSee more help with \`${help}\``;
44+
}
45+
46+
const hook: Hook<'command_not_found'> = async function ({ id, config }) {
47+
throw new Errors.CLIError(commandNotFoundMessage(id, config), { exit: 2 });
48+
};
49+
50+
export default hook;

‎packages/metadata-protocol/src/packaged-base-regime.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@
5151
* the action-clone half is not chartered, so a clone route named here would
5252
* advertise one that does not exist;
5353
* - `permission` — the clone only (§8 item 3, the landed lock-and-clone
54-
* machinery): the "Clone" action on the permission set, which posts the copy
55-
* to `POST /data/sys_permission_set` under a new name. Spelled as
54+
* machinery): the "New similar" action on the permission set — the label
55+
* the console draws on that control in Studio's Access pillar and in Setup
56+
* (`perm.clone.action`) — which posts the copy to the catalog's clone door,
57+
* `POST /security/permission-sets/:name/clone`, under a new name. Spelled as
5658
* `plugin-security`'s own lock refusal spells that same path
5759
* (`packaged-permission-set-lock.ts`), so one condition reads one way at
5860
* every door;
@@ -201,7 +203,7 @@ export const PACKAGED_BASE_REGIME: Readonly<Record<string, PackagedBaseRegimeRow
201203
permission: {
202204
regime: 'C',
203205
routes: {
204-
clone: 'the "Clone" action on the permission set, '
206+
clone: 'the "New similar" action on the permission set, '
205207
+ 'or POST /api/v1/security/permission-sets/:name/clone with a new name',
206208
},
207209
},

‎packages/metadata-protocol/src/protocol.packaged-base-refusal.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ describe('packagedBaseRefusal — each Regime C type names its OWN sanctioned pa
396396
const message = expectRegimeC(refusalOn(environmentId, 'permission', 'pkg_perm', 'save'), 'permission', 'pkg_perm', 'save');
397397
// The clone route's spelling moved with C3 stage 8 (the retired
398398
// object's data route → the catalog's clone door); the sentence did not.
399-
expect(message).toContain('Clone it under a new name to customize it (the "Clone" action on the permission set, or POST /api/v1/');
399+
expect(message).toContain('Clone it under a new name to customize it (the "New similar" action on the permission set, or POST /api/v1/');
400400
expect(message).toContain(' with a new name).');
401401
expect(message.toLowerCase()).not.toContain('switch it off');
402402
expect(message).not.toContain('_activation');
@@ -436,7 +436,7 @@ describe('packagedBaseRefusal — each Regime C type names its OWN sanctioned pa
436436
for (const [type, name, path] of [
437437
['flow', 'pkg_flow', 'POST /api/v1/automation/:name/clone'],
438438
['action', 'pkg_action', 'POST /api/v1/actions/_activation/:object_or_global/:action'],
439-
['permission', 'pkg_perm', 'the "Clone" action on the permission set, or POST /api/v1/'],
439+
['permission', 'pkg_perm', 'the "New similar" action on the permission set, or POST /api/v1/'],
440440
] as const) {
441441
const r: any = p.packagedBaseRefusal({ type, name, operation: 'save', packageId: PACKAGE_ID });
442442
expect({ code: r?.code, status: r?.status, lockSource: r?.lockSource, packageId: r?.packageId }, type)

‎packages/metadata-protocol/src/sys-metadata-repository.package-writability.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
* discharged, not still standing — do not read the history as a live warning.
5757
*/
5858

59+
// Pays the lint root's first load at collection, never inside a clocked case.
60+
import './lint-root-preload.testkit.js';
5961
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
6062
// [#5619] The producer's OWN write-verb dispatch decisions (#4550 delete /
6163
// #5480 update), so the fake engine below cannot accept a call ObjectQL
@@ -581,7 +583,7 @@ describe('#7682 — the refusal discriminates on package writability', () => {
581583
// The clone route is the catalog's clone door: the data route of the
582584
// `sys_permission_set` object retired with it (C3 stage 8).
583585
expect(message).toContain(
584-
'Clone it under a new name to customize it (the "Clone" action on the permission set, '
586+
'Clone it under a new name to customize it (the "New similar" action on the permission set, '
585587
+ 'or POST /api/v1/security/permission-sets/:name/clone with a new name).',
586588
);
587589
expect(message).not.toContain('OS_METADATA_WRITABLE');
@@ -1265,7 +1267,7 @@ describe('[#20910] the repository doors name a Regime C type\'s sanctioned path,
12651267
+ 'operator-only where one install serves several organizations).';
12661268
// The clone route is the catalog's clone door: the data route of the
12671269
// `sys_permission_set` object retired with it (C3 stage 8).
1268-
const PERMISSION_CLONE = 'Clone it under a new name to customize it (the "Clone" action on the permission set, '
1270+
const PERMISSION_CLONE = 'Clone it under a new name to customize it (the "New similar" action on the permission set, '
12691271
+ 'or POST /api/v1/security/permission-sets/:name/clone with a new name).';
12701272
const FLOW_PATHS = 'Clone it under a new name to customize it (POST /api/v1/automation/:name/clone, body {name, label}), '
12711273
+ 'or switch it off (POST /api/v1/automation/:name/toggle, body {enabled: false}; '

0 commit comments

Comments
 (0)