RAIA™ Specification

RentProfile R2R Photo Scraper

Right to Rent checks confirm a tenant is legally allowed to live in the UK. The system did not automatically save the tenant photo from the check into our platform. This page explains the automated pi

← Back to Developer Hub TEXTBOOK SPECIFICATION
RAIA™ (Real estate Artificial Intelligence Agent) Specification

Right to Rent checks confirm a tenant is legally allowed to live in the UK. The system did not automatically save the tenant photo from the check into our platform. This page explains the automated pi

🧩 Section A: In Plain English

RentProfile R2R Photo Scraper

Right to Rent checks confirm a tenant is legally allowed to live in the UK — this automated pipeline logs into RentProfile, scrapes certificate PDFs, extracts the face photo, and backfills the tenant record in Supabase.

🟢 In Plain English

Right to Rent checks confirm a tenant is legally allowed to live in the UK. The system did not automatically save the tenant photo from the check into our platform. This page explains the automated pipeline that fixes that — downloading the certificate, extracting the face photo, and storing it against the tenant record.

RentProfile R2R Photo Scraper

Automated Playwright pipeline — logs into any RentProfile agent account, scrapes all Right to Rent certificate PDFs, extracts the embedded face photo, and backfills tbl_persons.avatar_url in Supabase. Zero manual downloads. Reusable across all estate agent clients.

◉ AITL — Fully Automated ▲ HITL Gate — Credentials ✓ Read-Only by Design
44
Active tenants & guarantors missing photos (RAIA (Real estate Artificial Intelligence Agent) v1 portfolio)
0
Manual downloads required — fully automated via Playwright
372KB
Avg face JPEG size embedded in R2R certificate PDFs
~2 min
Write phase runtime using --from-plan (skips 950-page re-scrape)
📌

TL;DR. RentProfile embeds the tenant's liveness face photo inside the Right to Rent certificate PDF. This tool logs into any RentProfile agent dashboard with saved credentials, visits the R2R Reporting tab, downloads every certificate PDF, extracts image index [1] (the face) using PyMuPDF, uploads to gs://rcf_public/avatar/<person_id>.jpg, and writes the public URL to tbl_persons.avatar_url. Confirmed working on RAIA (Real estate Artificial Intelligence Agent) portfolio June 2026 (29 written, 0 errors, 136s).

📄
scrape-rentprofile-r2r-avatars.cjs
Main scraper — Playwright login, R2R list scrape, PDF download, face extraction, GCS upload, Supabase write. Path: 03_technology/09_pipelines/programs/
🐍
extract_pdf_image.py
PyMuPDF helper — extracts largest embedded JPEG from a PDF page. Called by scraper via execSync (NOT inline -c flag). Same directory.
📊
avatar-backfill-report.csv
Generated by --report flag — lists all 44 missing persons with name, role, tenancy_ref, email, person_id. Share with human reviewer before running --write.

Chapter 1 Why This Tool Exists

The Problem
  • RentProfile makes photo upload optional — conversion rate optimisation
  • request_id was never stored in AppSheet, MySQL, or Supabase during migration
  • API lookup requires request_id — no list/search endpoint exists
  • All 44 active tenants show silhouette placeholder in portal UI
  • R2R PDFs exist on RentProfile servers but were never pulled back to RAIA
The Solution
  • R2R certificate PDFs contain the face JPEG at image index [1]
  • R2R record id is visible in the URL — no request_id needed
  • Playwright can log in, scrape the full R2R list, and download all PDFs
  • PyMuPDF extracts the face photo in <1 second per PDF
  • GCS upload + Supabase write completes the backfill end-to-end

Why It's a Reusable Tool — Not a One-Off Script

Every estate agent we onboard who uses RentProfile will have the same gap: R2R PDFs on RentProfile servers, face photos never synced to RAIA. This tool becomes the standard onboarding backfill step for all RentProfile agencies. The only per-client variables are the agent login credentials and the Supabase database target.

The API Red-Team: Why We Built the Scraper

Before writing a single line of Playwright code, we ran a structured red-team of the RentProfile API — following what is now the standard Three-Method Extraction Protocol (see § 4.2 ETL Method). Here is exactly what we found:

A — API Verdict: Partial
  • One usable endpoint: /v1/api/status/request
  • Requires request_id per call — no list or search endpoint
  • request_id was never captured during AppSheet → Supabase migration
  • Result: API useful only for targeted lookups, not bulk extraction
  • Conclusion: API alone cannot complete the backfill
B — MCP Verdict: None
  • No /.well-known/mcp.json endpoint detected
  • No SSE or WebSocket event stream available
  • No tool registry exposed
  • Expected — RentProfile is a closed legacy SaaS
  • Conclusion: MCP not available; skip
C — Browser Verdict: Confirmed
  • Authenticated login succeeds with agency credentials
  • /agent/r2r-reporting paginates all R2R records without needing request_id
  • Individual certificate PDFs downloadable via record-level URL
  • PDFs contain embedded face JPEG at image index [1] (PyMuPDF confirmed)
  • Conclusion: Browser scrape is the primary extraction method

The API and browser scraper now run as complementary tools. The scraper handles bulk list extraction and PDF retrieval. The API handles targeted status lookups when a request_id is available (e.g. from an invite email or agent dashboard URL). Both outputs are cross-referenced to validate completeness — if the API returns a record not found in the scrape list, it surfaces as a data quality flag for investigation.

This pattern — red-team the API, confirm MCP absence, build the browser supplement, cross-reference both — is now the universal RAIA™ (Real estate Artificial Intelligence Agent) standard for all legacy PropTech integrations. The RentProfile tool is the canonical reference implementation. See § 4.1 Legacy Data Sources & Systems for how this applies across the full PropTech ecosystem.

GDPR Basis

RAIA (Real estate Artificial Intelligence Agent) processes tenant face photos as a data controller under UK GDPR Article 6(1)(b) (contractual necessity — property management agreement with landlord) and Article 6(1)(c) (legal obligation — Right to Rent verification under Immigration Act 2014). RAIA's lawful basis is independent of RentProfile's original processing — each controller must establish their own basis. Face photos are minimal biometric data retained solely for identity verification at viewings and video calls, proportionate to the legitimate purpose.

Scope Constraint

Active and renewing tenants + guarantors only. Never leads, enquiries, completed tenancies, or contacts without a tenancy link. See Pitfall P-01.

Future Prevention

Once Blinc (mandatory biometric selfie) is live, this gap never recurs for new tenancies. This tool handles the historic migration debt only.


Chapter 2 How It Works

Pipeline Architecture Map

RentProfile R2R Scraper — Full Pipeline Stealth browser automation · PyMuPDF face extraction · GCS upload · Supabase write CREDENTIALS LAYER PLAYWRIGHT BROWSER EXTRACTION STORAGE GUARD RAILS Load .env.local AGENT_EMAIL AGENT_PASSWORD Playwright Launch (headless) chromium · no JS injection URL allowlist enforced Stealth Plugin playwright-extra + stealth · anti-fingerprint Fill Login Form rentprofile.co/agent/login email + password → submit ▲ HITL GATE Human provides creds stored in .env.local Verify Login Success check for dashboard URL abort if login fails Scrape R2R Reporting List /agent/reporting/right_to_rent extract all ?id=XXXXX values ◉ AITL GATE URL allowlist — abort if navigation outside scope ◉ AITL GATE No mutation buttons: Cancel/Delete/Edit blocked ◉ AITL GATE --dry-run default --write flag required Download R2R Certificate PDFs /view_r2r_in_detail?id=XXXXX 5s polite delay between requests PyMuPDF Extraction page.get_images()[1] index[1] = face JPEG Silhouette Filter skip if <5KB or silhouette magic bytes check (FF D8) Upload to GCS gs://rcf_public/avatar/ <person_id>.jpg (public) Write avatar_url tbl_persons.avatar_url = storage.googleapis.com/... Audit Log — run-report.json processed · skipped (silhouette) · failed · GCS URL written Person ID Matching name+email → tbl_persons join via tbl_migration_contacts Browser step Extract/write HITL gate AITL gate

Security Model — Why It Cannot Mutate Data

🔒

RentProfile has no read-only sub-user or RBAC. One login = full agency access. The protection lives entirely in our scraper code — three independent layers prevent any write operation from occurring on the RentProfile platform.

Guard Rail
Layer
Enforcement
🌐
URL allowlist — Playwright throws and aborts if navigation is attempted to any URL not on the approved list
Code
Hard block
🚫
Mutation button block — script errors if it ever detects a click on any element whose text contains: Cancel, Delete, Edit, Remove, Archive, Withdraw
Code
Hard block
🔑
No API key usage — the scraper uses browser session only. The write-capable API endpoints (Invite, Cancel, Edit Tenancy) require the API key in the POST body. The scraper never calls any API endpoint.
Design
Zero overlap
🧪
Dry-run by default — script lists all PDFs it would download and faces it would extract without writing anything to GCS or Supabase. Pass --write to execute.
UX
Soft gate
📋
Full audit log — every navigation, download, and write is logged to run-report.json and stdout. Reviewable after any run.
Audit
Full trace

Data Flow — What Moves Where

RentProfile rentprofile.co/agent R2R PDFs (read-only) Local /tmp PDF download face JPEG crop gs://raia-gb-private Raw PDF archive (GDPR-protected, private) gs://rcf_public Cropped face JPEGs (public, CDN-served) Supabase tbl_persons avatar_url written download archive crop → upload public face JPEG only write URL ⚠ GDPR — never public ✓ Face portrait only — HTTPS
⚠️

Raw ID documents (full passport page, referencing PDF) → gs://raia-gb-private/ — private bucket, never public. Only the cropped face portrait → gs://rcf_public/avatar/. These must never be mixed.


Chapter 3 Running the Tool

Prerequisites

Credentials
  • RentProfile agent login email + password in .env.local
  • SUPABASE_SERVICE_ROLE_KEY in same file
  • GCS service account key at /root/storage-admin-key.json
Dependencies
  • playwright-extra — npm install playwright-extra
  • puppeteer-extra-plugin-stealth — npm install puppeteer-extra-plugin-stealth
  • playwright chromium — npx playwright install chromium
  • pymupdf (fitz) — pip install pymupdf
  • @google-cloud/storage node package
  • @supabase/supabase-js
Database
  • tbl_persons.avatar_url — writable
  • tbl_migration_contacts — readable (name/email join)
  • tbl_tenancies_persons — readable (scope filter)
🔁

Two-Phase Production Methodology

The scraper must always be run in two phases in production. Never run --write without first completing a dry-run and saving the plan.

  • Phase A — Dry-run (plan generation): Run without --write. The scraper logs into RentProfile, paginates all 950 list pages, matches each R2R record to a Supabase person_id, and saves the complete mapping to /tmp/r2r-dryrun-plan.json. This JSON contains all 29 r2r_id → person_id mappings. Nothing is downloaded or written. Review the output before proceeding.
    node scrape-rentprofile-r2r-avatars.cjs
    # dry-run is the default — saves /tmp/r2r-dryrun-plan.json
  • Phase B — Write (from-plan): Run with --write --from-plan=/tmp/r2r-dryrun-plan.json. The scraper skips the entire 950-page list re-scrape and jumps directly to downloading and processing the 29 matched persons. This takes approximately 136 seconds instead of ~190s for the full re-scrape path.
    node scrape-rentprofile-r2r-avatars.cjs --write --from-plan=/tmp/r2r-dryrun-plan.json
    # Skips 950-page list re-scrape entirely
    # ~136s for 29 persons · 0 errors in production June 2026

Why this matters: Without --from-plan, every write run burns ~56 seconds and ~950 list-page requests before downloading a single certificate. This risks triggering RentProfile rate limits before the actual work begins. The plan file is cheap to regenerate — always use it.

Step-by-Step Execution

  1. 1
    Generate the candidate list (CSV report)

    Run with --report to produce avatar-backfill-report.csv — lists all persons in scope with name, role, tenancy_ref, email, person_id. Review before proceeding.

    node scrape-rentprofile-r2r-avatars.cjs --report
  2. 2
    Dry run — see what would be downloaded (Phase A)

    Default mode. Logs into RentProfile, scrapes the R2R list, matches names to Supabase persons, prints what it would do, and saves /tmp/r2r-dryrun-plan.json. Nothing is written.

    node scrape-rentprofile-r2r-avatars.cjs
    # Dry run is the default — no --write flag
    # Output: list of matched PDFs + person_ids + estimated face size
    # Saves: /tmp/r2r-dryrun-plan.json (all r2r_id→person_id mappings)
  3. 3
    Live run — execute the backfill (Phase B)

    Runs the full pipeline. Use --from-plan to skip the 950-page list re-scrape. Logs every step. Creates run-report.json on completion.

    node scrape-rentprofile-r2r-avatars.cjs --write --from-plan=/tmp/r2r-dryrun-plan.json
    
    # Optional flags:
    --limit=10        # process first N persons only
    --person=UUID   # process a single person_id
    --delay=5000    # ms delay between PDF downloads (default 5000)
    --from-plan=PATH # skip list re-scrape, load plan from dry-run JSON
  4. 4
    Review the audit log

    Check run-report.json for: processed count, skipped (silhouettes), failed (no match / PDF error), GCS URLs written, Supabase rows updated.

    cat run-report.json | jq '.summary'
  5. 5
    Verify in portal

    Spot-check 3–5 persons in the RAIA (Real estate Artificial Intelligence Agent) portal — avatar should now show their face photo. For any failures, check run-report.json error field and re-run with --person=UUID.


Chapter 4 New Estate Agent Onboarding

When signing on a new UK estate agency that uses RentProfile, run this tool as part of the standard data migration playbook. It is a one-time backfill per client — after Blinc goes live for new tenancies, the gap never recurs.

Onboarding Checklist — Per Client

Repository Code

The live codebase implementation for this specification sits within the following repository folder:

le">New Agent Onboarding — RentProfile Backfill Sequence RAIA Onboarding 1. Credentials Agent gives RP login stored in .env.local 2. Scope Audit run --report flag review CSV with client 3. Dry Run confirm PDF matches saves plan JSON 4. Live Run --write --from-plan ~2 min for 29 persons 5. Verify check run-report.json spot-check in portal 6. Rotate Creds clear .env.local after run or keep for future syncs
  • ✓ Ask client: are you on RentProfile? → If yes, this tool applies
  • ✓ Collect agent login credentials → store in .env.local per pattern in this guide
  • ✓ Confirm Supabase project ID and service role key for the client DB
  • ✓ Confirm GCS bucket name — default rcf_public/avatar/ — verify public access is on
  • ⚠ Run --report first — share CSV with client contact for sign-off before photos are pulled
  • ✓ Dry run — confirm all person_id matches are correct (no name collisions) — saves plan JSON
  • ✓ Live run with --write --from-plan=/tmp/r2r-dryrun-plan.json
  • ✓ Review run-report.json — all processed count matches expected scope
  • ✓ Spot-check 5 photos in portal — confirm quality (face visible, not silhouette)
  • ⚠ Ask client: rotate RP password after run, or keep same for periodic re-sync cron
  • ✗ Do NOT run against completed/past tenants — only active, renewing, moving_out

Chapter 5 Configuration Reference

Environment Variables

VariableLocationRequiredNotes
RENTPROFILE_AGENT_EMAILportal/.env.localRequiredAgent dashboard login email — never commit
RENTPROFILE_AGENT_PASSWORDportal/.env.localRequiredAgent dashboard password — never commit
RENTPROFILE_API_KEYportal/.env.localOptionalNot used by scraper — used by Status/Result API only
NEXT_PUBLIC_SUPABASE_URLportal/.env.localRequiredTarget Supabase project URL
SUPABASE_SERVICE_ROLE_KEYportal/.env.localRequiredService role key — write access to tbl_persons
GCS service account/root/storage-admin-key.jsonRequiredGCS write access to rcf_public bucket

CLI Flags

FlagDefaultDescription
--reportoffGenerate avatar-backfill-report.csv — candidate list only, no login
--dry-runonDefault mode — login, scrape, extract, but do NOT write to GCS or Supabase. Saves plan to /tmp/r2r-dryrun-plan.json
--writeoffExecute the full pipeline — GCS upload + Supabase avatar_url write
--from-plan=PATHnoneSkip the 950-page R2R list re-scrape and load r2r_id → person_id mappings from a previously saved dry-run plan JSON. Always use with --write in production.
--limit=NallProcess first N matched persons only — useful for spot-testing
--person=UUIDallProcess a single person_id — re-run failed individuals
--delay=MS5000Milliseconds between PDF downloads — never set below 3000 on production (2000 triggered rate limiting)
--headless=falsetrueShow browser window — useful for debugging login failures

RentProfile URL Allowlist (hardcoded)

const ALLOWED_URLS = [
  'https://www.rentprofile.co/agent/login',
  'https://www.rentprofile.co/agent/dashboard',
  'https://www.rentprofile.co/agent/reporting/right_to_rent',
  'https://www.rentprofile.co/agent/view_r2r_in_detail',
  // PDF download endpoint (matches by prefix)
  'https://www.rentprofile.co/agent/download_r2r_document',
  // RentProfile S3 media — PDFs and cert assets (some served as .jpg)
  'https://rentprofile-media.s3.eu-west-1.amazonaws.com/',
]
// Any navigation outside this list throws an Error and aborts the run

File Inventory

FilePathPurpose
scrape-rentprofile-r2r-avatars.cjs 03_technology/09_pipelines/programs/ Main scraper — Playwright + PDF download + face extract + GCS + Supabase
extract_pdf_image.py 03_technology/09_pipelines/programs/ PyMuPDF helper — extracts face JPEG at image index [1] from R2R certificate PDF
backfill-avatars-from-r2r-pdf.cjs 03_technology/09_pipelines/programs/ Manual variant — processes PDFs Mi has already downloaded to a local folder
backfill-avatars-from-rentprofile.cjs 03_technology/09_pipelines/programs/ API variant — uses Status API with request_id (blocked until request_ids recovered)
avatar-backfill-report.csv 03_technology/09_pipelines/programs/ Generated by --report — candidate list for human review
run-report.json 03_technology/09_pipelines/programs/ Generated after each run — processed / skipped / failed / GCS URLs

Pitfalls

P-01
Wrong scope — never run against all NULL-avatar persons

There are ~52,220 NULL-avatar rows in tbl_persons. The vast majority are leads and enquiries for whom we hold no ID documents. Only query: tbl_tenancies_persons.role IN ('lead_tenant','co_tenant','guarantor') joined to active/renewing tenancies. Running a broader query wastes API calls and may attempt to pull photos for non-tenants.

P-02
PDF image index [1] is the face — index [0] is the logo

The R2R certificate PDF contains 3 images on page 0: [0] = RentProfile logo (PNG, ~134 bytes), [1] = face JPEG (~372KB), [2] = watermark badge. Always extract index [1]. If len(imgs) < 2, the PDF has no face photo — skip and log.

P-03
Do NOT use execSync python3 -c for PyMuPDF — use a .py file

Newlines in the inline script string become literal \n sequences and throw SyntaxError. Always write the extraction logic to extract_pdf_image.py and call it as: execSync(`python3 /path/to/extract_pdf_image.py ${JSON.stringify(pdfPath)} ${JSON.stringify(tmpDir)}`)

P-04
RentProfile session may expire mid-run for large portfolios

For clients with 100+ R2R records, the session cookie may expire during the run. The scraper should detect a redirect back to /agent/login and re-authenticate automatically. Check for this in large-portfolio runs.

P-05
Silhouette face detection — check file size, URL pattern, AND magic bytes

A silhouette image may still be extracted at index [1]. Always filter: skip if JPEG is <5KB (silhouette is typically 2–3KB) AND skip if the extracted bytes match known silhouette hash. Log skipped items as SILHOUETTE_SKIP not ERROR.

RentProfile S3 stores PDFs at .jpg URLs. Always check magic bytes (FF D8 = JPEG, 25504446 = %PDF) — do NOT trust the URL extension. Upload the wrong file type and the browser silently shows nothing (the img tag fires onError and the avatar disappears).

P-06
Name matching across RentProfile → Supabase is fuzzy

RentProfile may store tenant as "John Smith" while Supabase has "Jonathan Smith". Use: exact match first → fuzzy match (Levenshtein distance ≤2) → email match fallback. Any match below 90% confidence should be logged as MANUAL_REVIEW and skipped in --write mode.

P-07
dotenv v17+ does not reliably inject via require('dotenv').config()

Manually parse the .env.local file and inject into process.env. Path from 09_pipelines/programs/ to portal/.env.local is ../../11_frontend/portal/.env.local (2 levels up, not 3). Verify with console.log(process.env.NEXT_PUBLIC_SUPABASE_URL) after loading.

P-08
Skip list — exclude org entities and test records

Hardcode skip list by person_id: 8f7f0bbe (Alice Sovereign Agent — test), c982ae93 (Brunei High Commission — diplomatic), e307eabc (Earthmall Ltd — company), 08566531 (Reading FC — org). These will never have face photos.

P-09
domcontentloaded not networkidle — third-party analytics cause false timeouts

RentProfile loads third-party analytics (Stripe, Pirsch, TrustPilot) that never fully settle their network connections. Using waitUntil: 'networkidle' causes false 30-second timeouts on every page in the scraper. Use waitUntil: 'domcontentloaded' throughout — the DOM is ready and interactive well before the analytics settle.

P-10
Promise.all login pattern — SPA does not fire navigation after form submit

RentProfile is a SPA and does not fire a full navigation event after the login form is submitted. The correct pattern is:

await Promise.all([
  page.waitForNavigation({ waitUntil: 'domcontentloaded' }),
  page.click(submitSelector)
]);
// NEVER: await page.click(submitSelector); await page.waitForNavigation()
// Awaiting navigation AFTER click will miss the navigation event entirely.
P-11
Stealth plugin is mandatory — headless Chromium is fingerprinted and blocked

Headless Chromium without the playwright-extra stealth plugin is detected and blocked by RentProfile's CDN. The block is silent — pages may load but the login form may behave unexpectedly or sessions may fail to persist.

// Install:
npm install playwright-extra puppeteer-extra-plugin-stealth

// Initialise BEFORE any page.goto call:
const { chromium } = require('playwright-extra');
const stealth = require('puppeteer-extra-plugin-stealth')();
chromium.use(stealth);
P-12
--from-plan is critical for production — without it, 950 pages are re-scraped

Without --from-plan, every --write run re-scrapes all 950 list pages before any certificate downloads begin. This burns approximately 56 seconds of requests and risks triggering RentProfile rate limits before a single certificate is downloaded. Always run the dry-run first, save the plan JSON, then pass --write --from-plan=<path> for the write phase.

P-13
5s inter-request delay — 2s triggered rate limiting in production

A 2-second delay between certificate detail page requests triggered rate limiting in the June 2026 production run. The default DELAY_MS is now 5000ms. Never pass --delay below 3000 on production. If you see 302 redirects to the S3 error page (see P-15), wait 10+ minutes and increase the delay before retrying.

P-14
Retry with exponential backoff on detail pages

RentProfile throttles after the first detail page visit in rapid succession. The scraper retries up to 3 times with 6s, then 12s backoff delays between retries. Do not disable or shorten these retry intervals — they are the difference between a successful run and a permanently rate-limited session.

P-15
Rate-limit symptom: 302 redirect to S3 error page

The visible symptom of RentProfile rate limiting is a 302 redirect to rentprofile-media.s3.eu-west-1.amazonaws.com/error.html. If you see this URL appear in debug screenshots or Playwright navigation logs, stop the run immediately. Wait 10+ minutes before retrying. Continuing will not help — the rate limit applies to the session and IP.

P-16
The 950-page list count grows over time

The R2R reporting list grows as new Right to Rent checks are added across all tenancies. The dry-run page count will increase over time. The early-stop logic (stops paginating once all target person names have been found) prevents scraping unnecessary pages — but dry-run will still take longer as the portfolio grows. This is expected behaviour, not a bug.

P-17
PDF magic bytes vs .jpg URL extension — 14 of 29 certs were PDFs

In the June 2026 production run, 14 of 29 R2R certificates were PDFs served from RentProfile S3 at URLs ending in .jpg. Uploading a PDF buffer as image/jpeg to GCS results in a broken avatar — the browser fires onError for the <img> tag and silently hides it.

Always check Buffer magic bytes after download, before deciding how to process:

  • FF D8 at bytes [0–1] → genuine JPEG — use directly as avatar
  • 25 50 44 46 (%PDF) at bytes [0–3] → PDF — must extract via PyMuPDF first, then upload the extracted face JPEG

Never trust the .jpg URL extension. Always trust the magic bytes.


Vibe Check — SOP Test Checklist

Run before every live execution. All green before --write.

Pre-Run Gates

  • ✓ RENTPROFILE_AGENT_EMAIL is set in .env.local
  • ✓ RENTPROFILE_AGENT_PASSWORD is set in .env.local
  • ✓ SUPABASE_SERVICE_ROLE_KEY is set
  • ✓ /root/storage-admin-key.json exists and is valid
  • ✓ playwright-extra installed (npm install playwright-extra)
  • ✓ puppeteer-extra-plugin-stealth installed (npm install puppeteer-extra-plugin-stealth)
  • ✓ playwright + chromium installed (npx playwright install chromium)
  • ✓ pymupdf installed (pip install pymupdf)
  • ✓ --report CSV reviewed and approved
  • ✓ Dry run completed — matches look correct — /tmp/r2r-dryrun-plan.json saved
  • ✗ Do NOT run if any active tenancy dispute is ongoing for a matched person

Post-Run Verification

  • ✓ run-report.json — processed count matches expected scope
  • ✓ Zero ERROR entries (or all errors explained)
  • ✓ GCS URLs are HTTPS (not gs:// protocol)
  • ✓ Spot-check 5 persons in RAIA (Real estate Artificial Intelligence Agent) portal — faces visible
  • ✓ No silhouettes written (check run-report.json silhouette_skip count)
  • ✓ Verify GCS content-type is image/jpeg — not application/pdf (run: gsutil stat gs://rcf_public/avatar/<person_id>.jpg and check Content-Type)
  • ⚠ Any MANUAL_REVIEW items — resolve manually
  • ⚠ Consider rotating RentProfile password after run
  • ✓ Commit run-report.json to repo for audit trail

🚀

This tool is production-ready for any UK estate agent using RentProfile. The only client-specific configuration is: credentials in .env.local, Supabase project URL, and GCS bucket name. All guard rails, dry-run defaults, and audit logging are built in. Production result June 2026: 29 written, 0 errors, 136s.

Related pages: § 3.2a Referencing Report Avatar Backfill · RAIA (Real estate Artificial Intelligence Agent) Documentation Index

Author: RAIA (Real estate Artificial Intelligence Agent) OS — EstateAigents.com · Version: 1.1 · Last updated: June 2026

Repository Code

The live codebase implementation for this textbook logic sits within the following repository folder: