Lighthouse Model
DCP is a data pipeline. The lighthouse model is the claim that the same pipeline can serve as a continuous observation layer — one whose observation parameters are themselves Brain-controlled data, and whose retained raw events can be re-observed retroactively through any lens.
This is a different kind of claim from the pipeline's other properties. Schema encoding, shadow density, $ST aggregation — those address how data moves and compresses. The lighthouse model addresses what it means to observe a stream, and who controls that observation.
The problem it addresses
Point-in-time verdicts no longer scale.
Classical CI runs once per event (PR open, commit push, scheduled build). The verdict is binary. After it fires, nothing watches until the next trigger. This was adequate when humans reviewed every line and the trigger frequency was low.
That condition no longer holds. When code is generated continuously by AI agents — faster than any human review cycle — the verification layer cannot be event-driven. Events arrive at stream frequency. Verdicts must too. The monitoring architecture has to keep up.
The lighthouse model is the answer to that gap: a stream observer that never stops, whose view is controlled by the Brain reading it.
What the model claims
Three properties, each independently useful, composing into something stronger:
1. Observation parameters as data
The observation layer does not have fixed settings. Window length, grouping axis, decay rate, retention depth — these are rows in $Q[observe], a shadow table Brain can write. When Brain writes window_ms = 1000, the live view narrows. When Brain writes group_by = ["agentId"], the aggregation axis shifts. Neither change touches the stream. Neither requires a pipeline restart.
This is the same separation that $O applies to output format — Brain writes to a shadow, the layer reacts. The direction is reversed: $O is downstream of observation (shapes the output), $Q is upstream (shapes the input to aggregation). Both preserve the core property: the inferential layer touches only declarative data, never executing pipeline logic directly.
The write surface is not limited to $Q[observe]. Interpretation thresholds that more than one Brain implementation must agree on — "how far below its learned baseline counts as a regression" — are promoted to $Q[schema] rows and read live by the Brain, not compiled into it. This is demonstrated, not just claimed: writing baseline_delta to $Q[schema] mid-flight reconfigures the running Brain's regression threshold on its next tick, with no restart and no code path from the writer to the reader other than the shadow row itself.
What a view is scored against is a row too. $Q[compare] declares the reference and the null model behind each verdict, and $Q[forecast] declares which horizons are forecast from which history. In the pilot, the only rows a Brain proposal changes are $Q[observe] rows; thresholds, comparisons and forecasts are declared at startup or through operator endpoints.
2. Retroactive re-observation
Because the pipeline retains raw events for retention_window_ms, a past segment can be re-observed any number of times, with any $Q[observe] parameters — including parameters that did not exist when the segment first streamed through.
This is not variance reduction by re-reading. N samples carry N samples' worth of information, and circulating them does not add precision. What retroactive re-observation provides is the ability to ask "what did that window look like at 1-second resolution?" about a period that was aggregated at 10-second resolution when it was live. The answer is already there — in the retained raw events. Replay applies a new lens to old data.
The honest precedent is event sourcing: keep the raw events, derive views on demand. The addition is that the lens ($Q[observe]) is Brain-controlled data, so re-derivation uses a different aggregation than the original. Stream observation stops being a one-pass read and becomes a re-readable archive.
Re-observation is also targeted, not bulk. A replay proposal carries the segment bounds (fromTs/toTs) alongside the lens, and the Brain derives those bounds from its own detection state — the timestamps at which it first noticed the dip and later saw recovery, padded by the coarse window's own smear. The Brain does not say "re-read everything"; it says "re-read the interval where my live view told me something happened, through this finer lens."
3. The world changed vs. the lens changed
The two facts that look identical on a dashboard — "the signal rose" and "we zoomed in and the noise resolved into a spike" — are not identical. Conflating them is how an observation system produces false alarms.
The lighthouse model makes the distinction explicit by design. Every observation is tagged with the $Q[observe] parameters that produced it. A change in the observed shape has two possible explanations:
- The underlying event distribution shifted (the world changed)
- The
$Q[observe]row changed (the lens changed)
When Brain changes window_ms and the shape changes, that is lens-change, not world-change. The Brain that triggered the lens change knows this, because it authored the $Q write. The downstream human or AI reading the snapshot package can see both the shape and the parameter history that produced it.
This property is what the RC (Retroactive Re-observation) scenario demonstrates: a failure burst that the coarse live view averaged away appears in the fine-window replay as a dip tile. The world recorded it. The original lens missed it. The lens change revealed it. All three facts are present in the artifact.
A third axis, surfaced by real data. On a mock stream events always arrive, so "world vs. lens" is the whole story. Applying the mechanism to a real, sparse transport surfaces a third thing the absence of events can mean: the world is silent (no activity — normal) versus the observer is blind (the transport is down — we stopped seeing). A gap signal that reads only event flow conflates the two and false-fires on normal quiet. The fix is to treat transport liveness as a first-class observation input, separate from event flow — a gap is "blind" only when liveness says the channel is down. The world changing, the lens changing, and the observer's own sight failing are three independent axes the observation layer must keep apart.
A miscalibration, caught more than once. The tile classifier scores each window against a threshold; treating that threshold as safe per-window undercounts how many chances a long-running stream gets to cross it by chance alone. On seeded synthetic streams with only pass and fail results, an uncorrected classifier produced a false-alarm tile in 29% of packages that contained no injected anomaly. A Šidák correction — sized to the whole package's false-alarm budget, not each window's — brought that down to 6.5%, and a continuity correction to 4.40% against a 4.55% design target. That figure described less than it appeared to. The pilot's live stream encodes flaky as 0.5, so the continuity correction never applied to it, and the lens the rule-based Brain actually requests for a replay (1 s windows grouped by agent) had not been measured: on that lens the false-alarm rate was about 41%. Scoring thin two- and three-valued windows on an exact tail instead of a Gaussian approximation brought it to 4.3%, at the cost of some sensitivity to shallow dips. A calibration figure belongs to the stream shape and the lens it was measured on. This is the "world changed vs. lens changed" distinction applied to the mechanism itself: an uncalibrated threshold manufactures "world changed" readings that are artifacts of how the classifier looked.
A capability that transfers, and one that doesn't. Giving Brain's proposal authority to a real LLM (rather than fixed rules) tests the model's separation claim directly: can an inferential layer operate the lens without also being trusted to judge what it sees? Measured against the RC scenario, a Claude-based Brain reliably produces well-formed $Q[observe] proposals — correct window_ms, correct group_by, reasons that name the right mechanism — but does not reliably pick the right target: it re-observes quiet, unaffected sources at close to the same rate as the one with an actual injected regression. Prompting narrowed how much it proposed but did not fix what it proposed; a following experiment isolating framing from model choice found the framing dominant (p = 0.0003) but also found that a general "be more disciplined" instruction, in prose, silently zeroed out whichever proposal channel a given model leaned on most — including, in one case, the very channel carrying the model's one working capability. The conclusion is architectural rather than promptable: lens operation is safe to hand to inference; accept/reject judgment stays in the deterministic layer (the comparator that already runs), which is exactly what the four-layer separation below requires regardless of which Brain implementation is plugged in.
The grid is part of the lens. Window boundaries are observation state, not a property of whichever query happened to ask for them. Anchoring windows to the first event of an arbitrary request means two overlapping queries over the same retained data can land on different grids — a past event that cannot have changed reads as unstable, flickering between anomalous and unremarkable across identical replays. The fix is to make the grid explicit (origin, align) and shared by every reader of a lens, coarse or fine. The same discipline extends to grouped observation: splitting a stream by source (group_by) restores the comparator's assumption of a single distribution — a regression in one of several agents that reads as unremarkable in the mixture becomes clearly visible against its own group's history — but only when every group shares that same grid and is scored against a same-shape reference, and the false-alarm budget above accounts for the added comparisons rather than being spent per group. That accounting has a price: splitting adds comparisons and thins each group's reference. The example above is from the mock stream; on recorded CI results, a view split up front caught less than the combined one (see What real data changed).
What the domain is not
The lighthouse model is demonstrated on a test_result:v1 stream — unit test pass/fail events attributed to AI code-generation agents. This is the demonstration vehicle. It is not the definition of the model.
The choice of domain was motivated by the scale problem above: unit tests arrive at high frequency, are cheap per event, and localize to well-defined code regions. Those properties make the observation mechanics easy to verify against known ground truth. Any high-frequency stream with similar properties — game events, sensor readings, API call traces — admits the same mechanics. The domain is a skin.
Measuring on real streams qualified the skin claim. Windows, lenses, replay and comparisons carried over to recorded public CI results and to live results from the pilot's own test runs, but their sizes did not, and the most useful detector for single-test regressions depends on build order and commit identity, so it lives in the domain layer (see What real data changed).
The test-code framing in dcp-lighthouse/ exists because the development era that motivates the model (AI-volume code generation) is also the era where test events are the most natural demonstration stream. But the claim being made is about observation infrastructure, not about code quality tooling. The code-quality application is one instance of the model, not the model itself.
The skin claim extends further than structured streams. Unstructured text — news mentions, official announcements, raw social chatter — fits the same mechanics once one refuses the temptation to understand it in the pipeline. The deterministic layer does lightweight parsing only (source, timestamp, keyword hits) and emits it as an event stream (mention:v1); what the observation layer then watches is the statistics of mention flow — frequency, burstiness, source mix, silence — not the meaning of any individual text. Interpretation of content stays in the inferential layer, where it belongs. "The world got louder about X" is a shape on a stream, and shapes on streams are exactly what the lighthouse already observes.
Four-layer separation
Brain's authority in the lighthouse model is strictly bounded:
| Layer | Controls | Who can write |
|---|---|---|
| 1. Stream | Raw events, ingestion | Sources (AI agents, adapters) |
| 2. Observation | $Q rows — observe (window, decay, group_by), schema (shared thresholds), compare (reference, null model), forecast (horizons) | Brain (observe); startup declaration or operator (schema, compare, forecast) |
| 3. Aggregation | $ST output and snapshot packages — statistics, shapes; $F forecasts (virtual) | Pipeline (deterministic) |
| 4. Action | Reroute, quarantine, target update | Outer layer (human, ops, automation) |
Brain reads layer 3 and writes to layer 2. It does not write to layer 1 (the stream) or to layer 4 (the action layer). rerouteSchema, schemaUpdate, replayRequest — all three are proposals emitted outbound. Whether a reroute actually happens is the outer layer's decision.
This is intentional. A pipeline that Brain can directly mutate becomes unpredictable under adversarial or mistaken Brain behavior. A pipeline that Brain can only observe and propose degrades gracefully: if Brain misfires, nothing acts until the outer layer validates the proposal. If Brain's $Q writes produce garbage, the stream continues and the writes can be reverted.
This is not just a design intention — it is what makes an unreliable Brain implementation usable at all. Where an LLM Brain's target identification is measurably weak (see above), its rerouteSchema/quarantine claims are run in shadow and checked against the deterministic curator before being treated as backed; an unbacked claim is counted, not acted on. The gate is the outer layer's validation step made concrete, not a new mechanism bolted on around the limitation.
The Minecraft demo established this pattern (Brain steers via PostBox proposals, never entering the data path). The lighthouse model extends it: Brain's write surface now includes the observation parameters themselves, not just routing and gate configuration. The separation holds at the new layer because $Q rows are data, not callbacks.
What real data changed
The properties above were first shown on a mock stream with known injected truth. Measuring on real streams left the mechanisms standing and narrowed what can be claimed from them. Figures are from the pilot's measurements up to November 2026.
A detection is a comparison, and the comparison is declared. A tile is never a property of the observed windows alone: it is those windows scored against a reference, under a null model. Both change the answer as much as window_ms does. They are $Q[compare] rows, and every snapshot package names the comparison it ran.
Independence does not survive real data. On a high-volume public event stream (Wikimedia edits), a null model that treats events as independent raised an alarm in 99.8% of packages at 10 s windows. A null that models dependence over time (a variogram) closes most of that gap in the research harness for windows whose event volume is ordinary; much of what remains is sudden changes in volume, which are events in the world rather than errors of the yardstick. The shipped default is still the independent null, and the shipped configuration has not been shown to be calibrated on real data.
Forecasts come out of the same variance model. $F rows (kriging over window summaries) carry virtual: true, so no reader can mistake one for an observation. On the same stream, in windows of ordinary volume, they stayed slightly conservative. Compared with carrying the reference mean forward, their intervals were 23% narrower one 60 s window ahead and 3% narrower sixty windows ahead: the advantage is a short-horizon one. The far tail one window ahead is somewhat heavier than normal. The pilot declares forecasts for the mock stream only, and no Brain decision reads them yet.
Window sizes belong to the stream. CI results arrive in builds hours apart, and almost all of them pass. On recorded results from Kubernetes Prow, the 10 s and 1 s views had no usable reference for 99.8–100% of the questions asked of them. A 1-hour window against 30 windows of reference brought that to 1.2%.
Some regressions are not a window statistic. Inside a window, one broken test is the size of one flaky failure. A separate rule — the same test failing in consecutive builds, with no pass on the same code — names it. On two weeks of Mozilla Treeherder results, whose failures carry human classifications, this rule named 140 of 156 regressions, but 40% of its announcements contained no regression, and precision was lower on a second two-week range. Attaching each test's recent failure history to the announcement separates the two moderately, not well enough to drop any.
Replay shows; it does not by itself explain. On test-result streams, a downward tile or a failure burst in the combined coarse view now triggers a replay of that span grouped by source. With planted regressions it named only affected groups, or none. On Treeherder's real regressions, grouped by platform family, 163 replays were triggered on windows containing a regression: 11 named exactly the affected groups, 48 named some of them, 16 named at least one unaffected group, and 88 named none. Retroactive re-observation works as a mechanism; attribution on real data has not been demonstrated.
Blindness is declared, not inferred from silence. An unusable reference, a group that could not be scored, and a forecast extrapolated beyond its history are each stated on their own field. A quiet package and a package that could not judge do not look alike.
Relationship to adjacent ideas
The lighthouse model's individual primitives have precedents. What it adds is composition:
- Event sourcing — keep raw events, derive views on demand. Lighthouse applies this to a live observation layer whose lens is mutable mid-flight.
- Observability platforms (Prometheus, Grafana) — continuous metric streams, but observation parameters are static dashboard config, not Brain-writable data; and there is no control loop fed back into the system.
- Adaptive sampling — changes what is collected based on observed signal. Lighthouse changes how collected events are aggregated, not which events arrive.
The composing property — Brain-controlled lens over retained raw events, in a loop — is what makes the model novel enough to demonstrate separately from the Minecraft baseline.
Implementation reference: demos/lighthouse — AR / CG / RC scenarios, event schema, source file index.