Commit 55bacd7
v1.4.0: tier field in check JSON output (#2)
Adds a top-level "tier" string to the JSON returned by `check
--format=json`. Computed deterministically from severity counts:
- silver: 0 CRITICAL + 0 HIGH
- bronze: 0 CRITICAL + ≥1 HIGH
- fail: ≥1 CRITICAL
This is the CLI-green Silver path the directory site already uses as
one of its two Silver gates. The other Silver path (public methodology
page with Version + Changelog headings) requires a remote URL fetch and
remains directory-side. The CLI does not opine on that.
Motivation: integrity-md-action and the directory previously computed
their own tier labels from raw counts, drifting independently. One
source of truth means the badge the action publishes and the tier the
directory awards are always the same string.
Exported computeTier(counts) so external tooling can pin the mapping
without scraping JSON.
Base manifest unchanged (still v1.10.0). No rule additions, removals,
or shape changes — purely an additive JSON output field.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 08bf66a commit 55bacd7
3 files changed
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| 157 | + | |
155 | 158 | | |
156 | 159 | | |
157 | 160 | | |
| |||
233 | 236 | | |
234 | 237 | | |
235 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
0 commit comments