From e6c0f88fe8fb0f33f4020bab4f282a2814135044 Mon Sep 17 00:00:00 2001 From: os-zhuang Date: Tue, 16 Jun 2026 17:31:25 +0800 Subject: [PATCH] chore(spec): cut orphaned object.recordTypes and object.cdc stubs Both were spec-only properties with elaborate docstrings and zero consumers in either repo (framework runtime + objectui authoring/ rendering), classified `dead` in the liveness ledger: - `recordTypes`: a Salesforce-specific concept. The platform models record variants via a discriminator field + conditional layouts (visibleWhen / form variants), so this stub is redundant. - `cdc` / `CDCConfigSchema`: aspirational enterprise change-data- capture. Low-code change propagation is served by webhooks + triggers; no streaming runtime exists. Removes false surface from the metadata contract. Gate stays green (object 56 classified), spec tests 6562 passed. Co-Authored-By: Claude Opus 4.8 (1M context) --- .changeset/cut-recordtypes-cdc.md | 4 ++++ packages/spec/liveness/object.json | 8 -------- packages/spec/src/data/object.zod.ts | 24 ------------------------ 3 files changed, 4 insertions(+), 32 deletions(-) create mode 100644 .changeset/cut-recordtypes-cdc.md diff --git a/.changeset/cut-recordtypes-cdc.md b/.changeset/cut-recordtypes-cdc.md new file mode 100644 index 0000000000..62e07fc28f --- /dev/null +++ b/.changeset/cut-recordtypes-cdc.md @@ -0,0 +1,4 @@ +--- +--- + +chore(spec): remove the orphaned `object.recordTypes` and `object.cdc` properties from `ObjectSchema`. Both were spec-only stubs with elaborate docstrings and zero consumers in either repo (framework runtime + objectui authoring/rendering): `recordTypes` (Salesforce-specific concept — the platform models record variants via a discriminator field + conditional layouts / form variants) and `cdc` / `CDCConfigSchema` (aspirational enterprise change-data-capture — low-code change propagation is served by webhooks + triggers). Removes false surface from the metadata contract; both were classified `dead` in the liveness ledger. No package version impact. diff --git a/packages/spec/liveness/object.json b/packages/spec/liveness/object.json index fef2c54965..825d458b4c 100644 --- a/packages/spec/liveness/object.json +++ b/packages/spec/liveness/object.json @@ -181,10 +181,6 @@ "status": "dead", "evidence": "aspirational; no runtime" }, - "cdc": { - "status": "dead", - "evidence": "aspirational; no runtime" - }, "softDelete": { "status": "dead", "evidence": "no runtime; duplicates the (also dead) enable.trash" @@ -193,10 +189,6 @@ "status": "dead", "evidence": "SearchConfigSchema — no runtime; duplicates enable.searchable" }, - "recordTypes": { - "status": "dead", - "evidence": "elaborate docstring, unimplemented" - }, "defaultDetailForm": { "status": "dead", "evidence": "documented fallback chain unimplemented" diff --git a/packages/spec/src/data/object.zod.ts b/packages/spec/src/data/object.zod.ts index a257134805..a36a1f23e6 100644 --- a/packages/spec/src/data/object.zod.ts +++ b/packages/spec/src/data/object.zod.ts @@ -198,23 +198,6 @@ export const PartitioningConfigSchema = lazySchema(() => z.object({ message: 'interval is required when strategy is "range"', })); -/** - * Change Data Capture (CDC) Configuration Schema - * Enables real-time data streaming to external systems - * - * @example Stream all changes to Kafka - * { - * enabled: true, - * events: ['insert', 'update', 'delete'], - * destination: 'kafka://events.objectstack' - * } - */ -export const CDCConfigSchema = lazySchema(() => z.object({ - enabled: z.boolean().describe('Enable Change Data Capture'), - events: z.array(z.enum(['insert', 'update', 'delete'])).describe('Event types to capture'), - destination: z.string().describe('Destination endpoint (e.g., "kafka://topic", "webhook://url")'), -})); - /** * Object Field Group Schema — MVP (data-layer protocol) * @@ -514,9 +497,6 @@ const ObjectSchemaBase = z.object({ // Partitioning strategy partitioning: PartitioningConfigSchema.optional().describe('Table partitioning configuration for performance'), - // Change Data Capture - cdc: CDCConfigSchema.optional().describe('Change Data Capture (CDC) configuration for real-time data streaming'), - /** * Logic & Validation (Co-located) * Best Practice: Define rules close to data. @@ -607,9 +587,6 @@ const ObjectSchemaBase = z.object({ */ enable: ObjectCapabilities.optional().describe('Enabled system features modules'), - /** Record Types */ - recordTypes: z.array(z.string()).optional().describe('Record type names for this object'), - /** Sharing Model */ sharingModel: z.enum(['private', 'read', 'read_write', 'full']).optional().describe('Default sharing model'), @@ -882,7 +859,6 @@ export type TenancyConfig = z.infer; export type SoftDeleteConfig = z.infer; export type VersioningConfig = z.infer; export type PartitioningConfig = z.infer; -export type CDCConfig = z.infer; /** * Resolved CRUD affordance matrix for an object — what generic