Skip to content

Commit 5d8e216

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-7xrx9z
2 parents 2bebc35 + ec6b5fd commit 5d8e216

28 files changed

Lines changed: 740 additions & 58 deletions
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/plugin-chatbot': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
fix(console): the AI build chat's change card names drafted objects and fields by label, and the publish-health line speaks the console's language
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
Two fixes to the AI build chat:
13+
14+
- **The change card names drafted objects and fields by their labels.** Before the app's first publish, an object the build drafted lives only in the draft overlay, so the change card read 「b6bl_quote_item · line_total」 where the customer named 「报价明细 · 小计」. The card now asks the draft overlay (`GET /meta/object/:name?preview=draft`) by name for any object, or field, that the published registry does not know. The answer is kept per object; when it does not name what a later card asks for (a field or object a later change drafted), the overlay is asked again once the conversation has moved on, at most once per object per message or turn. A published object still answers from the registry without a draft read. A name neither world knows yet (one the change is about to create) still shows as given. Nothing else in the console reads the draft overlay because of this change.
15+
- **The publish-health line under a Published badge reads the locale pack.** Its own counts ("6 sample rows live", "2 views · 3 widgets verified") were English in every locale, with an `s` picked on `=== 1`. They are now count families under `chatbot.build.health` in every pack (zh-Hant generated from zh-Hans), so a zh console reads 「6 条示例数据已上线 · 已核对 2 个视图 · …」 and Russian agrees with its number. "seed" now reads "sample data set". The findings the line lists (`seedError`, the runtime probes' `issues[].message`) are the producer's text and pass through unchanged.
16+
17+
The widening is new i18n keys only (`chatbot.build.health.*`); no key is removed or renamed.

‎.claude/skills/pm-dispatch/references/contract-review.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
出货字节,⛔ 不是已发布接受集,改它不触发 `Clause-②: yes`;legacy node10 深引用在契约之外。
1818
- 四面皆不碰 ⇒ CI 加席位自读 ⛔ 不起第二个 agent;谁跑 = 派发席,档经子代理或卡线程取。
1919
- 送审路由只住此处:车道能取 `CONTRACT_REVIEW_TIER` 才自审;取不到(账号够不到、配额拒 429、
20-
维护者限配)⇒ ⛔ 不降档 ⛔ 非分诊,落交接行并同笔敲在座 L2 席 `Request: contract-review`;
20+
维护者限配)⇒ ⛔ 不降档 ⛔ 非分诊,落交接行并同笔请 L2 席(请谁照 `lanes/l2-review.md`);
2121
无 L2 席在座改点能取该档的兄弟席,皆无则挂等 L2 标记留欠审表待 (a)(b)(c)。交接行:
2222
- `Contract-review-handoff: <l2-review#N|domain:<lane>#N> — CONTRACT_REVIEW_TIER unavailable (<HTTP status / error>, <UTC time>) · head <sha>`
2323
- 「立 skills 卡,把契约复审的路由直接改成 review 座位」「没有 fable 时,找 review 座位」(卡33157)

‎.claude/skills/pm-dispatch/references/coordinator.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
项目会话里开席位线程与卡线程、跨车道调度的那一席读本文;项目席见 `seat-lifecycle.md`。
44
它不是 `domain:*` 席:不坐座位贴、不认领卡;席位线程照 SKILL.md 与 `execution-duties.md` 跑循环。
5-
项目指令只写「按仓库规则执行;管 X、Y 车道」;规则住本仓,⛔ 不在项目指令里转贴。
6-
本文只写 coordinator 与席位线程之间的接口,七节各注明读者。
75

86
## 一、车道归属登记在座位贴(coordinator 开席位线程前读;席位线程坐席时读)
97

108
- 项目管哪些车道只由项目指令声明;每条车道开一个席位线程,坐该车道空着的座位贴。
119
- 席位线程在贴的说明段写「由 X 账户的项目负责」;贴协议与互斥照 `seat-lifecycle.md`。
1210
- 一车道归一项目:座位贴 🟢 写他账号 ⇒ 车道已有主;仲裁者是座位贴,⛔ 不是项目记忆。
1311
- ⛔ 不坐别席,另一项目在飞卡由其席跟完;维护者指令行改写 ⇒ 按 `project-forms.md` 接管。
12+
- L2 积压 ⇒ 自开一条 `l2-review` 席位线程,⛔ 不先问维护者,开后在项目聊天说一句。
13+
- 积压 = 就绪 head 等 L2 记录逾约 30 分钟,或在座审核席人均排队逾约 3 个 head。
14+
- 新席坐空座、开信箱、按认领分行;队列排空即签退加开席,⛔ 不留闲席;用量墙照第六节。
1415

1516
## 二、跨车道取卡(coordinator 每次唤醒读)
1617

@@ -34,7 +35,6 @@
3435
## 五、卡线程的 `needs_decision`(coordinator 收到时读;席位写分析时读)
3536

3637
- 规则一处:`lanes/director.md` 与 `dispatch-runbook.md` 卡线程节;本文只指不抄。
37-
- 席位写四维分析加推荐,卡并入决裁批次由维护者人工裁;⛔ 无裁决线程、无代裁。
3838
- 等裁的卡线程不占槽(见第三节);裁决记录 = 卡上裁决评论,⛔ 不落项目文件或记忆。
3939

4040
## 六、额度压力(coordinator 每次开线程前读)

‎.claude/skills/pm-dispatch/references/lanes/l2-review.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
## 座位
55

66
- 席位 `l2-review#N`,一席一座位贴;坐席者 = 能达 `CONTRACT_REVIEW_TIER` 的账号的会话。
7-
- 旧拼 `review#N`、`review`、「复核」照读;在座席签名、致它的行仍写原名,新席用 `l2-review`。
87
- 会话 effort `high`;L2 子代理恒契约审核档。
98
- 每席开一个 `pm:mailbox` PR(`mailbox-open.mjs --seat l2-review#N`);签名、坐席与收班同他席。
109

1110
## 路由
1211

13-
- 车道何时送审、敲谁只住 contract-review.md 送审路由行;敲任一 L2 席信箱,空闲者接
14-
- 互斥 = 既有 `Contract-review-claim:` 行:同 head 先贴者持有,L2 席之间同此;后者撤回弃产出。
12+
- 何时送审只住 contract-review.md 送审路由行;请谁、怎么请只住本节,⛔ 不按席号路由。
13+
- 先请本账号开的审核席(本项目线程,从线程清单与 `seat-online` 帖找);皆忙才溢至他账号席。
14+
- 同项目向 L1/L2 席请审、delta 与回告发线程消息,⛔ 不敲信箱;信箱只留跨账号或跨项目。
15+
- N 席按认领分行:欠审表每个 head 先贴 `Contract-review-claim:` 者持有;后者撤回弃产出。
1516
- 本席只兜底:接哪些 head 只住 contract-review.md 欠审接审行,欠审表 `check-owed-reviews.mjs` 同读
1617
- delta 归原 L2 审核者;L2 席下班留下旧记录 ⇒ 下一 L2 席接 delta,交接行点名它。
1718

1819
## 独立性与边界
1920

2021
- 记录恒带 `Implemented-by:`/`Reviewed-by:` 对,两会话相异;⛔ 不限账号,派发账号亦可坐。
2122
- ⛔ 不 merge、不 ready、不派发、不定级、不做人工地板动作;只写 L2 记录、认领行与门铃
22-
- 安全发现照 `security-findings.md`:记录只停在规则层,机制只进本席本地笔记。

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
- 正文首行 `Mailbox-of: <席位> · <login>`;坐席即开(`mailbox-open.mjs`)并订阅,存根记 `Mailbox:`。
3535
- 永不合并,不欠 CI,落地与台账查询排除它;移交或换账号关旧开新;评论首行 `To: <席位>`。
3636
- 次行恒为一键,下列事件必敲;一事一行 ≤200 字节,只写键与编号;表外即半态。
37-
- 车道→L2 席或兄弟席同交接行 `Request: contract-review`;反向随记录 `Notify: contract-review`。
37+
- 跨账号或跨项目:车道→L2 或兄弟席 `Request: contract-review`;反向随记录 `Notify: contract-review`。
3838
- 任一席→分诊:p0 嫌疑、main 红、确定性队列红 `Request: urgent-triage`。
3939
- 立锚卡者→分诊(缺则总监)`Request: main-red`,→破坏 PR 的席与锚卡车道 `Notify: main-red`。
4040
- 锚卡关闭:分诊(缺则总监)→正文带 `Waits-on: main-red #n` 的每张 open PR 之席 `Notify: main-green`。

‎content/docs/permissions/permissions-matrix.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ flowchart TD
370370
| 7 | **Field-Level Security** | Which fields is the user allowed to see/edit? |
371371

372372
<Callout type="tip">
373-
**Performance:** For reads, steps 2–6 are compiled into a query filter (owner-match ∪ materialized shares, AND-ed with RLS) at query time, not evaluated record-by-record. By-id writes are verified with a pre-image check: the target row is re-read through the write-scope filter before the mutation, and a row the caller cannot read answers exactly what a missing id answers (`404 RECORD_NOT_FOUND`). A predicate (`multi: true`) update or delete matches only the rows the caller can read: a row the read door would not return is not written, not counted and not refused, and above 10 000 such rows the write is refused (`400 INVALID_FILTER`) rather than narrowed by a cut-off list. A caller whose read of the object is refused writes none of its records: its by-id and predicate updates and deletes are refused, whatever rows they address. This keeps security checks efficient even on tables with millions of rows.
373+
**Performance:** For reads, steps 2–6 are compiled into a query filter (owner-match ∪ materialized shares, AND-ed with RLS) at query time, not evaluated record-by-record. By-id writes are verified with a pre-image check: the target row is re-read through the write-scope filter before the mutation, and a row the caller cannot read answers exactly what a missing id answers (`404 RECORD_NOT_FOUND`). A predicate (`multi: true`) update or delete matches only the rows the caller can read: a row the read door would not return is not written, not counted and not refused, and above 10 000 such rows the write is refused (`400 INVALID_FILTER`) rather than narrowed by a cut-off list. Under record sharing it is bounded further, by the rows the caller may write (owner depth and queue, plus edit shares for an update; a share never grants delete, ADR-0111 D3): a row the caller can only read through a read share is not written by a predicate write, even when an app `update` widener admits it, and the write answers no error; address that row by id alone to write it. A caller whose read of the object is refused writes none of its records: its by-id and predicate updates and deletes are refused, whatever rows they address. This keeps security checks efficient even on tables with millions of rows.
374374
</Callout>
375375

376376
## See also

‎content/docs/permissions/rls.mdx‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,20 @@ records, their access depth and the records shared with them, so an `update`
100100
widener reaches **only rows the caller can already read**; everything else it
101101
admits by predicate is still refused.
102102

103+
**Under record sharing, a predicate write is bounded by the write scope, not
104+
the read scope.** When record sharing is composed (`@objectstack/plugin-sharing`),
105+
a predicate (`multi: true`) `update` / `delete` on a `private` object writes only
106+
the rows the caller may **write**: their own records, their access depth and
107+
queue membership, plus **edit** shares for an `update` (a share never grants
108+
`delete`, ADR-0111 D3). A row the caller holds only through
109+
a **read** share is readable, and an app `update` widener admits it, but a
110+
predicate write does not reach it: the row is left as it was and the write
111+
answers no error. To write such a row, address it **by id alone**
112+
(`where: { id }`, or the payload `id`): a by-id write is judged by id, and the
113+
widener admits it as written. A `where` that carries a scalar `id` **beside
114+
other keys** under `multi: true`, and an `id` that is falsy (`''`, `0`), run as
115+
predicate writes and meet the same bound.
116+
103117
<Callout type="warn">
104118
**Known limitation — an app-authored write widener does nothing on a
105119
`private` object without a matching read grant.** To let a position edit

‎content/docs/releases/v17/17-2.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ an intent decision no codemod may make for you:
108108

109109
| You wrote | Decide |
110110
| :--- | :--- |
111-
| `{ where: { id, …other } }` without `multi` | declare `multi: true` so the full `where` is honoured (the result becomes the matched count), or drop the extra `where` keys to keep an unconditional single-row write |
111+
| `{ where: { id, …other } }` without `multi` | declare `multi: true` so the full `where` is honoured (the result becomes the matched count), or drop the extra `where` keys to keep an unconditional single-row write. Under record sharing the `multi: true` form is a predicate write, bounded by the caller's write scope: a row the caller holds only through a read share, admitted by an app `update` widener, is left unwritten with no error. To write that row, address it by id alone (`where: { id }`) ([details](/docs/permissions/rls)) |
112112
| `data.id` ≠ `where.id` | make the two ids equal (or drop `where.id`) to address the row by the payload id, or remove `id` from the payload to address it by `where.id` |
113113

114114
⚠️ **Flow authors reach this through `update_record` / `delete_record` nodes**

‎packages/plugins/plugin-security/src/cascade-delete-security-parity.test.ts‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,21 @@ describe('cascade delete: security parity between id-shaped and predicate-shaped
208208
}
209209
return out;
210210
};
211-
/** The record ids the audit ledger holds a `delete` row for, under `prefix`. */
211+
/**
212+
* The record ids the audit ledger holds a `delete` row for, under `prefix`,
213+
* on the fixture objects only. Every fixture id is written by this file; the
214+
* ledger also holds the `delete` rows of revoked record shares, whose ids are
215+
* generated (16 characters from an alphabet that has `_`), so a prefix
216+
* alone would match one of them by chance.
217+
*/
212218
const auditedDeletes = async (prefix: string) => {
213219
const rows = (await ql.find('sys_audit_log', { where: { action: 'delete' }, context: SYSTEM } as never)) as
214-
Array<{ record_id?: string }>;
215-
return rows.map((r) => String(r.record_id)).filter((id) => id.startsWith(prefix)).sort();
220+
Array<{ object_name?: string; record_id?: string }>;
221+
return rows
222+
.filter((r) => FIXTURE_OBJECTS.includes(String(r.object_name)))
223+
.map((r) => String(r.record_id))
224+
.filter((id) => id.startsWith(prefix))
225+
.sort();
216226
};
217227
/** The record ids still carrying a record share, under `prefix`. */
218228
const sharedRecords = async (prefix: string) => {

‎ui/packages/app-shell/src/console/__tests__/openPathObjectReaders-12811.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ const OBJECTS_READERS: Record<string, { kind: Kind; why: string }> = {
8181
why: 'read when a label is resolved for a nav entry without its own label, or a view entry; with { byName: true } (Home, recent rows) the object is read by name',
8282
},
8383
'packages/app-shell/src/hooks/useNavTargetIcon.ts': { kind: 'byName', why: "an object nav entry with no icon, its object's icon by name, as the sidebar reads that entry's label (objectstack#30126)" },
84-
'packages/app-shell/src/console/ai/AiChatPage.tsx': {
84+
'packages/app-shell/src/console/ai/changeCardLabels.ts': {
8585
kind: 'byName',
86-
why: "the chat pane's change card names its objects and fields by label, each object by name when a card asks; the chat dock mounts the pane on an app open (objectstack#32984)",
86+
why: "the chat pane's change card names its objects and fields by label, each object by name when a card asks (the published registry, then the draft overlay); the chat dock mounts the pane on an app open (objectstack#32984)",
8787
},
8888
'packages/app-shell/src/hooks/useRecentItemLabel.ts': { kind: 'byName', why: "a recent object or view entry's object, by name (objectstack#29121)" },
8989
'packages/app-shell/src/layout/ActivityObjectLabel.tsx': { kind: 'byName', why: "the inbox's and the home rail's activity rows, each row's object by name (objectstack#29121)" },

0 commit comments

Comments
 (0)