feat(spec,objectql,metadata-protocol): validate-only data operation — DataProtocol.validateData - #6474
Merged
Conversation
…6037) #4633 ruling D: import's dry run stops PREDICTING the write's verdict with a hand-copied mirror of the engine's rules and starts ASKING for it. `DataProtocol.validateData` reports the write path's verdict on candidate rows and persists nothing. Declaration and execution land together — a ruling clause, not a style note: `BatchOptions.validateOnly` was retired in #4052 as a dry-run flag that promised a preview while the batch surfaces persisted regardless. The new operation avoids that spelling and leaves the tombstone standing. `engine.validate()` calls the same validateRecord / evaluateValidationRules that insert() calls, so preview == write is guaranteed by construction; a test asserts it by running both against one engine under both ADR-0104 postures. The response carries the posture it was reached under — a bad value shape is an error on a self-certified deployment and an admitted warning on a warn-first one, which is why option B (unconditional strict) was rejected. Two documented boundaries: no hooks run (firing user hooks in a preview would be the #4052 defect respelled), and warn-first admissions are not recorded as #4769 certification evidence (a preview writes nothing, so it must not block a later migration). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3U9PJm1hEJitS9LtZz8TC
…idate-only-data-protocol
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3U9PJm1hEJitS9LtZz8TC
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
qq9340100
enabled auto-merge
August 8, 2026 01:10
Contributor
📓 Docs Drift CheckThis PR changes 3 package(s): 115 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
The three new protocol aliases carry no defaults/transforms, so z.input and z.infer coincide — per ADR-0122 the complement is pinned in the registry rather than given a permanent-synonym XParsed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011M7UwH25Unfi73UHim7ajY
The registry's own count case documents every movement; record the three-pin rise with its cause per the file's idiom. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011M7UwH25Unfi73UHim7ajY
This was referenced Aug 8, 2026
qq9340100
pushed a commit
that referenced
this pull request
Aug 8, 2026
manifest 相对 origin/main 的删除恰为本 sweep 的 23 个 def,零新增; #6474 的 ValidateData 等同期条目在重生成后完整存活。
This was referenced Aug 8, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6037
变更(#4633 裁决 D 的落地)
import的 dry run 此前用手抄镜像(rest/src/import-coerce.ts)预测写路径的判决;镜像在结构上追不上被镜像的规则族(ADR-0104 值形状、format检查、对象级validations、状态机)。裁决 D 用判决本身取代预测:DataProtocol.validateData(request):对候选行返回写路径的判决,零持久化。mode: 'insert'全量判;mode: 'update'只判送来的键。应答含逐行errors/warnings与posture(strictness 姿态)。engine.validate()(objectql)调用与insert()同一套validateRecord/evaluateValidationRules,metadata-protocol在其上实现validateData——预览与写入的一致性由构造保证,并有测试将两者对同一 engine 双姿态直跑对拍。protocol.zod.ts+85 行契约;测试三层共 +435 行(spec 127 / objectql 209 / metadata-protocol 99);api-surface、authorable-surface、json-schema manifest、strictness ledger 计数、参考文档随动;changeset(三包 minor)。分支已含合 main(#6466 之后)与合后重生成的台账计数。
交付通道注记
wave-6 工头 dev 会话(
session_01G3U9PJm1hEJitS9LtZz8TC,串行卡 4,收官卡)无 GitHub 工具,走交付降级通道:dev 实现并 push 分支,PM(session_011M7UwH25Unfi73UHim7ajY)代开本 PR 并跟进 CI 至合并。Generated by Claude Code