Skip to content

Commit a407b4d

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-3b1vju
# Conflicts: # .claude/skills/pm-dispatch/references/lanes/l2-review.md
2 parents b049be8 + 0c7869c commit a407b4d

61 files changed

Lines changed: 1668 additions & 83 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: 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.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): `BulkActionResultSchema`, the per-row outcome an `execution: 'aggregate'` bulk action handler may resolve with
6+
7+
Clause-②: yes (widening) — a new optional public shape and its three exports (`BulkActionResultSchema`, `BulkActionResult`, `BulkActionResultParsed`) from `@objectstack/spec/ui`; nothing an author writes is accepted or refused differently
8+
Metadata-protocol: added
9+
10+
An aggregate bulk action is ONE dispatch for the whole selection, with every id in `params._selectedIds`. A handler that writes row by row can move some rows and fail on others, and the action contract had no declared way to say which: the grid can only report one outcome for the selection.
11+
12+
`BulkActionResultSchema` (`@objectstack/spec/ui`, beside `BulkActionExecutionSchema`) declares that answer, ahead of its reader:
13+
14+
```ts
15+
{ succeeded: string[]; failed: { id: string; message: string }[] }
16+
```
17+
18+
- **[PLANNED — not enforced].** The console does not read this value yet; its reader is the grid's bulk reader, objectstack#34269. Until that lands, a resolved aggregate call is counted as covering every selected row, so **a handler that cannot cover the whole selection must still reject.**
19+
- It is declared as the handler's whole RESOLVE value, never attached to a rejection: a rejection stays one outcome for the selection, because the `/actions` door carries no structured body on a script or flow handler's throw.
20+
- It is not the data plane's batch answer: here `succeeded` and `failed` are the row lists, not counts, and a failure's reason is `message`.
21+
- Once read, only for an `execution: 'aggregate'` dispatch: a value with neither member keeps the one-outcome report; a value with either member that does not parse is reported as unreadable, never as full success; members beyond the two lists carry no meaning.
22+
- Ids must be dispatched `params._selectedIds`: an id outside the selection is dropped, a duplicate counts once, an id in both lists counts as failed, and a selected id in neither list is reported as not confirmed, never as succeeded.
23+
24+
FROM no declared per-row answer for an aggregate handler TO a declared, exported `BulkActionResultSchema` whose reader is objectstack#34269. Nothing to migrate, and nothing to change in a handler today: until the reader lands, keep rejecting when the whole selection is not covered.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@object-ui/core': patch
3+
'@object-ui/components': patch
4+
'@object-ui/plugin-list': patch
5+
'@object-ui/plugin-grid': patch
6+
'@object-ui/plugin-report': patch
7+
'@object-ui/app-shell': patch
8+
---
9+
10+
fix(ui): CSV files the Console builds in the browser start with a UTF-8 byte-order mark, so Excel shows Chinese and other non-ASCII text correctly
11+
12+
Clause-②: no
13+
Metadata-protocol: none
14+
15+
Excel reads a CSV file that has no byte-order mark in the computer's own code page, so Chinese names and other non-ASCII values opened as garbled text. The server export already writes the mark. Six Console downloads build their CSV in the browser and did not:
16+
17+
- the list view's export when the data source cannot export on the server;
18+
- the grid's export in the same case;
19+
- the data table's Export CSV button;
20+
- a report's CSV export;
21+
- the bulk action's Download error CSV;
22+
- the temporary-password CSV after an identity import.
23+
24+
All six now build their file with the new `csvBlob(text)` from `@object-ui/core`. It puts one mark (U+FEFF, the bytes EF BB BF) before the text and types the file `text/csv;charset=utf-8`. The core package also exports the mark as `UTF8_BYTE_ORDER_MARK`. The CSV import already removes one leading mark, so a downloaded file can still be imported again. The data table's file is now typed with `charset=utf-8` too.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/console': patch
4+
---
5+
6+
fix(app-shell): a page printed in the dark theme prints on a white sheet, margins included
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
With the Console in the dark theme and "Background graphics" turned on in the print dialog, the printed sheet was dark where nothing covered it: a record print page printed a dark 12 mm frame round its white content, and a list printed its black text on a dark sheet. The theme's dark colour scheme also darkens the canvas the browser paints under the page, and on paper that canvas fills the whole sheet. On paper the Console now uses a light colour scheme, so the canvas is white. The dark theme on screen is unchanged.

‎.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`;每送审 head 起一个全新只读子代理达档审,⛔ 席内达档审(`../contract-review.md`)。
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

0 commit comments

Comments
 (0)