Commit 3fc09d7
fix(framework): docs-validation.yml recognizes all DocTypes (fw-4.4.1) (#66)
The workflow's VALID_PATTERN regex listed only 12 of the 16 canonical
DocType prefixes (missing the four China-specific PIPIA, CACFILE,
TC260RA, AILABEL) plus 2 stale entries (OPS, DOC) that aren't real
DocType variants. The governance-metrics job had the same 12-element
TYPES array, undercounting China docs in the metrics summary. The
EXCLUDED blacklist also missed ~18 framework / governance / NIST guide
files added in later releases, so an adopter running
`devtrail update-framework` on a tracked checkout would see the
workflow fail per-file with "Invalid naming".
Refactored to a whitelist approach: a workflow-level env var
DOC_TYPE_PREFIXES enumerates the 16 canonical prefixes once. Per-step
checks skip files whose basename does not start with one of those
prefixes — framework / governance / template files are silently
skipped with no manual exclude list to maintain. The governance-metrics
TYPES array is derived from the same env var.
cli/src/document.rs::ALL_PREFIXES gains a doc-comment pointing at the
workflow's env var. Adding a new DocType still requires updating both
sides, but the bidirectional pointer makes the obligation discoverable
from either entry point.
Framework-only patch. CLI behavior unchanged; cli-3.6.0 unaffected.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2fea763 commit 3fc09d7
26 files changed
Lines changed: 105 additions & 62 deletions
File tree
- cli/src
- dist
- .devtrail
- 00-governance
- i18n
- es
- zh-CN
- .github/workflows
- docs
- adopters
- i18n
- es
- adopters
- zh-CN
- adopters
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
10 | 31 | | |
11 | 32 | | |
12 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
75 | 81 | | |
76 | 82 | | |
77 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
0 commit comments