Locate ownership and preserve model contracts

Use this map to place a change and select its verification. It describes source commit 7cb7f20b357f23ee1683670953c7dd0092fa2084, reviewed on 1 October 2026. The public Python model, YAML builder and retained runner have distinct lifecycle and evidence responsibilities.

Construction and execution path

LayerResponsibilitySource and relevant tests
Public exports and model facadeStable import names, validated constructors, model lifecycle and analysis propertiessrc/ammm/mmm/__init__.py:10, src/ammm/mmm/mmm.py:377; tests/mmm/test_persistence_contract.py
Data and graphCanonical labelled inputs, scaling, parameter graph, contributions and likelihoodsrc/ammm/mmm/data_conversion.py:189, src/ammm/mmm/_mmm_graph.py:182; tests/mmm/test_fixed_effects.py, tests/mmm/test_correlated_random_effects.py
Calibration and persistenceCopied measurement inputs, graph attachment, saved-state validation and replaysrc/ammm/mmm/_mmm_calibration.py:102, src/ammm/mmm/persistence.py:62; tests/mmm/test_persistence_sampling.py
Summary, incrementality and optimisationTables/intervals, defined spend contrasts and constrained posterior utilitysrc/ammm/mmm/summary/factory.py:240, src/ammm/mmm/incrementality.py:271, src/ammm/mmm/budget_optimizer.py:704; tests/mmm/test_counterfactual.py
Trusted YAML constructionTyped blocks, recursive object resolution, effects, graph, original-scale variables, calibration and optional idata attachmentsrc/ammm/mmm/builders/yaml.py:73; tests/mmm/builders/test_yaml.py, tests/mmm/builders/test_schema.py
CLIInput selection, override precedence, verbosity and exit codesrunme.py:193, runme.py:313, runme.py:387; tests/test_pipeline_reporting.py
Retained runnerInvocation context, stage order, immutable directory reservation, manifests and failure retentionsrc/ammm/pipeline/runner.py:68, src/ammm/pipeline/runner.py:156; tests/test_pipeline_stage_edges.py
Evidence and advisory workDiagnostic policy, prior alternatives, anonymised evidence, deterministic floor and explicit proposal adoptionsrc/ammm/mmm/diagnostic_gates.py:507, src/ammm/pipeline/stages/ai_advisor.py:88; tests/test_prior_sensitivity.py, tests/test_pipeline_ai_advisor.py

The builder constructs a graph; the runner orchestrates fitting and retained outputs. Direct-builder data paths are process-relative whereas runner input paths are YAML-relative. A dry run builds the main graph without exercising every stage (src/ammm/mmm/builders/yaml.py:137, src/ammm/pipeline/runner.py:356, runme.py:163). Keep those boundaries visible when adding a new entry point.

Stage and artefact contract

PipelineStageSpec identifies the stage name, label and handler; PipelineContext carries resolved invocation state. A handler returns an artefact mapping or None for a skipped optional stage. The runner owns stage transitions, records exceptions, marks remaining pending stages not_reached and writes the manifest; handlers should not invent independent success semantics (src/ammm/pipeline/runner.py:68, src/ammm/pipeline/runner.py:295).

When adding or changing a stage, update its directory mapping, stage order, configuration validation, declared outputs and user-facing schemas together. Exercise enabled, disabled, failed and not-reached cases, and verify paths from the retained run root. Existing output directories are reserved exclusively; a repair must not merge a new invocation into an old run (src/ammm/pipeline/artifacts.py:103, src/ammm/pipeline/manifest.py:27). See retained output contracts.

A diagnostic failure is an evidence result and currently does not raise merely to stop orchestration. A provider recommendation cannot weaken the deterministic floor or silently apply a new configuration. Keep process completion, model-risk acceptance and configuration approval as separate records (src/ammm/pipeline/stages/core.py:684, src/ammm/pipeline/stages/ai_advisor.py:181, src/ammm/ai/approval.py:107).

Choose verification from the changed contract

ChangeMinimum relevant verification
Public argument, data shape or YAML blockValid/invalid inputs, default/override behaviour and matching example
Graph, transformation or likelihoodFixed-input numerical/gradient or distribution checks appropriate to the claim, plus estimator operation boundaries
Calibration or saved stateBuild/calibrate/fit lifecycle, copied inputs, save/load replay and prediction identity on labelled data
Counterfactual or optimisationUnits, coordinate order, history/carryover, explicit objective and independent feasibility checks
Runner output or advisory stageManifest transitions, optional outputs, failure retention, privacy and local-only execution
Documentation onlySource agreement, local links, examples affected by the change and navigation

Use local checks and typing/performance guidance. A passing software test or synthetic example does not replace an estimator recovery study, causal design review or resource qualification. State the executed scope and retain the source/configuration identity with results.

Raw documentation ownership

docs/source/ is the maintained raw-Markdown documentation. The empty docs-site/ directory has no documentation build, publishing role or runtime contract in this checkout; do not place maintained content there. It can be removed independently without introducing a site generator. Keep the main entry point within two links of each page, and link shared contracts instead of copying defaults into multiple workflows.