Aller au contenu
login
arrow_backRetour aux issues
finos/ai-governance-framework #367

Seven risk documents have lost their related_risks relationships to a missing newline

ecoDébutant help wanted good-first-issue

descriptionDescription

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.
codeOuvre sur GitHub