@windyroad/risk-scorer 0.12.6 → 0.12.7-preview.581
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/package.json
CHANGED
|
@@ -264,6 +264,22 @@ while IFS=$'\t' read -r slug count reason_tag prefill source_files; do
|
|
|
264
264
|
|
|
265
265
|
${prefill}
|
|
266
266
|
|
|
267
|
+
## Recogniser
|
|
268
|
+
|
|
269
|
+
(pending review — recogniser shape to be authored during curation per ADR-059)
|
|
270
|
+
|
|
271
|
+
**Path patterns** (file globs where this risk class typically applies):
|
|
272
|
+
|
|
273
|
+
- pending review — list path globs derived from \`.risk-reports/\` evidence + the prose above
|
|
274
|
+
|
|
275
|
+
**Diff-content keywords** (signals in the diff that suggest scoring against this entry):
|
|
276
|
+
|
|
277
|
+
- pending review — list keywords drawn from the report prose and adjacent incident reports
|
|
278
|
+
|
|
279
|
+
**Anti-patterns** (looks like this entry but should score under a different class):
|
|
280
|
+
|
|
281
|
+
- pending review — list cases that should redirect to a specialisation or sibling
|
|
282
|
+
|
|
267
283
|
## Inherent Risk
|
|
268
284
|
|
|
269
285
|
- **Impact**: not estimated — no prior data
|
|
@@ -163,6 +163,55 @@ EOF
|
|
|
163
163
|
grep -q "Active (auto-scaffolded — pending review)" "$entry"
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
# ──────────────────────────────────────────────────────────────────────────────
|
|
167
|
+
# Recogniser-shape skeleton emission (P169 — bootstrap stops the bleeding)
|
|
168
|
+
# ──────────────────────────────────────────────────────────────────────────────
|
|
169
|
+
# Newly-scaffolded entries MUST carry a ## Recogniser section with the three
|
|
170
|
+
# sub-blocks awaiting curation, so new risks stop landing without the shape
|
|
171
|
+
# that the @windyroad/risk-scorer pipeline relies on for slug-token matching.
|
|
172
|
+
|
|
173
|
+
@test "scaffolded entry includes ## Recogniser section" {
|
|
174
|
+
mkdir -p .risk-reports
|
|
175
|
+
cat > .risk-reports/r.md <<'EOF'
|
|
176
|
+
RISK_REGISTER_HINT:
|
|
177
|
+
- above-appetite-residual | recogniser-shape-test | Recogniser skeleton check
|
|
178
|
+
EOF
|
|
179
|
+
run "$SCRIPT"
|
|
180
|
+
[ "$status" -eq 0 ]
|
|
181
|
+
entry=$(ls docs/risks/R*-recogniser-shape-test.active.md)
|
|
182
|
+
grep -q "^## Recogniser" "$entry"
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@test "scaffolded Recogniser block has Path-patterns / Diff-content / Anti-patterns sub-blocks" {
|
|
186
|
+
mkdir -p .risk-reports
|
|
187
|
+
cat > .risk-reports/r.md <<'EOF'
|
|
188
|
+
RISK_REGISTER_HINT:
|
|
189
|
+
- above-appetite-residual | recogniser-subblock-test | Recogniser sub-block check
|
|
190
|
+
EOF
|
|
191
|
+
run "$SCRIPT"
|
|
192
|
+
[ "$status" -eq 0 ]
|
|
193
|
+
entry=$(ls docs/risks/R*-recogniser-subblock-test.active.md)
|
|
194
|
+
grep -q "Path patterns" "$entry"
|
|
195
|
+
grep -q "Diff-content keywords" "$entry"
|
|
196
|
+
grep -q "Anti-patterns" "$entry"
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@test "scaffolded Recogniser sub-blocks carry pending-review placeholders" {
|
|
200
|
+
mkdir -p .risk-reports
|
|
201
|
+
cat > .risk-reports/r.md <<'EOF'
|
|
202
|
+
RISK_REGISTER_HINT:
|
|
203
|
+
- above-appetite-residual | recogniser-pending-test | Recogniser pending check
|
|
204
|
+
EOF
|
|
205
|
+
run "$SCRIPT"
|
|
206
|
+
[ "$status" -eq 0 ]
|
|
207
|
+
entry=$(ls docs/risks/R*-recogniser-pending-test.active.md)
|
|
208
|
+
# The skeleton uses the same ADR-026-style "pending review" sentinel
|
|
209
|
+
# so curators can grep for unfinished sections. Three pending-review
|
|
210
|
+
# markers (one per sub-block: paths / keywords / anti-patterns).
|
|
211
|
+
recog_lines=$(sed -n '/^## Recogniser/,/^## Inherent/p' "$entry" | grep -c "pending review" || true)
|
|
212
|
+
[ "$recog_lines" -ge 3 ]
|
|
213
|
+
}
|
|
214
|
+
|
|
166
215
|
# ──────────────────────────────────────────────────────────────────────────────
|
|
167
216
|
# Idempotency / slug collision append
|
|
168
217
|
# ──────────────────────────────────────────────────────────────────────────────
|