Provenance mix over 8 weeks
The Phase 0 objective drawn as a picture: the orange and red bands shrink to nothing, and until they do, no gate advances.
The founding balances every later number derives from, and the permanent home of balance provenance · every non-zero balance in i3 traces to exactly one signed opening line and a chain of verifications · this is the step i2 skipped, and skipping it is mechanically how sellable reached minus 140,753
Four predicates, evaluated daily at 04:00 Dubai. All four must hold for seven consecutive days. A single failing day resets the streak to zero, and the page says which predicate did it rather than showing a silent gap.
All eleven balance-bearing locations, including the three virtual ones and 3PL_ARAMEX. A virtual location that is silently absent is exactly the gap that lets stock exist nowhere.
| Location | Type | Batch | Source | State | Keys | Units | Value AED | Shopify | Diff | vs i2 | Provenance | Signature 1 | Signature 2 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| HQ_319 | Warehouse | OB-2026-HQ319-01 | RFID MASS-TAG | Staged | 12,847 | 139,561 | 34,206,400 | 138,204 | +0.98% | -2,914 | UNVERIFIED | blocked · sweep 62% | blocked | Staging ↓ |
| HQ_325 | Warehouse | OB-2026-HQ325-01 | BLIND COUNT | Posted | 1,904 | 8,318 | 2,104,880 | 8,290 | +0.34% | -118 | SIGNED | Ramesh K. · 26-07 09:41 | Mahmoud F. · 26-07 11:02 | Trace |
| MCC | Retail | OB-2026-MCC-01 | SHOPIFY SEED | Diffed | 1,782 | 3,884 | 1,339,150 | 3,884 | 0.00% | -241 | UNVERIFIED | Fatima A. · awaiting | blocked | Sign ↓ |
| YAS | Retail | OB-2026-YAS-01 | SHOPIFY SEED | Staged | 1,109 | 3,102 | 1,018,440 | 3,102 | 0.00% | -96 | UNVERIFIED | diff not computed | blocked | Compute diff |
| CCZ | Retail | OB-2026-CCZ-01 | BLIND COUNT | Posted | 962 | 2,349 | 812,400 | 2,318 | +1.34% | -64 | COUNTED | Leila R. · 28-07 17:12 | Mahmoud F. · 28-07 18:40 | Trace |
| AJM | Retail | OB-2026-AJM-01 | SHOPIFY SEED | Staged | 874 | 2,088 | 682,140 | 2,088 | 0.00% | -312 | STALE | Noura S. · 118d unsigned | blocked | Schedule count |
| BAS | Retail | OB-2026-BAS-01 | BLIND COUNT | Posted | 611 | 1,472 | 498,220 | 1,461 | +0.75% | -38 | COUNTED | Hind A. · 26-07 19:04 re-signed | Mahmoud F. · 26-07 19:22 | Trace |
| 3PL_ARAMEX | Third party | OB-2026-3PL-01 | PARTNER STATEMENT | Draft | 96 | 411 | 96,440 | not mapped | n/a | n/a | NEVER_VERIFIED | no statement obtained | blocked | D-2026-0729-208 |
| TRANSIT | Virtual | OB-2026-TRANSIT-01 | OPEN AWB SEED | Posted | 268 | 946 | 267,180 | n/a | n/a | n/a | SIGNED | Ramesh K. · 25-07 08:20 | Mahmoud F. · 25-07 09:11 | 11 open AWBs |
| SUPPLIER_HOLD | Virtual | OB-2026-SUPHOLD-01 | OPEN RTS SEED | Posted | 41 | 187 | 52,140 | n/a | n/a | n/a | SIGNED | Sara H. · 25-07 10:02 | Mahmoud F. · 25-07 10:44 | 37 open cases |
| DISCONTINUED | Virtual | OB-2026-DISC-01 | ZERO BY DEFINITION | Posted | 0 | 0 | 0 | n/a | n/a | n/a | SIGNED | Sara H. · 25-07 10:05 | Mahmoud F. · 25-07 10:45 | Must stay zero |
| Total across all eleven | 19,187 | 162,318 | 39,439,390 | 159,772 | +0.88% | -3,783 | Shopify comparison excludes TRANSIT and SUPPLIER_HOLD, which Shopify does not hold | |||||||
Five sources, five different provenance outcomes. The source is a per-line property, not a per-batch one, because HQ_319's batch legitimately mixes an RFID sweep with a manual count of everything the sweep cannot see.
Staged against Shopify against i2's final balance. A batch cannot be signed while the diff is uncomputed (R-10.17), because signing a bootstrap without comparing it to the only external source available is precisely the omission this module exists to prevent.
| SKU | Stock type | Method | Staged | Shopify | i2 final | vs Shopify | vs i2 | Note required | Note |
|---|---|---|---|---|---|---|---|---|---|
| MSR31-07 | STOCK | SEED | 14 | 14 | -31 | 0 | +45 | no | i2 deducted from zero for 22 months |
| MSR31-07 | DISPLAY_GOOD | SEED | 3 | 3 | 0 | 0 | +3 | no | i2 had no display bucket at stores |
| MSR31-12 | STOCK | SEED | 7 | 7 | -14 | 0 | +21 | no | |
| MST-CRM-42-BLK | DISPLAY_GOOD | COUNT | 6 | 14 | -2 | -8 | +8 | yes | Blind count 29-07 found 6. Six units unaccounted, reason theft, drift case open. |
| LTC07-02 | DISPLAY_GOOD | SEED | 1 | 7 | 0 | -6 | +1 | yes | note missing · blocks sign-off |
| LTC04-03 | STOCK | SEED | 11 | 11 | -8 | 0 | +19 | no | |
| LTC01-01 | STOCK | SEED | 142 | 142 | -204 | 0 | +346 | no | the single worst i2 drift at MCC |
| MIN-CNDL-007 | STOCK | SEED | 184 | 184 | -96 | 0 | +280 | no | |
| MIN-DIF-004 | STOCK | COUNT | 0 | 0 | -4 | 0 | +4 | no | counted zero · a verification, no ledger row · INV1 could not store this at all |
| STRAP-MSK05 | STOCK | SEED | 152 | 152 | -41 | 0 | +193 | no | |
| JB_PEARL_03 | DISPLAY_GOOD | COUNT | 2 | 9 | 0 | -7 | +2 | yes | Two passes disagreed 0 against 2. Adjudicated to 2 by Sara H. |
| MST-CRM-38-TAN | STOCK | SEED | 68 | 68 | -22 | 0 | +90 | no | |
| MIN-VAS-005 | DISPLAY_GOOD | SEED | 38 | 38 | 0 | +38 | +38 | no | i2 had no key here at all |
| LTC09-01 | STOCK | SEED | 44 | 44 | -12 | 0 | +56 | no | |
| GIFTBOX_LUX_02 | STOCK | COMPOSITE | 0 | 4 | 0 | -4 | 0 | no | a composite never holds stock (L2) · Shopify's 4 is a derived set availability |
| MSK05-BRN | STOCK | SEED | 7 | 7 | -3 | 0 | +10 | no |
Eight classes over 19,187 balance keys. Provenance is a property of the key, not of a row, and it decays: a key is COUNTED only until the next movement, after which it is DERIVED_FROM_COUNT. This module populates module 02's v_balance_provenance.
| SKU | Location | Stock type | Qty | Value AED | Class | Opening source | Signed by | Last verified | Days | Confidence | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| LTC02-05 | 3PL_ARAMEX | STOCK | 84 | 19,740 | NEVER_VERIFIED | none | nobody | never | - | 0.00 | D-208 |
| MSR31-04 | 3PL_ARAMEX | STOCK | 61 | 15,982 | NEVER_VERIFIED | none | nobody | never | - | 0.00 | D-208 |
| MST-CRM-42-TAN | HQ_319 | STOCK | 17 | 4,896 | NEVER_VERIFIED | none | nobody | 29-07 sweep found EPCs | 0 | 0.98 | Adjudicate |
| MIN-VAS-012 | AJM | DISPLAY_GOOD | 22 | 6,820 | STALE | SEED | unsigned | 02-04-2026 | 118 | 0.30 | Count |
| LTC01-01 | AJM | STOCK | 96 | 8,448 | STALE | SEED | unsigned | 02-04-2026 | 118 | 0.30 | Count |
| MSR31-12 | YAS | STOCK | 31 | 9,455 | UNVERIFIED | SEED | unsigned | never counted | - | 0.30 | Sign batch |
| MST-CRM-38-TAN | MCC | STOCK | 68 | 19,584 | UNVERIFIED | SEED | awaiting | never counted | - | 0.30 | Sign batch |
| MIN-CNDL-018 | HQ_325 | QUARANTINE | 14 | 868 | CHAIN_MISMATCH | COUNT | Ramesh K. | 26-07-2026 | 3 | 1.00 | Correct |
| MSR31-07 | CCZ | STOCK | 18 | 5,490 | COUNTED | COUNT | Leila R. | 28-07-2026 | 1 | 1.00 | Session |
| LTC04-03 | BAS | STOCK | 42 | 6,300 | DERIVED_FROM_COUNT | COUNT | Hind A. | 20-07-2026 | 9 | 1.00 | 14 movements since |
| MSK05-BRN | TRANSIT | IN_TRANSIT_CUSTOMER | 6 | 840 | SIGNED | AWB SEED | Ramesh K. | 25-07-2026 | 4 | 0.50 | AWB |
| STRAP-MSK05 | HQ_325 | STOCK | 204 | 15,300 | COUNTED | COUNT | Ramesh K. | 26-07-2026 | 3 | 1.00 | Session |
The Phase 0 objective drawn as a picture: the orange and red bands shrink to nothing, and until they do, no gate advances.
Predicate P3 drawn per location. The gate is on the total, but a single location outside 1% is where to look first.
Four published steps derived from the location's own cadence policy. At no step is a balance zeroed, written off, hidden or deleted.
i2 built an opening-stock uploader and never ran it with real data. Sales then deducted from zero for 22 months. Sellable reached minus 140,753 and 410 reported stockouts were meaningless, because a stockout against a balance that was never established is not information.
The mechanism has three parts and i3 closes all three:
-- 1. No opening row, so the balance is never_verified from day one. SELECT sku_id, location_id, stock_type_id, qty, provenance FROM v_balance_provenance WHERE qty <> 0 AND provenance = 'never_verified'; -- i3 today: 110 rows, all named on this page. i2: no such query existed. -- 2. No self-check on the cache, so drift was undetectable (defect D6, ruling L8). -- i2's inventory_balance stored qty and last_event_id and never -- compared either to balance_after. -- 3. INV1's "opening balance" was a constant (defect G7): for p in products: post_entry(product_id=pid, location_id=hq_id, qty_delta=100, source_type='opening_balance', idempotency_key="opening-baseline:" + sku) -- Every active product. 100 units. No date in the key, so it can -- never be superseded by a real count. R-10.19 quarantines these.
The master plan's section 4 proposes replaying i2's 587K rows into i3. That replay explicitly excludes source_type = 'opening_balance'. History replays; opening balances do not. Anything with that source type lands in import_rows as quarantined and can enter the ledger only by being re-signed as an i3 batch.
R-10.16: gate_eligible(location, phase) is false while any key at that location is UNVERIFIED, NEVER_VERIFIED, STALE or CHAIN_MISMATCH with stock on it.
The balances still render, still count towards on_hand, and still appear in every list. They are not hidden, because hiding is how i2 lost track. What they cannot do is let a phase advance. GATE 1 through GATE 8 each re-evaluate the predicate for their own scope.
opening_signoffs stores hash_at_signing, keys_at_signing and units_at_signing. Appending one staged row after the first signature invalidates it, and the page names the signer who must re-sign and what changed.
That is what caught the 23 July gate failure on BAS. INV1's opening_balance_snapshots.taken_by is a free-text name on a snapshot that can change afterwards, which cannot express this at all.
INV1's opening_balance_lines carries CHECK (quantity > 0). i2's count_lines.actual_qty is nullable with nothing separating "not counted" from "counted, found none".
So in both systems every zero is either an inference or an absence and there is no way to tell which, which is exactly the question provenance is asked. i3 stores qty_counted = 0 as a real observation with a verification row and no ledger row.
Evaluating the four GATE 0 predicates across 19,187 balance keys and 11 locations. The provenance classification is a view, not a cache, so it is always current and never quietly repaired.
This is the state i2 shipped in and never left. Until a batch is staged and signed for a location, every balance at that location is NEVER_VERIFIED, every sale deducts from zero, and every stockout report is meaningless. Nothing else in i3 should be built on top of this page being empty.
You are filtered to COUNTED at 3PL_ARAMEX. That location has never been counted, so the set is empty by definition. All 96 of its keys are NEVER_VERIFIED.
Predicate P3 and rule R-10.17 both need a live comparison against Shopify inventory levels. The API has returned 503 for 14 minutes. Staging, diffing against i2, and counting all continue. Signing waits, deliberately: signing a bootstrap without comparing it to the only external source available is exactly the omission this module exists to prevent. Error id ob-2026-0729-s503.
Signing an opening balance needs role >= manager plus the opening_sign feature, and the signer must be the location's responsible manager or hold the finance role. You resolve to role = manager at MCC and YAS without that feature.
Master plan decision D8 is still open on who signs finance. Until it is answered, every batch has one eligible second signer and that is a single point of failure for GATE 0.
Reclassifying 19,187 keys and recomputing count_debt for 11 locations. Roughly 4 minutes. The register below is showing yesterday's 04:00 classification, which is stated rather than silently served. Signing is unaffected.
Streak 0 of 7. Predicates P1 and P2 are failing. Phase 1 sales ingest can run in shadow, and no phase advances and nothing posts to an unsigned location. The shortest route to closing the gate is: obtain the 3PL_ARAMEX statement (96 keys), finish the HQ_319 sweep (38% left), and collect four signatures on MCC, YAS and AJM.