@blamejs/exceptd-skills 0.16.23 → 0.16.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/agents/report-generator.md +2 -2
- package/bin/exceptd.js +72 -25
- package/data/_indexes/_meta.json +2 -2
- package/data/_indexes/chains.json +354 -177
- package/data/_indexes/section-offsets.json +35 -35
- package/lib/collectors/ai-api.js +112 -7
- package/lib/collectors/citation-hygiene.js +27 -0
- package/lib/collectors/crypto-codebase.js +25 -0
- package/lib/collectors/kernel.js +32 -2
- package/lib/collectors/library-author.js +30 -0
- package/lib/collectors/runtime.js +38 -3
- package/lib/collectors/sbom.js +21 -2
- package/lib/collectors/secrets.js +125 -0
- package/lib/cve-regression-watcher.js +5 -2
- package/lib/playbook-runner.js +16 -3
- package/manifest.json +53 -53
- package/orchestrator/README.md +1 -1
- package/orchestrator/index.js +17 -3
- package/package.json +1 -1
- package/sbom.cdx.json +50 -50
- package/scripts/builders/cwe-chains.js +1 -0
- package/scripts/builders/section-offsets.js +10 -2
- package/scripts/builders/token-budget.js +3 -3
- package/scripts/check-changelog-extract.js +38 -1
- package/scripts/check-version-tags.js +5 -0
package/sbom.cdx.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bomFormat": "CycloneDX",
|
|
3
3
|
"specVersion": "1.6",
|
|
4
|
-
"serialNumber": "urn:uuid:
|
|
4
|
+
"serialNumber": "urn:uuid:521b3f50-68ed-486c-8801-dcdfa6f46a2d",
|
|
5
5
|
"version": 1,
|
|
6
6
|
"metadata": {
|
|
7
|
-
"timestamp": "
|
|
7
|
+
"timestamp": "2069-08-26T11:43:12.000Z",
|
|
8
8
|
"tools": [
|
|
9
9
|
{
|
|
10
10
|
"vendor": "blamejs",
|
|
11
11
|
"name": "scripts/refresh-sbom.js",
|
|
12
|
-
"version": "0.16.
|
|
12
|
+
"version": "0.16.24"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"component": {
|
|
16
|
-
"bom-ref": "pkg:npm/@blamejs/exceptd-skills@0.16.
|
|
16
|
+
"bom-ref": "pkg:npm/@blamejs/exceptd-skills@0.16.24",
|
|
17
17
|
"type": "application",
|
|
18
18
|
"name": "@blamejs/exceptd-skills",
|
|
19
|
-
"version": "0.16.
|
|
19
|
+
"version": "0.16.24",
|
|
20
20
|
"description": "AI security skills grounded in mid-2026 threat reality, not stale framework documentation. 51 skills, 11 catalogs (439 CVEs / 177 CWEs / 805 ATT&CK + ICS / 170 ATLAS / 468 D3FEND / 8888 RFCs), 35 jurisdictions, 10-class catalog gap detector + budget gate, real XML parser + canonical-form diff + content-pattern regression detection, Ed25519-signed.",
|
|
21
21
|
"licenses": [
|
|
22
22
|
{
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
|
-
"purl": "pkg:npm/%40blamejs/exceptd-skills@0.16.
|
|
28
|
+
"purl": "pkg:npm/%40blamejs/exceptd-skills@0.16.24",
|
|
29
29
|
"hashes": [
|
|
30
30
|
{
|
|
31
31
|
"alg": "SHA-256",
|
|
32
|
-
"content": "
|
|
32
|
+
"content": "ecf00501bf1417cff985373ccbad6088384a14dfe144ab32a62cc1589400ca22"
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
35
|
"externalReferences": [
|
|
36
36
|
{
|
|
37
37
|
"type": "distribution",
|
|
38
|
-
"url": "https://www.npmjs.com/package/@blamejs/exceptd-skills/v/0.16.
|
|
38
|
+
"url": "https://www.npmjs.com/package/@blamejs/exceptd-skills/v/0.16.24"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"type": "vcs",
|
|
@@ -116,11 +116,11 @@
|
|
|
116
116
|
"hashes": [
|
|
117
117
|
{
|
|
118
118
|
"alg": "SHA-256",
|
|
119
|
-
"content": "
|
|
119
|
+
"content": "5ce7c68af3aad70ce86b63bb3e09e15787cb5631830b5fa7065d94ae1ef61dbb"
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"alg": "SHA3-512",
|
|
123
|
-
"content": "
|
|
123
|
+
"content": "1c4122bd634c77dce08017f8ef3629f0a35e7e2ba6c29d047192c62bdbe429aabe2847709d40c1f33b0923af1c101388d2c13590ff1bdba673e0ff3349cde5db"
|
|
124
124
|
}
|
|
125
125
|
]
|
|
126
126
|
},
|
|
@@ -221,11 +221,11 @@
|
|
|
221
221
|
"hashes": [
|
|
222
222
|
{
|
|
223
223
|
"alg": "SHA-256",
|
|
224
|
-
"content": "
|
|
224
|
+
"content": "46efbb0adeed34be39f1fe250ac80571ac3e0d41ed7ed1decb6e01cc4f1e23d7"
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
227
|
"alg": "SHA3-512",
|
|
228
|
-
"content": "
|
|
228
|
+
"content": "3f0fae83ecc016d43eba75eb560f4425b7c0c0ca065cb04fd2fb5cb016b9cc2c6886e8afa3fb7d765e82adef0374772394a240cc17ec910e95e237cefcdfc486"
|
|
229
229
|
}
|
|
230
230
|
]
|
|
231
231
|
},
|
|
@@ -281,11 +281,11 @@
|
|
|
281
281
|
"hashes": [
|
|
282
282
|
{
|
|
283
283
|
"alg": "SHA-256",
|
|
284
|
-
"content": "
|
|
284
|
+
"content": "669897636b4b0e4ea13d0ebd0fba261c09188a0b3a1a06d4596fa77f24ea497a"
|
|
285
285
|
},
|
|
286
286
|
{
|
|
287
287
|
"alg": "SHA3-512",
|
|
288
|
-
"content": "
|
|
288
|
+
"content": "a8770edb4e20e5d1995aad8ba73cdf22db9f476012238d750dd4bf3008a557e75d70333b6c4993b653201469557af18a59286d8a3c268c8bdda06f6ea535b900"
|
|
289
289
|
}
|
|
290
290
|
]
|
|
291
291
|
},
|
|
@@ -1046,11 +1046,11 @@
|
|
|
1046
1046
|
"hashes": [
|
|
1047
1047
|
{
|
|
1048
1048
|
"alg": "SHA-256",
|
|
1049
|
-
"content": "
|
|
1049
|
+
"content": "4bafa41b639f06ce42c2c8f6d348faa6481a161a81bff59120e13ffad7b136f5"
|
|
1050
1050
|
},
|
|
1051
1051
|
{
|
|
1052
1052
|
"alg": "SHA3-512",
|
|
1053
|
-
"content": "
|
|
1053
|
+
"content": "76bf38422b38d3db929118b7f42684d2c3fe6a75f1fd2c1daeba65b59b3c39a333aaac7998cfcb5444836569ce7b2b885f8cd5a910063cadd14ef7ea7815d8a2"
|
|
1054
1054
|
}
|
|
1055
1055
|
]
|
|
1056
1056
|
},
|
|
@@ -1076,11 +1076,11 @@
|
|
|
1076
1076
|
"hashes": [
|
|
1077
1077
|
{
|
|
1078
1078
|
"alg": "SHA-256",
|
|
1079
|
-
"content": "
|
|
1079
|
+
"content": "356a62a274be6fc70c4927ae14d6a97570ccc8d9590acdc1c3f3aa8c4330d7e7"
|
|
1080
1080
|
},
|
|
1081
1081
|
{
|
|
1082
1082
|
"alg": "SHA3-512",
|
|
1083
|
-
"content": "
|
|
1083
|
+
"content": "3cf136efbd1495ade1168a3169cbe989bdabd7c04b28b34527d995355b970aec53720be520fda0d41b63fabd02be39e04e1d5a662fcc248b1ebe546a0f67d696"
|
|
1084
1084
|
}
|
|
1085
1085
|
]
|
|
1086
1086
|
},
|
|
@@ -1121,11 +1121,11 @@
|
|
|
1121
1121
|
"hashes": [
|
|
1122
1122
|
{
|
|
1123
1123
|
"alg": "SHA-256",
|
|
1124
|
-
"content": "
|
|
1124
|
+
"content": "83bffd83a5c72e6cd4dc3d01cabf9af395eba5be73747d631af3773304727e17"
|
|
1125
1125
|
},
|
|
1126
1126
|
{
|
|
1127
1127
|
"alg": "SHA3-512",
|
|
1128
|
-
"content": "
|
|
1128
|
+
"content": "0e4bcf4382a67553d08b17082b18054d5f69d0ba383d1b578db8d73e5a70a1b4bff9eb6f20e6be9f9fb6fe3cb9b208895f0d2bfa558c9cb07ccb7603ba5c2237"
|
|
1129
1129
|
}
|
|
1130
1130
|
]
|
|
1131
1131
|
},
|
|
@@ -1166,11 +1166,11 @@
|
|
|
1166
1166
|
"hashes": [
|
|
1167
1167
|
{
|
|
1168
1168
|
"alg": "SHA-256",
|
|
1169
|
-
"content": "
|
|
1169
|
+
"content": "bb1f73a3c67496761436a334e77dc32b3b73e2ce9f9b8856c73932c7f351b609"
|
|
1170
1170
|
},
|
|
1171
1171
|
{
|
|
1172
1172
|
"alg": "SHA3-512",
|
|
1173
|
-
"content": "
|
|
1173
|
+
"content": "b3da3d9babfc950d4e9c90d632c7034cff5b13481ee4635466f47658e5071d11c3554afc5f45a15e2fc83c8ac890fc0942290e5f7b12fa5e12f91d3c0634d817"
|
|
1174
1174
|
}
|
|
1175
1175
|
]
|
|
1176
1176
|
},
|
|
@@ -1181,11 +1181,11 @@
|
|
|
1181
1181
|
"hashes": [
|
|
1182
1182
|
{
|
|
1183
1183
|
"alg": "SHA-256",
|
|
1184
|
-
"content": "
|
|
1184
|
+
"content": "a9b7fd5e3b4fae07ac1734d59dada55b904aac727197298efb3394c59feb9469"
|
|
1185
1185
|
},
|
|
1186
1186
|
{
|
|
1187
1187
|
"alg": "SHA3-512",
|
|
1188
|
-
"content": "
|
|
1188
|
+
"content": "6e4216872af0f849a64163ce9f8963b4ca875208a9868ba0f55cb6319362194bb6f5db657f11cd636c0da58ac9460ad8df638c5b5a8d34a5855dc07cf6d574a9"
|
|
1189
1189
|
}
|
|
1190
1190
|
]
|
|
1191
1191
|
},
|
|
@@ -1211,11 +1211,11 @@
|
|
|
1211
1211
|
"hashes": [
|
|
1212
1212
|
{
|
|
1213
1213
|
"alg": "SHA-256",
|
|
1214
|
-
"content": "
|
|
1214
|
+
"content": "045086f5cdeb7f1b83b4e741b23d95d895f4e7154ac982aacd07f6358638630e"
|
|
1215
1215
|
},
|
|
1216
1216
|
{
|
|
1217
1217
|
"alg": "SHA3-512",
|
|
1218
|
-
"content": "
|
|
1218
|
+
"content": "2e0e9730376abf0f044d6557793f5975acdf9149da87f371fee83ab30758ee15b32a6c586d9a10f14786e7d0456487661d944dbc87479d20805e68e64eebe051"
|
|
1219
1219
|
}
|
|
1220
1220
|
]
|
|
1221
1221
|
},
|
|
@@ -1226,11 +1226,11 @@
|
|
|
1226
1226
|
"hashes": [
|
|
1227
1227
|
{
|
|
1228
1228
|
"alg": "SHA-256",
|
|
1229
|
-
"content": "
|
|
1229
|
+
"content": "b75faed472a0abc9046b8d983bb33724fdc7a0e058158eb38357feb89389ee3d"
|
|
1230
1230
|
},
|
|
1231
1231
|
{
|
|
1232
1232
|
"alg": "SHA3-512",
|
|
1233
|
-
"content": "
|
|
1233
|
+
"content": "124e03e7981037cb241e3d6033e5ec28c8580219dd5424c4e11a1ea68209306258157407573d5fab194e320b06da3142f9e6c37678b416ae3ca4e8c620cb9500"
|
|
1234
1234
|
}
|
|
1235
1235
|
]
|
|
1236
1236
|
},
|
|
@@ -1256,11 +1256,11 @@
|
|
|
1256
1256
|
"hashes": [
|
|
1257
1257
|
{
|
|
1258
1258
|
"alg": "SHA-256",
|
|
1259
|
-
"content": "
|
|
1259
|
+
"content": "9cc57e688ef2812e687db325264f9c1d7b57d7bcb907e697bbd98e02fa01e09d"
|
|
1260
1260
|
},
|
|
1261
1261
|
{
|
|
1262
1262
|
"alg": "SHA3-512",
|
|
1263
|
-
"content": "
|
|
1263
|
+
"content": "337b7ce0afcf1fa521286d7f5506fc06db348ab6cabddfa5f20c4a72ac8b329e6be5d429119f550371709606f9fba7d88bec65c2643a579d334903c2f295e8ae"
|
|
1264
1264
|
}
|
|
1265
1265
|
]
|
|
1266
1266
|
},
|
|
@@ -1316,11 +1316,11 @@
|
|
|
1316
1316
|
"hashes": [
|
|
1317
1317
|
{
|
|
1318
1318
|
"alg": "SHA-256",
|
|
1319
|
-
"content": "
|
|
1319
|
+
"content": "b671746b4b7576d57c1b8e23b647031e7e313c65074009c016b034b51692090c"
|
|
1320
1320
|
},
|
|
1321
1321
|
{
|
|
1322
1322
|
"alg": "SHA3-512",
|
|
1323
|
-
"content": "
|
|
1323
|
+
"content": "3e7732791e118cfea7748dde441eb4e5ca037f486455a11d03ae11ba7aa7280135907eb4b1448824da3323de62dded25e73928433ad3d72d8835ea7c0c692fbf"
|
|
1324
1324
|
}
|
|
1325
1325
|
]
|
|
1326
1326
|
},
|
|
@@ -1451,11 +1451,11 @@
|
|
|
1451
1451
|
"hashes": [
|
|
1452
1452
|
{
|
|
1453
1453
|
"alg": "SHA-256",
|
|
1454
|
-
"content": "
|
|
1454
|
+
"content": "50efed9848abc76cc27b89f2d3ec1539e7945ead8f782dd6a50b8bd9e50aeea1"
|
|
1455
1455
|
},
|
|
1456
1456
|
{
|
|
1457
1457
|
"alg": "SHA3-512",
|
|
1458
|
-
"content": "
|
|
1458
|
+
"content": "2cf21e6aaf8fd15d6ea64a25cc142c05d45919f670f324eb95ae47f6e8b07832d768e5c2c61946b5673678831fc5278f6b2e579159a264715c91865bf2191e6f"
|
|
1459
1459
|
}
|
|
1460
1460
|
]
|
|
1461
1461
|
},
|
|
@@ -1886,11 +1886,11 @@
|
|
|
1886
1886
|
"hashes": [
|
|
1887
1887
|
{
|
|
1888
1888
|
"alg": "SHA-256",
|
|
1889
|
-
"content": "
|
|
1889
|
+
"content": "fe65c62f46bbb3c069247eb19169ac4ab99bf0354e3e9cfe432782bf402a918a"
|
|
1890
1890
|
},
|
|
1891
1891
|
{
|
|
1892
1892
|
"alg": "SHA3-512",
|
|
1893
|
-
"content": "
|
|
1893
|
+
"content": "bb490a647c2e048d0b4a5a1d3edea04d4055ee8d58db1dba1e4945a3a34837d5e43174e7b526b846bc534cbf8fdbdd90ab0161115ccaa5ac16d4a2a15492d8b4"
|
|
1894
1894
|
}
|
|
1895
1895
|
]
|
|
1896
1896
|
},
|
|
@@ -1901,11 +1901,11 @@
|
|
|
1901
1901
|
"hashes": [
|
|
1902
1902
|
{
|
|
1903
1903
|
"alg": "SHA-256",
|
|
1904
|
-
"content": "
|
|
1904
|
+
"content": "3c5fe10b5b7b7c0c70366c7d89928d2d27478f023905c24ef3c290d12c46b6d4"
|
|
1905
1905
|
},
|
|
1906
1906
|
{
|
|
1907
1907
|
"alg": "SHA3-512",
|
|
1908
|
-
"content": "
|
|
1908
|
+
"content": "c6d941219307087f99d6c01014eaf7d300ba117acabec3e95c4059629b18d3c17937fa1082b000869e03a19f891dd0c06f74943f2e2c29876dbf785e283982e4"
|
|
1909
1909
|
}
|
|
1910
1910
|
]
|
|
1911
1911
|
},
|
|
@@ -1946,11 +1946,11 @@
|
|
|
1946
1946
|
"hashes": [
|
|
1947
1947
|
{
|
|
1948
1948
|
"alg": "SHA-256",
|
|
1949
|
-
"content": "
|
|
1949
|
+
"content": "79ff6e5e1360099debfa00034ccf903f0b10f58dab982af180aa79ea69ee6dbd"
|
|
1950
1950
|
},
|
|
1951
1951
|
{
|
|
1952
1952
|
"alg": "SHA3-512",
|
|
1953
|
-
"content": "
|
|
1953
|
+
"content": "e57b550de41c42538aa0fc995bbea05f15b5a6c634fda4ec3fbba490ff520269525596f9d2cc941c4656651fae14ee4433f8b88cb4142578ea8218e2e365c47f"
|
|
1954
1954
|
}
|
|
1955
1955
|
]
|
|
1956
1956
|
},
|
|
@@ -2141,11 +2141,11 @@
|
|
|
2141
2141
|
"hashes": [
|
|
2142
2142
|
{
|
|
2143
2143
|
"alg": "SHA-256",
|
|
2144
|
-
"content": "
|
|
2144
|
+
"content": "6305a2e2e2f414f53ed6095075c2410b8e59c6c22d014179682c12d5231415e2"
|
|
2145
2145
|
},
|
|
2146
2146
|
{
|
|
2147
2147
|
"alg": "SHA3-512",
|
|
2148
|
-
"content": "
|
|
2148
|
+
"content": "fc82f0ba8ce4f1ca8098928ca15dae678c3a5ef44b6c99652bf45b017c7601b38974060a1809a00a2a72cea5ca49aad75be4afe43141b5ffa83de83e92c3b03e"
|
|
2149
2149
|
}
|
|
2150
2150
|
]
|
|
2151
2151
|
},
|
|
@@ -2216,11 +2216,11 @@
|
|
|
2216
2216
|
"hashes": [
|
|
2217
2217
|
{
|
|
2218
2218
|
"alg": "SHA-256",
|
|
2219
|
-
"content": "
|
|
2219
|
+
"content": "5f30a57cecfa0936474d7222fc15ad1a74fa6d2ab527511f9b37e413e5c7a488"
|
|
2220
2220
|
},
|
|
2221
2221
|
{
|
|
2222
2222
|
"alg": "SHA3-512",
|
|
2223
|
-
"content": "
|
|
2223
|
+
"content": "82e9870f149199b3d6bb97694d9c65c194a54133bc1453797091ae549a3289abc4ebfb00623ec3b0f34c9744ebaf5b4364a87b1b2c9ce4d9730832db4e551520"
|
|
2224
2224
|
}
|
|
2225
2225
|
]
|
|
2226
2226
|
},
|
|
@@ -2276,11 +2276,11 @@
|
|
|
2276
2276
|
"hashes": [
|
|
2277
2277
|
{
|
|
2278
2278
|
"alg": "SHA-256",
|
|
2279
|
-
"content": "
|
|
2279
|
+
"content": "efc77cd5a1939e8ddb81c7c2540abcffd8c16670701c2269fd71c08c1accdd4c"
|
|
2280
2280
|
},
|
|
2281
2281
|
{
|
|
2282
2282
|
"alg": "SHA3-512",
|
|
2283
|
-
"content": "
|
|
2283
|
+
"content": "4e3b1feacfd0c071e3d8744b3d3735c5928c9deee7c46d0b50451a16a78592190478ed2e3982310109544397a6326b6ee387fde9cfdeabee5c6cf795168e7f78"
|
|
2284
2284
|
}
|
|
2285
2285
|
]
|
|
2286
2286
|
},
|
|
@@ -2321,11 +2321,11 @@
|
|
|
2321
2321
|
"hashes": [
|
|
2322
2322
|
{
|
|
2323
2323
|
"alg": "SHA-256",
|
|
2324
|
-
"content": "
|
|
2324
|
+
"content": "fddde09473cf3653b014f22779e63acf4c93eef69a0a11ed4b48fe3d584e0c70"
|
|
2325
2325
|
},
|
|
2326
2326
|
{
|
|
2327
2327
|
"alg": "SHA3-512",
|
|
2328
|
-
"content": "
|
|
2328
|
+
"content": "e076fd39bc284f582b0a42090a774164b855ad2fc751092407836e1cc07c4026bf4f33ac6378d4800e8005d6ab239e9898aae6650591f89dc4ed8e3c419a2e71"
|
|
2329
2329
|
}
|
|
2330
2330
|
]
|
|
2331
2331
|
},
|
|
@@ -2441,11 +2441,11 @@
|
|
|
2441
2441
|
"hashes": [
|
|
2442
2442
|
{
|
|
2443
2443
|
"alg": "SHA-256",
|
|
2444
|
-
"content": "
|
|
2444
|
+
"content": "6f6060a574415c4d2be9a2247731127df261c14440817c9d7f9c21543f5c789b"
|
|
2445
2445
|
},
|
|
2446
2446
|
{
|
|
2447
2447
|
"alg": "SHA3-512",
|
|
2448
|
-
"content": "
|
|
2448
|
+
"content": "9e3db8d4c5b5995d75b20ea215267903c829ae35b34543cc1d5dcb53fcf6caeca4f2077f539ef83dcae6c94ed2a440bf955d23434f9b672c09615b25117e9e14"
|
|
2449
2449
|
}
|
|
2450
2450
|
]
|
|
2451
2451
|
},
|
|
@@ -77,6 +77,7 @@ function buildCweChains({ skills, cweCatalog, atlasTtps, cveCatalog, frameworkGa
|
|
|
77
77
|
title: rfcCatalog[r]?.title,
|
|
78
78
|
status: rfcCatalog[r]?.status,
|
|
79
79
|
})),
|
|
80
|
+
dlp_refs: [...accum.dlp_refs].sort(),
|
|
80
81
|
};
|
|
81
82
|
|
|
82
83
|
// Related CVEs: walk evidence_cves on the framework_gaps that the
|
|
@@ -118,11 +118,19 @@ function buildOne(absPath, relPath) {
|
|
|
118
118
|
const next = h2[j + 1];
|
|
119
119
|
const startByte = lineByteOffsets[cur.idx];
|
|
120
120
|
const endByte = next ? lineByteOffsets[next.idx] : totalBytes;
|
|
121
|
-
// Count H3 within this section
|
|
121
|
+
// Count H3 within this section — fence-aware, the same way the H2 loop
|
|
122
|
+
// above is. A section starts and ends on an H2 header, both of which are
|
|
123
|
+
// outside any fence, so fence state always begins false here. "### Foo"
|
|
124
|
+
// lines inside ```...``` output templates are not real sub-sections.
|
|
122
125
|
const endIdx = next ? next.idx : lines.length;
|
|
123
126
|
let h3Count = 0;
|
|
127
|
+
let h3InFence = false;
|
|
124
128
|
for (let k = cur.idx + 1; k < endIdx; k++) {
|
|
125
|
-
if (
|
|
129
|
+
if (/^```/.test(lines[k])) {
|
|
130
|
+
h3InFence = !h3InFence;
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if (!h3InFence && /^### /.test(lines[k])) h3Count++;
|
|
126
134
|
}
|
|
127
135
|
sections.push({
|
|
128
136
|
name: cur.raw.replace(/^##\s+/, ""),
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
* }
|
|
27
27
|
* }
|
|
28
28
|
*
|
|
29
|
-
*
|
|
29
|
+
* Corpus totals live under the top-level `_meta` block:
|
|
30
30
|
* {
|
|
31
|
-
*
|
|
32
|
-
*
|
|
31
|
+
* schema_version, tokenizer_note, approx_chars_per_token,
|
|
32
|
+
* total_chars, total_approx_tokens, skill_count
|
|
33
33
|
* }
|
|
34
34
|
*/
|
|
35
35
|
|
|
@@ -100,6 +100,35 @@ function readPackageVersion() {
|
|
|
100
100
|
return JSON.parse(fs.readFileSync(PACKAGE_JSON, 'utf8')).version;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
// Every previously released version must keep its own `## <version> ` heading.
|
|
104
|
+
// The release flow edits the TOP of the file; an edit that replaces the prior
|
|
105
|
+
// release's heading instead of inserting above it silently merges that
|
|
106
|
+
// release's notes into the new section — the extract then spans multiple
|
|
107
|
+
// releases and the public release body republishes old notes under the new
|
|
108
|
+
// version. Tags are the authoritative record of what was released.
|
|
109
|
+
// Tags whose release never published: the tag-push event was dropped (e.g.
|
|
110
|
+
// a GitHub Actions outage) and — because the v* ruleset forbids re-pushing a
|
|
111
|
+
// tag — the recovery is a version bump re-released with the same notes under
|
|
112
|
+
// the NEW heading. The orphan tag therefore legitimately has no CHANGELOG
|
|
113
|
+
// entry of its own. Tag exists, npm/GitHub Release do not.
|
|
114
|
+
const ORPHAN_RELEASE_TAGS = new Set(['0.13.111', '0.15.25']);
|
|
115
|
+
|
|
116
|
+
function releasedVersionsFromTags() {
|
|
117
|
+
try {
|
|
118
|
+
const out = require('node:child_process').execFileSync('git', ['tag', '-l', 'v*'], { cwd: ROOT, encoding: 'utf8' });
|
|
119
|
+
return out.split(/\r?\n/)
|
|
120
|
+
.map((t) => (t.match(/^v(\d+\.\d+\.\d+)$/) || [])[1])
|
|
121
|
+
.filter((v) => v && !ORPHAN_RELEASE_TAGS.has(v));
|
|
122
|
+
} catch {
|
|
123
|
+
// git absent or tags not fetched (shallow checkout) — nothing to check.
|
|
124
|
+
return [];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function missingReleasedHeadings(text, versions) {
|
|
129
|
+
return versions.filter((v) => !headingLine(text, v));
|
|
130
|
+
}
|
|
131
|
+
|
|
103
132
|
function main() {
|
|
104
133
|
const version = process.argv[2] || readPackageVersion();
|
|
105
134
|
if (!/^\d+\.\d+\.\d+$/.test(version)) {
|
|
@@ -130,6 +159,14 @@ function main() {
|
|
|
130
159
|
return;
|
|
131
160
|
}
|
|
132
161
|
|
|
162
|
+
const missing = missingReleasedHeadings(text, releasedVersionsFromTags());
|
|
163
|
+
if (missing.length > 0) {
|
|
164
|
+
console.error('[check-changelog-extract] FAIL: released version(s) lost their CHANGELOG heading: ' + missing.map((v) => '## ' + v).join(', '));
|
|
165
|
+
console.error('[check-changelog-extract] A new entry must be INSERTED ABOVE the previous release heading, never replace it — otherwise the prior release\'s notes merge into the new section and republish in the new release body.');
|
|
166
|
+
process.exitCode = 1;
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
133
170
|
const section = extractSection(text, version);
|
|
134
171
|
if (section.length === 0) {
|
|
135
172
|
console.error('[check-changelog-extract] FAIL: v' + version + ' section is empty — the release body would fall back to the generic "Release of v' + version + '." line.');
|
|
@@ -153,6 +190,6 @@ function main() {
|
|
|
153
190
|
process.exitCode = 0;
|
|
154
191
|
}
|
|
155
192
|
|
|
156
|
-
module.exports = { extractSection, headingLine, lintOperatorClean, FORBIDDEN };
|
|
193
|
+
module.exports = { extractSection, headingLine, lintOperatorClean, FORBIDDEN, missingReleasedHeadings, releasedVersionsFromTags };
|
|
157
194
|
|
|
158
195
|
if (require.main === module) main();
|
|
@@ -70,6 +70,11 @@ const COMMENT_EXEMPT = new Set([
|
|
|
70
70
|
// MUST embed real `## X.Y.Z` headings (e.g. 0.15.5 vs 0.15.50) — load-bearing
|
|
71
71
|
// test data, not sprinkled release tags.
|
|
72
72
|
"tests/check-changelog-extract.test.js",
|
|
73
|
+
// The extract gate's orphan-tag allowlist must name the exact versions of
|
|
74
|
+
// tags that exist with no published release (outage-recovery bumps), so the
|
|
75
|
+
// heading-completeness check can skip them — load-bearing references to git
|
|
76
|
+
// tags, an authoritative version surface.
|
|
77
|
+
"scripts/check-changelog-extract.js",
|
|
73
78
|
]);
|
|
74
79
|
|
|
75
80
|
// Git-ignored files (a contributor's local-only working docs, scratch) are
|