Skip to content

consent-engine v0.6.5

Choose a tag to compare

@github-actions github-actions released this 29 May 18:29
· 13 commits to main since this release

fix: harden jurisdiction Canadian-content signal (hex false-positive + French gate)

Follow-up to 5f9115b. Live re-validation caught bbc.com still resolving to CA:
the Canadian postal-code regex ([A-Z]\d[A-Z]\d[A-Z]\d under IGNORECASE) matched
160+ hex fragments in CSS/asset hashes (e.g. "a5b7a0" inside the build hash
537a5b7a0167d5a8), tripping the France-vs-Quebec tiebreaker on a UK news site.

  • Remove the postal-code pattern from _canadian_content_signal: it is the hex
    false-positive source and is redundant (a real Quebec address carries
    "Québec"/"Montréal").
  • Gate the Canadian-content tiebreaker behind a new _french_language_signal:
    it exists only to split French-Quebec from French-France, so it must not run
    on English (en-GB/en-US) pages. bbc.com (en-GB) now resolves EU.
  • Regression tests: hex asset hashes -> not CA; Montréal-in-English -> EU;
    French-Quebec -> CA; _french_language_signal coverage.

Live-verified end-to-end (scanning from a Canadian IP): cnn.com -> US,
bbc.com -> EU, canadiantire.ca -> CA. 145 passed, 1 skipped; ruff + mypy clean.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com