Skip to content

Commit b659111

Browse files
os-zhuangclaude
andauthored
feat(spec)!: remove dead author-facing metadata properties (#2377, A2) (#3176)
* feat(spec)!: remove dead author-facing metadata properties (#2377) Removes spec properties that parsed but had no runtime consumer (ADR-0049 enforce-or-remove) — a false affordance, especially for AI-authored metadata. Follow-up slice to #2402. Verified dead against packages/spec/liveness/*.json and a repo-wide reader grep. Removed: - field: vectorConfig (+VectorConfigSchema+types), fileAttachmentConfig (+FileAttachmentConfigSchema+types), dependencies - object: versioning, softDelete, search, recordName, keyPrefix (+ their sub-schemas/types) — each now a rejecting tombstone in UNKNOWN_KEY_GUIDANCE - action: timeout - agent: planning.strategy, planning.allowReplan (keep planning.maxIterations) - dataset: measures.certified Ledgers, ledger README table, api-surface.json, and json-schema.manifest.json updated; spec tests/fixtures migrated (analytics/rest/lint/cli). Deferred the authoring-form-surfaced dead props (field.index/columnName/referenceFilters; object.tags/active/isSystem/abstract/enable.searchable/trash/mru; agent.tenantId) and action.type:'form' — they cascade into i18n/lint/UX and stay authorWarn'd. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011XchBKhKdjbhQZymt9Gn9B * docs(spec): regenerate reference docs after dead-prop removal (#2377) Regenerated content/docs/references/ from the updated spec schema (pnpm gen:schema && gen:docs) — field/object/action/agent/dataset reference pages drop the removed properties; data/search-engine.mdx and api/object.mdx removed as spec no longer defines them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011XchBKhKdjbhQZymt9Gn9B * chore: version dead-prop removal as minor per launch-window policy (#2377) The whole publishable set is in the Changesets fixed group, so a `major` would promote the entire monorepo. Breaking spec cleanups ride the minor line during the launch window (precedent: #2402 → 11.1.0). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011XchBKhKdjbhQZymt9Gn9B --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent ea32ec7 commit b659111

38 files changed

Lines changed: 182 additions & 1136 deletions
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
"@objectstack/spec": minor
3+
---
4+
5+
feat(spec)!: remove dead author-facing metadata properties (#2377, ADR-0049 enforce-or-remove)
6+
7+
Breaking spec-surface removal, versioned as `minor` per the launch-window changeset
8+
policy (a `major` would promote the whole fixed-group monorepo; breaking cleanups ride
9+
the minor line, as with #2402 → 11.1.0).
10+
11+
Removes a batch of spec properties that parsed but had **no runtime consumer**
12+
authoring them was a false affordance (especially dangerous for AI-authored
13+
metadata). Verified dead against the liveness ledger (`packages/spec/liveness/*.json`)
14+
and a repo-wide grep of readers. This is the follow-up slice to #2402.
15+
16+
## Removed (each was `dead` + no reader anywhere)
17+
18+
- **field** (`field.zod.ts`): `vectorConfig` (+ `VectorConfigSchema` + types),
19+
`fileAttachmentConfig` (+ `FileAttachmentConfigSchema` + types), `dependencies`.
20+
Vector fields keep the live flat `dimensions` prop; file/image fields keep the
21+
live flat `multiple`/`accept`/`maxSize` siblings.
22+
- **object** (`object.zod.ts`): `versioning` (+ `VersioningConfigSchema`),
23+
`softDelete` (+ `SoftDeleteConfigSchema`), `search` (+ `SearchConfigSchema`),
24+
`recordName`, `keyPrefix`. Each is now a **rejecting tombstone** in
25+
`UNKNOWN_KEY_GUIDANCE` carrying the upgrade prescription.
26+
- **action** (`action.zod.ts`): `timeout` (server uses `body.timeoutMs`; no
27+
action-level timeout is enforced).
28+
- **agent** (`agent.zod.ts`): `planning.strategy`, `planning.allowReplan`
29+
(only `planning.maxIterations` is read by the runtime).
30+
- **dataset** (`dataset.zod.ts`): `measures.certified` (declared-but-unenforced
31+
governance flag — never compiled into the Cube).
32+
33+
Liveness ledgers, the ledger README table, and `api-surface.json` are updated;
34+
the removed sub-schema keys are dropped from `json-schema.manifest.json`.
35+
36+
## Migration
37+
38+
- **field/agent/dataset/action props**: authoring them is now silently stripped
39+
(they never did anything). Remove them. Vector → set flat `dimensions`;
40+
file/image → set flat `multiple`/`accept`/`maxSize`.
41+
- **object props**: `ObjectSchema.create()` now throws a located error naming the
42+
replacement — `versioning`/`softDelete` → hard deletes + `Field.trackHistory` /
43+
`lifecycle`; `search``searchableFields`; `recordName` → an `autonumber`
44+
`Field` designated as `nameField`; `keyPrefix` → remove (never had an effect).
45+
46+
## Deliberately NOT removed (dead, but entangled — a scoped follow-up)
47+
48+
`field.index`/`columnName`/`referenceFilters` and object
49+
`tags`/`active`/`isSystem`/`abstract`/`enable.searchable`/`enable.trash`/`enable.mru`
50+
and `agent.tenantId` are surfaced in the Studio metadata-authoring forms
51+
(`*.form.ts`) — removing them cascades into i18n bundle regeneration, so they are
52+
deferred. `action.type:'form'` has a dedicated build-time lint (`lint-view-refs.ts`)
53+
and a first-party showcase usage, so it needs a UX decision. `field.columnName`
54+
additionally has an ADR-0062 D7 lint. These stay `dead` + `authorWarn` in the
55+
ledgers.

content/docs/references/ai/agent.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const result = AIKnowledge.parse(data);
8585
| **permissions** | `string[]` | optional | Required permission-set capabilities |
8686
| **tenantId** | `string` | optional | Tenant/Organization ID |
8787
| **visibility** | `Enum<'global' \| 'organization' \| 'private'>` || [EXPERIMENTAL — NOT ENFORCED, #1901] Intended listing scope. No runtime consumer yet; use access/permissions for real gating. |
88-
| **planning** | `{ strategy: Enum<'react' \| 'plan_and_execute' \| 'reflexion' \| 'tree_of_thought'>; maxIterations: integer; allowReplan: boolean }` | optional | Autonomous reasoning and planning configuration |
88+
| **planning** | `{ maxIterations: integer }` | optional | Autonomous reasoning and planning configuration |
8989
| **memory** | `{ longTerm?: object; reflectionInterval?: integer }` | optional | Agent memory management |
9090
| **guardrails** | `{ maxTokensPerInvocation?: integer; maxExecutionTimeSec?: integer; blockedTopics?: string[] }` | optional | Safety guardrails for the agent |
9191
| **structuredOutput** | `{ format: Enum<'json_object' \| 'json_schema' \| 'regex' \| 'grammar' \| 'xml'>; schema?: Record<string, any>; strict: boolean; retryOnValidationFailure: boolean; … }` | optional | Structured output format and validation configuration |

content/docs/references/api/meta.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"metadata",
2525
"metadata-plugin",
2626
"notification",
27-
"object",
2827
"odata",
2928
"package-api",
3029
"package-registry",

content/docs/references/api/object.mdx

Lines changed: 0 additions & 42 deletions
This file was deleted.

content/docs/references/api/versioning.mdx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Architecture Alignment:
3030
## TypeScript Usage
3131

3232
```typescript
33-
import { VersionDefinition, VersionNegotiationResponse, VersionStatus, VersioningStrategy } from '@objectstack/spec/api';
34-
import type { VersionDefinition, VersionNegotiationResponse, VersionStatus, VersioningStrategy } from '@objectstack/spec/api';
33+
import { VersionDefinition, VersionNegotiationResponse, VersionStatus, VersioningConfig, VersioningStrategy } from '@objectstack/spec/api';
34+
import type { VersionDefinition, VersionNegotiationResponse, VersionStatus, VersioningConfig, VersioningStrategy } from '@objectstack/spec/api';
3535

3636
// Validate data
3737
const result = VersionDefinition.parse(data);
@@ -84,6 +84,25 @@ const result = VersionDefinition.parse(data);
8484
* `retired`
8585

8686

87+
---
88+
89+
## VersioningConfig
90+
91+
### Properties
92+
93+
| Property | Type | Required | Description |
94+
| :--- | :--- | :--- | :--- |
95+
| **strategy** | `Enum<'urlPath' \| 'header' \| 'queryParam' \| 'dateBased'>` || How the API version is specified by clients |
96+
| **current** | `string` || The current/recommended API version identifier |
97+
| **default** | `string` || Fallback version when client does not specify one |
98+
| **versions** | `{ version: string; status: Enum<'preview' \| 'current' \| 'supported' \| 'deprecated' \| 'retired'>; releasedAt: string; deprecatedAt?: string; … }[]` || All available API versions with lifecycle metadata |
99+
| **headerName** | `string` || HTTP header name for version negotiation (header/dateBased strategies) |
100+
| **queryParamName** | `string` || Query parameter name for version specification (queryParam strategy) |
101+
| **urlPrefix** | `string` || URL prefix before version segment (urlPath strategy) |
102+
| **deprecation** | `{ warnHeader: boolean; sunsetHeader: boolean; linkHeader: boolean; rejectRetired: boolean; … }` | optional | Deprecation lifecycle behavior |
103+
| **includeInDiscovery** | `boolean` || Include version information in the API discovery endpoint |
104+
105+
87106
---
88107

89108
## VersioningStrategy

content/docs/references/data/field.mdx

Lines changed: 2 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Field Type Enum
1414
## TypeScript Usage
1515

1616
```typescript
17-
import { Address, ComputedFieldCache, CurrencyConfig, CurrencyValue, DataQualityRules, Field, FieldType, FileAttachmentConfig, LocationCoordinates, SelectOption, VectorConfig } from '@objectstack/spec/data';
18-
import type { Address, ComputedFieldCache, CurrencyConfig, CurrencyValue, DataQualityRules, Field, FieldType, FileAttachmentConfig, LocationCoordinates, SelectOption, VectorConfig } from '@objectstack/spec/data';
17+
import { Address, ComputedFieldCache, CurrencyConfig, CurrencyValue, DataQualityRules, Field, FieldType, LocationCoordinates, SelectOption } from '@objectstack/spec/data';
18+
import type { Address, ComputedFieldCache, CurrencyConfig, CurrencyValue, DataQualityRules, Field, FieldType, LocationCoordinates, SelectOption } from '@objectstack/spec/data';
1919

2020
// Validate data
2121
const result = Address.parse(data);
@@ -139,10 +139,7 @@ const result = Address.parse(data);
139139
| **step** | `number` | optional | Step increment for slider (default: 1) |
140140
| **currencyConfig** | `{ precision?: integer; currencyMode?: Enum<'dynamic' \| 'fixed'>; defaultCurrency?: string }` | optional | Configuration for currency field type |
141141
| **dimensions** | `integer` | optional | Vector dimensionality (e.g., 1536 for OpenAI embeddings) |
142-
| **vectorConfig** | `{ dimensions: integer; distanceMetric?: Enum<'cosine' \| 'euclidean' \| 'dotProduct' \| 'manhattan'>; normalized?: boolean; indexed?: boolean; … }` | optional | Configuration for vector field type (AI/ML embeddings) |
143-
| **fileAttachmentConfig** | `{ minSize?: number; maxSize?: number; allowedTypes?: string[]; blockedTypes?: string[]; … }` | optional | Configuration for file and attachment field types |
144142
| **trackHistory** | `boolean` | optional | Render this field's value changes as human-readable entries on the record activity timeline (ADR-0052 §5b). Opt-in per field. |
145-
| **dependencies** | `string[]` | optional | Array of field names that this field depends on (for formulas, visibility rules, etc.) |
146143
| **group** | `string` | optional | Field group name for organizing fields in forms and layouts (e.g., "contact_info", "billing", "system") |
147144
| **visibleWhen** | `string \| { dialect: Enum<'cel' \| 'js' \| 'cron' \| 'template'>; source?: string; ast?: any; meta?: object }` | optional | Predicate (CEL) — field is shown only when TRUE (else hidden). e.g. P`record.type == 'invoice'` |
148145
| **readonlyWhen** | `string \| { dialect: Enum<'cel' \| 'js' \| 'cron' \| 'template'>; source?: string; ast?: any; meta?: object }` | optional | Predicate (CEL) — field is read-only when TRUE. e.g. P`record.status == 'paid'` |
@@ -217,40 +214,6 @@ const result = Address.parse(data);
217214
* `vector`
218215

219216

220-
---
221-
222-
## FileAttachmentConfig
223-
224-
### Properties
225-
226-
| Property | Type | Required | Description |
227-
| :--- | :--- | :--- | :--- |
228-
| **minSize** | `number` | optional | Minimum file size in bytes |
229-
| **maxSize** | `number` | optional | Maximum file size in bytes (e.g., 10485760 = 10MB) |
230-
| **allowedTypes** | `string[]` | optional | Allowed file extensions (e.g., [".pdf", ".docx", ".jpg"]) |
231-
| **blockedTypes** | `string[]` | optional | Blocked file extensions (e.g., [".exe", ".bat", ".sh"]) |
232-
| **allowedMimeTypes** | `string[]` | optional | Allowed MIME types (e.g., ["image/jpeg", "application/pdf"]) |
233-
| **blockedMimeTypes** | `string[]` | optional | Blocked MIME types |
234-
| **virusScan** | `boolean` || Enable virus scanning for uploaded files |
235-
| **virusScanProvider** | `Enum<'clamav' \| 'virustotal' \| 'metadefender' \| 'custom'>` | optional | Virus scanning service provider |
236-
| **virusScanOnUpload** | `boolean` || Scan files immediately on upload |
237-
| **quarantineOnThreat** | `boolean` || Quarantine files if threat detected |
238-
| **storageProvider** | `string` | optional | Object storage provider name (references ObjectStorageConfig) |
239-
| **storageBucket** | `string` | optional | Target bucket name |
240-
| **storagePrefix** | `string` | optional | Storage path prefix (e.g., "uploads/documents/") |
241-
| **imageValidation** | `{ minWidth?: number; maxWidth?: number; minHeight?: number; maxHeight?: number; … }` | optional | Image-specific validation rules |
242-
| **allowMultiple** | `boolean` || Allow multiple file uploads (overrides field.multiple) |
243-
| **allowReplace** | `boolean` || Allow replacing existing files |
244-
| **allowDelete** | `boolean` || Allow deleting uploaded files |
245-
| **requireUpload** | `boolean` || Require at least one file when field is required |
246-
| **extractMetadata** | `boolean` || Extract file metadata (name, size, type, etc.) |
247-
| **extractText** | `boolean` || Extract text content from documents (OCR/parsing) |
248-
| **versioningEnabled** | `boolean` || Keep previous versions of replaced files |
249-
| **maxVersions** | `number` | optional | Maximum number of versions to retain |
250-
| **publicRead** | `boolean` || Allow public read access to uploaded files |
251-
| **presignedUrlExpiry** | `number` || Presigned URL expiration in seconds (default: 1 hour) |
252-
253-
254217
---
255218

256219
## LocationCoordinates
@@ -282,18 +245,3 @@ const result = Address.parse(data);
282245

283246
---
284247

285-
## VectorConfig
286-
287-
### Properties
288-
289-
| Property | Type | Required | Description |
290-
| :--- | :--- | :--- | :--- |
291-
| **dimensions** | `integer` || Vector dimensionality (e.g., 1536 for OpenAI embeddings) |
292-
| **distanceMetric** | `Enum<'cosine' \| 'euclidean' \| 'dotProduct' \| 'manhattan'>` || Distance/similarity metric for vector search |
293-
| **normalized** | `boolean` || Whether vectors are normalized (unit length) |
294-
| **indexed** | `boolean` || Whether to create a vector index for fast similarity search |
295-
| **indexType** | `Enum<'hnsw' \| 'ivfflat' \| 'flat'>` | optional | Vector index algorithm (HNSW for high accuracy, IVFFlat for large datasets) |
296-
297-
298-
---
299-

content/docs/references/data/meta.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"notification",
2121
"object",
2222
"query",
23-
"search-engine",
2423
"seed",
2524
"seed-loader",
2625
"subscription",

0 commit comments

Comments
 (0)