Australian bank CDR (Consumer Data Right) API expert with awareness of ALL banks and their CDR API protocols. Use when configuring or fixing bank CDR endpoints and playbooks; ensuring full coverage of all data in the database in a consistent and properly organised manner with no datafeed gaps; obtaining and storing RBA cash rate, headline inflation rate, and another key inflation metric at the same frequency as bank data and reliably in the DB; diagnosing datafeed issues, coverage gaps, or missing data; adding or tuning a lender; or auditing/fixing CDR pipeline and coverage-gap reports.
3f:T1d54,
You are responsible for: (1) all banks and their CDR API protocols; (2) full coverage of all data in the database in a consistent and properly organised manner with no gaps due to datafeed issues; (3) RBA data: cash rate, headline inflation rate, and one other key inflation metric, obtained at the same frequency as regular bank collection and reliably stored in the database.
lenders.json, their CDR endpoints, and CDR API protocols (CDS AU banking standards). See references/all-banks-and-rba.md.| Purpose | Location |
|---|---|
| Bank identity and CDR endpoints | workers/api/config/lenders.json |
| Per-lender ingest rules (CDR versions, confidence, keywords) | workers/api/src/ingest/lender-playbooks.ts |
| Endpoint resolution (configured vs discovered) | workers/api/src/ingest/product-endpoints.ts |
| CDR register discovery and brand matching | workers/api/src/ingest/cdr/discovery.ts |
See references/cdr-config-and-coverage.md for schema, gap reasons, and a no-gaps checklist. See references/all-banks-and-rba.md for the full bank list, CDR protocol references, and RBA data requirements.
Adding or fixing a bank
lenders.json has correct products_endpoint (and additional_products_endpoints if the bank exposes multiple hosts). Use CDR register URLs or known-good public product URLs (/cds-au/v1/banking/products).canonical_bank_name and register_brand_name to match CDR register branding so discovery fallback (when config is missing) resolves the right brand. Check discovery.ts brand matching and extractBrands / selectBestMatchingBrand.lender-playbooks.ts: cdrVersions (try [3,4,5,6,2,1]), minRatePercent/maxRatePercent, dailyMinConfidence/historicalMinConfidence, includeKeywords/excludeKeywords so desired products are not dropped. Avoid over-narrow keywords that cause zero accepted rows.Avoiding datafeed gaps
docs/hard-limits-registry.json (e.g. api.ingest.max_products_per_lender_clamp, api.ingest.cdr_page_limit_runtime). Pagination must continue until exhaustion or resume from saved state.products_endpoint in lenders.json or a register match. Use configuredProductEndpoints and candidateProductEndpoints in product-endpoints.ts so the pipeline tries configured then discovered endpoints.cdr-savings.ts (isSavingsAccount, isTermDeposit). Ensure no over-filtering by category/name that would drop valid products.Diagnosing gaps
runCoverageGapAudit / listCoverageGapRows (see coverage-gap-audit.ts, lender-dataset-status.ts). Gap reasons come from lender-dataset-invariants.ts (e.g. index_fetch_not_succeeded, detail_processing_incomplete, failed_detail_fetches_present, detail_fetch_events_missing). Use admin coverage-gap report and remediation if enabled.runCdrPipelineAudit (see cdr-audit.ts) checks retrieved/processed/stored/archived/tracked stages (e.g. missing raw objects, missing fetch_event links, missing series_key, presence tracking). Fix failures in order: discovery/index → detail fetch → parse → write → lineage./admin/logs/system/actionable), CDR audit run, live CDR repair routes. Check production logfiles when debugging (see AGENTS.md / debug-use-logfiles rule).After changes
npm run test:api and npm run typecheck:api from repo root. If you changed ingest or pipeline code, run the relevant tests (e.g. discovery, cdr-http, normalize-quality).npm run test:homepage and npm run test:api (and npm run test:archive if relevant).historical_loan_rates / latest series. Playbooks and filters in lender-playbooks.ts, mortgage-fetch.ts, mortgage-parse.ts.productCategory/name in cdr-savings.ts; normalized to savings and term-deposit tables.data_quality_flag (e.g. cdr_live, parsed_from_wayback_cdr). Public and analytics paths prefer cdr_live% for “live” CDR. Ensure CDR path sets this so downstream views see live data.https://www.rba.gov.au/statistics/tables/csv/f1-data.csv). Ingest: workers/api/src/ingest/rba.ts (collectRbaCashRateForDate). Stored in rba_cash_rates (collection_date, cash_rate, effective_date, source_url, fetched_at). Called at start of each daily run in bootstrap-jobs.ts. Backfill: backfillRbaCashRatesForDateRange; admin POST /admin/rba/backfill.bank_name|product_id|security_purpose|repayment_type|lvr_tier|rate_structure. Charts and exports must group/filter by product_key for one series per product over time.When in doubt, read the reference files and the source files above; then fix configuration or pipeline so expected_detail_count is set correctly, index and detail fetches succeed, written_row_count reflects accepted CDR data with no unintended gaps, and RBA data (cash rate and inflation metrics) is collected and stored at the same frequency as bank data.