Skip to content

Commit 0a503cc

Browse files
committed
chore(scripts): 按 T13/T14/T17 归属重冻懒侧基线
§C46.4 每收口一次重冻一次:收口树 90bb5f6 真实构建实测 636,243 B / 37 chunk 4 族重冻 NoteMarkdown- 2950→3278 · NotesPage- 47045→48087 · RefineLaunchDialog- 7184→7469 · SessionsPage- 20987→21168 新族 NoteCardFlowWithSeek- 391 · chunkMax 36→37 · totalMax 634316→636243 · 未归族 0 vendor-* 五族零增长 58784/208585/41161/79915/50622 ⇒ 未触发条件⑤ STOP 同批同步 docs/standards/performance.md 的基线散文(AGENTS.md §6)
1 parent 950afd5 commit 0a503cc

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

‎docs/standards/performance.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
- **口径**:懒加载 chunk(仅动态可达的 `.js`)单独判定 —— ① **族前缀清单等式**(每个懒侧 chunk 必须归属某个已登记族,**未归族即红**;键用**族前缀**如 `vendor-katex-*`,因为 Vite 的 chunk 名带内容 hash、不稳定)② **逐族 gzip 上限** ③ **懒侧总 gzip 上限**(另加 chunk 数上限)。三条都只许降。
3939
- **基线来源**:`scripts/lazyBudget.json` —— 首次写入值 = 2026-09-13 **真构建**实测 **36 chunk / 634.32 kB**(**冻结现状,不是目标值**;写乐观「预算值」会立刻红)。
40+
- 🔴 **一次性重冻记录(批 7 §C46.4;7a 段收口 `90bb5f6a`)**:首次基线取自批次**中段快照** `cd800d63`,此后**同批合法功能工作**(T13/T14 的 markdown 并入、T17 的卡片流包装件)改变了懒侧 ⇒ 按「**每收口一次、重冻一次**」重冻为 **37 chunk / 636.24 kB**:4 族按收口树**真实构建**实测值重冻(`NoteMarkdown-` 3,278 · `NotesPage-` 48,087 · `RefineLaunchDialog-` 7,469 · `SessionsPage-` 21,168)+ 新族 `NoteCardFlowWithSeek-`(391)登记 + chunk 数 36 → 37。🔴 **`vendor-*` 五族逐族核对 = 零增长**(58,784 / 208,585 / 41,161 / 79,915 / 50,622 逐字节不变)。**批 8 的基线 = 本批收口时的重冻值**(此后才是真正的硬棘轮;T22 全批收口时再做一次)。
4041
- 🔴 **口径:本判据只在「新鲜构建」的产物上成立** —— 旧 `dist` 带着上一个时代的残渣(实测:顶层 katex 被删后旧产物仍多 **64,497 B** gzip)⇒ **`--no-build` 的读数不可用于本判据**;要判既有产物就显式 `--dist` 指认(不给 `--dist` 的 `--no-build` 只判首屏,懒侧打 `⏭ 未判`)。
4142
- **容差**:逐族与总量判据都用「上限 + **64 B**」—— 它是**测量噪声余量**(本机**同源重建实测 0 B**;参照批 4 的 CSS 顺序差 9 B),**不是**「漂移推导」;常量,**不得**随提交变大(改它 = 改判据)。
4243
- **硬约束**:上表「页面包大小 (JS) < 200KB (gzip)」与懒侧预算是**两个独立读数** —— 懒侧判定不得影响首屏读数,两者也不得并成一个预算。`--json` 的顶层 `pass` = **总体裁决**(两个读数的与),与退出码一致。

‎scripts/lazyBudget.json‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"generatedFrom": "node scripts/check-bundle-budget.mjs(**真构建**,不带 --no-build)· 源码 = 80b1eabc(T9 的提交树) · 读数存档 tmp/t9/fresh-dist.json",
2+
"generatedFrom": "node scripts/check-bundle-budget.mjs(**真构建**,不带 --no-build)· 源码 = 90bb5f6a(7a 段收口树)· 读数存档 tmp/t12/lazy-final-realbuild.json;上一版 = cd800d63(T9,批次中段快照)",
33
"unit": "gzip = zlib.gzipSync level 6 · 族前缀 = 去掉 8 位内容 hash 的 chunk 名 + '-'(chunk 名带内容 hash,不稳定,不能当键)",
44
"scope": "🔴 必须在**新鲜构建**产物上判定(§C21.3):旧 dist 上的 --no-build 读数含时代残渣,上界会虚高(实测 +64,497 B)⇒ 本判据的合格调用 = 不带 --no-build(本脚本自行构建)或显式 --dist 指认受判产物",
5-
"semantics": "全部字段 = 实测**冻结值**,只许降(批 7 §C9.6 第 2 条 / §C10.4);写乐观「预算值」会立刻红",
6-
"lazyChunkCountMax": 36,
7-
"lazyTotalGzipBytesMax": 634316,
5+
"semantics": "全部字段 = 实测**冻结值**,只许降(批 7 §C9.6 第 2 条 / §C10.4);写乐观「预算值」会立刻红。★ 本次(rulings §C46.4「每收口一次、重冻一次」)为**一次性、可归属的重冻**:4 族按收口树**真实构建**的实测值重冻(NoteMarkdown- · NotesPage- · RefineLaunchDialog- · SessionsPage-)+ 新族 NoteCardFlowWithSeek- 登记 + chunk 数 36 → 37 + 总量 634,316 → 636,243;🔴 **vendor-* 五族逐族核对为「零增长」**(58,784 / 208,585 / 41,161 / 79,915 / 50,622 逐字节不变)⇒ 未触发 §C46.4 条件⑤ 的 STOP。**批 8 的基线 = 本批收口时的重冻值**(此后才是真正的硬棘轮)。",
6+
"lazyChunkCountMax": 37,
7+
"lazyTotalGzipBytesMax": 636243,
88
"families": [
99
{
1010
"prefix": "ActionPage-",
@@ -42,17 +42,21 @@
4242
"prefix": "NoteCardFlowView-",
4343
"gzipBytesMax": 785
4444
},
45+
{
46+
"prefix": "NoteCardFlowWithSeek-",
47+
"gzipBytesMax": 391
48+
},
4549
{
4650
"prefix": "NoteMarkdown-",
47-
"gzipBytesMax": 2950
51+
"gzipBytesMax": 3278
4852
},
4953
{
5054
"prefix": "NotesPage-",
51-
"gzipBytesMax": 47045
55+
"gzipBytesMax": 48087
5256
},
5357
{
5458
"prefix": "RefineLaunchDialog-",
55-
"gzipBytesMax": 7184
59+
"gzipBytesMax": 7469
5660
},
5761
{
5862
"prefix": "RefineStrategyPicker-",
@@ -84,7 +88,7 @@
8488
},
8589
{
8690
"prefix": "SessionsPage-",
87-
"gzipBytesMax": 20987
91+
"gzipBytesMax": 21168
8892
},
8993
{
9094
"prefix": "SettingsPage-",

0 commit comments

Comments
 (0)