Skip to content
CAI
Software that uses CAICheck a score

festinalli/BankMore-Challenge

43.1

Weak · 8 November 2026

12.2k

lines of production code

C#

with Python, TypeScript

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Brazilian PIX payment platform that processes transactions while integrating a multi-layered fraud prevention and investigation workflow. It combines a primary XGBoost model with a contextual Jev AI check to analyze social engineering risks, supported by an ML service for model lifecycle management and drift detection. The platform features a dedicated investigation module using RAG and LLMs to assist analysts, alongside a robust infrastructure handling ISO 20022 message signing, secure mTLS, and reliable event streaming via Kafka.

Features

Fraud ML service introduces model lifecycle management with shadow mode, drift detection, and promotion gating

The new ML service container (port 5003) trains an XGBoost fraud model during the Docker build and serves it via Flask/Gunicorn. It adds a full model lifecycle: reproducible retraining generates candidate models, which can be run in shadow mode to compare predictions against production without affecting decisions. A promotion gate enforces a strict v1 criterion (recall with 1% fixed false positive rate, zero tolerance for degradation) before a candidate can replace the production model. The service also monitors feature and score drift using the Population Stability Index (PSI) and exposes metrics for shadow discrepancies and drift alerts via Prometheus.

ml · high confidence

Introduce BankMore Fraud Intelligence investigation MVP with MCP and Ollama integration

Adds a new fraud investigation service that ingests transfer events from Kafka, persists case dossiers in PostgreSQL (with pgvector for semantic search), and generates analyst reports via a local Ollama LLM. The service exposes a FastAPI backend and an MCP server (stdio transport) with six tools for listing alerts, retrieving evidence, fetching behavioral summaries, searching procedures, finding similar reviewed cases, and drafting reports. It supports hybrid lexical/vector retrieval (RRF), pseudonymizes customer data, and integrates with the existing Angular ops dashboard at /ops/investigacao for case review.

investigation · high confidence

Introduces Jev as a second-layer fraud check and adds fraud investigation and ML lifecycle capabilities

This change introduces three new capabilities to the fraud prevention and investigation workflow. First, it adds Jev as a second-layer antifraud check for Pix transactions, where a new client and policy layer evaluates transaction context to increase caution (e.g., requiring client confirmation or retention) without overriding the primary XGBoost model's rejections. Second, it introduces a fraud investigation MVP that defines data models for alert events, hypotheses, and proposals, supporting MCP and RAG-based investigation workflows. Third, it adds an ML service lifecycle for fraud scoring models, enabling model registration, shadow mode for testing new versions against production traffic, and drift detection via PSI metrics, all exposed through a Flask API with Prometheus monitoring.

python · high confidence

The BankMore.Pix.Api service is now available, exposing endpoints for managing Pix keys, initiating payments, generating static and dynamic QR codes, processing NFC payments, and handling return (MED) and automatic payment (Pix Automático) consents. The API is secured via JWT authentication and integrates with the Central Bank simulator (bacen-sim) using optional mutual TLS for channel security and a separate signing certificate (CERTPIA) for ISO 20022 message signatures as required by Manual Pix v6.0. Additionally, the service includes an inline fraud-checking step before settlement, publishes liquidation events to Kafka for post-transaction analysis, and features a background scheduler to automatically trigger recurring payments based on authorized consents.

src/BankMore.Pix.Api · high confidence

New Jev-based second-layer fraud detection module and local API

Introduces the \jev\ module, which implements a second-layer anti-fraud check for Pix payments using the TypeSafe AI Jev model to analyze social engineering context (e.g., false relatives, urgency) that numerical models like XGBoost may miss. This change adds a local Python API (port 5011) and an Angular frontend screen (\/ops/jev\) for BankMore, allowing users to evaluate synthetic scenarios or custom Pix transactions against the Jev model. The module includes a decision policy that combines Jev's contextual signals with XGBoost scores to determine actions such as approval, client confirmation, or retention for analysis, while ensuring sensitive data is masked before being sent to the AI provider.

jev · high confidence

New infrastructure stack for PIX, fraud detection, and intelligence modules

This change introduces a comprehensive local development environment for the BankMore platform. It adds a Docker Compose setup provisioning PostgreSQL 16, Redis, Kafka with Schema Registry, and Flink 1.18 for streaming fraud detection. A new 'intelligence' overlay adds a dedicated Postgres instance and API for fraud investigation using MCP and RAG. The infrastructure also includes a certificate generation script that creates separate mTLS (CERTPIC) and message-signing (CERTPIA) certificates to comply with PIX security standards, along with Prometheus and Grafana configurations for monitoring fraud decisions, ML latency, and transaction throughput.

infra · high confidence

Ops fraud monitoring and investigation UI with zoneless change detection

The frontend now includes a live Ops/Fraud monitoring dashboard (ops/fraude) that displays real-time fraud alerts and rejections via Server-Sent Events, showing event details, fraud scores, and latency, along with filters for alert types. Additionally, a new fraud investigation interface (ops/investigacao) allows operators to review cases, view evidence and AI-generated reports, and submit human review outcomes. The application has also migrated to Angular's zoneless change detection (provideZonelessChangeDetection) to reduce bundle size and improve predictability, and the app configuration now uses withInterceptorsFromDi for HTTP interceptors.

frontend · high confidence

Outbox-based reliable delivery with DLQ management and admin controls

The Transferencia API now guarantees reliable message delivery to Kafka via an outbox pattern, replacing the previous direct KafkaFlow producer. A new background relay service polls the database for pending messages and publishes them to Kafka, handling retries and moving failed messages to a Dead Letter Queue (DLQ) after a configurable number of attempts. Admin endpoints are available at /api/admin/outbox to list DLQ items and manually replay them, protected by a shared-secret Bearer token (configured via Outbox\_\_AdminToken) that fails closed if unset. DLQ entries are automatically purged after a configurable retention period. Additionally, messages for the 'transferencia.solicitada' topic are now serialized as Avro binary using the Schema Registry, while other topics remain JSON, and the API exposes Prometheus metrics for monitoring.

src/BankMore.Transferencia.Api · high confidence

Removals

Removal of legacy Angular dashboard, login, extrato, and transferencia components

The legacy Angular components for the dashboard, login, bank statement (extrato), and transfer (transferencia) views have been deleted from the frontend. This change removes the previous implementation of these core banking user interfaces, clearing the way for the new Angular zoneless/signals architecture and the restructured BankMore base referenced in the commit history.

(repo-wide) · high confidence

Removal of legacy Avro schemas and frontend template files

The \BankMore\_CaseTop/contracts\ area has removed the Avro schema definitions for \TransferenciaDecidida\ and \TransferenciaSolicitada\, as well as the default Angular frontend template files (\app.html\ and \app.css\). This indicates that the contract definitions for transfer events and the associated starter UI components are no longer maintained in this specific location, likely having been migrated or replaced by other parts of the system.

_BankMore\CaseTop/contracts · high confidence

Architecture

Project root directory restructured

The entire project has been moved from the \BankMore\_CaseTop\ subdirectory to the repository root. This change updates the file paths for all configuration files (\.env.example\, \.gitignore\), the solution file (\BankMoreSolution.sln\), documentation, frontend assets, infrastructure scripts, and all source code modules (including \BankMore.BacenSim\, \BankMore.ContaCorrente\, \BankMore.Pix\, \BankMore.Tarifas\, and \BankMore.Transferencia\). Users cloning or building the project must now reference files from the root directory instead of the previous subfolder.

(repo-wide) · high confidence

Behavioural changes

PIX message signing (XMLDSig) and ICOM access controls

The system now implements XMLDSig message signing for ISO 20022 payloads (pacs.008, pacs.004, pacs.002) using a dedicated signing certificate (CERTPIA), distinct from the mTLS channel certificate, as required by Manual Pix v6.0 §5.1. The SPI simulation (bacen-sim) validates incoming signatures and signs responses, rejecting invalid or unsigned messages with a rejection code. The PSP client (SpiClient) signs outgoing requests and verifies the regulator's signed responses. Additionally, the SPI simulation enforces an IP allowlist for ICOM access (Manual Pix v6.0 §2.1) before mTLS checks, logging access attempts by IP and certificate identity.

src/BankMore.BacenSim, src/BankMore.Pix.Infrastructure · high confidence

Removal of legacy Dockerfiles, account statement handler, and SHA256 password hashing

This change removes several legacy components from the BankMore codebase: the Dockerfiles for the Conta Corrente API, Tarifa Worker, and Transferencia API services; the ObterExtratoQuery handler responsible for fetching account statements; the PasswordHasher service which previously used SHA256; and the Transferencia domain entity. These deletions reflect a shift away from the previous Docker-based .NET 8 deployment structure, the old statement retrieval logic, and the less secure SHA256 password hashing algorithm, likely in preparation for the new PyFlink-based infrastructure and PBKDF2 security measures mentioned in the commit history.

_BankMore\CaseTop/src · high confidence

Repository restructuring and addition of core infrastructure scaffolding

The project has been promoted to the repository root, moving files from the previous \BankMore\CaseTop\ directory. This change introduces essential scaffolding for local development and operations: a \.env.example\ file defining Postgres, JWT, and Kafka configuration; a \LICENSE\ file adopting the MIT license; and a comprehensive \Makefile\ that automates Docker Compose orchestration, environment setup, database seeding, and end-to-end testing. Additionally, the \BankMoreSolution.sln\ has been updated to include new project references for the PIX bounded context (\BankMore.Pix.\\) and the BacenSim service, while \.gitignore\ rules have been added to exclude large PyFlink wheels and locally generated mTLS certificates.

(repo-wide) · high confidence

Test coverage

Added unit tests for CPF validation, account balance/extract retrieval, and Pix signature compliance; Enhanced e2e-pix test script for Pix v6.0 compliance and determinism; Removed unit tests for account statement and balance handlers.

Dependencies

Dependency updates and infrastructure shifts across .NET and Python services

This change updates dependencies and shifts infrastructure libraries across multiple services. In the .NET services, the Transferencia API and Application layers replace the KafkaFlow library with Confluent.Kafka, Confluent.SchemaRegistry, and Confluent.SchemaRegistry.Serdes.Avro to support binary Avro with Schema Registry, while also upgrading Microsoft.IdentityModel.Tokens and System.IdentityModel.Tokens.Jwt to version 8.15.0 and adding prometheus-net for metrics. The ContaCorrente.Application layer removes Dapper and Npgsql, moving those dependencies to the Infrastructure layer, and adds Newtonsoft.Json. The Tarifas.Worker adds StackExchange.Redis and prometheus-net. New .NET projects (BacenSim, Pix.Api, Pix.Application, Pix.Infrastructure, Pix.Domain) are introduced, targeting .NET 8.0 and using libraries like MediatR, Dapper, Npgsql, Confluent.Kafka, and System.Security.Cryptography.Xml. In Python, new requirements files are added for the investigation service (FastAPI, uvicorn, httpx, pydantic, SQLAlchemy, psycopg, pgvector, confluent-kafka, mcp, pytest, python-dotenv) and the ML service (numpy, pandas, scikit-learn, xgboost, joblib, flask, gunicorn, redis, prometheus-client).

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 42 → 43 (+0.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 74 → 74 (-0.2)
  • Architecture 79 → 79 (+0.0)
  • Maturity 81 → 84 (+3.7)
  • Readiness 27 → 37 (+9.9)
  • Security 31 → 33 (+1.2)
  • Domain Modelling 98 → 98 (+0.0)
  • Event-Driven 100 → 100 (+0.0)
  • Accessibility 69 → 45 (-24.0)
  • Performance 85 → 85 (+0.0)

Resolved (41)

  • ADR has no Decision and Consequences section (docs/adr/0001-bounded-contexts.md)
  • ADR has no Decision and Consequences section (docs/adr/0002-cqrs-mediatr.md)
  • ADR has no Decision and Consequences section (docs/adr/0003-pyflink-real.md)
  • ADR has no Decision and Consequences section (docs/adr/0004-ml-fail-open.md)
  • ADR has no Decision and Consequences section (docs/adr/0006-parallelism-3.md)
  • ADR has no Decision and Consequences section (docs/adr/0007-zoneless-signals.md)
  • ADR has no Decision and Consequences section (docs/adr/0008-pbkdf2.md)
  • ADR has no Decision and Consequences section (docs/adr/0009-exception-middleware.md)
  • ADR has no Decision and Consequences section (docs/adr/0011-flink-prometheus-reporter.md)
  • ADR has no Decision and Consequences section (docs/adr/0012-outbox-pattern.md)
  • ADR has no Decision and Consequences section (docs/adr/0013-schema-registry-hibrido.md)
  • ADR has no Decision and Consequences section (docs/adr/0014-outbox-dlq.md)
  • ADR has no Decision and Consequences section (docs/adr/0015-avro-binario-producer-only.md)
  • ADR has no Decision and Consequences section (docs/adr/0016-sprint7-avro-e2e-auth-admin-retencao.md)
  • ADR has no Decision and Consequences section (docs/adr/0017-sprint8-pix-real.md)
  • ADR has no Decision and Consequences section (docs/adr/0018-sprint9-antifraude-inline-pix.md)
  • ADR has no Decision and Consequences section (docs/adr/0019-sprint10-streaming-pos-liquidacao-mtls.md)
  • ADR has no Decision and Consequences section (docs/adr/0020-conformidade-manual-pix-v6.md)
  • ADR has no Decision and Consequences section (docs/adr/0022-jev-segunda-camada-antifraude-pix.md)
  • ADR has no Decision and Consequences section (docs/adr/0023-ciclo-de-vida-do-modelo-de-fraude.md)
  • …and 21 more

New (14)

  • Duplicated block (47 lines × 2) (src/BankMore.ContaCorrente.Api/Program.cs)
  • High CVE: [GHSA redacted] (frontend/package-lock.json)
  • High CVE: [GHSA redacted] (frontend/package-lock.json)
  • High CVE: [GHSA redacted] (frontend/package-lock.json)
  • Medium CVE: [GHSA redacted] (frontend/package-lock.json)
  • Outdated (npm): @angular/common
  • Outdated (npm): @angular/compiler
  • Outdated (npm): @angular/core
  • Outdated (npm): @angular/forms
  • Outdated (npm): @angular/platform-browser
  • Outdated (npm): @angular/router
  • Outdated (npm): tslib
  • top-level statements (cognitive 39) (src/BankMore.BacenSim/Program.cs)
  • top-level statements (cyclomatic 30) (src/BankMore.BacenSim/Program.cs)

API surface

  • Unchanged — 17 HTTP endpoints

Architecture

  • Unchanged — 8 containers · 3 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

festinalli/BankMore-Challenge was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 8 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit e041c5df57c2a63bacfb215175bd1855ee7df86a — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.