Skip to content

Commit 38faba5

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-dpz9e7
2 parents d217dd5 + 3b8c724 commit 38faba5

26 files changed

Lines changed: 1641 additions & 111 deletions
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/metadata-protocol': patch
4+
'@objectstack/runtime': patch
5+
---
6+
7+
fix(objectql, metadata-protocol, runtime): a package's export carries the `objectExtensions` it was installed with, and the extended object's owner's export does not
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: none
11+
12+
A package installed through `POST /api/v1/marketplace/install-local` (what `os package install` sends, and how every entry of a whole-deployment export is restored) that extends another package's object exported without its `objectExtensions`: `GET /api/v1/packages/<id>/export` answered the package's other items and no extension, while the extension's fields were folded into the owner's export instead, as if the owner had shipped them. So a deployment restored from an export lost those fields on its next export, with no error, and a `.custom` pair installed from its export no longer exported its extension.
13+
14+
- **The extending package's export** (and its entry in `GET /api/v1/packages/export`) now carries every extension it contributes as `objectExtensions`, however it was installed: an extension published through `/api/v1/meta/object_extension` (as before) or a manifest's `objectExtensions` entry (install-local, or a code package). A published extension is exported as it is stored; a manifest entry as it was registered, with `priority` written only when it is not the default `200`.
15+
- **The extended object's owner's export** now carries the object as the owner declares it, without the fields, field patches or labels of ANY other package's extension. Until now only its own `.custom` pair's extension was left out; an extension from any other installed package was folded in.
16+
- **Every served read is unchanged**: `GET /api/v1/meta/object/<name>`, the object list, the console and the data API keep serving the object with every extension folded in.
17+
18+
`SchemaRegistry` gains `getObjectExtensionsOf(packageId)`, which reads a package's `extend` contributions back as the `objectExtensions` entries they were registered from (the inverse of `registerObjectExtension`). `listItems`, `getAllObjects` and `foldObjectExtendersOnto` take an `onlyExtensionsOf` option beside `withoutExtensionsOf`: each object is resolved with only that package's `extend` contributions folded in. The metadata protocol's per-package layer (the package export) now passes `onlyExtensionsOf`, naming the listed package, and no longer passes `withoutExtensionsOf`, which keeps its meaning for any other caller.
19+
20+
Supersedes, in the same release: the `.custom` pair note for #29903 says an extension contributed by any other installed package is still folded into the base's object in the base's export. After this change it is not: the base's export leaves out every other package's extension, and that package's own export carries it.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(app-shell): Studio's publish review sheet no longer lists an `Options` change on a picklist-bound field nobody edited (#29899)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On an object with a field bound to a package picklist (`{ type: 'select', picklist: 'NAME' }`), the publish review sheet listed `~ FIELD · Options` on every publish, beside the change the author actually made. The draft is stored without the field's `options`, while the live read serves the options the runtime resolved from the picklist, and the sheet compared the two as read.
11+
12+
The sheet now compares both versions of an object in the form the publish door stores: a field that names a picklist is read without `options` on both sides. A field with its own inline `options` is untouched, so a real options change there is still listed, and a field moved between a picklist and inline options still lists both keys.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/data-objectstack': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
A `ConnectionError` for a request nothing answered (an unreachable host, a rejected `fetch`) no longer reads as a server that answered with a 503 (#29916).
9+
10+
- The `ConnectionError` constructor leaves `statusCode` undefined when the caller passes none. Before, it stamped `503`. `connect()` builds it that way when discovery's `fetch` rejects, every data method opens with `await this.connect()`, and the post-connect `error` connection state builds it the same way, so a read against a down backend was taken for the server's own answer. `answeredLoadFailure` now returns `null` for it and `classifyLoadError` reads `network`, so a failed-read state keeps its "check your connection" sentence.
11+
- A discovery read the server answered with an error status (`!res.ok`) now carries that status (a 401 reads as `unauthorized`), instead of the invented 503.
12+
- An answered 503 or 504 through `createErrorFromResponse` keeps its status, as before.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/plugin-security': patch
3+
---
4+
5+
fix(plugin-security): a delegated administrator's refused assignment write answers the same for a row it cannot read as for a missing one
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A delegated administrator — a caller holding an `adminScope`, an organization administrator who holds one included — updates or removes an assignment row (`sys_user_position` or `sys_user_permission_set`) by id. The delegated-administration gate (ADR-0090 D12) now asks first whether the caller itself reads that row, in its own context.
11+
12+
- **A row the caller cannot read** is refused with exactly the answer an id that names no row gets: `403 PERMISSION_DENIED`, "the assignment row it addresses could not be read", with the same details. Both are answered by the gate; an id that names no row is no longer handed on, so a removal of one answers that refusal instead of `404 RECORD_NOT_FOUND`.
13+
- **A row the caller reads** keeps the verdict and the guidance it had: the gate judges the stored row, as before.
14+
- **A caller the read door refuses outright** (no read grant on the table) is answered as before: the read refusal, for every id the gate refuses, and the writes it was admitted are still admitted.
15+
- **Unchanged.** Inserts, tenant-level administrators, and organization administrators who hold no scope are judged as before.

‎.claude/skills/pm-dispatch/references/execution-duties.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
- ③ 新卡预读:复现、查重查询与命中数、一行 `Suggested-grade: p<n> · <理由>`;⛔ 不写级标签。
6161
- ④ 本车道 `finding` 卡补缺的 `reach:` 或复现,或写明为何不合三类。
6262
- ⛔ 不静默等分诊:敲信箱键(`project-forms.md`);报「等分诊」须引所敲评论 id,引不出即未问。
63+
- 缺审计评论当轮敲 `Request: triage · #n · first-touch audit`,分诊空席敲总监,⛔ 不改报维护者。
6364

6465
## 认领(先认领后动工)
6566

@@ -117,8 +118,7 @@
117118
- 自审随面定档:仅申报面车道席作 `TIER_DEFAULT` 记录;余面未达档 ⛔ 不自审,起隔离子代理。
118119
- 降档出口两条:额度耗尽豁免(达档实测不可用才落默认判断档,⛔ 不再往下)与主动预降。
119120
- 额度墙只向下(降档或降并发)⛔ 永不向上;临时偏离记座位贴带结束条件,逐次巡检重读。
120-
- 降档的档位与理由记入认领评论 Container & model 行;档位逐次派发显式传参,永不省略。
121-
- effort 按卡难度定、与档位并列,写进 Container & model 行与派发令,派发显式传参,⛔ 不留空。
121+
- effort 按卡难度定,与档位、降档理由写进 Container & model 行与派发令,显式传参,⛔ 不留空。
122122
- S 机械 `medium`;M `high`(默认);L/XL/security/p1/契约复核/四轴分析/ADR `xhigh`;`max` 凭点名/常设令。
123123
- 解析顺序、pin 语义与允许名单回退陷阱以 os-dev 定义 frontmatter 注释为权威。
124124
- 分诊 suggestion 行是输入不是决定,不采纳给理由。

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
先敲其席(无信箱按名)过下轮无答且回收需其一句;待裁或被具名 `Blocked-by:`、`status:parked`
1414
卡、所骑栈阻者与信箱、Version PR 不算。⑦席位或子代理被拒、需人做的动作,⛔ 不代做。
1515
- 不推:定级、治半状态、解锁、契约复核(PASS/FAIL 归车道)、门铃答复、健康绿读数。
16+
- sweep 加推导 `pm:queue`/`pm:blocked` 无审计评论卡(豁免照 H74 行),照未定级首触补审计并报数。
1617
- 每轮扫 `pm:dispatched` 卡与非信箱 open PR,进展=head 提交/非分诊评论/其席改标,非 `updated_at`。
1718
- 进展逾 3h 即敲认领席 `Request: progress`,下轮读答复,无答列轮次记录;两轮无答视为掉线。
1819
- 掉线或下班席的项归在线兄弟席(`seat-lifecycle.md`),下轮敲兄弟席一次;⛔ 分诊永不释放。
1920
- 安全发现:即推 ① 后转交 `security#1` 席即止(`security.md`);有公开卡只定 `security`+p1,余不判。
20-
- `security#1` 空缺时沿用 `security-findings.md` 第 7 节处置,⛔ 不代席、不追加细节。

‎packages/metadata-protocol/src/protocol-meta-list-reads.ts‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@ export async function readFlattenedMetaItems(host: Pick<ProtocolHost, 'artifactL
8989
// and exports every package, enabled or not); the effective and the
9090
// execution reads hide them, at the registry and after the merges below.
9191
const keepDisabledPackages = layer === 'per-package';
92-
// [#29903, ADR-0146 D8 item 3] …and it serves a package's objects as the
93-
// package declares them: its `.custom` pair's extension of one is the
94-
// pair's item, exported as the pair's `objectExtensions` entry, never
95-
// folded into the base's object for the base's export (a field and its
96-
// patches would travel twice, the second time as the base's). Every
97-
// other contributor folds as on the effective read, and the effective
98-
// and execution reads keep the pair's extension in the object they serve.
99-
const pairOfLayer = layer === 'per-package' && packageId ? customizationPackageId(packageId) : undefined;
100-
const withoutExtensionsOf = pairOfLayer?.ok ? pairOfLayer.value : undefined;
92+
// [#29903, #29872, ADR-0146 D8 item 3] …and it serves a package's objects
93+
// as the package declares them: another package's extension of one (the
94+
// `.custom` pair's, or any other installed package's) is that package's,
95+
// exported as its own `objectExtensions` entry, never folded into the
96+
// owner's object for the owner's export (a field and its patches would
97+
// travel twice, the second time as the owner's). Only the package's own
98+
// extensions fold, and the effective and execution reads keep every
99+
// extension in the object they serve.
100+
const onlyExtensionsOf = layer === 'per-package' && packageId ? packageId : undefined;
101101
const listRegistry = (type: string): unknown[] => (keepDisabledPackages
102102
? host.engine.registry.listItems(type, packageId, {
103103
includeDisabledPackages: true,
104-
...(withoutExtensionsOf !== undefined ? { withoutExtensionsOf } : {}),
104+
...(onlyExtensionsOf !== undefined ? { onlyExtensionsOf } : {}),
105105
})
106106
: host.engine.registry.listItems(type, packageId));
107107
// ── [ADR-0131 D6] The environment → code read ──────────────────────
@@ -263,10 +263,10 @@ export async function readFlattenedMetaItems(host: Pick<ProtocolHost, 'artifactL
263263
// object disagree the moment a row exists. Both routes were
264264
// wrong here together, which is why #7556's byName===listed
265265
// pin stayed green through this defect.
266-
// [#29903] …without the package's pair's extension on the
267-
// per-package layer, as its registry items are listed.
266+
// [#29903, #29872] …with only the package's own extensions on
267+
// the per-package layer, as its registry items are listed.
268268
return host.foldObjectExtendersFromRegistry(
269-
request.type, (data as { name?: unknown } | null)?.name, data, withoutExtensionsOf,
269+
request.type, (data as { name?: unknown } | null)?.name, data, onlyExtensionsOf,
270270
);
271271
}, unseated, { servedOverride });
272272

‎packages/metadata-protocol/src/protocol-object-extender-fold.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function foldObjectExtendersFromRegistry(
4646
type: string,
4747
name: unknown,
4848
body: unknown,
49-
withoutExtensionsOf?: string,
49+
onlyExtensionsOf?: string,
5050
): unknown {
5151
const singular = PLURAL_TO_SINGULAR[type] ?? type;
5252
if (singular !== 'object') return body;
@@ -60,11 +60,12 @@ export function foldObjectExtendersFromRegistry(
6060
// cannot fold answers exactly as it did before.
6161
if (!registry || typeof registry.foldObjectExtendersOnto !== 'function') return body;
6262
try {
63-
// [#29903] `withoutExtensionsOf`: that package's `extend` contributions
64-
// are left out of the fold (the per-package layer names a base's pair).
65-
return withoutExtensionsOf === undefined
63+
// [#29903, #29872] `onlyExtensionsOf`: every other package's `extend`
64+
// contributions are left out of the fold (the per-package layer names
65+
// the listed package).
66+
return onlyExtensionsOf === undefined
6667
? registry.foldObjectExtendersOnto(name, body)
67-
: registry.foldObjectExtendersOnto(name, body, { withoutExtensionsOf });
68+
: registry.foldObjectExtendersOnto(name, body, { onlyExtensionsOf });
6869
} catch {
6970
// The fold is a read over in-memory contributors; a failure here
7071
// must not turn a served schema into a 5xx.

‎packages/metadata-protocol/src/protocol.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3526,13 +3526,13 @@ export class ObjectStackProtocolImplementation implements
35263526
* (see {@link SchemaRegistry.foldObjectExtendersOnto}), so applying it twice
35273527
* would duplicate both.
35283528
*/
3529-
private foldObjectExtendersFromRegistry(type: string, name: unknown, body: unknown, withoutExtensionsOf?: string): unknown {
3529+
private foldObjectExtendersFromRegistry(type: string, name: unknown, body: unknown, onlyExtensionsOf?: string): unknown {
35303530
// [#25467 cut 30] The body moved to `protocol-object-extender-fold.ts` (see `ObjectExtenderFoldHost`).
35313531
const readEngine = () => this.engine;
35323532
const host: ThisParameterType<typeof foldObjectExtendersFromRegistry> = {
35333533
get engine() { return readEngine(); },
35343534
};
3535-
return foldObjectExtendersFromRegistry.call(host, type, name, body, withoutExtensionsOf);
3535+
return foldObjectExtendersFromRegistry.call(host, type, name, body, onlyExtensionsOf);
35363536
}
35373537

35383538
/**

0 commit comments

Comments
 (0)