Skip to content

Commit 4cbd679

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-vouia2
2 parents 7055150 + 3e07389 commit 4cbd679

32 files changed

Lines changed: 876 additions & 548 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/service-settings': patch
3+
---
4+
5+
fix(service-settings): Setup → Company → Legal name help no longer points to an organization name under Branding
6+
7+
Clause-②: no
8+
9+
Metadata-protocol: none
10+
11+
The `legal_name` help in the Company settings page (the manifest description and the `en`, `zh-CN`, `ja-JP` and `es-ES` bundles) said the legal name "may differ from the organization name set under Branding". Branding's workspace name is the product name, not an organization name, and the Branding page is not offered at all under the `group` and `isolated` postures, where Company is. The help now reads "Registered legal name of the organization, as it appears on contracts and invoices." in every locale. Copy only; no key, value or behaviour changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/driver-sql': patch
3+
'@objectstack/cli': patch
4+
---
5+
6+
fix(driver-sql,cli): `os migrate plan` / `apply` no longer offer `--allow-destructive` for a unique index the existing rows already violate
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
The duplicate pre-flight that blocks such a `create_index` (ADR-0120 D4) said so only in the entry's message, and the apply-limit seam the two commands read asked the driver by op type. So `os migrate plan` closed with `(add --allow-destructive for drops / tightenings)`, `os migrate apply --yes` said `re-run with --allow-destructive to include them`, and that re-run refused the entry and ended PARTIAL.
12+
13+
- **`ManagedDriftEntry.applyLimit` (`@objectstack/driver-sql`, new and optional).** Why the reporting driver's apply door will not perform this entry on this database, read from its data. The duplicate pre-flight sets it on a blocked unique index, naming the conflicting groups. It is absent on every other entry, so a reader that ignores it sees the report as before. On `--json`, a blocked entry now carries this key.
14+
- **`os migrate plan` / `os migrate apply` (`@objectstack/cli`).** The apply-limit seam reads the entry's own limit first, then the driver's per-op one. A blocked unique index is listed with the conflicting groups as the reason it cannot be applied, the footer and the skip lines stop offering `--allow-destructive` for it, and it is counted among the changes that remain drift. A database with no blocked index prints as before.
15+
16+
Unchanged: `os migrate apply --allow-destructive` still names such an entry as not applied and reports the run PARTIAL with exit 1, because the database still differs from its metadata. To clear it, deduplicate the listed rows and run `os migrate plan` again.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/driver-sql': patch
4+
---
5+
6+
refactor(objectql)!: the per-table platform-object tenancy ledger is retired, and the tenant-audit mute is decided by the object's schema (ADR-0131 D13)
7+
8+
Clause-②: no (narrowing)
9+
Metadata-protocol: none
10+
11+
<!-- adr-0087: not-required (runtime-export-retired @objectstack/objectql#PLATFORM_OBJECT_TENANCY, @objectstack/objectql#classifyPlatformObjectTenancy, @objectstack/objectql#isPlatformObjectOutOfTenantAuditScope, @objectstack/objectql#tenantScopedPlatformObjects, @objectstack/objectql#PlatformObjectTenancy, @objectstack/objectql#PlatformObjectTenancyEntry) The only author-reachable removals are runtime exports of `@objectstack/objectql`'s published entry: the ledger table, its three predicates and its two types. No key of any metadata schema is removed, renamed or re-shaped, so there is nothing for `objectstack migrate meta` to rewrite and no tombstone. -->
12+
13+
**BREAKING** for code that imports the ledger from `@objectstack/objectql`. It ships as `patch` because the metadata protocol is unchanged.
14+
15+
- **`@objectstack/objectql`: the ledger and its exports are gone.** No write ever depended on them: since ADR-0131 C8 stage 8b, every object with a tenant column takes the system-write rule's derived organization or is refused, whatever its name. The ledger's last reader was the engine's tenant-audit mute, which is now read off the schema.
16+
- **The tenant-audit mute (`bypassTenantAudit` on an elevated write) is decided by the object's schema alone.** An elevated write is muted only when the object has no tenant column (`tenancy.enabled: false`, `systemFields.tenant: false`, or no tenant field) or is federated. A platform-namespace object that has a tenant column is now audited like any other. On a walled posture (`isolated` / `group`), an elevated write on such an object that reaches the SQL driver with no `tenantId` therefore prints the `[tenant-audit]` warning, once per object and operation. Nothing a write touches changes: the mute only decides whether that line is printed.
17+
- **`@objectstack/driver-sql`: the `[tenant-audit]` warning names both readings.** It no longer tells every unscoped write to "pass tenantId". A write that belongs to one organization should run in that organization's context. A write that crosses organizations on purpose, such as a platform admin the organization wall exempts or a system job over every organization, needs no fix, and the caller declares it with `bypassTenantAudit: true`. The line still starts `[tenant-audit] <op> on tenant-scoped object "<object>"`, and its metadata is unchanged.
18+
19+
**Migration** for code that imported the ledger:
20+
21+
- FROM `PLATFORM_OBJECT_TENANCY` TO the object's schema: an object is in tenant scope when `resolveTenantFieldName(schema)` (still exported) answers non-null. `scripts/platform-object-tenancy-census.json` in the repository lists, per platform object, the schema declaration that puts it outside.
22+
- FROM `classifyPlatformObjectTenancy(name)` TO `resolveTenantFieldName(schema) !== null` on the registered schema.
23+
- FROM `isPlatformObjectOutOfTenantAuditScope(name)` TO `resolveTenantFieldName(schema) === null`.
24+
- FROM `tenantScopedPlatformObjects()` TO the census's `reach: "in"` rows.
25+
- FROM `PlatformObjectTenancy` TO delete it: no classification exists any more.
26+
- FROM `PlatformObjectTenancyEntry` TO delete it: no classification exists any more.

‎.claude/agents/os-dev.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ model: opus
322322
- 全文 ⛔ 不出现 HTML 注释:sanitizer 落库后吃短尖括号片段,连反引号里的也吃。
323323
- 被吃掉标记的评论对 PM 扫描不可见;HTML 注释形不是等价写法,是坏写法。
324324
- 凡要上 GitHub 的文本,尖括号形状片段一律改占位词拼写(`FIELD`、`IDENT.MEMBER` 一类)。
325-
- 两种派发模式(`mode:subagent` 与 `mode:cloud`)下 GitHub 都是报告的权威源。
325+
- 各派发模式(`mode:subagent`、`mode:cloud`、`mode:thread`)下 GitHub 都是报告的权威源。
326326
- 写完读回那条评论到尾部:只认首行标记保不住正文,sanitizer 可从首个 tag 形片段吃到尾。
327327
- PR 正文同欠一次全文回读,评审读的正是它。
328328

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报
5656
| `director` | 以项目总监席身份运行(人工召唤;三职与章程见 `references/lanes/director.md`) | — |
5757
| `label:<name>` | backlog 过滤标签;`label:all` = 全部 open 未认领 | `pm:queue` |
5858
| `repo:<owner/name>` | 扫哪个仓的 backlog(单 issue 的落地仓看它自己的 `repo:*` 标签) | `objectstack-ai/objectstack` |
59-
| `batch:<n>` | 席位同时在飞的子代理总上限,按 `Agent` 调用与 `create_session` 计:dev、复核、普查皆计,⛔ 只读不豁免 | 默认 `3`;`n` 的维护者天花板 `5` |
59+
| `batch:<n>` | 席位同时在飞的子代理总上限,按 `Agent` 调用、`create_session` 与卡线程计:dev、复核、普查皆计,⛔ 只读不豁免 | 默认 `3`;`n` 的维护者天花板 `5` |
6060
| `rounds:<n>` | 跑 N 轮后停 | 队列清空为止 |
61-
| `mode:subagent` \| `mode:cloud` | 派发后端 | 按卡分流:S+M ⇒ `subagent`,`cloud` 只留 L/XL 等保留面 |
61+
| `mode:subagent` \| `mode:cloud` \| `mode:thread` | 派发后端 | 按卡分流:S+M ⇒ `subagent`,`cloud` 只留 L/XL 等保留面;席位是项目线程时 M 及以上、p1、`security` 一律 `thread` |
6262
| `#12 #34 …` | 显式 issue 清单,整体覆盖标签查询 | — |
6363

6464
- 无角色参数按执行姿态运行,车道由座位贴认定;角色参数令召唤词收敛为一行调用。
@@ -310,7 +310,7 @@ Worktree: `<repo>-issue-<n>`
310310
Domain: `domain:<x>`
311311
Seat: `domain:<x>#<n>` (the seat number this PM sits on; absent = seat 1)
312312
File surface: `<预期触碰的目录>` (stop on breach; explain in the report)
313-
Container & model: `<S 级机械卡 / M / L>`, `mode:subagent | mode:cloud`, `model: <档位词,引当次 --tier 输出;天花板拼 CONTRACT_REVIEW_TIER,同行引其 MANDATORY 路径行或 reason:;⛔ 不抄模型 id>`
313+
Container & model: `<S 级机械卡 / M / L>`, `mode:subagent | mode:cloud | mode:thread`, `model: <档位词,引当次 --tier 输出;天花板拼 CONTRACT_REVIEW_TIER,同行引其 MANDATORY 路径行或 reason:;⛔ 不抄模型 id>`, `effort: <medium | high | xhigh | max,按卡难度定>`
314314
Clause-②: yes | no
315315
Responsibility: `<whose code produces the risk | the platform path that already covers it, or none | who reaches it, and whether anyone uses it today>` (defect cards only, else `n/a — not a defect card`; the dispatch prompt's ruling section repeats the three answers)
316316
Thread-read: <id of the newest comment on the card at the moment this claim is written, or none>

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

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,19 @@
77
- 级别半边:p1–p3 是分诊已裁的显式排序;无级末位是分诊缺口,不是一个已裁的低优先级。
88
- `pm:blocking` 的写入与摘除都在分诊轮 sweep,依赖者全关即摘。
99
- 手工挂上的按误标处理,sweep 对着索引校正。
10-
- 种子与消费者注记在 `scripts/pm/ensure-pm-labels.sh`。
1110

1211
## 紧急卡直接分诊
1312

1413
- 授权面不含派发:⛔ 不写码、不认领、不派发。
1514
- 单一生产者纪律照旧:分诊座位在班且已在处理同卡即让行。
1615
- 正文自报 P0 或 data-integrity 的命中即走本节紧急通道。
17-
- 机械年龄告警在半状态巡查脚本,细节以脚本头为权威。
1816

1917
## 发现分诊轮细则
2018

2119
- 状态转换机制:定级出 hold ⇒ 同笔 `finding` → `pm:on-hold`,域标签保留。
2220
- hold 评论照既有纪律带日期、理由与具名重启条件,出处写进评论。
23-
- ⛔ 不设第二个标签区分维护者裁与座位定级。
2421
- 首触定级补遗:零定级评论的卡优先;关闭 not planned 附理由并列入轮次报告。
2522
- 立单 dev 只有局部视野,照实立单不压级。
26-
- 每批约定:≤5 张同族卡、同上下文逐张读;常设授权,⛔ 不逐次请示。
2723
- sweep 打包晋级五条:同类才打包(全部命中同一判据)。
2824
- 逐项清单(落点、before、after)是 PR 正文必备件。
2925
- N 项之外零改动且 PR 自证;范围外按立卡三类门槛分流,三类外进 Acceptance notes、不单开。
@@ -48,7 +44,6 @@
4844
- 判据只认在任者自己的产出:自有评论、认领、正文编辑;作者与时间戳是硬读数。
4945
- ⛔ 不算发给它的跨座位通知:收到消息不是活着的证据。
5046
- >24h 无自有产出 ⇒ 当场降级:改 `⏳ vacant` + 摘 assignee 同笔 + 证据评论(时间戳与链接)。
51-
- 在飞认领照认领协议由原认领者跟完。
5247
5348
## 分诊席读数成本三则
5449

@@ -58,7 +53,6 @@
5853
- 细节禁止复述:逐卡理由已作审计评论落卡,简报只指不拷。
5954
- 硬预算正文 ≤3000 字符,收班自报字符数;连续两轮超限即漂移。
6055
- 互斥最小尾页读法:尾页配方只覆盖座位贴的两个读数,判空缺另对正文与标题。
61-
- 第三读数(本车道 `pm:dispatched` ∪ `pm:queue` 卡最新非本 session 同席号 `Claim:`)出自车道盘点。
6256
- 配方:`issue_read get` 拿评论总数,按小 `perPage`(~15)算末页页码只读尾页。
6357
- 尾页缺读数再回翻一页,⛔ 不读整线程;返回数少于总数 ⇒ 记录可能已消失,报缺口。
6458
- 长线程状态读外包:>~15 条的线程派下限档只读子代理返回结构化摘录,尾部优先。
@@ -110,7 +104,6 @@
110104
- ⛔ 禁止记录后离场;结论表同规,表不是交付物,落账才是。
111105
- 无权执行 ⇒ 点名有权者,并当轮换标把状态搬进对方的收件箱视图或决策箱。
112106
- ⛔ 不许只留一条评论等人路过:评论不是任何人的收件箱,标签才是。
113-
- 机械半边:旗标由半状态巡查 report-only 浮出,判据以脚本头为权威;当轮执行才是修法。
114107

115108
## 云卡(`mode:cloud`)四课
116109

@@ -122,7 +115,6 @@
122115
- ⛔ 不为提问或中期汇报结束回合;开放选择按裁决与评估轴自裁,记入终报 `open_questions`。
123116
- 合法回合终点只有两个:推送完成加终报,或硬阻塞详报。
124117
- 三、交付通道:dev 自开 draft PR(`Fixes #<n>` 只写正文,`partof-closing-keyword` RULE 2,含验证记录)。
125-
- 终报以 issue 评论交付,带 `os-dev-report` 标记。
126118
- 未 attach 的姊妹仓够不着,跨仓跟进卡由 PM 代立。
127119
- trigger 定时会话维持降级通道:推送 outcome branch,终报走最后一条会话消息,PM 代开 draft PR。
128120
- 四、云卡 draft PR 一存在立即 `subscribe_pr_activity`,这是硬步骤。
@@ -134,6 +126,25 @@
134126
- 该答案与从不存在不可区分,⛔ 永不读作死亡信号。
135127
- 跨账号接班活性只认 GitHub 产出读数,draft-PR 时点交报正为此存在。
136128

129+
## 卡线程(`mode:thread`)
130+
131+
- 席位会话是项目线程(载 coordinator 通道工具)⇒ M 及以上、p1、`security` 卡一卡一线程。
132+
- S 级机械卡留席内 `mode:subagent`:开线程要重新克隆、重读技能与 `os-dev.md`,起步成本不值。
133+
- 披露纪律卡(私密细节不得离开席位会话)也留席内,认领写明;卡线程照计 `batch`。
134+
- 项目的 coordinator 跨席位统一调度卡线程;每席一个线程跑 PM 循环,卡线程即 dev。
135+
- 席位随时把候选卡交 coordinator,附优先级、派发令文件与建议 effort,⛔ 不等自己的槽位。
136+
- coordinator 按优先级开线程,p1 先;全项目上限 = 各席 `batch` 之和,满即排队。
137+
- 卡线程交回或其 PR 合入,席位当即告知 coordinator 释放槽位。
138+
- 请 coordinator 开线程附维护者原话消息:它只凭维护者明言设线程的 model 与 effort。
139+
- 席位留认领文本、派发令、契约复核、ACCEPT 与落地;线程实施、开 draft PR、驱动 CI。
140+
- 派发令落项目共享目录 `/mnt/project-files/<席位>/dispatch-<N>.md`:线程读不到席位 scratchpad。
141+
- 线程开起后第一动作:向席位报告指定推送分支并等待;⛔ 线程不贴认领、不写 assignee。
142+
- 席位按 AGENTS.md 的顺序写 assignee+`pm:dispatched`,再贴带该 `Branch:` 的认领;之后线程才开工。
143+
- 分支约定仍是 `claude/issue-<n>-<slug>`;线程只能推指定分支是实测平台例外,认领如实写。
144+
- worktree 照建;仓 `.claude/agents` 类型未加载(实测),线程照读 `os-dev.md`。
145+
- 交回:PR 与报告落地后给席位线程发一条消息(PR、head、报告要点);审核期线程不关,接 FAIL。
146+
- 容器重启杀本地后台循环:席位等服务端信号(PR 订阅事件、座位 Routine),本地 watcher 可选。
147+
137148
## subagent 批派发前置:先把本地检出钉到 main
138149

139150
- subagent 读 PM 容器本地检出的 agent 定义与技能文本,不读 `origin/main`:过期则整批过期。
@@ -168,24 +179,19 @@
168179
- ① 复述执行姿态;② 点名下一个工具调用加明令禁止后台等待。
169180
- ③ 第三次停摆判 unreliable,按接手协议重派到该分支。
170181
- 自己挂的定时器不会唤醒自己;长验证管线的派发或接力词写明前台姿态。
171-
- 生产侧条款在 os-dev 定义。
172182

173183
## 通知重放去重
174184

175-
- 重放形态可以完全正常、报告完整正确:monitor 按自己的 deadline 触发。
176185
- 身份 = 三元组(issue、分支、PR head sha)加通知自报的守护对象。
177186
- 自报缺席就用三元组自己算;判定重放 ⇒ 台账记重放与首达时间即结束。
178187

179188
## 直接验收兜底
180189

181190
- 验收动作:逐文件核对 diff 与认领申报的文件面。
182191
- 对照 `origin/main` 复核 PR 正文的前提声明与验证叙述,复核清单其余判据不减。
183-
- 抢先翻 ready 会撞上 agent 的收尾推送,故先探活后翻。
184-
- 推分支 → 开 draft PR → 立即交报告的契约住 os-dev 定义,派发令只带增量。
185192

186193
## 派发词构造细则
187194

188-
- 三分区各自的 dev 义务单源见 SKILL.md 与 os-dev 定义,派发词 ⛔ 不复述。
189195
- 兄弟 dev 报告里的成本或形状估计一律落机制假设区并注明须复测。
190196
- ⛔ 不得穿裁决的衣服转述:被当事实搬运的估计会把错误方向写死,而天真测试照绿。
191197
- 前提含 spec 有这个槽位 ⇒ 派发前先读安装包内的活性账本对应行。
@@ -201,15 +207,11 @@
201207
- ① 门禁清单单班之内即过期;全 farm 归 CI 跑一次,⛔ 不让 dev 枚举全 farm。
202208
- ② 去重或看板读数取一次(查询式加时间戳)整批共用。
203209
- 派发令写:当既有事实用,只复核其后的增量,⛔ 不重跑;dev 侧对价住 os-dev 定义。
204-
- 四轴框架块(SKILL.md 升级与决策 节)整段现取现粘、逐单随派发词下发。
205-
- 该块自黑体句起、至推荐约束句止,整段逐字粘贴,⛔ 不重打、⛔ 不摘句。
210+
- 四轴框架块(SKILL.md 升级与决策)黑体句起至推荐约束句止,逐字现取现粘,⛔ 不摘句。
206211
- 派发那刻现取,把该副本的 commit 与 md5 记进派发词。
207-
- ⛔ 仓内任何文件不得另立第三份,`check:skill-frame-sync` 全树扫;os-dev 定义没带就停下索取。
208212
- 文件面两句原文照抄:预期落点是 X。
209213
- 若实测表明真正的生产者在别包,直接按生产者侧修,落点与理由写进报告和 PR 正文。
210214
- 跨包常等于跨车道,PM 事后补跨座位声明。
211-
- 模型标识只禁内容工件:PR 标题与正文、代码注释、文档、changeset、评论。
212-
- 豁免:`.claude/agents/*` frontmatter 的 `model:`,`check:agent-model-declared` 要求。
213215
- 新 changeset 文件名用 `<issue>-<slug>.md`,⛔ 不用随机词对名。
214216
- same-day churn 行:派发时 `git log origin/main --oneline -20 -- <paths>` 见当天合并即加一行。
215217
- 该行原文:基于合并后的代码工作,issue 引用的片段可能已变,先核对当前 main。

0 commit comments

Comments
 (0)