Skip to content
Increment 0.1.0a6 prerelease documentation. These docs describe the increment 0.1.0a6 prerelease (v0.1.0a6). Its API may change. Install: pip install 'increment==0.1.0a6' Keep any extras requested by the guide, such as increment[dashboard]==0.1.0a6.

Compatibility policy

This policy defines the compatibility promise beginning with release 1.0.0. It does not claim that the current alpha release is 1.0.0 or already has this promise. Before 1.0.0, compatibility between prereleases is not guaranteed. This section covers interfaces, persisted formats, and migrations—not statistical certification. A stable interface does not establish that a method’s assumptions fit your experiment. See Statistical limitations for method assumptions and the capability table for what runs on each entry point.

The machine-checked public manifest is the import promise from 1.0.0. It lists one user task per name, grouped by namespace:

  • increment for workflow entry points and caller-authored declarations;
  • increment.estimators, increment.power, increment.results, and increment.evidence for estimation, planning, received results, and custom providers;
  • increment.artifacts, increment.digest, and increment.store for artifact publication, integrity verification, and saving and reopening runs;
  • increment.dashboard, increment.tables, and increment.simulate for presentation and synthetic data;
  • increment.errors for errors and warnings callers catch;
  • increment.assignment for optional deterministic assignment and holdout records;
  • increment.query for build_panel_for_metric, panel_sql, and summary_sql. Each operates on an (experiment, reader) pair; SQL previews preserve their optional-breakout defaults and use adopted SQL as the summary fallback.
  • increment.workflows promises only materialize, export_moments, breakout_summaries, factor_summaries, experiment_definition, metrics, compiled_decision_plan, available_metrics, unit_counts, srm, trigger_rates, allocation_history, health_check, assignment_diagnostic, planning_baseline, capture_sequential, and sequential_snapshot. These functions operate on an (experiment, reader) pair; the experiment definition inspection returns the semantic source declaration, not the kernel execution request. A sequential capture is kept by the reader’s source, so the next run(experiment, reader) and export_moments with that reader read it.
  • increment.artifacts.artifact_context and publish_unit_day_artifact operate on an (experiment, reader) pair; publication retains trusted extension selection and refresh semantics. WarehouseArtifactStore implements the artifact store contract for warehouse publication.
  • increment.estimators conditional-effect operations estimate_cate, validate_cate, targeting_rule, and select_targeting_rule, and the whole-site estimate sitewide, operate on an (experiment, reader) pair; their remaining parameters are unchanged. The data-only array kernels in increment.estimation.targeting and increment.estimation.sitewide, and the increment.power solvers, take no source.

The promise covers the listed public names and their signatures (new optional parameters only); result fields and schemas, including row sets, null reasons, and interval reference/guarantee labels (new fields only, never renamed or reinterpreted); stable error codes and their named context keys (message text may change); each saved format and the versions its readers accept, listed in the saved-format table; and identity hashes, including Experiment.hash(), View.hash(), and scope_key.

Other modules, underscore names, registry and dispatch helpers, private research kernels, and the increment.experimental namespace are not covered by this promise and may change without notice.

Public additions may ship in minor releases. To remove or change a promised contract, first deprecate it with a warning and state the release in which it will be removed. Removal happens in the next major release. Clean cutovers without an alias remain appropriate for private code only.

An older release refuses data written in a newer saved format with a coded upgrade-required error. It does not guess how to interpret unknown data or silently upgrade it. The saved-format table identifies the supported versions and refusal codes.

The package requires Python 3.12 or newer (>=3.12). Core and dataframe analysis are tested on Python 3.12–3.15; warehouse workflows are tested on 3.12–3.14. DuckDB-backed extras on Python 3.15 need a compatible DuckDB wheel. The dependency floors below describe supported configurations, not a claim that the current alpha release is 1.0.0. Dependency changes are reflected in pyproject.toml.

InstallationDependency floors
CorePydantic 2.14.1, packaging 24.0, NumPy 2.5.4, SciPy 1.18.1, Narwhals 2.27.1, PyArrow 26.0.0 (25.0.0 excluded); PyYAML 6.0.1 on Python 3.12, 6.0.2 on 3.13, and 6.0.3 on 3.14 and newer
warehouse extraIbis 10.1.0 on Python 3.12–3.13 and 11.0.0 on 3.14; SQLGlot >=30.14,<30.18 (the verified compatible warehouse-extra range)

The standalone tables extra accepts pandas 3.1; its CoefTable rendering path does not require Ibis. The warehouse extra retains pandas>=3.0.5,<3.1 because Ibis 12 reads a deprecated pandas option that raises under this project’s warnings-as-errors policy. Warehouse installs therefore include pandas directly, and demo inherits the same restriction through warehouse. The dashboard extra remains capped at <3.1; no dashboard-only pandas 3.1 support is claimed.

These floors describe supported dependency combinations, not statistical certification. Optional extras have their own dependencies in pyproject.toml.

A bug fix may change a previously incorrect numerical answer. Disclose numerical corrections in release notes; compatibility does not preserve wrong values.

  • DuckDB accumulates daily ratio statistics more accurately. A sparse day with valid data can now report an interval instead of refusing because of rounding. Invalid statistics and days without a usable denominator are still handled as before.

  • increment.estimators.RelativeLiftPrior explicitly declares a Normal, zero-centered Student-t, or Normal-mixture distribution on fractional relative lift. Eligible randomized fixed-horizon results use a direct relative Normal working likelihood, retain unrestricted support and report the posterior median separately from unchanged sampling inference. Existing unwrapped prior meanings and encodings are unchanged. Relative model/state and independent query-unavailability reasons survive result, breakout, daily, JSON, frame and table replay. The prior guide explains units, historical prediction, approximation limits and unchanged method restrictions.

  • Normal-mixture updates preserve finite answers when squared input scales overflow. Expected-loss arithmetic also retains resolvable small tails. These numerical corrections can change previously inaccurate answers; distribution families, component order and ordinary sampling inference are unchanged.

  • increment.load_definitions(path) lists experiments and their declared metrics from YAML without connecting to a warehouse or writing a catalog.

  • increment.from_definitions(..., catalog_path=...) writes the offline catalog to a file you choose. Pass the same path to reopen without a connection; omitting it preserves the existing location.

  • Warehouse result and artifact stores create missing schemas on first write in the DuckDB catalog you specify, including an already attached catalog.

  • runnable() refuses unknown metric names before reading data. It still checks eligible metrics you can add from the experiment’s definitions.

  • Dashboard preparation consolidates repeated ratio cautions into one dashboard.statistical_cautions warning. Affected results retain expandable Diagnostics with their dates, segments, arms and sample sizes; clean headline rows do not inherit cautions from other views. Denominator-skew advisories retain structured arm diagnostics and use qualified heuristic wording instead of asserting undercoverage. Estimates, intervals, unrelated warnings and Python warnings-as-errors behavior are unchanged.

  • Dashboard Readout, Explore, and Report tables omit the Result column; readout_table() and the analysis notebooks keep it by default. Dashboard caveat markers now sit beside the affected relative or absolute lift. Plot colors, detailed outcomes, CSV, and saved evidence are unchanged.

  • Breakout and daily result rows now preserve optional preferred_direction metadata through projections and saved-result round trips. Declared favorable findings receive the same green Result label as whole-experiment findings. Older rows without this metadata remain readable and neutral. Existing source IDs are preserved for otherwise identical inputs.

  • Dashboard diagnostic details and time-series cells keep segment labels as literal text instead of interpreting them as links. Diagnostic values, plots and captured evidence are unchanged.

  • Routine numerical assumptions no longer add Result markers or table footnotes in native tables, notebooks, Readout, Explore, or Report. The metric inspector keeps each result’s recorded numerical assumption and captured counts in a collapsed Advanced calculation record, separate from ordinary policy details. Result-specific notes, reliability caveats, errors, and missing-evidence disclosures remain visible. Estimates, verdicts, raw evidence, and saved result formats are unchanged.

  • Fixed-horizon Bonferroni breakout tables no longer show Unavailable merely because they have no separate discovery verdict. Results use the test of each already-adjusted interval; estimates, confidence levels and test outcomes are unchanged. Caveat footnotes no longer repeat an “Affected” row list: Result markers identify the applicable rows.

  • Readout caveats now use numbered Result markers and attributed notes beneath the table instead of a Qualification column saying “Qualified.” Notes survive native .gt() rendering, notebook display, table customization, dashboard column filtering, and Report printing. Shared caveats appear once; metric inspectors retain per-result explanations and technical details. Estimates, verdicts, CSV fields, and saved result formats are unchanged.

  • Readout tables and dashboard result colors now follow one Result status: recorded family selection when applicable, otherwise the comparison’s own test. Separate Discovery and Significant headline columns are replaced by that status; the original verdicts remain in result data and details. A one-sided safety guardrail shows Guardrail passed or Inconclusive; failing to establish safety does not produce a red harm verdict. Estimates, intervals, test procedures, and saved result formats are unchanged.

  • Dashboard whole-experiment time series show all primary, secondary and guardrail metrics together, with selected added metrics labeled exploratory. Relative lift and daily/cumulative absolute values retain each metric’s units, uncertainty and unavailable reasons; absolute values overlay both arms. The example’s experiment selector follows the dashboard’s light/dark palette.

  • Summary SQL previews organize the warehouse calculation into named stages for unit measurements, analysis rows, group references and centered moments. Public signatures, result columns, eligibility rules and statistical calculations are unchanged. Generated stage names are presentation details; the executable preview does not promise a particular warehouse execution plan.

  • Warehouse summaries preserve exact zero variance for constant input groups. Nonconstant neighboring values retain their positive variance; no minimum variance threshold is introduced. This corrects availability that could depend on aggregate order. The numerical reference remains tests/fixtures/parity_baseline.json; ordinary estimates retain their existing tolerances.

  • Supported whole-window, breakout, daily/as-of, triggered, and registered analyses retain their existing behavior. Source declarations and provider adapters own differences in available evidence; unsupported requests keep their existing refusals. Estimator behavior and numeric baselines are unchanged.

  • runnable() honors a saved source’s support for quantiles with an outcome window in breakout views. An unsupported window reports frame.metric.window_days_supported, matching execution before data is read.

  • Daily views honor a custom provider’s declared day-level access even when its aggregate data lists only a total.

  • A failed custom-provider CUPED fit no longer prevents a valid comparison method from using available unit-level data. The failed method retains its original reason.

  • Saved experiments retain triggered analyses for legacy custom providers that offer triggered moments. Explicitly disabling triggered support still refuses before data is read.

  • Unclustered triggered analyses accept a custom provider’s declared unit counts when assignment counts are unavailable. Clustered analyses still require counts at the randomization grain.

  • Fresh warehouse and demo installations keep SQLGlot in the verified >=30.14,<30.18 range. Newer releases, including 30.33.0, generate invalid SQL when Ibis 12 creates a DuckDB table from Arrow data.

  • Unavailable CUPED results contribute their fit identity and structured reason to readout snapshot identity. Changing that evidence no longer reuses an identity; valid comparison-method estimates are unchanged.

  • Clustered daily/as-of requests honor custom-provider support declarations even when cluster metadata is supplied without an experiment definition. Older declarations retain their existing early refusals.

  • Saved daily/as-of metric definitions now agree between runnable() and execution. Providers can answer these requests through their moments operation without creating an exploratory sibling; exploratory_metrics= still requires separately declared support.

  • Missing-breakout refusals retain their full structured context in runnable() and run, including the original guidance for declaring breakouts.

  • runnable() retains daily quantile refusals for saved artifacts when another validation check also refuses; execution’s reason is no longer omitted.

  • View.breakout(segment, *, population="assigned", metrics=()) accepts an optional tuple of registered metric definitions. An empty tuple selects the experiment’s metrics. Save or log a selective breakout alongside the complete overall primary and guardrail decision in the same run. Global incomplete metric selections and selective breakouts without that overall decision still refuse before acquisition or writes. Both stores preserve the scoped family evidence and unavailable cells; no saved-format migration is needed.

  • Fixed-horizon randomized breakouts use each declared metric’s margin and alternative where the existing estimator supports that hypothesis. They remain exploratory: nominal alpha and count-based correction are unchanged, not replaced by headline primary allocation. Previously ignored one-sided zero-null alternatives are now honored; this can change p-values, selection and other members’ corrected intervals in the same family. Unsupported encouragement and multi-covariate CUPED margins retain their refusal. Absolute-margin segments retain valid additive inference at zero or negative arm means. When both arms are constant, mean-based inference instead reports estimation.engine.lift_guard with reason "zero_variance", irrespective of their means; the unavailable cell remains a family non-rejection.

  • Frame capture and compliance cutoffs share the panel’s time-axis validation. Ambiguous empty pandas calendar columns can use their declared exposure column or calendar construction cutoff; explicitly typed label columns stay labels. Integer elapsed-day predicates do not wrap, and eligibility counts retain exact coordinate ordering. Construction keeps source.panel.observation_end; sequential capture keeps sequential.source.invalid and its existing context. Invalid panel compliance cutoffs now use source.panel.as_of with value, axis_kind and issue; summary-frame compliance retains source.frame.compliance_asof.

  • Exact dataframe reductions use bounded scratch space and a value-checked integer path without changing dataframe snapshot identities or rounded-once sums. Warehouse censor diagnostics count the enrolled population before dense event joins, preserving the warning and maturity counts.

  • Compatible warehouse-backed count, mean and ratio metrics reuse source reductions across whole-window and time-series results. Each request keeps its own observation window, eligible units and completion rules. Requests that cannot share work retain their existing paths; custom readers do not need a new interface. This does not promise one query for every analysis.

  • Preparing large dashboards checks result identity without repeatedly scanning every result. Existing result identities, ordering and numerical values are unchanged.

  • Explore lift charts group compatible breakout and arm series in one table. Shading covers finite confidence intervals; open sides are not drawn as separate lines or invented bands. Exact latest values, available bounds and attributed qualifications expand together, including when a point estimate is unavailable. Labels remain literal, and multi-metric plots retain visible identities. Confidence levels near 0% or 100% retain their precision; when a stored level rounds to 100%, its positive noncoverage budget remains explicit. Timestamps with UTC offsets retain their actual spacing and ordering, including repeated local clock times. Exported pages still allow previously unopened chart selections without a data source.

  • Flat readout rows and dashboard CSVs add nullable coverage_alpha, the stored noncoverage budget of the retained interval. This preserves the interval’s own budget through flattening, including when level rounds to 1.0; it does not substitute a family or decision allocation. Existing fields retain their meanings.

  • Individual result rows display relative effects in percent and absolute effects in native units. Unbounded endpoints remain open; undefined endpoints remain unavailable rather than becoming infinite. Large finite effects stay finite in the display, and extreme standard-error diagnostics use compact formatting. Estimate numeric fields and model serialization are unchanged.

  • HTML readouts and dashboard summaries display supported fixed-horizon, one-sided guardrails as the relevant safety bound, with the corresponding one-sided confidence level. A central 90% interval can therefore display as a 95% one-sided bound without changing its finite endpoint. Additive effects retain their own confidence labels where needed. Stored estimates, raw rows, CSV, p-values and decisions are unchanged; dashboard tables still omit Result. The CUPED example compares estimated variance using absolute standard errors, not relative-lift interval widths, and labels sampling confidence correctly.

  • The optional Python assignment API and locally packed @increment/assignment use one v1 protocol for enrollment, arms, mutually exclusive layers and named holdouts. Neither records exposure nor changes analysis of assignments produced by another system.

See the release history archive for earlier prerelease changes, including superseded APIs. New release notes continue in GitHub releases.

Every removed Analysis member, every public name moved since, and every renamed option has one replacement. In the table, experiment, reader is the pair a builder returns, workflows, query, artifacts, estimators and dashboard are the increment.* namespaces of those names, and parameters not shown keep their names, defaults and refusals.

Removed callReplacement
Analysis(experiment_name, definitions_path, con, ...), Analysis.from_definitions(experiment_name, definitions_path, con, ...)experiment, reader = from_definitions(definitions_path, con, experiment_name=..., ...); the path comes first and the name is a keyword
Analysis.from_unit_summary(frame, ...), increment.builders.from_unit_summary(frame, ...)from_frame(frame, shape="summary", ...)
Analysis.from_unit_panel(frame, ...), increment.builders.from_unit_panel(frame, ...)from_frame(frame, shape="panel", ...)
Analysis.from_unit_day_artifact(store, ref, expected_context=..., ...)from_unit_day_artifact(store, ref, expected_context=..., ...)
Analysis.from_moments(rows, ...)from_moments(rows, ...)
Analysis.from_switchback_panel(frame, ...)from_switchback_frame(frame, ...)
with analysis:, analysis.close()with reader:, reader.close(); neither closes a connection you supplied
reader.run_experiment(experiment, provider, ...), reader.resolve(...), reader.verify(...), reader.validate_experiment(experiment)run(experiment, reader, ...), which checks the experiment against the reader and verifies its source declarations before reading
reader.binding and the source, plan, design and metrics it heldreader.experiment, and the workflows, query, artifacts and estimators functions taking (experiment, reader), such as workflows.metrics, workflows.compiled_decision_plan and workflows.experiment_definition
reader.catalog_writer(experiment)run(experiment, reader) on a connected from_definitions pair, which records the offline catalog
reading through a reader after close() or its with blockbuild a new pair with the builder that returned it; a closed reader refuses with kernel.run.reader_closed
analysis.run(**options)run(experiment, reader, **options).readout(), the same LiftEstimates or ContrastResults
analysis.run(population="triggered")view = View.overall(population="triggered"), then run(experiment.with_views(view), reader, views=(view,)).readout(view); omit views= to read the builder’s assigned view beside it
analysis.run(store=store)run(experiment, reader, results_store=store); decision_log= and run_id= are checked before any read
run(analysis, registration, compiled_plan, *, experiment_id=..., analysis_spec_hash=..., execution_identity_hash=..., run_id=..., ...)run(experiment, reader, run_id=..., results_store=..., decision_log=..., ...); the experiment supplies its registration and identities
analysis.run_breakout(...)View.breakout(segment); segment=(BreakoutIdentity(property, source), ...) selects declared breakouts, and () selects all
analysis.run_daily(dimension=property, ...)View.daily(values=True, segment=(BreakoutIdentity(property, None),))
analysis.run_daily_lift(dimension=property, ...)View.daily(segment=(BreakoutIdentity(property, None),))
analysis.run_asof(completed_windows_only=flag, ...)View.asof(values=True, completion_policy=flag)
analysis.run_asof_lift(completed_windows_only=flag, ...)View.asof(completion_policy=flag)
population= on a day-axis or breakout methodpopulation= on View.daily, View.asof or View.breakout
increment.readouts.run_scoped(analysis, ...)declared = {view.hash() for view in experiment.views} and added = [view for view in views if view.hash() not in declared], then run(experiment.with_views(*added) if added else experiment, reader, views=views): one capture of the data serves every selected view; with_views refuses a view the experiment already declares, such as the builder’s View.overall()
analysis.materialize(), analysis.materialize().run()workflows.materialize(experiment, reader), then run(experiment, reader)
analysis.export(path)workflows.export_moments(experiment, reader, path)
analysis.experimentworkflows.experiment_definition(experiment, reader), the semantic declaration
analysis.metrics, analysis.compiled_decision_plan, analysis.available_metricsworkflows.metrics(...), workflows.compiled_decision_plan(...), workflows.available_metrics(...), each taking (experiment, reader)
analysis.unit_counts(), srm(...), trigger_rates(), allocation_history(...), health_check(...), assignment_diagnostic(), planning_baseline(metric), breakout_summaries(...), factor_summaries(), capture_sequential(...), sequential_snapshot(...)workflows.<name>(experiment, reader, ...) with the same remaining parameters
analysis.artifact_contextartifacts.artifact_context(experiment, reader)
analysis.publish_unit_day_artifact(store, ...)artifacts.publish_unit_day_artifact(experiment, reader, store, ...)
analysis.build_panel_for_metric(...), panel_sql(...), summary_sql(...)query.<name>(experiment, reader, ...)
analysis.estimate_cate(...), validate_cate(...), targeting_rule(...), select_targeting_rule(...), sitewide(...)estimators.<name>(experiment, reader, ...)
analysis.dashboard_snapshot(...), dashboard_breakout_reads(...), dashboard_group_data(...)dashboard.prepare_dashboard(experiment, reader, config=...) captures the headline, group data and Explore reads once; load_explore(experiment, snapshot=...) and render_dashboard(experiment, snapshot=...) read the snapshot
increment.analysis.fit_predeclared_adjustmentestimators.fit_predeclared_adjustment
increment.Resolver, increment.BoundResolverincrement.evidence.Resolver, increment.evidence.BoundResolver, under the same names
resolver= on run and on every function that reads datareader=; positional calls are unchanged
MetricSpec(missing="drop")MetricSpec(missing="skip"), the same computation; the rows’ population names the units each group observed
increment.Scopeincrement.View
Scope.run(population=...)View.overall(population=...)
experiment.scopes, Experiment(..., scopes=...)experiment.views, Experiment(..., views=...); saved JSON keeps its "scopes" key
experiment.with_views(*scopes), which replaced the declared viewsexperiment.with_views(*views), which adds after the declared views: omit a view already declared, such as the builder’s View.overall(), and pass views= to run to execute only some of them
result.readout(scope=...)result.readout(view=...); positional calls are unchanged

Readout options such as decision_method, prior, metrics, estimands, exploratory_metrics and coherence are run keywords and apply to every selected view. A view’s population, breakout selection and completed-window gate belong to its View. One run reads every declared view from one capture, so the daily, as-of and whole-window rows agree on the data they describe. Daily and as-of views on a panel need its exposure_date= column; here every unit was exposed on the first day:

import polars as pl
import increment
from increment.evidence import BreakoutIdentity
panel = pl.DataFrame(
{
"user_id": [f"u{index}" for index in range(8)] * 2,
"variant": ["control", "treatment"] * 8,
"day": ["2025-01-01"] * 8 + ["2025-01-02"] * 8,
"exposed_on": ["2025-01-01"] * 16,
"country": ["US", "US", "GB", "GB"] * 4,
"revenue": [float(index % 5) for index in range(16)],
}
)
experiment, reader = increment.from_frame(
panel,
shape="panel",
unit="user_id",
group="variant",
date="day",
exposure_date="exposed_on",
control="control",
metrics={"revenue": "mean"},
breakouts=["country"],
)
whole = increment.View.overall()
daily_by_country = increment.View.daily(values=True, segment=(BreakoutIdentity("country", None),))
asof_lift = increment.View.asof()
result = increment.run(experiment.with_views(daily_by_country, asof_lift), reader)
estimates = result.readout(whole) # was analysis.run()
values = result.readout(daily_by_country) # was analysis.run_daily(dimension="country")
trend = result.readout(asof_lift) # was analysis.run_asof_lift()
  • A refusal code always keeps its meaning. Message text may change; branch on .code and context fields.
  • Retired codes remain in increment.errors.RETIRED_CODES, mapped to a replacement, replacement tuple, or None if there is no replacement. For example, estimation.binomial.arm_too_large_for_exact_enumeration maps to estimation.binomial.finite_sample_arm_ceiling_exceeded. Retirement is a contract change listed in the release notes.
  • Preserve numeric nulls and their reason, guarantee, and reference metadata. Dropping these changes what a result claims.
  • Removing a result field or changing its type requires a migration notice.

Persisted files use versioned formats; they are not upgraded silently. Re-export legacy artifacts from trusted definitions. The saved-format table lists the version each writer produces and the versions each reader accepts. The details below document supported moments, artifact, and checkpoint formats.

Decoders accept saved metadata cells in either the previous source-snapshot-first order or the current population-first order, and normalize reopened metadata to the current order.

Serialize the collection and reopen it with its dedicated decoder:

import polars as pl
import increment
from increment.results import ReadoutResults
frame = pl.DataFrame(
{
"unit": ["c0", "c1", "t0", "t1"],
"arm": ["control", "control", "treatment", "treatment"],
"revenue": [1.0, 2.0, 1.5, 2.5],
}
)
experiment, reader = increment.from_frame(
frame,
shape="summary",
unit="unit",
group="arm",
design=increment.Randomized(
control_group="control",
allocation={"control": 0.5, "treatment": 0.5},
allocation_scheme="independent",
),
metrics=[increment.MetricSpec(name="revenue", type="mean")],
)
rows = increment.run(experiment, reader).readout()
payload = rows.model_dump_json()
restored = ReadoutResults.model_validate_json(payload)

This preserves the rows and collection-level metadata. A row or collection JSON payload is distinct from a portable ResultCell payload; use the envelope format below when you need per-cell operation metadata, summaries, or Arrow interchange.

For portable cells, use ResultCell and AnalysisEnvelope from increment.results. ResultCell.to_payload() / from_payload() read and write JSON-compatible cells; ResultCell.to_arrow() / from_arrow() read and write Arrow tables. The matching envelope methods also preserve collection metadata.

Estimated result collections expose as_cells(): this includes run readouts, BreakoutEstimates, DailyLiftEstimates, DailyMetricValues, and ContrastResults. Individual report objects expose as_cell(), including CateResult, CateValidation, TargetingRule, TargetingSelection, and ConfoundingSensitivity. Store identity is based on the capture (source_snapshot_id) and analysis specification, not on equality of source_content_digest. The content digest records exact canonical estimation inputs as provenance; it is not a store deduplication key. Moment-row metadata such as experiment_id is excluded, but a user-data column with that name remains part of the evidence.

Different constructors or aggregation orders can produce numerically equivalent moments with slightly different floating-point representations, and therefore different exact hashes. Compare estimates and intervals at the numerical tolerance appropriate to the quantity, not by content-hash equality. The digest does not round evidence or promise universal cross-constructor equality.

The Arrow se column in portable cells, envelopes, and run history uses the estimator’s native uncertainty scale: log_se for log-scale relative lift and abs_se when no log-scale standard error is retained. It is not a standard error on the displayed relative lift (exp(log_mean) - 1).

Continuing with the rows collection created above, save and reopen an envelope to render its table or text report:

import json
import increment
from increment.results import AnalysisEnvelope, ResultCell
from increment.tables import readout_table
cells: tuple[ResultCell, ...] = tuple(rows.as_cells())
envelope = AnalysisEnvelope(cells, rows.metadata)
saved = json.dumps(envelope.to_payload())
reopened = AnalysisEnvelope.from_payload(json.loads(saved))
table = readout_table(reopened)
brief = increment.render(reopened)

Version-2 cells also cover breakout rows, daily/as-of lift and absolute metric values, switchback contrasts, honest CATE and targeting reports, and sensitivity reports. These rows preserve typed report data and identity; their retained payloads do not recreate fit state or grant portable inference operations. Check each cell’s supports before requesting an operation. Raw source outcomes are not retained: cells that would carry raw outcomes preserve identity and the reason without serializing those outcomes. The envelope retains no live analysis or fit object.

relevel(cell, alpha=...) is available only for supported retained t intervals, at the same or a lower alpha than already stored; it can preserve or widen the interval, but cannot narrow it. Directional intervals with an open endpoint are not relevelable. Requests that would narrow an interval refuse with results.operation.alpha_above_allocation. This cell operation is separate from LiftEstimate.reintervalize(alpha), which rebuilds from the retained row but refuses requests above the row’s registered plan or selected family allocation with results.operation.alpha_above_allocation. Register a new alpha in the analysis plan and rerun rather than widening an existing result. For multiplicity correction, pass retained lift rows to select_exploratory_family(); it derives the family cutoff and returns corrected estimates.

Choose the format by what must survive. ReadoutResults.model_dump_json() keeps the typed readout collection and its collection metadata. AnalysisEnvelope and ResultCell provide portable per-cell summaries, supported operations, rendering, and Arrow interchange. A persisted execution belongs in ResultsStore: its Run keeps the cells alongside execution identity, plan, and manifest metadata in Arrow-backed storage. These formats serve different lifecycles; none substitutes for live analysis or fit state.

See the retained-state inventory for construction details and operation limits.

Statistical and wire-format details

Moments cubes. increment.workflows.export_moments(experiment, reader, path) stamps each row with moments_format; from_moments reads it. Formats vary by writer:

FormatWritten byRead by from_moments
13Fixed-horizon export_moments when method-scoped CUPED evidence is needed: scalar families, categorical cells, or fitted continuous/mixed multicovariate QR stateYes
12Fixed-horizon export_moments; source identity, exact counts, ratio denominator third moment cden3Yes
11Prior fixed-horizon export; source identity and exact countsYes; ratio denominator-skew coverage is unavailable
10Earlier fixed-horizon export or current sequential checkpoint exportYes; fixed-horizon ratio denominator-skew coverage is unavailable
9Prior sequential checkpoint exportYes
Below 9No longer writtenRefused: moments.format.unsupported_legacy
Above 13Not written by this releaseRefused: moments.format.unsupported_future

A cube must use one format (moments.format.mixed) and have no duplicate (metric, group_id) rows (moments.rows.duplicate). Fixed and sequential records use typed envelopes. Formats 10 and 11 fixed-horizon cubes and format 9 sequential cubes remain readable. Every row below format 9 is refused before a plan is read, including sequential format 8. A sequential checkpoint stamped older than the supported format is refused with sequential.continuation.legacy. Re-export from trusted definitions or use the release that wrote the file; formats are never silently upgraded.

Historical fixed-horizon format 10 does not synthesize missing assignment_counts; operations that require those counts refuse with source.moments.assignment_counts. Its rows remain distinct from typed sequential format-10 checkpoints. A format-12 ratio row without cden3 is refused with moments.denominator_third_moment_missing. Formats 10 and 11 have no cden3; their lift rows mark denominator-skew coverage unavailable, not passed.

Fixed formats 11, 12, and 13 and sequential format 10 carry source identity. from_moments restores it rather than using the replay object’s default study name. Snapshot identity also binds the canonical request, pinned evidence, and integer sufficient statistics—not floating aggregates. Fixed format 10 and sequential format 9 lack source identity; format 11 may omit it. Replay identity for these cubes is namespaced by legacy format and study ID because provenance is unrecoverable. source_identity is self-asserted, not authenticated.

Every ordinary row needs integer n >= 1 and, if present, integer 0 <= successes <= n. Import and export refuse invalid values, including unselected rows, with moments.count_out_of_range. Counts remain integers; floating centered moments only check count agreement and cannot recover counts. Keep count columns integer when storing or merging partitions.

For per-arm summaries, call moments_from_summaries(rows, metrics=..., control=..., study_id=..., assignment_counts=...) and pass its rows to from_moments. It accepts strict mean rows (group_id, metric, n >= 2, mean, ddof=1 var) and conversion rows (group_id, metric, n, exact integer successes). Extra fields are refused with moments.summaries.invalid. Without assignment_counts, workflows.unit_counts and health allocation checks refuse with source.moments.assignment_counts; workflows.srm does too once a target allocation is declared, and refuses with an integrity.allocation_* code before that. For ratios and richer summaries, use from_frame(..., shape="summary").

LiftEstimate, BreakoutEstimate, DailyLiftEstimate, DailyMetricValue and ContrastResult carry metric_type: the declared Metric.type of the row’s metric (mean, conversion, retention, ratio, total, active or quantile), stamped by every run view and carried through saved results and frame exports. It is None when the type is unknown: rows built directly by the low-level estimators, the design-level compliance row, and results saved before the field existed.

LiftEstimate, BreakoutEstimate, DailyLiftEstimate and ContrastResult carry metric_type: the declared Metric.type of the row’s metric (mean, conversion, retention, ratio, total, active or quantile), stamped by every run view and carried through saved results and frame exports. It is None when the type is unknown: rows built directly by the low-level estimators, the design-level compliance row, and results saved before the field existed.

Site-volume coverage ends at end. An experiment that declares observation_end after end now publishes site-volume coverage through end, the window its rows and the estimand use, instead of through observation_end. Its context and site-volume extension digests change, so republish such artifacts. Experiments whose observation_end is not on a later local day than end are byte-identical.

Unit-day artifacts. Artifact context format 2 is the only supported format. It contains no source SQL; source recipes use domain-tagged SHA-256 digests. Opening or publishing format 1 is refused with artifact.format.unsupported, naming the received and supported versions. Republish from trusted definitions; existing format-1 manifests still contain their original SQL. See Canonical unit-day artifacts.

publications use digest format 4 and verify it with the SQL codec on DuckDB, PostgreSQL, Snowflake, and BigQuery. Format 2 remains a verify-only codec for existing DuckDB relations. Relations stored with digest formats 1 or 3 cannot be adopted on a route without a warehouse-side verifier; they refuse before unit transfer with query.session.warehouse_artifact.verification_unavailable. Republish from trusted definitions with warehouse-side integrity enabled; never relabel a stored digest.

Republish and re-register after window-day and label fixes. Artifact context binds window_days, the boundary-local day of each declared window edge. Contexts missing it are refused with artifact.context.mismatch before any manifest, relation, or pin is used; republish from trusted definitions. Older native sequential registrations bind a different source recipe and are refused with sequential.source.invalid; register again. Frame registrations are unaffected. Older artifacts label Boolean breakouts and factors True/False; republishing uses true/false/__null__.

Names added in this release. increment.semantics.models.local_day, window_days, Experiment.start_day, Experiment.end_day, Experiment.observation_horizon_day, increment.query.artifact_contract.open_trusted_manifest_snapshot, WarehouseArtifactStore.abandon_generation(artifact_id, generation_id), and the roles= argument of increment.estimators.impute.pooled_mean. The abandon call durably hides a generation even if no manifest row exists and is safe to repeat. pooled_mean without roles= still fills but warns with impute.pooled_mean_role_undeclared.

LiftEstimate, BreakoutEstimate, and DailyLiftEstimate expose read-only reason from persisted coded-cell failure fields: the context reason, or otherwise the failure code. It does not combine other sampling or interval reasons.

Site-volume coverage ends at end. If observation_end is later than end, coverage now ends at end, matching the rows and estimand. This changes context and extension digests; republish affected artifacts. Experiments whose observation end is on or before end’s local day remain byte-identical.

New refusal codes. query.session.warehouse_artifact.publication_cleanup_incomplete (relations could not be dropped before the manifest insert began) and query.session.warehouse_artifact.publication_state_unknown (cleanup was incomplete after it began: the tombstone could not be written, or relation erasure failed after it was) are raised when a publication block exits normally without a manifest and cleanup could not finish. Propagating errors are re-raised unchanged with a note. Both codes include qualified relation names and recovery steps.

Sequential checkpoints and segment labels. A checkpoint belongs to one monitoring process; never relabel or rehash it. Frame segment labels use true/false for Booleans and __null__ for missing values. Older checkpoints still replay, but continuing them with canonical source labels is refused with sequential.continuation.rewrite. Do not restart monitoring and spend alpha again: retain the old checkpoint or register a defensible new protocol. See Sequential inference.

Triggered chains in sequential checkpoints. A checkpoint captured with a declared trigger contains a nested triggered SequentialSnapshot, with its own registration, records, states, and prefix_id. Optional SequentialRegistration.population, SequentialCheckpoint.population, InferenceSpec.triggered_registration, and compiled-plan triggered_registration fields are omitted when unused. The derived registration is not added to the hashed artifact context. Existing assigned record, prefix, and checkpoint identities do not change; older checkpoints, registrations, exports, and artifact contexts replay as before. Older artifacts derive the same registration when opened. A checkpoint without a triggered chain remains assigned-only; backfilling one is refused with sequential.continuation.legacy.

Frame labels and shared schedules. Noncanonical segment labels in frame registrations now use canonical labels instead of producing missing_arm. Implausibly lopsided shared schedules declared as unit-cycle orders are refused before statistics are built, with source.frame.switchback.schedule and reason implausible_realized_split.

Encodings are format-specific. Each format defines its aliases, tuple encoding, collection order, duplicate handling, and runtime-only values. There is no general guarantee that a value is “JSON compatible.”

A digest shows that bytes match the hashed encoding. It does not identify the writer, establish statistical validity, or hide guessable secrets. For artifacts, authenticity depends on the caller-pinned reference and store authorization.

Moments files, JSON, and artifacts are the portable interchange formats. Python pickle is only for trusted objects you produced; it has no cross-release interchange guarantee. Never unpickle untrusted data.

TabularPolicy accepts any hashable context key, but JSON round-trips only string-keyed tables. Other key types are refused at dump time with logged_policy.policy.json_context_key; JSON could otherwise change 1 to "1" and alter the policy. Use model_dump(mode="python") or trusted pickle for typed keys. Built-in TARGET_POLICY_V1 uses integer keys and is Python-only.

from increment.estimators import TabularPolicy
policy = TabularPolicy(
policy_id="p",
version="v1",
probabilities={"web": {"A": 0.5, "B": 0.5}},
default={"A": 1.0},
)
assert TabularPolicy.model_validate_json(policy.model_dump_json()) == policy
typed = TabularPolicy(
policy_id="p", version="v2", probabilities={1: {"A": 1.0}}, default={"A": 1.0}
)
assert TabularPolicy.model_validate(typed.model_dump(mode="python")) == typed
try:
typed.model_dump_json()
except Exception as exc:
assert exc.code == "logged_policy.policy.json_context_key"

See Persisting a TabularPolicy.