← Return to Kraken
Systems

Kraken Technologies / 2025–2026

Keeping billing and settlement in step.

Reading-validation safeguards and migration repairs for data that feeds billing and settlement.

  • Django
  • Data integrity
  • Asynchronous processing

01 / Context

The problem

Billing validation and submission to the energy industry can run on different schedules. A reading could be submitted before an asynchronous process quarantined it. Separately, overlapping meter dates and missing fields after migrations could block billing.

02 / Responsibility

My contribution

I added validation before downstream submission, persisted suspect-reading state across asynchronous processes, and built checks and repair tooling for migration-related meter data.

03 / Approach

Key decisions

An in-memory validation flag could not protect a reading from a separate submission worker. I introduced a persisted suspect-reading state that the worker could see, plus a configurable submission delay to allow asynchronous billing to run. I also fixed missing-timestamp handling in the validation check, restoring temporary field changes even when an exception occurred. For migration data, I added checks and resolvers for overlapping meter dates and missing meter types, alongside bulk repair tooling with a dry-run mode.

  1. 01

    Validate

    Check readings before submission and preserve relevant state across asynchronous work.

  2. 02

    Allow for timing

    Introduce a configurable delay before pending readings become eligible for submission.

  3. 03

    Repair existing data

    Detect overlapping meter dates and missing fields, with tooling to inspect repairs before applying them.

04 / Result

The result

The validation work blocked approximately 483,000 invalid updates per month across two enterprise clients. A separate missing-timestamp fix addressed a defect responsible for 3.7 million application errors, with regression tests and diagnostic logging. Migration repairs corrected data that prevented billing. I also fixed a handler that combined historical and current meter details, so it selected the latest complete set instead.

05 / Sources & context

The monthly validation count and historical error count are separate results recorded in my CV. They do not measure the submission delay or migration repairs. The technical approach is drawn from the corresponding implementation descriptions.

Download my CV ↓