Skip to content

Commit ca3cc56

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-mtqfy5
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTJcKuqRSJyv696zZ9
2 parents 37edd17 + fa494d0 commit ca3cc56

30 files changed

Lines changed: 2908 additions & 21 deletions
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/metadata-protocol': minor
3+
'@objectstack/cli': minor
4+
---
5+
6+
feat(cli,metadata-protocol): `os migrate packageless-overlays` moves package-less Setup customizations of a package's view, dashboard, report, translation or email template into its paired `.custom` package as declared overrides
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: added
10+
Skills-docs: none — the one taught line this touches, `skills/objectstack-platform/SKILL.md`'s "a package-unbound Setup row still wins over the base's until D11", stays true: the ceremony moves such rows when an operator runs it, and the package-less write that makes new ones stays open until #28576, which is the change that retires that line. No file under `skills/**` teaches the `os migrate` operator ceremonies (a `git grep` of `skills/` for `packageless` and `security-catalog-overlays` names nothing).
11+
12+
**The one operator step of this release.** After upgrading, run `os migrate packageless-overlays` once (preview), then `os migrate packageless-overlays --apply`, on each deployment that has Setup customizations. Until it runs, those customizations are still served, but they stay rows of no package: they are not exported and do not reach another environment.
13+
14+
- **What moves.** Every `sys_metadata` row bound to no package, of the five overlay types (`view`, `dashboard`, `report`, `translation`, `email_template`, active or draft), over a name exactly one installed read-only package ships. It moves into that package's paired `<base>.custom` — created through the ensure door when absent and persisted to `sys_packages` — with `overrides: { package: <base>, basedOn: <the base's installed version> }` in its body, saved through the metadata save door in its own state. The new row is read back as the served override, and only then is the package-less row deleted (with its history tombstone). Every read of the name serves the same content as before. A second run moves nothing.
15+
- **What is left alone, and listed.** A name several packages ship; a row whose body already declares an override of another package; and a row the pair already overrides, active or draft (a customization made in Studio first — the report names the two ways out: delete the package-less row, or "Restore package original" in Studio and re-run). A name no package ships is environment metadata and is not touched. Permission sets and positions are not overlay types; `os migrate security-catalog-overlays` is theirs.
16+
- **Declarations missing `basedOn`.** A row of a pair, of any type a declared override applies to, that declares `overrides: { package }` with no `basedOn` is read as an override but refused on its next save. The same command records `basedOn` (the base's installed version) on it.
17+
- **Setup keeps working on a moved item.** Until the package-less write closes, a save that names no package and lands on a moved row (Setup's form save and reset) keeps that row's `overrides` block when the body carries none, and is judged as the write into the pair when the body carries one — so it is no longer refused `403 NOT_OVERRIDABLE`. A package-less delete removes the pair's row, and the package's own document is served again.
18+
- **Flags.** `--apply` (with `--yes` or the prompt), `--json`, `--force` past a busy SQLite file, `--database-url`, and `serve`'s `--preset` / `--dev`. The command is the operator's; the HTTP door that creates a pair keeps its walled refusal.
19+
20+
`ObjectStackProtocolImplementation` gains `listPackagelessOverlays()` and `migratePackagelessOverlays({ actor })`.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/formula': patch
3+
'@objectstack/objectql': patch
4+
---
5+
6+
fix(objectql,formula): a formula field whose `date()` / `datetime()` is handed text it cannot parse is a reported evaluation fault, not a silent null
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
A formula field such as `date(record.first)` on a row whose `first` holds text that is not a date (`"grace"`) read `null`, the same bytes an empty `first` gives, and nothing was logged. `date()` / `datetime()` answer an invalid Date for such text, the evaluator reports that as a success, and the invalid Date serializes to `null`, so the once-per-field formula fault line never fired.
12+
13+
- **The field now reports it.** The read path (`find`, `findOne` and a write's response) treats that invalid Date as an evaluation fault: the field reads `null` exactly as before, and the engine's logger gets the one `warn` line per object and field per engine instance that every other formula fault gets. The line says that `date()` / `datetime()` take ISO text, a timestamp or epoch milliseconds. The record's text is not quoted in the log. A date function over the bad value (`addDays(date(record.first), 1)`) reports the same way.
14+
- **An empty source is not a fault.** `null`, empty or blank text still reads `null` with no line.
15+
- **Predicates are unchanged.** `date()` still answers the same invalid Date, so `date(record.d) == today()` over non-date text is still `false`, and `visibleWhen`, validation rules and filters answer as before. `isoDate()` and `daysBetween()` over it still refuse at evaluation.
16+
- **`@objectstack/formula` gains `isUnparseableDate(value)`**: `true` for the invalid Date `date()` / `datetime()` (or `addDays` / `addMonths` over it) answered for non-empty text they could not parse, `false` for everything else, including an invalid Date from an empty source. It reads a weakly held mark and never changes what any function returns.
17+
- **What a read returns over the wire does not move.** In process, `ObjectQL#find` now hands back `null` for such a field where it handed back an invalid `Date`; serialized, both are `null`.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
- 指令行就是指派:维护者在项目里写下或改写这一行,是唯一的指派动作。
2424
- 项目聊天里的长句(「本账户坐 X;Y 的 PR 由本账户复审」)是等价写法。
2525
- 坐席即把本账号写进 🟢 行、每席开一条席位线程;⛔ 无花名册文件。
26-
- 首次坐席自建本项目的 routine:巡逻默认每小时;分诊席加每小时裸卡轮;总监席不建。
26+
- 坐席即建巡查 routine(见 `seat-lifecycle.md`);分诊席加每小时裸卡轮;总监席不建。
2727

2828
## 接管不等撞墙账号
2929

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
- ⛔ 永不从贴的 `updated_at` 或标题推死活;活性只认在任者自己的产出。
3939
- 竞态三招:动手前重 fetch 正文、审计评论时间戳先到先得、写后回读。
4040
- 收班 = 状态 flush + 在飞默认交回队列、不等落地;派发口径失效,简报 ⛔ 不列作继承裁决。
41-
- 坐席发 `seat-online`、收班简报同一动作发 `seat-offline`,键见 `project-forms.md` 〈信箱 PR〉。
42-
- 强制接管的新账号代撞墙账号发 `seat-online`;Routine 席唤不醒,读信箱靠巡查。
41+
- 坐席即建自绑巡查 routine、存根记 `Patrol:`、发 `seat-online`;收班同笔删它、发 `seat-offline`。
42+
- 强制接管者代撞墙账号发 `seat-online`,键见 `project-forms.md`;Routine 席唤不醒,读信箱靠巡查。
4343
- 离任留守只写点名的已 ACCEPT 待队列或待人批 PR,⛔ 不读队列、不新派发、不碰未点名卡。
4444
- 换班报告默认零建议,只收三类:原则错/缺、可机械化项、平台事实变化。
4545
- 原则错/缺 → 只进简报,维护者点名才立卡;可机械化项 → 门禁/脚本卡,⛔ 不是散文。
@@ -85,12 +85,12 @@
8585
## 停止条件与待命
8686

8787
- 停:队列空或 `rounds` 用尽(仅一次性调用适用);一轮 ≥ 半数派发失败或升级;维护者打断。
88-
- 常设座位队列清空不等于退场,是切换待命姿态:巡检间隔按 `execution-duties.md` 收集节②。
88+
- 队列空是待命非退场:巡查跑到收班,只维护者明令停;⛔ 不按「N 次无变化即停」的习惯。
89+
- 巡查 prompt 先认领至本席 `batch` 上限,再跑待命五项;间隔按 `execution-duties.md` 收集节②。
8990
- 待命五项各以其主节为准,⛔ 此处不另抄:findings 配合;`pm:blocked`/`pm:on-hold` 解锁扫描。
9091
- 在飞/已入队 PR 跟到 MERGED;决策箱仅在报告中列出 ⛔ 不 nag;跨车道备忘跟进。
9192

9293
## 断粮与跨墙恢复(5 小时用量墙)
9394

9495
- 权威的墙信号是失败本身:撞墙报文里的重置时刻在那一刻可得、事前查不到,记下来。
9596
- 恢复 playbook 链既有规则:逐个探在飞云卡 → 直接验收兜底或 transcript 复活 → 照常跑轮。
96-
- 项目席巡查 routine 默认每小时跑各车道待命项(含前提过时);撞墙记入存根,⛔ 无 cron 链。

‎.claude/skills/pm-dispatch/references/seat-post-protocol.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- 审计与认领评论的作者字段是平台盖章的硬读数,接管仲裁与活性判定优先用它对账正文。
1616
- 班次叙事 ⛔ 不进贴正文:逐卡状态在卡与 PR 上必填,轮次合计走轮次报告。
1717
- 存根四项:在座账号与项目 · 上任时刻 · 热文件串行队 · 指针行「姿态台账住项目」。
18-
- 第五行可选撞墙注记(预计 HH:MM 恢复);存根只在坐席、串行队改、撞墙、移交刷新。
18+
- 加 `Patrol:` 行,可选撞墙注记(预计 HH:MM 恢复);存根只在坐席、串行队改、撞墙、移交刷新。
1919
- 接管压缩:接任 PM 把交接的有效内容按四段模板重述为新正文,编辑历史即存档。
2020
- 旧账留在上一版 body revision,审计评论带版本指针(哪一版、何时)。
2121
- 热文件串行队是跨轮跨班次的常设事实:文件 → 有序卡片清单 → 每张卡认领的区域。
@@ -63,7 +63,7 @@
6363
- ⛔ 不取会话看起来起来了;零产出即技术性失败。
6464
- 回滚 = `delete_trigger` + 清空座位登记 + 失败注记。
6565
- 档位按职责挑,⛔ 不按重要性挑;Routine 席的档位与 cron 是维护者在 UI 上的可调项。
66-
- 项目席巡查默认每小时(总监席无巡查),放宽须有理由并写座位贴;协议 ⛔ 不复制当前值。
66+
- 项目席巡查默认每小时(总监席无),现值只记存根 `Patrol: TRIGGER_ID · CRON`;放宽须写理由。
6767

6868
## Epic 车道收尾与僵尸回收
6969

‎content/docs/protocol/kernel/http-protocol.mdx‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,38 @@ the created record (including server-generated fields) under `record`.
658658
}
659659
```
660660

661+
**Caller-supplied `id`:**
662+
A create may carry its own `id`; when no record holds it, the record is stored under
663+
that `id` and the response echoes it. `id` is the one key that is unique across the
664+
whole deployment — unlike a field's `unique`, which is scoped to the organization —
665+
so a create whose `id` is already held is refused with HTTP 409, and nothing is
666+
written, on a store that enforces the primary key (the SQL-family drivers do; the
667+
in-memory driver, the development and test driver, not a production store, declares
668+
no primary key, and a duplicate `id` lands there):
669+
670+
**Duplicate `id` (HTTP 409):**
671+
```json
672+
{
673+
"error": "A record with this value already exists",
674+
"code": "UNIQUE_VIOLATION",
675+
"field": "id",
676+
"object": "account"
677+
}
678+
```
679+
680+
The refusal is the same whichever record holds the `id`: one you can read, one that
681+
row-level access or the org-wide default hides from you inside your own organization,
682+
or one in another organization. It names neither that record's organization nor its
683+
owner. Every create door answers it the same way: `POST /{base_path}/{object_name}/batch`
684+
with `operation: "create"` (the row's error carries `UNIQUE_VIOLATION` with
685+
`httpStatus: 409`), `createMany`, the cross-object
686+
[`POST /api/v1/batch`](#batch-operations) (the whole batch rolls back), import, and
687+
clone's `overrides.id`. Key on `code`: `field` is best-effort, as the Constraint
688+
Violations note under [Delete Record](#delete-record) describes. A create never
689+
overwrites — change an existing record with [Update Record](#update-record). Why a
690+
global key answers this way is recorded in ADR-0120 (the 2026-11-01 amendment under
691+
its business-requirement matrix).
692+
661693
### Update Record
662694

663695
Update an existing record (partial update).

0 commit comments

Comments
 (0)