Skip to content

Commit 2163119

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-j3eq52
2 parents cb136d4 + 2ae3e30 commit 2163119

64 files changed

Lines changed: 7710 additions & 140 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/i18n': patch
3+
'@object-ui/app-shell': patch
4+
---
5+
6+
fix(console): the create-workspace dialog explains the organization limit in the session language
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
- **The organization-limit refusal is localized.** When a deployment caps how many organizations one user may create (`OS_ORG_LIMIT`) and the user is past it, the server refuses with `403 YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS`. The create-workspace dialog showed the auth library's English sentence for it in every locale. It now shows `organization.errors.organizationLimitReached`, which says the cap counts only organizations the user created, never ones they were invited to, in all 11 console locales (`en`, `zh-Hans`, `zh-Hant`, `ja`, `ar`, `de`, `es`, `fr`, `ko`, `pt-BR`, `ru`). The message names no number: the refusal body and `/auth/config` do not carry the cap.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/platform-objects': patch
3+
---
4+
5+
i18n(platform-objects): the platform objects, Setup, Studio and Account ship in Russian
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`@objectstack/platform-objects` now carries `ru` beside `en`, `zh-CN`, `ja-JP`, `es-ES`, `zh-Hant`, `ar`, `fr` and `pt-BR`: every `sys_*` object (labels, fields, help, options, views, actions and their dialogs), the metadata-type configuration forms Studio opens, the Setup, Studio and Account navigation, the System Overview dashboard and its datasets, the platform pages' titles, and the inline copy on the user and organization record pages. A user whose locale is `ru` no longer reads English `sys_*` labels in the console. The new bundles pass through the same source-hash fallback as the existing ones, and every hand-authored leaf records the digest of the source it was translated from. The extract config documents `ru` in its `--locales`, so `check:i18n` now gates the new bundles.
11+
12+
The French Connect-an-AI-assistant page subtitle (`pages.connect_agent.subtitle`) is retranslated from the current English text, which names Claude and Doubao, and its recorded digest is refreshed; before this, the source-hash fallback served the English sentence to `fr` users because the French leaf had been translated from an older wording. Package 11 of #30512, fifth of seven locales; `de` and `ko` follow.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/cloud-connection': patch
3+
---
4+
5+
fix(cloud-connection)!: install-local's cloud branch refuses a package whose namespace or security catalog name another package or a built-in holds (#31392)
6+
7+
Clause-②: no (narrowing) — `POST /api/v1/marketplace/install-local` with a cloud-fetched package (`packageId` + `versionId`) whose register the registry refuses because another installed package owns its namespace, or because another package or a built-in holds a position, permission set or capability name it ships, answers `422 PLUGIN_REGISTER_FAILED` where it answered `200` with `hotLoaded: false` and wrote the ledger entry. Nothing is widened.
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (no-migration-prescription) no key of any schema is added, removed or re-shaped and no stored row is read differently: the narrowing is one runtime refusal at one door, for two registry refusals the inline branch of the same door already answers 422, and its remedy is the rename or uninstall the refusal names, so there is nothing for `objectstack migrate meta` to rewrite. A ledger entry an earlier build wrote this way is read as before at boot. -->
11+
12+
**BREAKING** for a cloud-branch install that relied on the lenient answer for a held namespace or a held security catalog name.
13+
14+
- **Before.** The cloud branch refused two of the registry's held-name refusals: a security catalog name the environment catalog holds (#25366) and a bare name another package holds (#31296). A package whose `manifest.namespace` another installed package owns (with no declared dependency on it), or that ships a position, permission set or capability name another package or a built-in holds, was refused by the registry and then ledgered anyway, answering `200` with `hotLoaded: false`, "loads at the next restart". It does not: both checks run again at every load with no seal, so the next boot refuses the registration again.
15+
- **Now.** Both refusals are answered `422 PLUGIN_REGISTER_FAILED` with the registry's sentence naming both holders, as the inline branch answers them. Nothing is registered or written, and an installed earlier version stays registered and ledgered. The door recognises the registry's three held-name refusals by their own code and `name`, never by a list of types or holders.
16+
- **Unchanged.** Any other register failure on the cloud branch keeps the lenient answer (`200`, `hotLoaded: false`, `hotLoadError`). Under `OS_METADATA_COLLISION=warn` the registry throws nothing for a held namespace, so the install proceeds as before. A namespace held by a writable base is still refused `409 RESOURCE_CONFLICT` before the register.
17+
18+
**The remedy.** Rename the item (or choose another namespace) in the incoming package, declare the holding app in its `manifest.dependencies` when it extends that app, rename the item in the holding package, or uninstall that package, then install again. A built-in name is never available to a package.

‎.claude/skills/pm-dispatch/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报
162162
| `domain:spec` | `packages/spec` 整包:schema 形状、`contracts/**`、退役行为半边、strictness 台账;describe/JSDoc/墓碑散文/错误 guidance 与 alias 表;`packages/spec/scripts/**`、`packages/spec/docs/**` 及按锚定规则的例外归本域的工具链(域边界枚举与席内分派见 `references/lanes/spec.md`) |
163163
| `domain:ui` | `ui/**` 全部代码:`@object-ui/*` 库与 `ui/apps/*`、`ui/packages/types` 与 schema 语料、`ui/scripts` 与门禁工具、文档随所记录的面走;`packages/console`(dist 由 `pnpm console:build` 生成 ⛔ 不手改);协议恒归 `domain:spec`,受管面归 `domain:skills`;详见 `references/lanes/ui.md` |
164164
| `domain:cloud` | 涉 cloud 即整卡归 cloud PM(`repo:cloud` 席,同挂 `repo:cloud`):读或改 cloud 代码、生产方、事实或带 cloud 半边;本仓车道 ⛔ 不认领;cloud PM 跟到关卡,余下纯本仓活由它写明 cloud 事实后另立卡;判据见 `references/cross-repo-coordination.md` |
165-
| `security` · `review`(车道,无 `domain:*` 标签) | 安全发现(无文件面;修复落在归属包);席位 `security#N`、接收、台账、派修与复核见 `references/lanes/security.md`;永不公开的规则只住 `references/security-findings.md`。复核席 `review#N` 见 `references/lanes/review.md` |
165+
| `security` · `review`(车道,无 `domain:*` 标签) | 本仓安全公告(无文件面;修复落在归属包;私有仓卡归该仓车道,cloud 即上行);席位 `security#N` 与职责见 `references/lanes/security.md`;永不公开的规则只住 `references/security-findings.md`。复核席 `review#N` 见 `references/lanes/review.md` |
166166
| (无固定归属,按落点分诊) | `packages/apps/*`、`examples/*`(归它演练的子系统)、`docs/audits/**` |
167167

168168
- 表未覆盖的包首次分诊时归类并走 PR 更新本表;新增或退役 `domain:*` 必须同批改本表。

‎.claude/skills/pm-dispatch/references/lanes/security.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
## 座位
88

9-
- 席位 `security#N`,首席 `security#1`;签名、座位贴、坐席与收班同他席。
10-
- 无 `domain:security` 标签、无 `pm:queue`、无文件面:私卡照第 3 节,修复落在归属包。
9+
- 席位 `security#N`,首席 `security#1`,只管本仓公告;签名、座位贴、坐席与收班同他席。
10+
- 无 `domain:security` 标签、无 `pm:queue`、无文件面:私卡照第 3、9 节,修复落在归属包。
1111
- 坐席者 = 能读写本仓安全公告的账号(管理员或安全经理)的会话;读不了公告 ⛔ 不坐。
1212
- 公告的读、建与写只照第 3 节。
1313

1414
## 接收与台账
1515

16-
- 接收 ①:发现者 `Notify: security · GHSA-ID`(私有仓 `OWNER/REPO#N`)门铃,私卡已由其经中继建好。
16+
- 接收 ①:发现者 `Notify: security · GHSA-ID` 门铃,公告已由其经中继建好;私有仓卡不经本席。
1717
- 接收 ②:列表比出的无台账编号(外报、无门铃或席空时建):记 `received`,经 `advisory_read` 读。
1818
- 判定:发现 ⇒ 中继 `advisory_state` 置 `draft` 走派修;非发现 ⇒ 置 `closed`,台账记非发现。
1919
- 中继拒或本席空缺照第 3、9 节。
@@ -25,7 +25,7 @@
2525
## 派修与复核
2626

2727
- 修复照第 3 节派发;L/XL、build 重、长跑或浏览器验证走 `mode:cloud`,余 `mode:subagent`。
28-
- 修复 PR 的契约复核归本席,照第 6 节;要定契约的修复交维护者前照下节。
28+
- 公告修复 PR 的契约复核归本席,照第 6 节;要定契约的修复交维护者前照下节。
2929

3030
## 呈维护者
3131

‎.claude/skills/pm-dispatch/references/lanes/triage.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
- 每轮扫 `pm:dispatched` 卡与非信箱 open PR,进展=head 提交/非分诊评论/其席改标,非 `updated_at`。
1818
- 进展逾 3h 即敲认领席 `Request: progress`,下轮读答复,无答列轮次记录;两轮无答视为掉线。
1919
- 掉线或下班席的项归在线兄弟席(`seat-lifecycle.md`),下轮敲兄弟席一次;⛔ 分诊永不释放。
20-
- 安全发现:即推 ① 后转交 `security#1` 席即止(`security.md`);有公开卡只定 `security`+p1,余不判。
20+
- 安全发现:即推 ① 后转交归属席即止(`security.md` 座位);有公开卡只定 `security`+p1,余不判。

‎.claude/skills/pm-dispatch/references/project-forms.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
- 移卡入队者→车道:p0/p1 `Blocked-by` 关闭 `Notify: unblocked`;记裁决席→被改席 `Notify: ruling`。
4646
- 席→兄弟席或他车道:认领文件面相交或须先落 `Notify: serial`,先落者落地 `Notify: landed`。
4747
- 上下线→兄弟席与分诊 `Notify: seat-online`、`Notify: seat-offline`;清单变→兄弟席 `Notify: split`。
48-
- 持发现席→`security#1`:私卡建成或误公开卡挂标即 `Notify: security`,只带编号或 `OWNER/REPO#N`。
48+
- 持发现席→`security#1`:公告建成或误公开卡挂标即 `Notify: security`,只带编号;私有仓卡不敲。
4949
- 分诊→认领席:认领卡或 open PR 闲置 ≥3h `Request: progress`;反向随记录 `Notify: progress`。
5050
- 记录 = 项上写下一步与 ETA 的评论、§C 停车或释放;同项 60 分钟一敲,答 ETA 到期前不敲。
5151
- ⛔ 不敲:回执、重发;收方订阅 PR 已载者;停车或待决策卡的项的进度;问维护者走决策卡。

‎.claude/skills/pm-dispatch/references/seat-lifecycle.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
- 分诊席与车道席会话 effort 恒 `high`;坐席时低于即登记行注明,请账号主人以 `high` 重开。
4141
- 收班同笔删 routine、关信箱、发 `seat-offline`;强制接管者代发 `seat-online`(`project-forms.md`)。
4242
- 下班席(`seat-offline`,或两敲 `Request: progress` 无答走接管四件)的在飞归同车道在线兄弟席。
43-
- 兄弟席 `Resume-from:` 引简报或轮次记录认领;待裁先等字;无兄弟席「待席」;安全归安全席。
43+
- 兄弟席 `Resume-from:` 引简报或轮次记录认领;待裁先等字;无兄弟席「待席」;公告归安全席。
4444
- 离任留守只写点名的已 ACCEPT 待队列或待人批 PR,⛔ 不读队列、不新派发、不碰未点名卡。
4545
- 换班报告默认零建议,只收三类:原则错/缺、可机械化项、平台事实变化。
4646
- 原则错/缺 → 只进简报,维护者点名才立卡;可机械化项 → 门禁/脚本卡,⛔ 不是散文。

‎.claude/skills/pm-dispatch/references/security-findings.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
- 公开仓修复只由 `security#1` 席以无卡派发令派 `os-dev`,`xhigh`;机制只进派发令与公告。
2828
- 用到公告的临时私有 fork ⇒ 修复从该 fork 落地。
2929
- 私有仓私卡 = 该仓带 `security` 标签的普通 issue,经中继 `issue_create` 立,机制写在其中。
30-
- 私有仓修复由 `security#1` 席照该卡如常派发,`xhigh`;⛔ 不另起无卡派发令或公告。
30+
- 私有仓卡归该仓车道(cloud 即 cloud 车道),照其规则派修、复核、落地;第 2、6 节照旧。
3131

3232
## 4. 跨仓发现者(应用仓量框架、cloud 席位)
3333

@@ -56,10 +56,10 @@
5656
- 立卡门、server 与 security 车道、信箱、`checklist-test` 与 `os-dev` 只指向本文,⛔ 不留第二份。
5757
- ⛔ 本规则不新增门禁、不新增标签。
5858

59-
## 9. 归属:`security#1` 席
59+
## 9. 归属:公告归 `security#1` 席,私有仓卡归该仓车道
6060

61-
- 每份安全发现从接收到发布归 `security#1` 席(章程 `lanes/security.md`),发现者只报不修。
61+
- 公开仓的公告从接收到发布归 `security#1` 席(章程 `lanes/security.md`),发现者只报不修。
6262
- ⛔ 不扩本 PR 或分支,不自开修复分支,不在同一面顺手加固;dev 只走第 5 节上报。
63-
- 席位两件事:照第 3 节建私卡;敲 `Notify: security · GHSA-ID`(私有仓 `OWNER/REPO#N`),只带编号。
64-
- 中继拒(第 3 节)⇒ 机制在会话里交 `security#1` 席;席空缺 ⇒ 交维护者;发布清单归维护者。
63+
- 席位两件事:照第 3 节建私卡;公告敲 `Notify: security · GHSA-ID`,只带编号;私有仓不敲。
64+
- 中继拒 ⇒ 机制会话里交 `security#1` 或私有仓车道席;席空缺交维护者;发布清单归维护者。
6565
- 任务绕不开它 ⇒ 报 `blocked`,只写「a security item is with the owner seat」;席位停卡,⛔ 不绕行。

‎packages/cloud-connection/src/marketplace-install-local-bare-name-conflict.test.ts‎

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@
4040
* answered before (#25366; its full matrix lives in
4141
* `marketplace-install-local-catalog-name-collision.test.ts`);
4242
* - CONTROL, the same package declaring a flow name nobody holds: `200`,
43-
* `hotLoaded: true`, registered and ledgered.
43+
* `hotLoaded: true`, registered and ledgered;
44+
* - #31392, the namespace sibling: a fresh install and an upgrade declaring
45+
* the namespace the holder owns, with no dependency on it, answer the same
46+
* `422` with the registry's namespace sentence, nothing registered or
47+
* ledgered. Measured before the fix: `200`, `hotLoaded: false`, ledgered.
48+
* The `objectql` service hands the door the engine's `manifests`, so the
49+
* holder this door installed reads as a code package (step 1f's writable
50+
* base refusal is not this one).
4451
*
4552
* A register failure that is NOT a registry refusal keeps #22695's lenient
4653
* answer; `marketplace-install-local-hot-loaded.test.ts` pins that.
@@ -154,6 +161,10 @@ async function bootPlugin() {
154161
objectql: withInstallerGrants({
155162
convertPackageBodyForward: (body: unknown) => ql.convertPackageBodyForward(body),
156163
registry: ql.registry,
164+
// [#31392] The engine's registered code packages, read live, so a
165+
// package this door installed reads as code and not as a writable
166+
// base (`isWritablePackage`), as on the real `objectql` service.
167+
get manifests() { return (ql as unknown as { manifests: Map<string, unknown> }).manifests; },
157168
syncSchemas: async () => undefined,
158169
}),
159170
};
@@ -298,3 +309,57 @@ describe('install-local cloud branch refuses a package declaring a bare name ano
298309
expectHolderFlowKept(ql);
299310
});
300311
});
312+
313+
describe('install-local cloud branch refuses a package whose namespace another package owns, before any write (#31392)', () => {
314+
const versions = {
315+
// The holder's namespace (`dispatch`), under another id, with no dependency on it.
316+
'v1-ns-held': packageVersion(INCOMING_ID, '1.0.0', [FREE_FLOW], { namespace: 'dispatch' }),
317+
'v1-free': packageVersion(INCOMING_ID, '1.0.0', [FREE_FLOW]),
318+
'v2-ns-held': packageVersion(INCOMING_ID, '2.0.0', [FREE_FLOW], { namespace: 'dispatch' }),
319+
};
320+
321+
function expectNamespaceRefusal(res: any) {
322+
expect(res.status, JSON.stringify(res.payload)).toBe(422);
323+
expect(BaseResponseSchema.safeParse(res.payload).success).toBe(true);
324+
expect(envelopeViolations(res.payload)).toEqual([]);
325+
expect(ApiErrorSchema.safeParse(res.payload.error).success).toBe(true);
326+
expect(res.payload.success).toBe(false);
327+
expect(res.payload.error.code).toBe('PLUGIN_REGISTER_FAILED');
328+
// The registry's own sentence: the namespace, its owner, and the package it stopped.
329+
expect(res.payload.error.message).toContain(`namespace "dispatch" is already owned by package "${HOLDER_ID}"`);
330+
expect(res.payload.error.message).toContain(`package "${INCOMING_ID}" cannot be installed alongside it`);
331+
}
332+
333+
it('a fresh install is refused: 422 naming the namespace and its owner, nothing registered or ledgered', async () => {
334+
serveVersions(versions);
335+
const { ql, installFromCloud, installHolder } = await bootPlugin();
336+
await installHolder();
337+
const before = ledger();
338+
339+
const res = await installFromCloud('v1-ns-held');
340+
341+
expectNamespaceRefusal(res);
342+
expect(res.payload.data).toBeUndefined();
343+
expect(ql.registry.getPackage(INCOMING_ID)).toBeUndefined();
344+
expect(ledger()).toEqual(before);
345+
expect(ledger().incoming).toBeNull();
346+
expectHolderFlowKept(ql);
347+
});
348+
349+
it('an upgrade into the held namespace is refused: 422, the installed version still registered and ledgered', async () => {
350+
serveVersions(versions);
351+
const { ql, installFromCloud, installHolder } = await bootPlugin();
352+
await installHolder();
353+
const first = await installFromCloud('v1-free');
354+
expect(first.status, JSON.stringify(first.payload)).toBe(200);
355+
const before = ledger();
356+
357+
const res = await installFromCloud('v2-ns-held');
358+
359+
expectNamespaceRefusal(res);
360+
expect(ql.registry.getPackage(INCOMING_ID)?.manifest?.version).toBe('1.0.0');
361+
expect(ledger()).toEqual(before);
362+
expect(ledger().incoming?.version).toBe('1.0.0');
363+
expectHolderFlowKept(ql);
364+
});
365+
});

0 commit comments

Comments
 (0)