• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

peczenyj / GDPR-IAB-TCFv2 / 25524252473
96%
main: 96%

Build:
Build:
LAST BUILD BRANCH: devel
DEFAULT BRANCH: main
Ran 07 May 2026 10:05PM UTC
Jobs 1
Files 16
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 May 2026 09:55PM UTC coverage: 95.648% (+0.08%) from 95.57%
25524252473

push

github

web-flow
feat(validator): structured Failure objects + Result accessors (Phase 6.2) (#66)

Introduce GDPR::IAB::TCFv2::Validator::Failure as a lightweight value
object representing a single validation failure: stable integer code
(from Validator::Reason), human-readable message, plus optional
structured context (purpose_id, vendor_id, restriction_type, cmp_id).
Stringifies to message so it slots into existing display code without
ceremony.

Validator::Result now stores Failure objects internally and exposes
two new accessors:

  failures()     -> list of Failure objects (machine-actionable)
  reason_codes() -> list of integer codes (just the codes, when codes
                    are all you need)

Existing accessors are unchanged: reasons() still returns the list of
human-readable strings (now derived from Failure->message), the bool
overload still reports validity, and stringification still joins the
messages by $\. No back-compat break for any caller.

Validator.pm now constructs Failure objects at each rule's failure
point, attaching the appropriate ReasonXxx code + structured fields:

  - ReasonPolicyVersionTooLow -- min_policy_version mismatch
  - ReasonVendorNotDisclosed  -- check_disclosed_vendors miss
  - ReasonVendorNotAllowedConsent / ReasonVendorNotAllowedLegitimateInterest
                              -- per-purpose flag missing
  - ReasonInvalidCMP          -- cmp_validator rejection (carries cmp_id)

ReasonInvalidCMP is added to Validator::Reason as code 13. The other
CMP-family codes (Deleted/Unknown) are deferred until CMPValidator
gains the API to distinguish lifecycle states; the comment in
Reason.pm reserves the slot.

Out of scope for this stage and queued for 6.3-6.5:

  - TCF spec carve-out reason (P1 / P3-6 LI not permitted by spec).
  - Distinct publisher-restriction reasons.
  - Per-call list overrides for purpose IDs.

Tests: t/16-validator-failures.t covers Failure round-trip,
stringification, Result accessors (failures/reason_codes... (continued)

43 of 43 new or added lines in 3 files covered. (100.0%)

1033 of 1080 relevant lines covered (95.65%)

10922.33 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25524252473.1 07 May 2026 10:06PM UTC 16
95.65
GitHub Action Run
Source Files on build 25524252473
  • Tree
  • List 16
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 8d49a2e3 on github
  • Prev Build on devel (#25523098909)
  • Next Build on devel (#25525224521)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc