Repository navigation
fix(observability): guard against nil tag before sort - #283
Conversation
site.tags["observability"] returns nil when no posts carry the tag, causing Liquid's sort filter to throw 'Cannot sort a null object.' and breaking the pre-commit Jekyll build. Guard with a nil check and fall back to an empty array. Broke the weekly gptme digest publish step (bob-weekly-gptme-digest.service). Git-Session-Id: 0e108269-aed7-406a-9942-c991b20ebdb0
🤖 AI code reviewThe PR modifies observability.pug to guard against a nil value for site.tags["observability"] before sorting. It assigns the raw tag array to obs_posts_raw, then conditionally sorts and reverses it if non-nil, otherwise assigns an empty array via "" | split: "". This prevents a Liquid 'Cannot sort a null object' error when no posts carry the observability tag. Safe to merge — no P0/P1 findingsConfidence 5/5 ✅ No thread-worthy findings. Advisory notes follow; they are retained without opening review threads. 1 advisory finding (summary-only, not scored)These P2 guard, heuristic, trade-off, or documentation claims are retained for judgment without opening review threads.
This is a How this was verified: static preflight: fix-commit + touched-files scan (rule 7) Files changed (1) — the diff as I read it
Reviewed Maintainer commands
|
Summary
site.tags["observability"]returns nil when no posts carry the tag| sort: "date"on nil throwsCannot sort a null object.in Liquid"" | split: ""(empty array)Impact
This was breaking the weekly gptme digest publish step (
bob-weekly-gptme-digest.service) — the pre-commit Jekyll build failed, blocking the website PR from being created.Test plan
observability