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.
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.
Reconstruct availability
This decision covers physical stock and recorded quality holds. Other orders, reservations and delivery windows require separate records.
Resolve the discrepancy
Choose the posting supported by the receiving document and record why. Your choice applies only to this investigation.
Inspect the postings
| Source cell | Posted at | Movement | Document / line | Source | Units | Available impact | Reason |
|---|
Replay the warehouse shift
Select a posting time to see the promise the team could have made at that moment. A disputed balance stays open until its evidence is resolved.
Challenge the rule
Replay a receipt in memory, then give that posting a distinct line reference. Compare both outcomes with the current decision.
Case Results
Scenario 1. The same receipt line was posted twice
At 8:45, Dallas cannot promise the full order of 50 pump seals, because only 48 are available.
The dashboard shows 84 because two findings were missed:
- 24 units were counted twice. The warehouse opened with 36 units. The receiving desk and the ERP system each posted 24 units against the same receipt,
R-417, line01. Both entries describe one physical delivery, so stock on hand is 60, not 84. - 12 units are on quality hold. Ticket
QH-9makes those units unavailable to ship. That leaves 48 available, two short of the order.
At 10:30, quality releases the hold. All 60 units become available, and the order can be promised.
Case Results
Scenario 2. The second posting is a distinct receipt line
Both postings represent real deliveries. Stock on hand is 84. The quality hold removes 12 units, leaving 72 available at 8:45. The order can be promised.
Case Results
Scenario 3. The sources disagree on the same receipt line
The receiving desk reports 24 units and the ERP system reports 18 units for the same receipt line. The quantity cannot be confirmed, and the result is Review required until someone resolves the discrepancy.
We could not complete this step. Try again or return to the Engineering Lab.
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.
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 eProtonsProposed change
Stop treating accounts in grace status as eligible for renewal.
Example accounts, evaluated on 2026-11-23
The renewal window starts on 2026-10-24.| Account | Status | Paid through | Manual override | Current rule | After the change | Lines |
|---|---|---|---|---|---|---|
| ACC-1001 | active | 2026-11-10 | No | Eligible | Eligible | 6 to 8 |
| ACC-1002 | active | 2026-10-01 | No | Not eligible | Not eligible | 11 |
| ACC-1003 | grace | 2026-11-05 | No | Eligible | Loses eligibility | 6 to 8 → 11 |
| ACC-1004 | grace | 2026-10-24 | No | Eligible | Loses eligibility | 6 to 8 → 11 |
| ACC-1005 | grace | 2026-09-15 | No | Not eligible | Not eligible | 11 |
| ACC-1006 | suspended | 2026-08-30 | Yes | Eligible | Eligible | 9 to 10 |
| ACC-1007 | suspended | 2026-11-01 | No | Not eligible | Not eligible | 11 |
| ACC-1008 | active | 2026-10-24 | No | Eligible | Eligible | 6 to 8 |
| ACC-1009 | closed | 2026-11-20 | No | Not eligible | Not eligible | 11 |
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.
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 eProtonsReport query
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
01
Map and backfill
Map each customer_status value to status_code and backfill existing rows.
02
Move readers
Point the view and the report query to status_code.
03
Stop writes
Remove writes to customer_status and monitor for remaining use.
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.