King Hippopotamus

Case study

Data platform architecture & governance

Two independent rebuilds of one derived panel produced 17,136,654 bit-identical rows. The estate's other rule: a pipeline that cannot prove coverage refuses to write.

Context

A financial data estate has no natural primary key. A ticker is a lease on a symbol, reassigned when the previous holder delists, and the right answer to "which security is this" depends on the date you ask. In the institutional-holdings store, 1,424,669 security rows collapse to 95,457 distinct CUSIPs and expand to 526,294 distinct spellings of the issuer's name. One mega-cap issuer alone appears under 110 CUSIPs and 156 name variants. Joining two sources on a symbol and getting rows back is not proof that the join was right.

The estate holding those rows is a single node: 54 databases, 423 tables, 105.4 GB (98.2 GiB) of database files, 397,679,393 rows across 28 named surfaces.

In August 2026 I ran three independent reviews of the estate — architecture, engineering, analysis — separately, then cross-examined them against each other. The verdict was not that the collection layer was broken. It was that a well-built collection layer was being read incorrectly. So the fix was not a list of corrections.

What I built

The fix was to make the estate re-derivable and to put a refusal on the exit.

Two from-scratch rebuilds of the derived returns panel, run against read-only sources with scratch outside the estate, produced 17,136,654 rows each in 465.6 s and 432.0 s. A row-exact merge found 0 value mismatches and 0 one-sided rows. A staged prediction of the identity fix matched the live production run to the row at cutover: null identity 1,664,407 (9.71%), ambiguous 480. One derived product, proven to the row.

A research pipeline may write "the company did not disclose X" only when the surface that would hold X is whole. If the coverage contract lists an open hole there, the write raises GapRefused at the call site. There is no override parameter, and a contract older than 36 hours counts as no contract at all. The pipeline is pushed into the honest sentence instead: this platform has not ingested it yet.

Underneath both sits the layout. Four layers — 31 raw stores, 17 derived, 5 registry, 1 application — with one writer per store and every consumer opening mode=ro. Collection carries no third-party dependency. Row shapes are registered as 81 versioned schemas on the surfaces that publish.

Identity is where the numbers moved. The master carries two validity windows per claim, one for bookkeeping and one anchored to what was observed; consumers read the bookkeeping pair, so temporally disjoint successions of a ticker looked like overlaps. 2,348 flagged rows across 957 tickers became 28 rows across 14 tickers, read live after this morning's build.

The four-layer estate — one writer in, read-only out, a gate on the exit

ONE WRITER IN · EVERY CONSUMER OPENS mode=ro · THE EXIT IS A GATE54 databases · 423 tables · 105.4 GBSOURCESSEC EDGARand other feedsCOLLECTIONstandard library onlyone writer per storeRAW31 storesDERIVED17 storesAPP1 storeCOVERAGE GATEcontract older than 36 h= no contract · no overrideGapRefuseda hole on the surfacePUBLISHED CLAIMthe surface is wholeREGISTRY · 5 STORES81 versioned row-shape schemas — a changed shape becomes a new version, never an editand the coverage contract the gate reads · 19 stores carry resume state, so a crash resumescaptureone writermode=romode=roa claim about what is not therereads
One entry from the assertion registry — the dead-safety-net detector. The store it opens is written here as a placeholder.
{
  "name": "returns.beyond_bound_unflagged",
  "db":   "<the derived returns panel>",
  "sql":  "SELECT COUNT(*) FROM daily_returns
           WHERE (implausible IS NULL OR implausible = 0)
             AND (ret > 47.238328008997684 OR ret < -0.97926958)",
  "low":  0,
  "high": 0,
  "note": "The dead-safety-net detector: a row beyond the
           physical bound without a flag means the bound was not applied
           at the call site. Must be 0 forever."
}

Decisions

  • Chose 54 single-writer SQLite files on one node over a distributed store with an orchestrator, because one host and one operator is the whole operating budget — a cluster and a scheduler would spend on themselves what the data needs, and one writer per file turns "who wrote this row" into a layout question instead of an investigation.

  • Chose a refusal at write time over a review step after publication, because a reviewer who catches a wrong "the company did not disclose X" catches it once it is already written — the gate raises GapRefused at the call site, carries no override parameter, and treats a contract older than 36 hours as no contract at all.

  • Chose assertions that return a number over checks that return a verdict, because a verdict hides its own drift — 30 SQL claims judged against inclusive bands produced 776 evaluations and 4 deviations across 31 runs, and every deviation named the surface and the value that had moved.

Evidence

Research artifact · evidence ledger

ClaimHow it was checkedStatus
Two independent from-scratch rebuilds of the derived returns panel produced identical outputTwo full rebuilds against read-only sources, scratch outside the estate, 465.6 s and 432.0 s; then a row-exact merge comparison of A and B — 17,136,654 identical rows, 0 value mismatches, 0 one-sided rows.published
A staged prediction of the identity fix matched the live production run to the rowStaged rebuild first, then the live full compute (739.3 s). Both runs: null identity 1,664,407 = 9.71%, ambiguous 480, unmapped 1,663,927, beyond-bound-unflagged 0.published
A pipeline cannot write "the company did not disclose X" over a surface with a known holeRead the coverage gate's refusal path and its docstring: the claim raises GapRefused at write time, there is no override parameter, and a coverage contract older than 36 hours is treated as no contract.published
The estate is 54 databases, 423 tables and 340 indexes across four layerssqlite_master sweep over all 54 database files, each opened mode=ro, 2026-08-23; layer breakdown by directory — 31 raw, 17 derived, 5 registry, 1 app.published
397,679,393 rows across 28 named surfaces are under governanceRow counts read mode=ro from each of the 28 row-bearing surfaces and summed, 2026-08-23. The sum mixes grains — filings, facts, positions, speaker turns — so it is a governed-row count, not a fact count.published
Ambiguous ticker identity fell from 2,348 rows across 957 tickers to 28 rows across 14 tickersThe registry assertion that counts ticker rows flagged ambiguous in the identity master, run mode=ro. 2,348 rows over 957 tickers before the fix; 38 over 15 staged; the assertion run at 04:40 UTC on 2026-08-23 recorded 18, and a live re-read after the 06:16 UTC identity build returns 28 over 14. The assertion band is [0, 40]; the figure moves with each build, which is the point of putting it on a timer.published
The defect was reading the wrong validity window, and the obvious repair measured worse than the fixThe master carries two validity-window pairs per identity claim, bookkeeping and evidence; consumers read the bookkeeping pair. The literal fallback proposal was staged first and measured at 16.70% unresolved against a predicted 9.8%, and was rejected on that measurement.published
30 assertions ran 31 times over 15 distinct days: 776 evaluations, 772 in band, 4 deviations, 0 runner errorsScan of the assertion run history, 2026-08-09 to 2026-08-23. The registry has a daily timer; the recorded history is 31 runs over 15 days, which is what is claimed here.published
Integrity: 40 databases checked ok on 2026-08-09 — all 40 in scope that day; the estate holds 54 todayquick_check on each of the 40 databases in scope that day, supervised, once. The largest single file, 53.0 GB, took 2,340.8 s at 23 MB/s. There is no recurring readability check across the large files.published

12 claims tested · 9 published · 3 withdrawn before publication. Full evidence record available on request — king.hippopotamus@yahoo.com.

Published claims and the verification policy →

Limitations

  • Integrity was checked once, completely, on a single supervised date — 40 databases, all 40 that were in scope that day and 40 of the 54 the estate holds today. There is no recurring readability check across the large files. The absence of that check is a recorded open item, not something this page discovered.

  • One derived product is proven reconstructible: the returns panel. Raw capture is not reproducible by definition — it is a capture of a source at a moment. The claim is that the derived layer rebuilds from sources, not that the platform is bit-reproducible.

  • The schema-generated probe emitted 1,970 numbers over 4 databases and 19 tables. The estate has 423 tables. The method generalises; the coverage does not.

  • Identity is not solved. About 10.3% of panel rows resolve to no security today — 9.71% at the cutover that fixed it, drifting as new rows land — 28 ticker rows across 14 tickers remain genuinely ambiguous, and about two-thirds of the entities in the archives nobody consumes yet have no bridge into the identity master at all — join yields of 39.8%, 36.4%, 30.0% and 27.6% against 99.4% and 93.7% for the surfaces already in production. What changed is that all of those are numbers on a timer rather than unknowns.

  • Backups are host-local, one generation deep, perishable-only: 26 compressed database copies at 1.9 GB, one generation kept per store, because a source that stays downloadable forever is its own second copy. They cover corruption and bad writes on this host, not loss of the host, and off-host mirroring is an open decision. Separately, one major price panel is survivorship-selected at the source — delisted names were never collected — which is a procurement problem and cannot be repaired in code.

Links

No demo — the estate is a private operating environment and is not exposed; the read-only commands behind every row are published instead, with placeholder roots.

Authorship

I am the architect and author of record; drafts were produced by agent tooling under my protocol and every sentence was approved by me before publication.

Author approval — 2026-08-23, hash b704efae