-
Notifications
You must be signed in to change notification settings - Fork 1
hygiene(backlog-generator): warn on row files missing YAML frontmatter #1018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
eb12bc4
1df2dfe
853069c
88b3029
2800fdf
7f12e27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,6 +20,14 @@ | |||||
| # 1 environment / dependency error | ||||||
| # 2 drift detected (--check mode only) | ||||||
| # | ||||||
| # Stderr warnings (non-fatal): | ||||||
| # `WARN: <file> — missing required frontmatter field (need both id and title)` | ||||||
| # surfaces row files that are silently rendering as empty | ||||||
| # `**[](path)** ` entries because the heading-only format | ||||||
| # was used without the YAML frontmatter the generator reads. | ||||||
| # Doesn't change exit code; operators / CI can grep stderr | ||||||
| # to surface the cause when --check fails downstream. | ||||||
| # | ||||||
| # Dependencies: bash 4+, POSIX awk, sort, diff, find, mktemp. | ||||||
| # No external `yq` required; inline awk parser handles the | ||||||
| # flat frontmatter schema. `yq` integration is a Phase 1b | ||||||
|
|
@@ -120,6 +128,20 @@ HEADER | |||||
| status=$(extract_field "$file" "status") | ||||||
| title=$(extract_field "$file" "title") | ||||||
|
|
||||||
| # Surface missing frontmatter to stderr — the file is | ||||||
| # otherwise silently rendered as `**[](path)** ` (empty | ||||||
| # link text + empty title) and the integrity check fails | ||||||
| # later with no hint at the cause. Warning only — does not | ||||||
| # change generator output, so does not regress existing CI | ||||||
| # behaviour. Operators / CI can grep stderr for "WARN:" to | ||||||
| # surface the cause early. | ||||||
| if [ -z "$id" ] || [ -z "$title" ]; then | ||||||
| # Print path relative to REPO_ROOT so CI logs aren't | ||||||
| # cluttered with runner-specific absolute paths | ||||||
| # (Codex P2 finding: keep warnings portable). | ||||||
|
||||||
| # (Codex P2 finding: keep warnings portable). | |
| # (Keep warnings portable.) |
Uh oh!
There was an error while loading. Please reload this page.