Seven risk documents have lost their related_risks relationships to a missing newline
Débutant
help wantedgood-first-issue
98 ★
Poids du clone léger
Mise à jour
Description
Found during an issue and pull request hygiene pass, using `scripts/review-pr.py --tree origin/main`.
## The defect
Seven risk documents on `main` have lost their `related_risks` relationships. The last entry of the `uk-regulations_references` list is missing its trailing newline, so the following key is swallowed into that entry's trailing comment and never parsed as a key at all.
`ri-1_information-leaked-to-hosted-model.md`, front matter:
```yaml
- ico-ai-data-protection-toolkit # Toolkit prompts risk assessment of data leakage in AI systemsrelated_risks:
- ri-2 # Information Leaked to Vector Store
- ri-23 # Intellectual Property (IP) and Copyright
```
Note `AI systemsrelated_risks:` run together on one line. YAML parses this as a single list item with a long comment, so:
- `related_risks` does not exist on the document.
- `ri-2` and `ri-23` are parsed as further `uk-regulations_references` entries, where they resolve against nothing.
The relationships are not broken visibly — they are simply absent, which is why this has gone unnoticed since it merged.
## Affected documents
| Document | Relationships lost |
|---|---|
| `ri-1_information-leaked-to-hosted-model.md` | ri-2, ri-23 |
| `ri-16_bias-and-discrimination.md` | ri-19, ri-22 |
| `ri-17_lack-of-explainability.md` | ri-16, ri-18, ri-22 |
| `ri-18_model-overreach-expanded-use.md` | ri-10, ri-17, ri-22 |
| `ri-19_data-quality-and-drift.md` | ri-4, ri-9, ri-16 |
| `ri-20_reputational-risk.md` | ri-4, ri-10, ri-16 |
| `ri-22_regulatory-compliance-and-oversight.md` | ri-16, ri-17, ri-18 |
Seven documents, twenty relationships.
## Origin
Introduced with the UK regulations references in #327, merged 17 July 2026. All seven are documents that gained a `uk-regulations_references` block in that change, and the failure is consistent across them, which points at how the block was generated rather than at seven separate typos.
## Reproducing
```bash
python scripts/review-pr.py --tree origin/main
```
The `frontmatter` check reports each one as a FAIL. Worth noting this is exactly the class of problem that check exists for: a missing newline is invisible in review, produces valid YAML, and silently drops data.
## Fixing it
Mechanically trivial — a newline before each swallowed key. All seven documents are `doc-status: Approved-Specification`, so it needs a proper review round rather than a direct push, though it restores relationships that were meant to be there rather than changing the specification.
Two things worth doing alongside the fix:
1. Check whether the generation step that produced the UK blocks is still in use, since it will reintroduce this.
2. Consider running `scripts/review-pr.py --tree origin/main` in CI so a front matter regression on `main` fails loudly instead of waiting for someone to audit it.
Happy to raise the pull request if nobody else is on it.
Issues similaires
Tout voir
Python
Débutant
VS Code extension should be robust to YAML parser errors
Seeing this error: ``` Failed to read calkit.yaml: YAMLParseError: A block sequence may not be used as an im…
Mise à jour
Python
Débutant
dash: a manual Refresh control
The dashboard polls: `refreshStats()` (`src/doberman/dash/app.py:408`) every 5 s and `refreshPending()` (`:54…
Mise à jour
Python
Débutant
dash: "Copy details" button on each pending-approval card
Each pending-approval card in the dashboard (`renderPending`, `src/doberman/dash/app.py:448-544`) shows the r…
Mise à jour