# causality-canary: catch helper- and library-hidden lookahead leaks at runtime

> Source: <https://dev.to/causalcanary/causality-canary-catch-helper-and-library-hidden-lookahead-leaks-at-runtime-ola>
> Published: 2026-12-02 23:33:27+00:00

**Key takeaway:** Re-running a signal function on truncated prefixes and future-perturbed series catches lookahead leaks hidden in helpers or libraries that static linters miss; a 600-bar test flagged 4 of 25 checkpoints with the first leak at bar 100.

Free static linters already catch a lot of obvious lookahead. MIT `leakguard-mcp` documents that rules `LG003` and `LG006` flag the inline full-dataframe z-score `(x - x.mean()) / x.std()`. This project does not claim that pattern as a unique wedge.

What those linters say they cannot follow is a future-peeking aggregate behind a helper, another module, or a third-party library: no cross-function dataflow, no cross-module taint, and no runtime execution.

`causality-canary` is a zero-dependency MIT CLI that treats your signal function as a black box. It re-runs the function on truncated prefixes and on future-perturbed series. If the value at bar `t` moves, you have a leak — even when the leak lives inside a helper call.

```
PYTHONPATH=src python3 -m causality_canary.cli demo
```

A 600-bar synthetic teardown (cross-module full-series z-score helper) fails in under a second: 4 of 25 prefix checkpoints mismatch, first leak at bar 100 (live prefix fires long; the full-series run stays flat because a later regime shift widens the helper's standard deviation). The causal rolling-window fix returns 0 violations.

`$195` / `$249–$309` / `$499`):
Scope is runtime and workflow causality only. This is not a statistical overfitting score, not trading advice, and not a claim of a tradable edge. Demand for the paid rungs is unproven.
