fix(councils): fix 4 real bugs found triaging the full CI run - #2223
Conversation
Worked through the 65 councils that showed FAILED in a full nightly-style
run on the Python 3.14 branch. Re-ran each locally with a real Chrome
(--local_browser True) instead of a remote grid: 40 of 65 passed
immediately (CI-environment flakiness, not regressions). Of the 25 that
failed locally too, most turned out to be live-site/live-data issues or
a Cloudflare IP block on this environment unrelated to any code change
(full breakdown in CI_FAILURE_TRIAGE.md) - but 4 were genuine, fixable
bugs:
- GlasgowCityCouncil: site renamed the food-bin icon from grey to
foodBin.gif, so the icon->type lookup returned None for it.
- OrkneyIslandsCouncil: test fixture had a `postcode` field the code has
never read - it's always required a street/area/island name instead.
Pre-existing since this council's creation, not a regression.
- NeathPortTalbotCouncil: three separate bugs - (1) results page now
renders multiple layout blocks with a promo banner first, so the old
code's "just take the first one" missed the actual date headings
entirely, (2) dates use a non-breaking space the old
`.replace(" ", " ")` never matched (that string never appears in
decoded text), (3) the bin-type card's class list gained an extra
class that broke an exact multi-class match - now matched on that new,
more specific class instead.
- IsleOfWightCouncil: the address-select lookup used a stale
`aria-label` the site no longer sets - swapped to the stable element
id. (Test fixture also updated off a stale UPRN-only config that never
matched what the code has required since it was written; one further
issue remains on the final results page and needs follow-up.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe changes update three council scrapers, revise Isle of Wight and Orkney test inputs, and add a CI failure triage document covering all 65 council tests and their local results. ChangesCouncil scraper updates
Estimated code review effort: 2 (Simple) | ~15 minutes Merge Risk: ⚪ Minimal · up to The compatibility and fixture updates are ready to merge, with no substantiated correctness, availability, or integration issue remaining. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
Summary
Worked through the 65 councils that showed
FAILEDin a full nightly-style BDD run on the Python 3.14 branch (PR #2222), one by one, tracking progress inCI_FAILURE_TRIAGE.md.Method: re-ran each locally with a real Chrome (
--local_browser True) instead of the remote Selenium grid CI uses.requests.get()on plain homepages, no scraper code involved).4 genuine, fixable bugs found and fixed:
greyBin.giftofoodBin.gif, so the icon→type lookup returnedNonefor it.postcodefield the code has never actually read; it's always required a street/area/island name instead (pre-existing since this council's creation, not a regression)..replace(" ", " ")never matched (that literal string never appears in decoded text); (3) the bin-type card gained an extra CSS class that broke an exact multi-class match.aria-labelthe site no longer sets, swapped to the stable elementid. (Also updated the test fixture off a stale UPRN-only config that never matched what the code has required since it was written — one further issue remains on the results page, documented in the triage doc for follow-up.)Full per-council breakdown and reasoning:
CI_FAILURE_TRIAGE.md.Test plan
blackclean on all touched filesSummary by CodeRabbit
Bug Fixes
Documentation