Commit bd2fb98
committed
fix(spec): manifest 删行相对 merge-base 自证 —— 整 schema 消失不再只是纪律 (#4725)
`json-schema.manifest.json` 的 #2978 ratchet 对删行的全部要求是一句注释
("remove a key ONLY for a deliberate retirement"),没有任何机器校验。它的
`missing` 集合是「manifest − 本次产出」,而 manifest 是同一个 commit 里可以随手
改的文件:把导出、manifest 行、基线行一起删掉,`missing` 恒空;检查 (c) 又以
「def 已不再产出」为由放行它名下的每一行(那一条出口原话就写着交给 manifest 裁
判);`check:api-surface` 只是新鲜度门。三个门,一句话都不说。
实测(修复前):删掉 src/data/index.ts 一行 `export * from './validation.zod';`
—— ObjectSchema 直接从该模块导入 ValidationRuleSchema,所以 7 个 def 依旧从
`object` 元数据根可达 —— gen:schema 与 check:authorable-surface 双双 exit 0,
116 个 authorable key 静默离开契约。
- 新增 manifest deletion gate:相对 merge-base(HEAD, origin/main) 的 manifest
计算「离开已发布集合」的 def,跑在检查 (c) 之前。
- 新增导出 RETIRED_DEFS_BY_MAJOR(per-DEF,精确集合判定,#4659 先例)+ 镜像检查
(登记了一个仍在发布的 def 直接失败)。RENAMED_DEFS 前置豁免。
- 不复用 #4650 的可达性:reachableVia() 从 zodByDefKey 取实例,该表只装本次构建
产出的 def,刚被删的 def 必然答 null(「不可达 ⇒ 放行」)。
- 离线沿用 #5235 姿态:镜像照跑,比较打印说明并跳过。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01559M8FVm6W6vDLABL3jvdW1 parent 72bd873 commit bd2fb98
7 files changed
Lines changed: 789 additions & 21 deletions
File tree
- .changeset
- packages/spec
- scripts
- src/migrations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments