Skip to content

Commit f35930d

Browse files
os-zhuangclaude
andcommitted
feat(spec): remove first batch of dead metadata props (#2377, A2)
Dead (unenforced + 0 set/read across all repos) props removed: - field: caseSensitive, maxRating - object: softDelete (+SoftDeleteConfigSchema), partitioning (+PartitioningConfigSchema), defaultDetailForm - dataset: measures.certified Liveness ledgers (field/object/dataset) updated; api-surface regenerated (drops SoftDeleteConfig/PartitioningConfig types only). dataset.test default assertion fixed. Overloaded-name candidates deferred (see #2377 split). Verified: full spec suite 6595 passed; check:api-surface ✓; liveness gate ✓. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 8c84c97 commit f35930d

9 files changed

Lines changed: 18 additions & 90 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"@objectstack/spec": minor
3+
---
4+
5+
Remove a first batch of dead (unenforced, unauthored) metadata properties (#2377, ADR-0049).
6+
7+
Verified set 0× / read 0× across framework + objectui + cloud + hotcrm + templates:
8+
9+
- **field**: `caseSensitive`, `maxRating`
10+
- **object**: `softDelete` (+`SoftDeleteConfigSchema`), `partitioning` (+`PartitioningConfigSchema`), `defaultDetailForm`
11+
- **dataset**: `measures.certified`
12+
13+
Liveness ledgers updated; api-surface regenerated (only the two config types dropped).
14+
Folded into the 11 line (kept `minor`). The remaining #2377 candidates with
15+
overloaded names (`tags`/`active`/`versioning`/`dependencies`/`index`/…) are
16+
intentionally **not** removed — see the issue for the safe/risky split.

packages/spec/api-surface.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,6 @@
347347
"ObjectOwnershipEnum (const)",
348348
"ObjectSchema (const)",
349349
"OperatorKey (type)",
350-
"PartitioningConfig (type)",
351-
"PartitioningConfigSchema (const)",
352350
"PoolConfig (type)",
353351
"PoolConfigSchema (const)",
354352
"QueryAST (type)",
@@ -410,8 +408,6 @@
410408
"SetOperatorSchema (const)",
411409
"ShardingConfig (type)",
412410
"ShardingConfigSchema (const)",
413-
"SoftDeleteConfig (type)",
414-
"SoftDeleteConfigSchema (const)",
415411
"SortNode (type)",
416412
"SortNodeSchema (const)",
417413
"SpecialOperatorSchema (const)",

packages/spec/liveness/dataset.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@
9898
"evidence": "packages/services/service-analytics/src/analytics-service.ts:531",
9999
"note": "measure-declared currency (ISO 4217) enriched onto result fields alongside label/format, so the renderer formats the amount with a locale-correct Intl symbol rather than a '$' baked into format."
100100
},
101-
"certified": {
102-
"status": "dead",
103-
"evidence": "no runtime consumer — analytics execution never reads it; not compiled into the Cube",
104-
"note": "measure trust/governance flag, declared but unenforced (ADR-0049 enforce-or-remove candidate). Not authorWarn'd: it may surface as an objectui badge, so it is not necessarily misleading."
105-
},
106101
"derived": {
107102
"status": "live",
108103
"evidence": "packages/services/service-analytics/src/dataset-executor.ts:247",

packages/spec/liveness/field.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,6 @@
192192
"status": "live",
193193
"note": "objectui LookupField — opt-in inline quick-create (dataSource.create from typed text) (reads allowCreate || allow_create)."
194194
},
195-
"maxRating": {
196-
"status": "dead",
197-
"evidence": "RatingField reads `max` (RatingField.tsx:13) — dead + redundant with max",
198-
"authorWarn": true,
199-
"authorHint": "The rating renderer reads `max`, not `maxRating` — set `max` instead; `maxRating` is ignored."
200-
},
201195
"columnName": {
202196
"status": "dead",
203197
"evidence": "resolveColumnName (spec system-names.ts:182) has ZERO call sites; SQL driver hardcodes column = field key",
@@ -246,10 +240,6 @@
246240
"status": "dead",
247241
"evidence": "no consumer"
248242
},
249-
"caseSensitive": {
250-
"status": "dead",
251-
"evidence": "no consumer"
252-
},
253243
"inlineTitle": {
254244
"status": "live",
255245
"evidence": "objectui: packages/app-shell/src/providers/MetadataProvider.tsx + plugin-form/deriveMasterDetail.ts",

packages/spec/liveness/object.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -201,30 +201,12 @@
201201
"authorWarn": true,
202202
"authorHint": "No record-versioning engine reads this block — setting it stores nothing and snapshots no history. Remove it (use Field.trackHistory for field-level history)."
203203
},
204-
"partitioning": {
205-
"status": "dead",
206-
"evidence": "aspirational; no runtime",
207-
"authorWarn": true,
208-
"authorHint": "No table-partitioning is applied from this block. Remove it — it has no runtime effect."
209-
},
210-
"softDelete": {
211-
"status": "dead",
212-
"evidence": "no runtime; duplicates the (also dead) enable.trash",
213-
"authorWarn": true,
214-
"authorHint": "There is no soft-delete/recycle-bin runtime. Deletes are hard deletes; remove this to avoid implying restore semantics that don't exist."
215-
},
216204
"search": {
217205
"status": "dead",
218206
"evidence": "SearchConfigSchema — no runtime; duplicates enable.searchable",
219207
"authorWarn": true,
220208
"authorHint": "No search-engine config is consumed. Remove it — records remain queryable via the normal data API regardless."
221209
},
222-
"defaultDetailForm": {
223-
"status": "dead",
224-
"evidence": "documented fallback chain unimplemented",
225-
"authorWarn": true,
226-
"authorHint": "The detail form is chosen by the view layer; this field's documented fallback chain is unimplemented and ignored. Remove it."
227-
},
228210
"recordName": {
229211
"status": "dead",
230212
"evidence": "superseded by a field of type:'autonumber' + autonumberFormat (engine.ts:757)",

packages/spec/src/data/field.zod.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,6 @@ export const FieldSchema = lazySchema(() => z.object({
509509
// addressFormat, color colorFormat/allowAlpha/presetColors, slider showValue/marks,
510510
// barcode/qr barcodeFormat/qrErrorCorrection/displayValue/allowScanning.
511511
language: z.string().optional().describe('Programming language for syntax highlighting (e.g., javascript, python, sql)'),
512-
maxRating: z.number().optional().describe('Maximum rating value (default: 5)'),
513512
step: z.number().optional().describe('Step increment for slider (default: 1)'),
514513

515514
// Currency field config
@@ -582,7 +581,6 @@ export const FieldSchema = lazySchema(() => z.object({
582581
system: z.boolean().optional().describe('Auto-injected system/audit field (e.g. created_at, updated_by, organization_id). Tools that surface system fields separately from author-declared business fields should branch on this flag.'),
583582
sortable: z.boolean().optional().default(true).describe('Whether field is sortable in list views'),
584583
inlineHelpText: z.string().optional().describe('Help text displayed below the field in forms'),
585-
caseSensitive: z.boolean().optional().describe('Whether text comparisons are case-sensitive'),
586584
/**
587585
* Auto-number display format. Literal text interleaved with `{...}` tokens:
588586
*

packages/spec/src/data/object.zod.ts

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -161,22 +161,6 @@ export const ObjectAccessConfigSchema = lazySchema(() => z.object({
161161
.describe('Default exposure posture: public (covered by wildcard grants) | private (needs explicit grant; exempt from wildcard RLS).'),
162162
}));
163163

164-
/**
165-
* Soft Delete Configuration Schema
166-
* Implements recycle bin / trash functionality
167-
*
168-
* @example Standard soft delete with cascade
169-
* {
170-
* enabled: true,
171-
* field: 'deleted_at',
172-
* cascadeDelete: true
173-
* }
174-
*/
175-
export const SoftDeleteConfigSchema = lazySchema(() => z.object({
176-
enabled: z.boolean().describe('Enable soft delete (trash/recycle bin)'),
177-
field: z.string().default('deleted_at').describe('Field name for soft delete timestamp'),
178-
cascadeDelete: z.boolean().default(false).describe('Cascade soft delete to related records'),
179-
}));
180164

181165
/**
182166
* Versioning Configuration Schema
@@ -197,32 +181,6 @@ export const VersioningConfigSchema = lazySchema(() => z.object({
197181
versionField: z.string().default('version').describe('Field name for version number/timestamp'),
198182
}));
199183

200-
/**
201-
* Partitioning Strategy Schema
202-
* Configures table partitioning for performance at scale
203-
*
204-
* @example Range partitioning by date (monthly)
205-
* {
206-
* enabled: true,
207-
* strategy: 'range',
208-
* key: 'created_at',
209-
* interval: '1 month'
210-
* }
211-
*/
212-
export const PartitioningConfigSchema = lazySchema(() => z.object({
213-
enabled: z.boolean().describe('Enable table partitioning'),
214-
strategy: z.enum(['range', 'hash', 'list']).describe('Partitioning strategy: range (date ranges), hash (consistent hashing), list (predefined values)'),
215-
key: z.string().describe('Field name to partition by'),
216-
interval: z.string().optional().describe('Partition interval for range strategy (e.g., "1 month", "1 year")'),
217-
}).refine((data) => {
218-
// If strategy is 'range', interval must be provided
219-
if (data.strategy === 'range' && !data.interval) {
220-
return false;
221-
}
222-
return true;
223-
}, {
224-
message: 'interval is required when strategy is "range"',
225-
}));
226184

227185
/**
228186
* Object Field Group Schema — MVP (data-layer protocol)
@@ -534,13 +492,11 @@ const ObjectSchemaBase = z.object({
534492
requiredPermissions: z.array(z.string()).optional().describe('[ADR-0066 D3] Capabilities required to access this object (AND-gate, checked alongside CRUD grants).'),
535493

536494
// Soft delete configuration
537-
softDelete: SoftDeleteConfigSchema.optional().describe('Soft delete (trash/recycle bin) configuration'),
538495

539496
// Versioning configuration
540497
versioning: VersioningConfigSchema.optional().describe('Record versioning and history tracking configuration'),
541498

542499
// Partitioning strategy
543-
partitioning: PartitioningConfigSchema.optional().describe('Table partitioning configuration for performance'),
544500

545501
/**
546502
* Logic & Validation (Co-located)
@@ -620,7 +576,6 @@ const ObjectSchemaBase = z.object({
620576
* same metadata drives both the public collection form and the operator's
621577
* edit panel.
622578
*/
623-
defaultDetailForm: z.string().optional().describe('Name of the default FormView for record detail / edit screens'),
624579

625580
/**
626581
* Search Engine Config
@@ -913,9 +868,7 @@ export type ObjectCapabilities = z.infer<typeof ObjectCapabilities>;
913868
export type ObjectIndex = z.infer<typeof IndexSchema>;
914869
export type TenancyConfig = z.infer<typeof TenancyConfigSchema>;
915870
export type ObjectAccessConfig = z.infer<typeof ObjectAccessConfigSchema>;
916-
export type SoftDeleteConfig = z.infer<typeof SoftDeleteConfigSchema>;
917871
export type VersioningConfig = z.infer<typeof VersioningConfigSchema>;
918-
export type PartitioningConfig = z.infer<typeof PartitioningConfigSchema>;
919872

920873
/**
921874
* Resolved CRUD affordance matrix for an object — what generic

packages/spec/src/ui/dataset.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ const base = {
1616
};
1717

1818
describe('DatasetSchema', () => {
19-
it('accepts a well-formed dataset and applies defaults (certified=false)', () => {
19+
it('accepts a well-formed dataset and applies defaults', () => {
2020
const ds = DatasetSchema.parse(base);
21-
expect(ds.measures[0].certified).toBe(false);
2221
expect(ds.object).toBe('opportunity');
2322
});
2423

packages/spec/src/ui/dataset.zod.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ export const DatasetMeasureSchema = lazySchema(() => z.object({
8181
*/
8282
currency: z.string().length(3).optional().describe('Display currency code (ISO 4217)'),
8383
/** Governance: a human-blessed metric — the review checkpoint. */
84-
certified: z.boolean().default(false).describe('Blessed metric (governance checkpoint)'),
8584
/**
8685
* Derived measure — computed from OTHER measures in this dataset by name
8786
* only. e.g. `{ op: 'ratio', of: ['won_amount', 'total_amount'] }`.
@@ -208,7 +207,7 @@ export const DatasetSchema = lazySchema(() => z.object({
208207
* object: 'opportunity',
209208
* include: ['account'],
210209
* dimensions: [{ name: 'region', field: 'account.region' }],
211-
* measures: [{ name: 'revenue', aggregate: 'sum', field: 'amount', certified: true }],
210+
* measures: [{ name: 'revenue', aggregate: 'sum', field: 'amount' }],
212211
* });
213212
* ```
214213
*/

0 commit comments

Comments
 (0)