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
{{ message }}
Repository navigation
Commit f50a8b9
Browse filesBrowse the repository at this point in the historyBrowse files
feat(spec)!: retire BatchOptions.validateOnly — a dry-run flag never implemented (#4052)
`BatchOptions.validateOnly` promised a dry-run ("validate records without
persisting changes") but no batch surface ever read it — updateManyData /
deleteManyData / batchData all persist regardless. A caller sending
`options.validateOnly: true` to PREVIEW a mutation got it executed: a declared
flag lying about a data-safety guarantee, the dangerous direction of "declared
≠ enforced" (PD #10).
Retired rather than half-implemented — a real no-commit batch has its own design
space (cascade / constraint semantics under rollback, a per-row would-succeed
response contract) and should be reintroduced deliberately, not back-filled to
match a promise nothing kept.
- Tombstone `validateOnly` with `retiredKey()` in BatchOptionsSchema so writing
it fails with the prescription instead of being silently stripped (ADR-0104 /
#3733). The BatchOptions type's key becomes `never`.
- HTTP-only (never stored in stack metadata), so recorded as a semantic
migration on the protocol-18 chain step (`batch-options-validate-only-retired`)
— a TODO for API callers, not a stack conversion.
- Regenerated authorable-surface, references docs; major changeset.
Also fixes a dangling doc reference: the /createMany route named
`requestSchema: 'CreateManyRequestSchema'`, a schema no module ever exported —
pointed at the real `CreateManyDataRequestSchema`.
Closes#4052.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzLE9cw4gZKNyPN2ZP4iTt
@@ -89,7 +89,7 @@ const result = BatchConfig.parse(data);
89
89
|**atomic**|`boolean`| ✅ | If true, rollback entire batch on any failure (transaction mode) |
90
90
|**returnRecords**|`boolean`| ✅ | If true, return full record data in response |
91
91
|**continueOnError**|`boolean`| ✅ | If true (and atomic=false), continue processing remaining records after errors |
92
-
|**validateOnly**|`boolean`|✅|If true, validate records without persisting changes (dry-run mode)|
92
+
|**validateOnly**|`any`|optional|[REMOVED]`options.validateOnly` was removed from BatchOptions in @objectstack/spec (#4052). It was never implemented: the batch surfaces persisted regardless, so a "dry-run" would have silently executed. There is no dry-run today — drop the key. If you need to preview a batch without writing, open an issue so it can be designed (no-commit cascade / constraint semantics) and reintroduced as a flag that actually holds.|
93
93
94
94
95
95
---
@@ -115,7 +115,7 @@ const result = BatchConfig.parse(data);
115
115
| :--- | :--- | :--- | :--- |
116
116
|**operation**|`Enum<'create' \| 'update' \| 'upsert' \| 'delete'>`| ✅ | Type of batch operation |
117
117
|**records**|`{ id?: string; data?: Record<string, any>; externalId?: string }[]`| ✅ | Array of records to process (server caps the count — see batch.maxBatchSize) |
0 commit comments