Skip to content

Commit e141521

Browse files
committed
docs(adr): record the paper metadata-customization module's retirement in ADR-0005
ADR-0005 named `packages/spec/src/kernel/metadata-customization.zod.ts` in two places as a kept, deliberately-retained model held for a future phase. That module was deleted whole under ADR-0049 enforce-or-remove (maintainer ruling of 2026-08-29 on #12057, executed by PR #13186), so both sentences pointed at a file that no longer exists and promised a future phase ADR-0126 §6 has since ruled out. Decides nothing new. Both original sentences are left standing as written per Prime Directive #13; the correction is appended. The full record goes once, on the substantive claim (Design principles item 3), following the inline `⚠️ Correction (#issue, date)` convention that PR #13139 applied to ADR-0126 §6.4 the same day. The References bullet is a restatement of that claim, so it gets the terse corrected fact plus a pointer to the one home rather than a second copy of the reasoning. ADR-0005's own decision is untouched: the org-scoped overlay (`allowOrgOverride` on `DEFAULT_METADATA_TYPE_REGISTRY`, `sys_metadata` org rows, the layered code/overlay/effective read) works exactly as before, and customizations remain full-JSON deltas with merge unimplemented. What changed is only the reserve the retired module represented: the RFC 7396 / 3-way-merge direction is closed rather than deferred. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KX8wnyjStaZcuMyAMNsy3N
1 parent 7404925 commit e141521

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

docs/adr/0005-metadata-customization-overlay.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,23 @@ Three different things were tangled into one place:
121121
1. **One Zod schema per metadata type.** Every metadata type (`view`, `dashboard`, `flow`, `agent`, `tool`, `object`, `report`, `skill`, `rag-pipeline`, `action`, ...) has exactly one definition source: the Zod schema in `@objectstack/spec`. **No mirrored `*.object.ts` is permitted in `packages/platform-objects/src/metadata/`.**
122122
2. **Artifact is immutable at runtime.** Out-of-box defaults always come from the compiled artifact, never written back to.
123123
3. **Customizations are full-JSON deltas, not field-level patches.** Phase 1 stores the entire item document. A finer-grained patch model (RFC 7396, 3-way merge) is out of scope — `MetadataOverlaySchema` in `metadata-customization.zod.ts` already specifies it; we keep that model available for future phases but do **not** implement merge yet.
124+
125+
⚠️ **Correction (#13185, 2026-08-29):** the second half of this principle — that a specified patch
126+
model is "kept available for future phases" — no longer holds. `MetadataOverlaySchema` and the
127+
module that declared it, `packages/spec/src/kernel/metadata-customization.zod.ts`, were **retired
128+
and deleted whole** under ADR-0049 enforce-or-remove: maintainer ruling of 2026-08-29 on
129+
[#12057](https://github.com/objectstack-ai/objectstack/issues/12057#issuecomment-5459699497)
130+
(verbatim 「同意」), executed by PR
131+
[#13186](https://github.com/objectstack-ai/objectstack/pull/13186) (merged 2026-08-29). The future
132+
phase the model was held for is itself ruled out by
133+
[ADR-0126](./0126-packaged-metadata-customization-model.md) §6: wall 3 separates upgrades from
134+
choices — a package upgrade rewrites the packaged **base**, and the customer's choices live in the
135+
activation ledger, which no upgrade merges into or un-makes — and wall 4 supersedes the paper
136+
protocol outright ("nothing may build against it"). ⛔ **This principle's own decision is
137+
unaffected** — customizations are still full-JSON deltas, field-level patches are still not
138+
implemented, and the stored unit is still the entire item document. What changed is only the
139+
reserve this sentence pointed at: the RFC 7396 / 3-way-merge direction is **closed, not
140+
deferred**, and ADR-0126 §6 is the model that replaced it.
124141
4. **Forms render from Zod, not from physical tables.** Studio's view/dashboard editors generate their forms from `@objectstack/spec` Zod schemas through `z.toJSONSchema()`. Forms never reflect a `*.object.ts` shape.
125142
5. **Whitelist by type.** Only types explicitly enabled for overlay can be saved through `PUT /api/v1/meta/*`. Phase 1 ships with `view` and `dashboard` enabled; other types return `400 customization_not_allowed`.
126143

@@ -218,7 +235,7 @@ Five files in `packages/platform-objects/src/metadata/` duplicate a Zod schema t
218235
- `packages/rest/src/rest-server.ts``PUT/GET/DELETE /api/v1/meta/:type/:name` routes
219236
- `packages/spec/src/api/protocol.zod.ts``ObjectStackProtocol` interface (`deleteMetaItem` added)
220237
- `packages/spec/src/kernel/metadata-plugin.zod.ts``MetadataTypeRegistryEntrySchema.supportsOverlay` (future hook for the whitelist)
221-
- `packages/spec/src/kernel/metadata-customization.zod.ts` — pre-existing `MetadataOverlaySchema` (kept; field-level patches are a future phase, not implemented here)
238+
- `packages/spec/src/kernel/metadata-customization.zod.ts` — pre-existing `MetadataOverlaySchema` (kept; field-level patches are a future phase, not implemented here) — ⚠️ **retired; this file no longer exists** (#13185, 2026-08-29). Deleted whole by PR [#13186](https://github.com/objectstack-ai/objectstack/pull/13186) under ADR-0049 enforce-or-remove; the correction is recorded once, under *Design principles (binding)* item 3 above.
222239
- `packages/platform-objects/src/metadata/sys-{view,flow,agent,tool,object}.object.ts` — files marked `@deprecated` by this ADR
223240
- [HotCRM reference app](https://github.com/objectstack-ai/hotcrm) — primary E2E reference workspace
224241

0 commit comments

Comments
 (0)