Data Health

Whether the numbers can be trusted today · build run_20260815T230628 · 2026-08-15 23:06
Publication gate
PASSED
47 of 50 tests passed
Landed batches
69
15 reconstructed, not original
Contracts complete
59/59
grain declared by a human
Open conflicts
14
of 33 recorded

The gate

A blocking failure stops publication: no marts are written and nothing downstream updates. Warnings are recorded and do not block — they mark a known gap rather than a broken load.

TestSubject AssertionResultRows
T010kravers.ordersPWD-registered customers are VAT-exemptwarn401
T025kravers.paymentProcessor payments tie to an orderwarn1,734
T035kravers.market_requirementRequirement tables carry no exact duplicate rowswarn1,081
T024kravers.paymentPayment method is a value, not an unevaluated spreadsheet formulapass0
T036kravers.franchise_procurementThe franchise catch-all is held but not summed by any martpass0
T011platform.personConflicted identities are flagged, never silently mergedpass0
T012kravers.mc_batchA package sale must carry cash receivedpass0
T001kravers.ordersOne row per order_ref per iterationpass0
T002kravers.ordersExactly one latest iteration per order_refpass0
T003kravers.mc_batchCredit rate must sit between 0 and 1pass0
T004kravers.mc_batchphp_value reconciles to qty_issued * rate_php (php_value is authoritative)pass0
T005kravers.mc_eventEvery credit event belongs to a known batchpass0
T006kravers.mc_eventConsumption never exceeds the batch issuedpass0
T007kravers.order_itemEvery order item belongs to a known order_datepass0
T008kravers.ordersEvery order carries a source system and batchpass0
T009kravers.ordersVAT is not charged on credit-settled orderspass0
T013meta.table_docEvery core table declares its grainpass0
T014kravers.ordersChannel is always stated, including when it is unknownpass0
T015kravers.order_itemEvery order item belongs to a known orderpass0
T016kravers.ordersEx-VAT plus VAT reconciles to cash receivedpass0
T017kravers.order_itemLine value equals quantity times menu price wherever a price existspass0
T018kravers.ordersNo sample data ever reaches a transaction tablepass0
T019kravers.ingredient_costEvery ingredient cost states its basis, and sample costs are never invoicedpass0
T020kravers.recipe_lineWhere recipe yield is stated it is a fraction above zero, and loss is never negativepass0
T020bkravers.recipe_lineInvented sample recipes still declare a yield — a blank there is an omission, not a gappass0
T021meta.ingest_batchEvery landed batch states its row count, path and checksumpass0
T022meta.source_contractEvery landed batch has a registered source contractpass0
T023meta.source_contractEvery contract declares at least one columnpass0
T026meta.metric_bindingEvery binding points at a column that exists and a metric that is definedpass0
T026bmeta.source_contractEvery contract declares a grain, a natural key and its required columnspass0
T027martEvery published measure is bound to a metric definitionpass0
T030kravers.orders_cxEvery core order is present in the consolidated export once references are normalisedpass0
T031kravers.mc_eventCore meal-credit coverage is not narrowed to the export's Krave Daily scopepass0
T032kravers.product_xrefA product crosswalk marked unambiguous resolves to exactly one product on each sidepass0
T033kravers.recipe_lineEvery recipe line loaded from the export points at a real product and a real ingredientpass0
T034kravers.ops_eventProduction ops events carry a resolvable database and timestamppass0
T040mart.kravers_sales_dailyOne brand and one day are fed by exactly one source, never bothpass0
T041mart.kravers_sales_dailyEvery core reportable brand-day survives into the consolidated seriespass0
T042mart.kravers_product_performanceProduct performance carries one row per product namepass0
T043mart.kravers_discount_basisEvery published discount basis states both its numerator and its denominatorpass0
T044kravers.companyOne row per company, and every company states a namepass0
T045kravers.company_memberEvery membership points at a company that existspass0
T046kravers.order_companyEvery company-attributed order points at a company that existspass0
T047kravers.companyEvery company core already knew survives the mergepass0
T048stg.orders_cx_reportableThe reportable export filter removes only control-account and non-paid orderspass0
T050mart.kravers_dish_costNo food-cost percentage is published for a partially costed dishpass0
T051kravers.ingredient_costCosts sourced from the production database are standard, never invoiced, and above zeropass0
T052kravers.ingredient_costEvery ingredient cost points at an ingredient that existspass0
T053mart.kravers_sales_dailyA brand-day is fed by exactly one tier, never twopass0
T054mart.kravers_dish_feedbackNo dish rating is published on fewer than three reviewspass0

What is not real

Every limit below is stated, not discovered. A figure drawn from a row in this table describes a subset or rests on an inference, and should be labelled as one wherever it is shown.

LimitAffectedShare What it costs
Orders with no business unit32,640 of 32,640100%PC3 cannot be measured per unit. On a --sample build every order is attributed to KV-MAIN — see CONF_BU_SAMPLED.
Customers not resolved to a person4,231 of 4,231100%No cohorts, no lifetime value, no cross-brand or cross-business view.
Processor payments not tied to an order1,734 of 21,1888%Was 21,188 before the values-only re-extraction. The residue is a real reconciliation gap.
Credit batches with no recorded actor3,213 of 3,213100%The credit audit console runs but cannot answer 'who'.
Ingredient costs that are estimated00%Every cost figure on a --sample build is invented. Actual COGS has no source until the production dumps land.
Purchase lines held00%Zero means actual cost variance is not computable at all.

Collection coverage

Reportable orders per month on the cash-date basis. The amber portion is orders where no cash was received — a share that climbs sharply through the closing months, which reads as manual collection tailing off rather than as trading.

25-08
1,664
25-09
1,441
25-10
1,373
25-11
1,447
25-12
834
26-01
1,669
26-02
1,320
26-03
1,623
26-04
2,230
26-05
1,508
26-06
1,072
26-07
573
cash received no cash recorded  ·  bar length = orders

Metric coverage

Every published measure is bound to a written definition. T027 blocks the build if a mart gains a measure column that nobody has defined, so this figure cannot silently fall behind.

Metrics defined
67
in sql/052_metric_dictionary.sql
Measures published
108
across all mart views
Bound to a definition
109
101% covered
Order lines held
207,009
TSPC only — see CONF_LINE_COVERAGE

Source contracts

A contract declares what a source should carry. Landing checks it before writing, so a renamed or vanished column stops the load. Grain, natural key and required columns are blank where they were registered from an observed snapshot — a machine can see what arrived, it cannot say what it means.

SystemTable ColumnsNot yet declared
consolidated_exportbridge_meal_ingredient13complete
consolidated_exportdim_brand4complete
consolidated_exportdim_customer7complete
consolidated_exportdim_date7complete
consolidated_exportdim_ingredient9complete
consolidated_exportdim_item9complete
consolidated_exportfact_credit_event11complete
consolidated_exportfact_delivery_line25complete
consolidated_exportfact_delivery_schedule10complete
consolidated_exportfact_franchise_prep14complete
consolidated_exportfact_franchise_procurement12complete
consolidated_exportfact_inventory6complete
consolidated_exportfact_item_sold11complete
consolidated_exportfact_market_requirement10complete
consolidated_exportfact_ops_event7complete
consolidated_exportfact_order15complete
consolidated_exportfact_payment10complete
consolidated_exportfact_payment_event6complete
consolidated_exportfact_prep_requirement14complete
daily_feeddd_daily_sales21complete
daily_feeddd_delivery_report16complete
daily_feeddd_order_reviews71complete
daily_feeddd_sales_by_delivery_date22complete
daily_feeddd_sales_by_order_date20complete
daily_feedpaymongo_payment_details9complete
daily_feedpaymongo_payments39complete
daily_feedpaymongo_payouts24complete
daily_feedpaymongo_webhook_events7complete
daily_feedsales_by_delivery_date23complete
daily_feedsales_by_order_date21complete
daily_feedtspc_all_meal_orders32complete
daily_feedtspc_all_orders15complete
daily_feedtspc_gift_voucher_orders9complete
daily_feedtspc_meal_credit_orders10complete
kd_ops_dbcomplete_meal_ingredients19complete
kd_ops_dbcomplete_meals19complete
kd_ops_dbingredient_macros17complete
kd_weekly_dbcredit_packages11complete
kd_weekly_dbusers20complete
ledger_workbookchecker_by_tx8complete
ledger_workbookconsolidation_all45complete
ledger_workbookdd_by_order_date36complete
ledger_workbookkd_all_orders21complete
ledger_workbooknewsite_all_orders19complete
ledger_workbookpaymongo_report48complete
ledger_workbooktspc_all_meals39complete
ledger_workbooktspc_all_orders21complete
ledger_workbooktspc_dd_daily_by_order_date26complete
ledger_workbooktspc_meal_credits_giftcard13complete
ops_workbookconsumption6complete
ops_workbookdaily_usage3complete
ops_workbookexpense_detail3complete
ops_workbookexpense_summary3complete
ops_workbookpricelist5complete
portal_extractao18complete
portal_extractdd11complete
portal_extractmc8complete
portal_extractpm14complete
portal_extractpmh8complete

Landed batches

Every snapshot carries its own manifest beside the Parquet, so this register survives a rebuild. Rows marked backfilled were reconstructed after the fact: the data exists, but the checksum is of the landed file rather than of what the source actually sent.

SystemTable SnapshotRowsStatusSHA
consolidated_exportbridge_meal_ingredient2026-08-1414,943loaded75523caa06
consolidated_exportdim_brand2026-08-146loaded167324c374
consolidated_exportdim_customer2026-08-142,713loadeda1c85d7c3d
consolidated_exportdim_date2026-08-141,826loadedc98da19e47
consolidated_exportdim_ingredient2026-08-14272loadede2bc51d87a
consolidated_exportdim_item2026-08-141,432loaded5c72055649
consolidated_exportfact_credit_event2026-08-146,230loadedf6617906b6
consolidated_exportfact_delivery_line2026-08-14142,379loadedeeedd4d4a8
consolidated_exportfact_delivery_schedule2026-08-1438,786loaded77e5f3c816
consolidated_exportfact_franchise_prep2026-08-1468,630loadede21f36b585
consolidated_exportfact_franchise_procurement2026-08-1480,193loaded4d31cc69f7
consolidated_exportfact_inventory2026-08-14192,768loaded8db6716552
consolidated_exportfact_item_sold2026-08-14575,722loaded3ceda47e24
consolidated_exportfact_market_requirement2026-08-14310,107loaded34bc434f5e
consolidated_exportfact_ops_event2026-08-141,582,964loaded2ceae1a7b0
consolidated_exportfact_order2026-08-1445,182loadedad86cea687
consolidated_exportfact_payment2026-08-1448,073loaded3bdeef5445
consolidated_exportfact_payment_event2026-08-1473,324loadedc302eaab1f
consolidated_exportfact_prep_requirement2026-08-14310,186loadedd25c75cc12
daily_feeddd_daily_sales2026-08-1440loadedc221377510
daily_feeddd_delivery_report2026-08-1483loaded2915bfc7b4
daily_feeddd_order_reviews2026-08-1426,048loaded0772792ffa
daily_feeddd_sales_by_delivery_date2026-08-1424,339loaded9c7e4c0ef6
daily_feeddd_sales_by_order_date2026-08-1411,653loaded6824a52f0e
daily_feedpaymongo_payment_details2026-08-1418,919loaded72b20fbadf
daily_feedpaymongo_payments2026-08-141,717loaded7d185c495b
daily_feedpaymongo_payouts2026-08-147loadede4ddc9f95a
daily_feedpaymongo_webhook_events2026-08-1473,324loadedaac91444e0
daily_feedsales_by_delivery_date2026-08-14120,115loaded22ae8ada47
daily_feedsales_by_order_date2026-08-1420,406loaded59f38fea10
daily_feedtspc_all_meal_orders2026-08-1437,632loaded4abd631f94
daily_feedtspc_all_orders2026-08-1440,545loaded0424654577
daily_feedtspc_gift_voucher_orders2026-08-14134loadede23ec9ed88
daily_feedtspc_meal_credit_orders2026-08-143,125loaded5b516e05c3
kd_ops_dbcomplete_meal_ingredients2026-08-1414,998loaded19c1f47906
kd_ops_dbcomplete_meals2026-08-14535loadedd4c71e5049
kd_ops_dbingredient_macros2026-08-14701loaded9e82680e5e
kd_weekly_dbcredit_packages2026-08-1430loaded999f97999d
kd_weekly_dbusers2026-08-141,895loaded9158159b20
ledger_workbookchecker_by_tx2026-08-1434,355loaded93acdd5df4
ledger_workbookconsolidation_all2026-08-1452,848loadedf381a1ce9c
ledger_workbookdd_by_order_date2026-08-1410,297loaded96b15ae4ba
ledger_workbookkd_all_orders2026-08-1410,221loaded33b4635529
ledger_workbooknewsite_all_orders2026-08-1410,297loadedb692c7abf9
ledger_workbookpaymongo_report2026-08-1421,344loadedb991239b24
ledger_workbooktspc_all_meals2026-08-1425,742loadedc35348e220
ledger_workbooktspc_all_orders2026-08-1424,891loaded63f7cb9fff
ledger_workbooktspc_dd_daily_by_order_date2026-08-1415,023loadedcffa5aa7be
ledger_workbooktspc_meal_credits_giftcard2026-08-1422,883loaded6807d7a0bf
ledger_workbookchecker_by_tx2026-08-1334,355backfilledfc41a7af43
ledger_workbookconsolidation_all2026-08-1360,499backfilled88e05a654b
ledger_workbookdd_by_order_date2026-08-1310,297backfilledc921989b2e
ledger_workbookkd_all_orders2026-08-1310,221backfilled84b8ea6ded
ledger_workbooknewsite_all_orders2026-08-1310,297backfilledb3fcadda1c
ledger_workbookpaymongo_report2026-08-1321,344backfillede4aa60d23f
ledger_workbooktspc_all_meals2026-08-1325,742backfilled71863fa64e
ledger_workbooktspc_all_orders2026-08-1324,891backfilled7698cabd09
ledger_workbooktspc_dd_daily_by_order_date2026-08-1322,898backfilledf8caaaf8a6
ledger_workbooktspc_meal_credits_giftcard2026-08-1322,883backfilled8ed0400551
portal_extractao2026-08-1332,650backfilled637db4aadd
portal_extractdd2026-08-13751backfilled500be754e4
portal_extractmc2026-08-1337backfilledc0fc423dc0
portal_extractpm2026-08-13932backfilledf07214ffa8
portal_extractpmh2026-08-1320,278backfillede970f75477
ops_workbookconsumption2026-07-31248loadedfdfb81c893
ops_workbookdaily_usage2026-07-311,023loaded8ef1b6aad7
ops_workbookexpense_detail2026-07-3195loaded9061f3e461
ops_workbookexpense_summary2026-07-318loadedbc74e4348b
ops_workbookpricelist2026-07-31204loaded381068877b

Conflicts

Where a recorded value disagrees with what the rules compute, the recorded value is truth, the rule is computed alongside it, and the difference is kept here. Resolving one means recording the decision and its date, never deleting the row.

IDSubject BasisStatusRaised
CONF_CHECKER_EMPTYchecker_by_tx holds 34,355 rows and zero valuesEvery column except order_parent_id exported as an unevaluated formula (=vlookup(...)), so the per-transaction variance against PayMongo cannot be read from it. The comparison it wopen2026-08-15
CONF_COST_COVERAGEIngredient cost coverage — the gap that decides whether a dish margin is honestThe Krave Daily ops database holds 701 ingredient rows and only 248 carry a cost above zero. A dish whose recipe includes an uncosted ingredient produces a PARTIAL cost, and a partopen2026-08-14
CONF_CX_CREDIT_SCOPEMeal-credit coverage — this repository's raw model against the consolidated exportThe export carries Krave Daily credit movements only. It holds none of the TSPC issuance this repository models from the gift-card sheet and the MC-order channel. Superseding kraveopen2026-08-14
CONF_CX_DUP_ROWSExact duplicate rows in the consolidated export's requirement and schedule tablesLoaded as delivered. Whether a repeated row is a real second requirement line or an artefact of the producing build's union cannot be decided from here — the raw tables behind it wopen2026-08-14
CONF_CX_EVENT_ID_COLLIDESfact_payment_event.event_id is declared a key and is not oneThe producing build unioned five processor sources without namespacing their row ids, so the same event_id denotes different events with different dates and amounts. The rows are gopen2026-08-14
CONF_CX_NOT_REDERIVABLEThe consolidated export is a rollup, and its own raw sources were not shippedEvery other source here can be rebuilt from 00_raw. This one cannot: only the conformed output arrived. Figures taken from it are traceable to a landed batch but not to a source reopen2026-08-14
CONF_CX_NO_YIELDRecipe yield and loss are unsourced, and inventory recovery_pct is unpopulatedThe recipe source states quantities, not yields. The Krave Daily production database records recovery_pct as 1.0 almost everywhere, which is an unpopulated field rather than a findopen2026-08-14
CONF_CX_ORDER_COVERAGEOrder-header coverage — core against the consolidated exportAfter stripping the amendment iteration, every core order appears in the export and the export adds more, extending history earlier than the ledger workbook reaches. The export is open2026-08-14
CONF_CX_PRODUCT_AMBIGUOUSProducts that cannot be crosswalked between the export and coreThe two catalogues share no key; the only bridge is the product name, and names repeat on both sides. Only names appearing exactly once on both sides are treated as a match. Recipeopen2026-08-14
CONF_LINE_COVERAGEOrders with line-item detail, against all reportable ordersLine items exist for TSPC only, and only where a meal reference maps to a ledger order through tspc_all_orders. Krave Daily, Sodexo and the new site have no line-item source. Any popen2026-08-15
CONF_MC_UNSOURCEDCredit consumption exceeding recorded issuanceCredits consumed with no issuing record are held in synthetic batches of origin 'unsourced' rather than dropped. Candidate causes: manual staff grants, corporate off-system allocatopen2026-08-15
CONF_ORDERS_PAIDPaid order value — ledger workbook vs deployed portal extractJuly 2026 ledger stubs exported with no amount due and were backfilled from the daily feed in the portal build; the workbook carries no backfill. Landing must choose one basis and open2026-08-15
CONF_PAYMENT_METHOD_SEMANTICSkravers.payment.methodThe ledger workbook derives this column from the order reference suffix, not from the processor. It classifies the order iteration. Fees by instrument need the PayMongo payment_metopen2026-08-14
CONF_PWD_SCOPEPWD exemption is recorded per order, but PWD status belongs to a personRecorded value is the count of orders the source marks PWD-exempt. Computed value is the count of VAT-charged orders placed by those same customers. If PWD registration is a personopen2026-08-15
CONF_FORMULA_CELLS00_raw KRAVERS/ledger_workbook — 10 of 15 landed tablesThe workbook was read in formula mode. It always held cached values; they were simply never read.resolved2026-08-14
CONF_COMPANY_COVERAGEB2B company coverage — core against the consolidated exportThe export is a superset here, so this is a gap fill, not a contradiction. Two caveats travel with it. First, company identity is the normalised NAME — no source carries a company variance2026-08-14
CONF_CONSUMPTION_UNMATCHEDIngredients consumed that the recipe catalogue does not nameThe kitchen buys and uses things the recipe catalogue does not list — prepared stocks, staff-meal items, and the same ingredient under a different name. Loaded whole and flagged, bvariance2026-08-14
CONF_CX_CREDIT_FACE_MISSINGCredit peso value present while credit face value is zeroCarried from the export's CONFLICTS.csv. The peso value survived the export, the face value did not.variance2026-08-14
CONF_CX_CREDIT_PESO_EXCEEDS_FACECredit peso value exceeds a recorded face valueCarried from the export's CONFLICTS.csv. The two fields disagree at source.variance2026-08-14
CONF_CX_HEADER_COVERAGE_LAGDelivery lines exist with no order headerCarried from the export's CONFLICTS.csv. Missing header history, not a broken key.variance2026-08-14
CONF_CX_LEDGER_DUPLICATE_ROWSKrave Daily amendment orders appear up to 3 times in the source workbookCarried from the export's CONFLICTS.csv. Resolved by the producing build; the source workbook still holds them.variance2026-08-14
CONF_CX_NET_ABSENT_PRE_2025Processor NET and FEE are absent before 2025Found here, not carried. Any 2021-24 "net revenue" from this source is a GROSS figure with fees unmodelled. Bears directly on how 2022 is framed: the volume is real, the net is notvariance2026-08-14
CONF_CX_ORPHAN_LINESOrders in the delivery-line feed with no header, inside the covered windowCarried from the export's CONFLICTS.csv.variance2026-08-14
CONF_CX_PAYMONGO_GAPTSPC processor history for Mar 2023 to Dec 2024 is absent, not sparseCarried from the export's CONFLICTS.csv. The highest-value window with no processor coverage on either side. Closed only by a PayMongo re-export.variance2026-08-14
CONF_CX_PRE2025_VOLUME_ONLYThe order history the export adds before 2025 states volume but no valueThose orders come from the daily feed, which carries no financial columns; the ledger only reaches back to 1 Jan 2025. So 2023 and 2024 volume and customers are sound and 2023-24 Rvariance2026-08-14
CONF_DISCOUNT_BASIS_VARIANCEDiscount rate — this warehouse against the export's analytics baselineNeither figure from the export baseline reproduces on this data. The bases differ in scope, not in arithmetic. All four computable bases are published together in mart.kravers_discvariance2026-08-14
CONF_FEED_RECOVERS_20242024 revenue was not missing — it was dropped in transitCONF_CX_PRE2025_VOLUME_ONLY recorded 2023-24 as volume with no value. The daily export feed those orders came from states the money; the build that produced the consolidated exportvariance2026-08-14
CONF_MC_RATE_CONTRACT_VS_OBSERVEDContracted credit rate against the rate actually observed on consumptionThe package table states the rate the customer was sold. The blended figure is what the book actually realised across all batches. A gap between them is discounting, mix, or issuanvariance2026-08-14
CONF_ML_DENSITYMillilitre costs are derived from per-kilogram pricesExact for water and stock, out by roughly 8% for oil. The alternative was to leave every liquid uncosted, which would have blocked more dishes than the assumption distorts. Basis ivariance2026-08-14
CONF_OPEX_SUMMARY_VS_DETAILOperating expenses: the summary lines and the transaction lines do not tieThe source sheet interleaves both in one column, so reading it whole double counts. They are separated at ingest and neither is adjusted. The gap is largely utilities, which the shvariance2026-08-14
CONF_PWD_REGISTER_FOUNDPWD status is registered against a person, and the register has been foundCONF_PWD_SCOPE asked whether exemption belongs to the person or the transaction. The production schema answers it: `users.pwd_sc` is a property of the customer. That does not resolvariance2026-08-14
CONF_PWD_VAT_CHARGEDVAT charged on orders by customers the production register marks PWD-exemptSurfaced the moment the register was loaded — T010 had been vacuous until then, because is_pwd_registered was FALSE on all 4,231 customers and the rule could not fail. It is eithervariance2026-08-14
CONF_TWO_MENUSThe recipes were being crosswalked onto the wrong cataloguecomplete_meals is the KRAVE DAILY menu. kravers.product is TSPC's. Exactly one dish name appears in both, because the two brands sold different food. Recipe coverage was stuck at 9variance2026-08-14
How to read this page. A green gate means every assertion the warehouse makes about itself held on the last build. It does not mean the numbers are right — it means they are consistent with the rules that have been written down so far. The "what is not real" table is the honest boundary of what those rules currently cover.