Proof / Verify
Proof / Verify
Lens lays out a lot of signal at once, so it is built for the desktop. Open it on a laptop or a larger display and everything will be right where you left it.
The reproduce.ipynb notebook runs the published methodology against your workspace’s ai_event JSONL export on your own machine. The file never leaves your laptop. The notebook prints a finance-ready report that must match the dashboard headline for the same time window; if it disagrees, file a P0 issue and we treat methodology drift as a load-bearing incident. A security reviewer or your auditor can run it without any access to our infrastructure.
Step 1
Download reproduce.ipynb from the repo. It implements the published methodology in Python and needs scipy and numpy. Run it under Jupyter Lab or any hosted notebook environment.
curl -LO https://github.com/QuestoM/cortex-lens/raw/main/docs/proof/reproduce.ipynb
pip install scipy numpy jupyterlabThe notebook source lives at docs/proof/reproduce.ipynb in the QuestoM/cortex-lens repo. The statistical core it mirrors lives at packages/measurement/, and the telemetry wrapper that feeds the same pipeline lives at connectors/lens-cli/. Read the source before you run it.
Step 2
From your Lens dashboard, open Settings, then Export. Choose the date range that matches the dashboard headline you want to reproduce. The export is one JSONL file with one audit event per line, gzip-optional. The schema is documented in the methodology under Section 6.
The export contains your encrypted payload columns, decrypted client-side under your workspace key. The notebook processes the file locally and never re-uploads it.
Step 3
Open reproduce.ipynb, set the input path to your export, and run all cells. The notebook prints the finance-ready report. Save the rendered notebook if your team wants to diff the output against the dashboard render.
jupyter lab docs/proof/reproduce.ipynb
# in the first cell, set:
INPUT_PATH = "./ai_event.jsonl"
BOOTSTRAP_SEED = 0xc0ffeeLeave BOOTSTRAP_SEED = 0xc0ffee to pin the bootstrap RNG to the same seed the harness uses for the weekly numbers, which is what makes the confidence interval reproduce byte for byte. The notebook uses scipy.stats.wilcoxon and a seeded numpy bootstrap.
Coming soon
A one-command wrapper, lens verify, is on the roadmap so you can reproduce the same report without opening a notebook. It is not shipped yet. Until it lands, the notebook above is the path that runs today, and it computes the same numbers. The wrapper lives at connectors/lens-cli/ and currently ships the telemetry commands only (claude, codex, gemini, backfill); follow that package for the verify subcommand.
Step 4
The notebook output is the same shape as the dashboard headline: median savings percent, 95 percent CI, Wilcoxon p-value, parity pass rate. If the numbers match to four decimal places, your team has independently verified the math. If they disagree by more than a rounding step, the diff is a methodology bug.
Open an issue with the input row count, the seed used, and the diff between the notebook output and the dashboard render. We respond on the same business day.
Download and source
Download reproduce.ipynb directly, or read the methodology it implements. The notebook uses scipy.stats.wilcoxon and a seeded numpy bootstrap; the corteX Lens TypeScript port in packages/measurement/ is byte-equal against the Python reference for the three checked-in input vectors, so the dashboard and the notebook compute the same numbers from the same code.
Source: docs/proof/reproduce.ipynb plus packages/measurement/ and connectors/lens-cli/ in the QuestoM/cortex-lens repo. The reproduce code is open-source and runs locally; Lens infrastructure never receives your export. Methodology is signed per commit per Section 9 of the methodology doc.
Proof / Verify
The reproduce.ipynb notebook runs the published methodology against your workspace’s ai_event JSONL export on your own machine. The file never leaves your laptop. The notebook prints a finance-ready report that must match the dashboard headline for the same time window; if it disagrees, file a P0 issue and we treat methodology drift as a load-bearing incident. A security reviewer or your auditor can run it without any access to our infrastructure.
Step 1
Download reproduce.ipynb from the repo. It implements the published methodology in Python and needs scipy and numpy. Run it under Jupyter Lab or any hosted notebook environment.
curl -LO https://github.com/QuestoM/cortex-lens/raw/main/docs/proof/reproduce.ipynb
pip install scipy numpy jupyterlabThe notebook source lives at docs/proof/reproduce.ipynb in the QuestoM/cortex-lens repo. The statistical core it mirrors lives at packages/measurement/, and the telemetry wrapper that feeds the same pipeline lives at connectors/lens-cli/. Read the source before you run it.
Step 2
From your Lens dashboard, open Settings, then Export. Choose the date range that matches the dashboard headline you want to reproduce. The export is one JSONL file with one audit event per line, gzip-optional. The schema is documented in the methodology under Section 6.
The export contains your encrypted payload columns, decrypted client-side under your workspace key. The notebook processes the file locally and never re-uploads it.
Step 3
Open reproduce.ipynb, set the input path to your export, and run all cells. The notebook prints the finance-ready report. Save the rendered notebook if your team wants to diff the output against the dashboard render.
jupyter lab docs/proof/reproduce.ipynb
# in the first cell, set:
INPUT_PATH = "./ai_event.jsonl"
BOOTSTRAP_SEED = 0xc0ffeeLeave BOOTSTRAP_SEED = 0xc0ffee to pin the bootstrap RNG to the same seed the harness uses for the weekly numbers, which is what makes the confidence interval reproduce byte for byte. The notebook uses scipy.stats.wilcoxon and a seeded numpy bootstrap.
Coming soon
A one-command wrapper, lens verify, is on the roadmap so you can reproduce the same report without opening a notebook. It is not shipped yet. Until it lands, the notebook above is the path that runs today, and it computes the same numbers. The wrapper lives at connectors/lens-cli/ and currently ships the telemetry commands only (claude, codex, gemini, backfill); follow that package for the verify subcommand.
Step 4
The notebook output is the same shape as the dashboard headline: median savings percent, 95 percent CI, Wilcoxon p-value, parity pass rate. If the numbers match to four decimal places, your team has independently verified the math. If they disagree by more than a rounding step, the diff is a methodology bug.
Open an issue with the input row count, the seed used, and the diff between the notebook output and the dashboard render. We respond on the same business day.
Download and source
Download reproduce.ipynb directly, or read the methodology it implements. The notebook uses scipy.stats.wilcoxon and a seeded numpy bootstrap; the corteX Lens TypeScript port in packages/measurement/ is byte-equal against the Python reference for the three checked-in input vectors, so the dashboard and the notebook compute the same numbers from the same code.
Source: docs/proof/reproduce.ipynb plus packages/measurement/ and connectors/lens-cli/ in the QuestoM/cortex-lens repo. The reproduce code is open-source and runs locally; Lens infrastructure never receives your export. Methodology is signed per commit per Section 9 of the methodology doc.
Lens lays out a lot of signal at once, so it is built for the desktop. Open it on a laptop or a larger display and everything will be right where you left it.