You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9210175
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/adr/0070-package-first-authoring.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# ADR-0070: Package-first authoring — every runtime-authored item lives in a writable package (base); no orphans
2
2
3
-
**Status**: Accepted (2026-06-24) — P1–P3 implemented, merged & live-verified (see *Implementation status*); D4–D6 remaining · **Superseded in part by [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md)** (2026-10-31) — D3's prompt to create a base, for the paired case only: a customer's first customization of an installed base lands in the auto-created `<base>.custom` package without a prompt (ADR-0146 D3); D5's destination for a package-less overlay row of a packaged item: the base's `<base>.custom`, as a declared override, after which the package-less write closes (ADR-0146 D11). D1, D2, D4 and D6 stand; D3's prompt stands everywhere else. · **Amended** (2026-10-31, [#28117](https://github.com/objectstack-ai/objectstack/issues/28117) — the maintainer's ruling of 2026-10-30, 「大包 + 设置里启用模块」, then 「同意」: a `type: module` sub-package of an installed app may be **disabled**, not authored into, by an admin, on the tie PR [#28308](https://github.com/objectstack-ai/objectstack/pull/28308) shipped; see the amendment note under D2. D2's two kinds and its writability predicate stand.) · **Amended** (2026-11-29, [#38150](https://github.com/objectstack-ai/objectstack/issues/38150) — ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 3, ruled C, as [ADR-0084](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org) records it: D5's "move into a base" is the move-in door, and D5's bulk assignment to a default base is superseded; see the amendment note under D5. D1 and D6 stand.) · **Amended** (2026-12-03, [#38174](https://github.com/objectstack-ai/objectstack/issues/38174) — ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 2, ruled A, as [ADR-0084](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org) records it, and ruling record [comment 7380917604](https://github.com/objectstack-ai/objectstack/issues/38174#issuecomment-7380917604), ruled A: the kernel refuses a create that names no package, five writers keep a named exemption (the four of the first ruling and, by the second, the organization-ownership ceremony's conversions of rows stored before the upgrade), and a loose row that exists is still saved in place; D1 is complete with the code PR cut from #38174; see the amendment note under D1. D1's text stands.)
3
+
**Status**: Accepted (2026-06-24) — P1–P3 implemented, merged & live-verified (see *Implementation status*); D4–D6 remaining · **Superseded in part by [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md)** (2026-10-31) — D3's prompt to create a base, for the paired case only: a customer's first customization of an installed base lands in the auto-created `<base>.custom` package without a prompt (ADR-0146 D3); D5's destination for a package-less overlay row of a packaged item: the base's `<base>.custom`, as a declared override, after which the package-less write closes (ADR-0146 D11). D1, D2, D4 and D6 stand; D3's prompt stands everywhere else. · **Amended** (2026-10-31, [#28117](https://github.com/objectstack-ai/objectstack/issues/28117) — the maintainer's ruling of 2026-10-30, 「大包 + 设置里启用模块」, then 「同意」: a `type: module` sub-package of an installed app may be **disabled**, not authored into, by an admin, on the tie PR [#28308](https://github.com/objectstack-ai/objectstack/pull/28308) shipped; see the amendment note under D2. D2's two kinds and its writability predicate stand.) · **Amended** (2026-11-29, [#38150](https://github.com/objectstack-ai/objectstack/issues/38150) — ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 3, ruled C, as [ADR-0084](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org) records it: D5's "move into a base" is the move-in door, and D5's bulk assignment to a default base is superseded; see the amendment note under D5. D1 and D6 stand.) · **Amended** (2026-12-03, [#38174](https://github.com/objectstack-ai/objectstack/issues/38174) — ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 2, ruled A, as [ADR-0084](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org) records it, and ruling record [comment 7380917604](https://github.com/objectstack-ai/objectstack/issues/38174#issuecomment-7380917604), ruled A: the kernel refuses a create that names no package, five writers keep a named exemption (the four of the first ruling and, by the second, the organization-ownership ceremony's conversions of rows stored before the upgrade), and a loose row that exists is still saved in place; D1 is complete with [PR #39386](https://github.com/objectstack-ai/objectstack/pull/39386); see the amendment note under D1. D1's text stands.)
4
4
**Deciders**: ObjectStack Protocol Architects
5
5
**Builds on**: [ADR-0005](./0005-metadata-customization-overlay.md) (`allowOrgOverride` / runtime overlay model; one Zod source per type), [ADR-0048](./0048-cross-package-metadata-collision.md) (one app per package; package id is the addressing unit), [ADR-0033](./0033-ai-assisted-metadata-authoring.md) (AI authors metadata as drafts), [ADR-0067](./0067-commit-history-and-rollback-for-ai-authoring.md) (commit history & rollback for AI authoring)
@@ -23,7 +23,7 @@ Built across the three surfaces and verified end-to-end in a real environment vi
23
23
-**P3 — AI (D3)** — `../cloud``service-ai-studio` ([cloud#479](https://github.com/objectstack-ai/cloud/pull/479), [cloud#481](https://github.com/objectstack-ai/cloud/pull/481); tests [cloud#480](https://github.com/objectstack-ai/cloud/pull/480)): drops the shared `com.workspace` catch-all and auto-creates an **intentional named** base via `protocol.installPackage` (a real, Studio-visible package); single-writable-base coherence groups an incremental build into one base; an explicit platform/system `packageId` is discarded; empty field props are sanitized.
24
24
-**Live dogfood (real LLM + runtime)**: a one-sentence magic build plus iterative business-user changes (add a related object, add a field) all landed in **one** app base (`app.iojn`), live and editable — no `com.workspace`, no orphans.
25
25
-**Remaining**: **D4** (package-as-lifecycle-unit: delete-cascade / export / duplicate), **D5** (orphan migration + stopgap removal), **D6** (framing). The P1 kernel rejection becomes the runtime backstop once the framework release is consumed by the cloud runtime (today's runtime links the published framework).
26
-
-**D1 complete (2026-12-03, [#38174](https://github.com/objectstack-ai/objectstack/issues/38174))** — P1 refused a runtime create that names a read-only package, and still accepted one that names no package. The code PR cut from #38174 closes that create too: the kernel save answers `422 WRITABLE_PACKAGE_REQUIRED` and names the writable packages. D1 is complete, and D3's Kernel bullet is done; the amendment note under D1 has the exemptions and what stays open.
26
+
-**D1 complete (2026-12-03, [#38174](https://github.com/objectstack-ai/objectstack/issues/38174))** — P1 refused a runtime create that names a read-only package, and still accepted one that names no package. [PR #39386](https://github.com/objectstack-ai/objectstack/pull/39386) closes that create too: the kernel save answers `422 WRITABLE_PACKAGE_REQUIRED` and names the writable packages. D1 is complete, and D3's Kernel bullet is done; the amendment note under D1 has the exemptions and what stays open.
27
27
28
28
## TL;DR
29
29
@@ -57,7 +57,7 @@ A runtime **create** (`intent = runtime-only`, i.e. not an overlay of an artifac
57
57
-`null` / `sys_metadata`-scope ceases to be a *write* destination for new items. It survives only as (a) the read-side rehydration tag for legacy rows and (b) the source set for the D5 migration.
58
58
- Overlays of artifact items (`intent = override-artifact`, `allowOrgOverride`) are **unchanged** — they keep their binding to the packaged item they customise.
59
59
60
-
> **Amended 2026-12-03 ([#38174](https://github.com/objectstack-ai/objectstack/issues/38174), ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 2, ruled A, written into [ADR-0084's amendment of 2026-11-26](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org); and ruling record [comment 7380917604](https://github.com/objectstack-ai/objectstack/issues/38174#issuecomment-7380917604), ruled A) — the kernel refuses a create that names no package; five writers keep a named exemption, and a loose row that exists is still saved in place.** This note records the implementation status of the decision above, with the exemptions the two rulings name. Before the code PR cut from #38174, the kernel enforced one half of it: it refused a runtime create that named a read-only package, and it accepted one that named no package and stored a loose row. That PR closes the second half, in the same phase as the interface's ask and after it, with no flag.
60
+
> **Amended 2026-12-03 ([#38174](https://github.com/objectstack-ai/objectstack/issues/38174), ruling record [comment 7184753035](https://github.com/objectstack-ai/objectstack/issues/37424#issuecomment-7184753035), question 2, ruled A, written into [ADR-0084's amendment of 2026-11-26](./0084-application-builder-information-architecture.md#amendment-2026-11-26-org); and ruling record [comment 7380917604](https://github.com/objectstack-ai/objectstack/issues/38174#issuecomment-7380917604), ruled A) — the kernel refuses a create that names no package; five writers keep a named exemption, and a loose row that exists is still saved in place.** This note records the implementation status of the decision above, with the exemptions the two rulings name. Before [PR #39386](https://github.com/objectstack-ai/objectstack/pull/39386), the kernel enforced one half of it: it refused a runtime create that named a read-only package, and it accepted one that named no package and stored a loose row. That PR closes the second half, in the same phase as the interface's ask and after it, with no flag.
61
61
>
62
62
> -**What is refused.** A save through `protocol.saveMetaItem`, draft or publish, that names no package is a create when no package holds the name, as an item or as a draft, and no package-less row or draft of it is stored. It is refused before anything is written, with `422 WRITABLE_PACKAGE_REQUIRED`, D1's own code, in a sentence that names the type and the name and lists, up to a cap, the writable packages the caller may name. `os meta register` is closed with the rest: a new item needs its `--package`.
63
63
> -**Five writers keep a named exemption, and no other.** The ruling of 2026-11-26 names four. An overlay of a kernel item, until the platform pair's whitelist exists: an overlay is `intent = override-artifact`, which the third bullet above leaves unchanged. The ruled import of an external datasource, which the server stamps `writeFace: 'external-import'`. A migration that preserves a binding, which re-saves a stored row under a server-stated `source`. Platform registration, which writes the metadata service's own store and does not pass the kernel save. The ruling of 2026-12-03 names the fifth, which the next bullet gives with its bound. A remote caller can state none of the marks these exemptions are read by. Decisions Q-a, answered A, and Q-b, answered C, add no metadata type and no case to the five (ADR-0084's first note of 2026-12-03 gives them).
0 commit comments