Engineering Lab

Engineering Problems, Presented as the Decisions a Business Has to Make.

Each investigation in the Engineering Lab begins with a question a business needs answered and the data or code behind it. You work through the evidence the way our engineers would: inspecting sources, testing assumptions and seeing how the answer changes when the rules change.

The Lab runs on example data and code supplied by eProtons. You do not need to provide any information of your own to use it.

Working Demonstration · Interactive Investigation

Can we promise this shipment?

It is 8:45 in Dallas. The dashboard shows 84 pump seals. A customer wants 50. Can we promise the shipment?

What you can do in this investigation

  • Inspect the source records behind the dashboard figure, down to the individual cell.
  • Compare what the receiving desk and the enterprise resource planning (ERP) system recorded for the same delivery.
  • Change the rules that decide how receipts are matched and which stock counts as available.
  • Run the case under three scenarios and see how the answer changes.

Dallas · PS-204 pump seals · 08:45

84

units on the dashboard

Order decision · 50 units

Would you promise the shipment?

Answer first, then trace the figure to its source rows.

What This Investigation Shows

A dashboard total is only as reliable as the rules that produce it. Two controls would have prevented the wrong answer: a receipt key that recognizes one delivery recorded by two systems, and an availability rule that excludes stock on quality hold. This case covers duplicate receipts and quality holds only. Allocations, stock in transit and unit conversions are outside its scope.

These controls belong to the governed data model described in our solution brief, Consolidating Spreadsheet Operations Into a Governed Data Model.

Discuss Your Data Challenge
Working Demonstration · Code Walkthrough

What could break if we change this rule?

A renewal rule decides which accounts are eligible to renew. This walkthrough follows a proposed change to that rule through the code and identifies the accounts that would lose eligibility, with references to the lines involved. You can download regression checks for the example code to help protect the existing behavior before the change is made.

Related: Modernizing a Tightly Coupled Application in Stages While It Remains in Service

renewal.py · current rule

Example code supplied by eProtons
from datetime import timedelta
def is_eligible_for_renewal(account, today):
window_start = today - timedelta(days=30)
if account.status in ("active", "grace"):
if account.paid_through >= window_start:
return True
if account.status == "suspended" and account.manual_override:
return True
return False

Proposed change

Stop treating accounts in grace status as eligible for renewal.

if account.status in ("active", "grace"):
if account.status == "active":

Example accounts, evaluated on 2026-11-23

The renewal window starts on 2026-10-24.
AccountStatusPaid throughManual overrideCurrent ruleAfter the changeLines
ACC-1001active2026-11-10NoEligibleEligible6 to 8
ACC-1002active2026-10-01NoNot eligibleNot eligible11
ACC-1003grace2026-11-05NoEligibleLoses eligibility6 to 8 → 11
ACC-1004grace2026-10-24NoEligibleLoses eligibility6 to 8 → 11
ACC-1005grace2026-09-15NoNot eligibleNot eligible11
ACC-1006suspended2026-08-30YesEligibleEligible9 to 10
ACC-1007suspended2026-11-01NoNot eligibleNot eligible11
ACC-1008active2026-10-24NoEligibleEligible6 to 8
ACC-1009closed2026-11-20NoNot eligibleNot eligible11

Accounts that would lose eligibility: ACC-1003 and ACC-1004

  • Both are in grace status and paid within the 30-day window, so lines 6 to 8 return eligible today. After the change, line 6 no longer accepts grace status and both reach line 11.
  • ACC-1004 paid exactly 30 days before the evaluation date. Line 7 includes that boundary, which is why it is eligible today.
  • ACC-1006 keeps its eligibility through the manual override on lines 9 and 10. No active account changes.
Download the Regression ChecksA pytest file with the example rule, the proposed rule and 20 checks.
Working Demonstration · Schema Walkthrough

Can we retire this column?

Removing a database column looks simple until something still depends on it. This walkthrough traces the customer_status column through an index, a view and a report query, and shows what would be affected if the column were dropped. You can download the migration analysis for the example schema.

Related: Data Modernization

Example schema

Supplied by eProtons
CREATE TABLE customers (
id BIGINT PRIMARY KEY,
name VARCHAR(200) NOT NULL,
customer_status VARCHAR(20) NOT NULL DEFAULT 'active',
status_code SMALLINT,
updated_at TIMESTAMP NOT NULL
);
CREATE INDEX ix_customers_status ON customers (customer_status);
CREATE VIEW active_customers AS
SELECT id, name FROM customers WHERE customer_status = 'active';

Report query

-- Report: customers by status
SELECT customer_status, COUNT(*) AS customers
FROM customers
GROUP BY customer_status;

Column under review

customers.customer_status

  • Line 9Index · ix_customers_statusIf the column is droppedDropped together with the column. Any query that relied on it for filtering by status loses that access path.
  • Lines 11 to 12View · active_customersIf the column is droppedThe view filters on the column. Dropping the column is refused while the view depends on it, and a cascading drop removes the view.
  • Query lines 2 and 4Report query · Customers by statusIf the column is droppedThe query selects and groups by the column, so it fails once the column is removed.

Open questions the schema cannot answer

  • Which application code writes or reads customer_status?
  • Do reporting tools or exports read the view active_customers?
  • Does status_code cover every customer_status value, or do some values have no mapping?
  • Do scheduled jobs filter on customer_status?

Checks before removal

  • Row counts by status match between the two columns.
  • active_customers returns the same rows before and after the change.
  • No reads of customer_status appear in query logs over an agreed period.
  • Application writes to customer_status are confirmed removed.

A staged migration

  1. 01

    Map and backfill

    Map each customer_status value to status_code and backfill existing rows.

  2. 02

    Move readers

    Point the view and the report query to status_code.

  3. 03

    Stop writes

    Remove writes to customer_status and monitor for remaining use.

  4. 04

    Remove

    Drop the index, then the column.

Bring Us a Problem Like These

If your systems hold a question like these, describe it and we will show you how we would investigate it.