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
Follow-up to #2377 (ADR-0049 enforce-or-remove). The final object dead-property slice deliberately deferred from #3199 (merged as 5754a23).
What
Two object capability flags in the enable block are ledger-classified dead but still authored across the system objects:
Property
Schema
Ledger
enable.trash
object.zod.ts:110 — z.boolean().default(true)
spec/liveness/object.json → status: dead, "no behavior-changing reader"
enable.mru
object.zod.ts:113 — z.boolean().default(true)
spec/liveness/object.json → status: dead, "no behavior-changing reader"
No runtime consumer reads either flag — verified by grep across plugins/services/objectql/runtime. The only non-setter references are the generated i18n form labels (capabilities.trash / capabilities.mru) and the authorWarn-skip note in lint-liveness-properties.ts. Authoring them is a false affordance: toggling "Enable Recycle Bin" or "Track Recently Viewed" off changes nothing.
Why it was deferred (not a quick win)
Unlike the other #2377 removals, these are inert default(true) flags explicitly set by the system-object definitions:
trash: set in 44*.object.ts files
mru: set in 39*.object.ts files
(mostly sys-*.object.ts across packages/metadata-core and packages/platform-objects). Removing the schema property is breaking (next major) and forces touching all ~44 files to drop the now-rejected keys. High churn, low value — so #3199 left them dead + authorWarn-skipped rather than block that PR.
Remove trash and mru from the enable capabilities schema in packages/spec/src/data/object.zod.ts.
Add rejecting tombstones for enable.trash / enable.mru in UNKNOWN_KEY_GUIDANCE (point authors at the removal, matching the tags/active/abstract tombstones).
Delete the enable: { … trash, mru … } entries from all ~44 setter *.object.ts files.
Remove the two entries from packages/spec/liveness/object.json and update the ledger README count table.
Drop the capabilities.trash / capabilities.mru entries from the object authoring form (object.form.ts) and regenerate the metadata-forms i18n bundles (os i18n extract, all 4 locales).
Regenerate api-surface.json + reference docs (gen:schema + gen:docs); run check:docs.
Add a minor changeset (launch-window policy — breaking spec changes ship as minor, per check-changeset-no-major), with a migration note: the flags never gated behavior, so removal is drop-the-key only.
Verification
pnpm --filter @objectstack/spec test (full)
Spec property liveness gate (check-liveness.mts)
Full-repo build/typecheck — a missed setter surfaces as an ObjectSchema.create() unknown-key throw
check:docs + check:api-surface
Notes
Non-breaking at runtime: the metadata registry parses objects via ObjectSchema.parse(), which strips unknown keys — a stale trash/mru in a persisted payload is a no-op, not an error. The break is purely author-side (ObjectSchema.create() on hand-authored *.object.ts).
Follow-up to #2377 (ADR-0049 enforce-or-remove). The final
objectdead-property slice deliberately deferred from #3199 (merged as5754a23).What
Two object capability flags in the
enableblock are ledger-classified dead but still authored across the system objects:enable.trashobject.zod.ts:110—z.boolean().default(true)spec/liveness/object.json→status: dead, "no behavior-changing reader"enable.mruobject.zod.ts:113—z.boolean().default(true)spec/liveness/object.json→status: dead, "no behavior-changing reader"No runtime consumer reads either flag — verified by grep across plugins/services/objectql/runtime. The only non-setter references are the generated i18n form labels (
capabilities.trash/capabilities.mru) and theauthorWarn-skip note inlint-liveness-properties.ts. Authoring them is a false affordance: toggling "Enable Recycle Bin" or "Track Recently Viewed" off changes nothing.Why it was deferred (not a quick win)
Unlike the other #2377 removals, these are inert
default(true)flags explicitly set by the system-object definitions:trash:set in 44*.object.tsfilesmru:set in 39*.object.tsfiles(mostly
sys-*.object.tsacrosspackages/metadata-coreandpackages/platform-objects). Removing the schema property is breaking (next major) and forces touching all ~44 files to drop the now-rejected keys. High churn, low value — so #3199 left themdead+ authorWarn-skipped rather than block that PR.Proposed work (same pattern as #3199)
trashandmrufrom theenablecapabilities schema inpackages/spec/src/data/object.zod.ts.enable.trash/enable.mruinUNKNOWN_KEY_GUIDANCE(point authors at the removal, matching thetags/active/abstracttombstones).enable: { … trash, mru … }entries from all ~44 setter*.object.tsfiles.packages/spec/liveness/object.jsonand update the ledger README count table.capabilities.trash/capabilities.mruentries from the object authoring form (object.form.ts) and regenerate the metadata-forms i18n bundles (os i18n extract, all 4 locales).api-surface.json+ reference docs (gen:schema+gen:docs); runcheck:docs.minorchangeset (launch-window policy — breaking spec changes ship asminor, percheck-changeset-no-major), with a migration note: the flags never gated behavior, so removal is drop-the-key only.Verification
pnpm --filter @objectstack/spec test(full)check-liveness.mts)ObjectSchema.create()unknown-key throwcheck:docs+check:api-surfaceNotes
ObjectSchema.parse(), which strips unknown keys — a staletrash/mruin a persisted payload is a no-op, not an error. The break is purely author-side (ObjectSchema.create()on hand-authored*.object.ts).