Architecture Note · Security & Compliance
Deterministic Credential Verification, Pre-Adverse Clocks, and Shift-Rostering Guards
Why naive screening automations trigger FCRA, GDPR Article 22, and licensing-board liability—and how consent pre-gates, 60/30/7-day expiry radar, statutory waiting clocks, and shift blocks protect regulated operations.
The Problem: Expired Licenses on Shift and Statutory Screening Violations
Healthcare systems, cross-border commercial fleets, and engineering contractors rely on continuously valid credentials—ranging from RN, GMC, AHPRA, and MHLW registrations to CDL-A, HGV Driver CPC, EU Code 95, PE/CEng/PEng licenses, and right-to-work visas. Letting a clinician or heavy-freight driver work a regulated shift four days after a license lapses creates immediate regulatory and insurance exposure, while initiating background checks without standalone consent or issuing adverse rejections prematurely violates US FCRA, UK DBS, and EU GDPR rules.
Why Naive AI Screening Wrappers Fail
Routing background checks and credential documents through unguarded LLM workflows fails regulated compliance teams across four critical boundaries:
- Missing pre-query consent and disclosures: Automated pipelines that invoke registry or screening endpoints before validating captured electronic consent and jurisdiction-specific disclosure packs violate statutory prerequisites before an order even runs.
- Autonomous adverse employment decisions: Letting an AI classifier reject a candidate on a flagged FMCSA or criminal record breaches GDPR Article 22 human-review mandates and skips mandatory pre-adverse waiting windows (
5business days under US FCRA,7days under EU GDPR,10days for UK DBS representation). - Silent date parsing and rostering gaps: Probabilistic OCR extraction misreads regional expiry formats (
DD/MMvsMM/DD) and fails to block an expired worker from dispatch schedules. - Unbounded upload retention and intrusive outreach: Storing raw license scans indefinitely or blasting unsolicited SMS reminders creates unnecessary privacy exposure.
The Deterministic Architecture That Fixes It
A compliant credentialing system enforces statutory preconditions, deterministic expiry math, and human adjudication gates directly in FastAPI and SQLite WAL.
- Consent and disclosure pre-gate:
POST /api/checks/initiaterejects any screening order lackingconsent_captured=true, ISO-8601consent_timestamp,consent_ip_or_ref, and complete jurisdictional disclosure packs acrossUS_FCRA(standalone disclosure, summary of rights, written authorization),UK_DBS,CA_PIC,AU_NPC,EU_GDPR,JP_APPI, andSG_MOM—returningHTTP 422with zero partial database writes. - 60/30/7-day expiry radar and hard rostering guard:
POST /api/credentials/ingestparses primary-source license and right-to-work records viaOfflineDeterministicAdapterby default, stores staged multipart files at0600permissions with automatic3600sauto-wipe (retaining SHA-256 digests), and feedsGET /api/credentials/expiringacross60-day,30-day, and7-daywindows. Expired or suspended credentials immediately emitblocked_roster_alertsto lock uncredentialed staff—such as an HGV Class 1 driver whose Driver CPC expired four days prior—out of regulated shifts, while renewal nudges use strictly opt-in Email or Official WhatsApp Business Cloud API templates (zero outbound AI voice calls, zero unsolicited SMS). - Statutory waiting clocks and human compliance-officer gates:
POST /api/checks/{id}/adjudicateenforcesHTTP 409 Conflictifhuman_review_confirmed=trueandofficer_idare missing, and blocks prematureadverse_actionuntilpre_adverse_noticehas been issued, candidate disputes or uploads are logged, and the full statutory waiting clock (such as5business days under US FCRA or7days under EU GDPR) has elapsed. - Tamper-evident audit packets: Decisions write inside SQLite
BEGIN IMMEDIATEtransactions to a SHA-256 hash-chainedaudit_logstable and export viaGET /api/checks/audit-packets.csvas JSON or OWASP formula-safe RFC 4180 CSV packets scoped for external regulators, backed by scoped invite tokens with per-token sliding-window rate limits.
Operational Takeaway
Credential compliance cannot be bolted on after a shift is worked or an adverse letter is sent. Enforcing consent and disclosure packs before registry lookup, statutory pre-adverse waiting clocks before adjudication, and automated roster locks on license expiry keeps safety-critical healthcare, fleet, and engineering operations audit-ready across every regulated hub.