An insight that was right in March can be quietly wrong by June. Sometimes the world moved: the public benchmark it compared against has a newer figure. Sometimes the warehouse moved: a column was renamed in a release and the query behind a card now fails, or worse, a dashboard that depends on it shows nothing and nobody notices. Discovery is only useful if what it proposes stays honest after it is published. This last post in the series covers the two mechanisms that keep it that way: outside facts with contracts, and drift checks on every index.
The earlier parts covered where proposals come from, the domain knowledge underneath, guided discovery, content packs and reviewing and publishing.
Part one: outside facts
Where public data is allowed
Many of the most useful insights put an internal figure beside an outside one: your rate change against a published market rate survey, weather losses against a public storm series, growth by state against economic data. Discovery is told to use public data only where an external benchmark genuinely changes the interpretation, not as decoration. A guided brief can turn it off entirely, and each guided proposal says whether it wants public data at all.
When a plan does include a public part, it is held to a contract. The part carries a standalone question that names the series, the period and the geography, and an expect block: the exact columns its rows must come back in (three to six names), and where it matters the grain and the units. A public part proposed without that contract is removed by discovery and refused by the planner, because it could never be checked.
Cited, or refused
Public parts are answered by a public-data search service, under instructions to return only figures it can cite to a named public source, and never to estimate, interpolate or carry a figure from memory. Partial coverage is expected and useful: a handful of cited rows beats none, and a coarser published grain beats an invented finer one.
What comes back is checked before it is used. Rows whose length does not match the declared columns are dropped. A reply with no citation, or no usable rows, is refused. The part then says, in its narrative, that no citable public figures were available, so it is left open rather than estimated. The rest of the insight still runs and is written up from what was found.
Each public part's section carries its provider, the citations (title, publisher, link and as-of date), the units and any coverage notes. A chart drawn from public rows leaves out a column the source left entirely blank, while the stored rows keep every column the contract asked for. The cost of each call is recorded with the series.
How outside facts stay fresh
Public answers are cached by provider and question, so the same question is not paid for on every run:
| Outcome | Kept for | Why |
|---|---|---|
| OK, with citations | Its time to live, 30 days by default, less a tenth | So last night's warm-up counts as due by tonight's |
| Refused | 6 hours | The web may know more tomorrow, but not in the next minute |
| Provider error | Not cached | A bad key or a timeout is not an answer; the next run asks again |
An author can set a part's time to live in its contract. For home pages, results with a web part are recomputed once they are older than that part's time to live; results that read only the warehouse are recomputed when the warehouse is re-indexed. Either way the answer says when it was computed.
Part two: drift
Every index compares itself with the last one
Each time a source is indexed, InsightCompose keeps a snapshot of its tables, columns and column types. The next index compares with it and records what changed: tables and columns added, removed and retyped. A partial index, of a few chosen tables, compares only the tables it re-read, so choosing different tables is never mistaken for columns disappearing.
Then it checks what that breaks
Knowing that a column went away is half the answer. The other half is which definitions read it. After every index, every definition on the source that carries SQL is parsed and its tables and columns are looked up in the current index:
- data APIs, by their query;
- insights, by each part's SQL and any saved or scoped SQL, skipping archived ones;
- metrics, by their expression, unless rejected;
- golden questions people trusted or wrote by hand;
- dashboards built on a data API that is broken.
The parsing uses sqlglot and no model. It resolves one SELECT at a time, so a name that is only an alias or the output of a CTE or subquery is never reported. A column written without its table is looked up in every table the statement reads, and reported only if none of them has it.

The result appears on the source's Prepare page as Schema drift: each broken object, with a link to the page that owns it and exactly what it reads that the index no longer has. A Check now button reruns the check without re-indexing. When a check finds breakage that was not there before and an alert webhook is configured, one JSON message says so, listing what broke.
Drift is found before a caller finds it. Because the check runs at the end of every index, a renamed column shows up as a list of affected data APIs, insights and dashboards the same day, not as an error in someone's application next week.
What a re-index keeps
Re-indexing rebuilds what a machine can derive, so it must not discard what people decided. Column descriptions, roles and additivity a person curated are kept by column name. Join verdicts people gave are kept. A table someone excluded, or whose grain or kind they set, keeps that. The domain pack is mapped again once the index queue has drained, and that leaves your own metrics alone. And the discovery agent's cold read replaces only proposals nobody has acted on.
Keeping discovered insights current, in practice
- Re-index on a schedule that matches how often the warehouse changes, and after any schema release.
- Configure the alert webhook so new breakage reaches the channel your data team watches.
- Read Schema drift after each release, starting with dashboards and data APIs, since those have callers waiting.
- Set a public part's time to live to match how often its source publishes: monthly series need less than daily ones.
- Treat a refused public part as information. If a benchmark is refused run after run, rephrase its question, widen its grain, or remove the part.
Where people stay in charge
People decide whether discovery may use outside data at all, and every outside figure that enters an insight is cited or the part is left open; nothing is estimated to fill a gap. Drift checks find and report, they do not fix: a person opens each broken data API, insight or dashboard and decides whether to change the SQL, retire the object or restore the column. Re-indexing keeps what people curated, and the alert goes to the people who own the definitions, not to an automated repair.