Skip to content

Commit 34d869b

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-jk6i6y
2 parents 42c715c + 98a4449 commit 34d869b

28 files changed

Lines changed: 1623 additions & 54 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): `objectstack-data` states what `writeRequiresMasterRead` asks when a master is set or emptied, and whose ownership floor binds an on-behalf-of write
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
objectstack-data's `rules/relationships.md` is more exact about a `controlled_by_parent` detail's two write opt-ins. Under `sharing.controlledByParent.writeRequiresMasterRead`, setting a master on a row and emptying one both ask read (the sentence read as if only emptying did), and both still ask edit under `ownerMayEdit`. On an on-behalf-of update or delete the ownership floor binds for both users, not one. The `ownerMayEdit` bullet now says "every other write, on-behalf-of included, still needs master edit" where it listed the writes, which pays for the added words: the file is the same size. The eval case for the key also fails an answer that writes `ownerMayEdit: true` beside it, in either order, or puts the key on the `master_detail` field.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the data skill teaches the `dynamic` roll-up over a stored home amount
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-data/rules/field-types.md` § Currency now says how a roll-up of a home-currency amount is drawn as money: a `sum` / `min` / `max` / `avg` `summary` over a child field that a `homeAmount.field` names declares `currencyConfig: { currencyMode: 'dynamic' }` with no `defaultCurrency`, and is then shown in the organization's home currency (`localization.currency`) instead of as a bare number. Metadata never names the home currency (ADR-0144), so the roll-up is never `fixed` with that code; `defineStack` (`os validate`, the build) refuses `dynamic` on any other roll-up, and a `count` carries no `currencyConfig`. One worked example and a matching eval case. To pay for it, two same-file restatements are cut: the `currency` row's list of `currencyConfig` keys (§ Currency spells each) and the Autonumber snippet (the `autonumber` row and the token table carry the same `CASE-{0000}` format). No schema or runtime change.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): a position saved active through the metadata save door carries the holders of its renamed names at once
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A position saved straight to active through the metadata save door (`PUT /api/v1/meta/position/:name`, the default mode, no draft) now carries the holders of the names it lists in `renamedFrom` before the door answers, as a draft save followed by the per-item publish (`POST /api/v1/meta/position/:name/publish`) already did. Before this fix the active save announced nothing, so the holder carry ran only at the next restart: until then each holder (`sys_user_position.position`) kept the old name, which no position serves any more, and lost that position's access.
11+
12+
The active save of a position now signals the host the way the per-item publish does (`onMetaItemPublished`), awaited, after the save's projector and mutation event. `ObjectQLPlugin` turns that into `metadata:reloaded` with `changed: ['position/NAME']`, which the carry reads. Only the node that took the save announces.
13+
14+
What it does not change:
15+
16+
- Position only. An active save of any other type announces nothing new.
17+
- The per-item publish and `POST /packages/:id/publish-drafts` still announce once each; neither passes through the save door.
18+
- `duplicatePackage` and the unmanaged package import, which save every copied item through the save door, announce nothing per position: what they carry stays as it was, at the next restart.
19+
- The package-commit restore and revert doors do not save through the save door, so they announce nothing new either.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/spec': patch
4+
---
5+
6+
fix(objectql): a field a dependent package adds through `objectExtensions` is served translated on `/api/v1/meta/object`
7+
8+
`SchemaRegistry.getPackagedObjectBase` (the packaged base that `/meta` translates an object against, and that the save door's translated-echo restore reads) now also carries each field a CODE `extend` contributor adds under a name the owner does not declare, as that extender ships it. A later extender's declaration of the same name replaces an earlier one, as in the fold, and a disabled package's extension adds nothing, as the fold withholds it. Before this change such a field counted as authored after the fact. Every non-default-locale read (`GET /api/v1/meta/object`, `GET /api/v1/meta/object/:name`, the list read, the form routes) then served its `label`, help text and option labels in the source language, even when the extender's own translation pack carried them. These reads now serve the pack's translation for those fields. A Studio save of such a read stores the source text again. Default-locale reads are unchanged.
9+
10+
Unchanged: the object scalars, every field the owner declares (including one an extender redeclares), and an extender's `fieldPatches` all stay the owner's. A patched label or description still keeps its text in every language. Fields added by a tenant overlay or by an extension of tenant provenance (`_provenance: 'org'`), the `.custom` pair's included, still count as authored after the fact. `@objectstack/spec` changes only in doc comments (`TranslateDocumentOptions.packagedBase` and `translateObject`).
11+
12+
Clause-②: no
13+
Metadata-protocol: none
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/plugin-audit': patch
3+
---
4+
5+
fix(plugin-audit): an activity row names a record whose `nameField` is a lookup by the target record's title, and a tracked yes/no change reads as words in the reader's language
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
**Lookup `nameField` labels.** An object titled by a lookup or `user` field (a project member with `nameField: 'person'`, a lookup to `sys_user`) was named in its activity rows by the stored foreign key: `Created Project Member "gCX6SR…"` in `record_label` and in every created, updated and deleted sentence, while the record page header showed the person's name. The CRUD mirror now follows such a title field to the target record's own title (ADR-0079's title field of the target), through the same resolver that already titles a referenced record inside a field-change summary: the target's declared API exposure must serve `get`, a credential or `internal` title column is never read, and the read is one `id: { $in }` query per write, projected to the id and the title column. An object titled by any other field pays no read for its label. A multi-value lookup names every title it holds. The label still declares the lookup field as its source, so a reader not served that field is still served the row without it.
11+
12+
The title is read as the writer, not as the system. A writer the security layer refuses the target, or serves the target row without its title column, gets the stored value in the label, as before, and never a title the writer could not have read. An id the target has no row for also keeps the stored value. Rows written before this release keep the label they were written with.
13+
14+
**Yes/no changes.** A tracked `boolean` or `toggle` field change read as the literals `false → true`, beside select changes that already read through their option labels (`Status: New → Converted; Converted: false → true`). The value is now stored in the summary code as a boolean and worded by two new message keys in the plugin's bundles, `messages.activityValueTrue` and `messages.activityValueFalse`, in all eleven platform languages. The stored sentence uses the write locale, and a read with a locale re-composes it in the reader's locale, as the verb templates are (`Converted: No → Yes`, zh-CN `已转化: 否 → 是`). A boolean field that declares its own options keeps reading through them. A fired milestone's sentence is the author's and still interpolates a boolean token as stored.

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ See `ui/AGENTS.md` for the app-id / localStorage / auth gotchas.
303303
membership), so ask the maintainer at once to remove a queued PR by hand — then confirm from the remote that it is
304304
in neither the queue nor `origin/main`. **Draft is no barrier by itself — the barrier is this directive**, and a
305305
spent approval or a standing record IS the review record, ⛔ not a relaxation. Behind it: the queue guard refuses a
306-
governed diff without its tier's record; CODEOWNERS routes every Tier H surface but the low-risk catalogs to the
306+
governed diff without its tier's record; CODEOWNERS routes every Tier H surface but the low-risk arm's rows to the
307307
approvers, the relay asks per pull on drafts (no barrier); the post-merge audit (`check-governed-merges.mjs`) lists
308308
every governed-surface merge with its approver and merger — a merger the maintainer does not recognise, any agent
309309
approval, or a Tier S merge without a PASS record is a seat violation, filed and rolled back. No seat judges this.

‎docs/adr/0048-cross-package-metadata-collision.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ADR-0048: Cross-package metadata collision — package-id identity, namespace install gate, package-scoped resolution
22

3-
**Status**: Revised (2026-06-13) — supersedes the original *per-item collision detection* framing. The runtime guard shipped under the original proposal is **retained as a same-package authoring backstop**; the strategic direction for the app-marketplace era is revised below. · **Superseded in part by [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md)** (2026-10-31) — §3.3's sentence that a context-free read "is best-effort: it returns the first match": a read of a name a code package ships has an owner — that package, or the declared override its paired `<base>.custom` publishes — and a same-named item of a package outside that closure is served only under its own address (ADR-0146 D8); and §3.4's coexistence "by construction", for a base's dependency closure only: the paired `<base>.custom`'s item bearing a base item's name is a declared override or is refused at publish — declare or rename — and any other dependent package's item bearing a base item's name is refused at publish — rename; only the pair declares (ADR-0146 D2, ruled 2026-10-31 on #28364 and #28390). Packages with no dependency relation keep §3.3 and §3.4 as written; qualify-to-cross, the same-package overwrite and the 2026-10-08 addendum stand. · **Amended** (2026-11-07, [#30794](https://github.com/objectstack-ai/objectstack/issues/30794)): §3.5 — rename-on-install ships for **unmanaged** copies, through the one rename engine `duplicatePackage` applies; a managed install is never renamed and §3.2 stands for it as written. See the dated note under §3.5. · **Amended by [ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md)** (proposed 2026-11-08): the 2026-11-06 addendum's one-holder refusal retires type by type as each type's readers carry the package; it stays for platform-requested bare names and, as ruled (ADR-0150 Q2 = A, record [`6724050556`](https://github.com/objectstack-ai/objectstack/issues/31527#issuecomment-6724050556) on #31527), for positions. This line takes effect when ADR-0150 is accepted. · **Amended** (2026-11-09, [#31685](https://github.com/objectstack-ai/objectstack/issues/31685)): §5's authoring-lint bullet, rewritten in place — since ADR-0150 child P ([#31669](https://github.com/objectstack-ai/objectstack/issues/31669)) the bare-name finding of `naming/namespace-prefix` judges only capabilities and positions, and the refusal #30806 phase 3 was to add is withdrawn. §3.4's lint sentence stands as written; see the dated note under §3.4.
3+
**Status**: Revised (2026-06-13) — supersedes the original *per-item collision detection* framing. The runtime guard shipped under the original proposal is **retained as a same-package authoring backstop**; the strategic direction for the app-marketplace era is revised below. · **Superseded in part by [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md)** (2026-10-31) — §3.3's sentence that a context-free read "is best-effort: it returns the first match": a read of a name a code package ships has an owner — that package, or the declared override its paired `<base>.custom` publishes — and a same-named item of a package outside that closure is served only under its own address (ADR-0146 D8); and §3.4's coexistence "by construction", for a base's dependency closure only: the paired `<base>.custom`'s item bearing a base item's name is a declared override or is refused at publish — declare or rename — and any other dependent package's item bearing a base item's name is refused at publish — rename; only the pair declares (ADR-0146 D2, ruled 2026-10-31 on #28364 and #28390). Packages with no dependency relation keep §3.3 and §3.4 as written; qualify-to-cross, the same-package overwrite and the 2026-10-08 addendum stand. · **Amended** (2026-11-07, [#30794](https://github.com/objectstack-ai/objectstack/issues/30794)): §3.5 — rename-on-install ships for **unmanaged** copies, through the one rename engine `duplicatePackage` applies; a managed install is never renamed and §3.2 stands for it as written. See the dated note under §3.5. · **Amended by [ADR-0150](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md)** (proposed 2026-11-08): the 2026-11-06 addendum's one-holder refusal retires type by type as each type's readers carry the package; it stays for platform-requested bare names and, as ruled (ADR-0150 Q2 = A, record [`6724050556`](https://github.com/objectstack-ai/objectstack/issues/31527#issuecomment-6724050556) on #31527), for positions. This line takes effect when ADR-0150 is accepted. · **Amended** (2026-11-09, [#31685](https://github.com/objectstack-ai/objectstack/issues/31685)): §5's authoring-lint bullet, rewritten in place — since ADR-0150 child P ([#31669](https://github.com/objectstack-ai/objectstack/issues/31669)) the bare-name finding of `naming/namespace-prefix` judges only capabilities and positions, and the refusal #30806 phase 3 was to add is withdrawn. §3.4's lint sentence stands as written; see the dated note under §3.4. · **Amended** (2026-11-15, [#34069](https://github.com/objectstack-ai/objectstack/issues/34069)): the sentence above that "Packages with no dependency relation keep §3.3 and §3.4 as written" no longer covers `doc` for §3.3's context-free read — a by-name read of a `doc` that names no package (`GET /meta/doc/NAME` and the in-process `MetadataFacade.get` alike), of a name two or more enabled packages hold, answers `409 RESOURCE_CONFLICT` naming every holder, so §3.3's "it returns the first match" no longer describes that read (ruling record [`6893582352`](https://github.com/objectstack-ai/objectstack/issues/33264#issuecomment-6893582352) on #33264, option A; shipped by PR [#34036](https://github.com/objectstack-ai/objectstack/pull/34036): `packages/objectql/src/registry.ts#resolveItem`, which the protocol's by-name read asks before any layer through `packages/metadata-protocol/src/protocol-meta-item-reads.ts#refuseAmbiguousBareDocRead`; pinned in `packages/objectql/src/package-scoped-e8-readers.test.ts`). Unchanged: a name one package holds, a read that names its package (`?package=`, a package caller) and the environment's own item, which still answers first where the registry holds it; a disabled package holds no name. Not a re-bucketing: `doc` keeps its literal global name and its addressing (ADR-0150 D1 bucket 1), and this entry moves nothing else — §3.4's half of that sentence and ADR-0146 D8 read as before.
44
**Deciders**: ObjectStack Protocol Architects
55
**Builds on**: [ADR-0003](./0003-package-as-first-class-citizen.md) (package as first-class citizen), [ADR-0005](./0005-metadata-customization-overlay.md) (artifact vs runtime overlay precedence), [ADR-0008](./0008-metadata-repository-and-change-log.md) (metadata repository, `MetaRef` identity), [ADR-0010](./0010-metadata-protection-model.md) (package provenance / `_packageId` stamping)
66
**Consumers**: `@objectstack/objectql` (`SchemaRegistry.registerItem`, `ObjectQL.registerApp`, install path), `@objectstack/console` / `objectui` (routing + metadata resolution), package authors, CLI/CI install path, the app marketplace registry.

0 commit comments

Comments
 (0)