ADR-017: AnalysisConfig field growth and compat module ownership
Status
Section titled “Status”Accepted — 2026-04-27
Context
Section titled “Context”AnalysisConfig and nested sub-models feed preregistration, config_hash on
analysis artifacts, and compute_model_config_hash / nested hash walks
(ADR-016). Ad-hoc leaf fields risk silent hash drift, duplicated flat-key
routing, and unclear review ownership.
Decision
Section titled “Decision”-
Change control: New top-level leaves on
AnalysisConfig, new nested fields on any sub-model that participate in provenance hashing, or any change to flat TOML key routing /_GROUP_ATTRSmembership requires an ADR update (this document or ADR-016) before merge, plus golden updates intests/unit/test_config_hash.pywhen the digest is intended to move. -
Compat ownership: Legacy flat
[analysis]lifting and_FLAT_TO_GROUP/_GROUP_ATTRSlive insrc/forensics/config/compat_analysis.py.analysis_settings.pyimports from compat; provenance continues to useAnalysisConfigfromanalysis_settings. -
No
HashableFieldannotation for now: A custom Pydantic annotation was evaluated and deferred: it could interact unexpectedly withmodel_dumpand the recursive hash payload builder. Governance above plus compat isolation satisfy maintainability without risking hash stability (correctness over convenience).
Consequences
Section titled “Consequences”- Deprecation (2026-04-29): loading
config.tomlwith legacy flat[analysis]keys (lifted via_lift_flat_analysis_dict) emits a one-time per processWARNINGdirecting operators toward nested tables such as[analysis.pelt]. Removal of the lift path is gated on a future release after the warning window. - Flat-key table edits happen in one module; reviewers watch compat + hash tests.
- Optional fields like
ContentLdaConfigknobs remain grouped there; moving fields across sub-models remains a hash-visible change needing ADR-016 alignment.
References
Section titled “References”- ADR-016 (
016-analysis-config-nesting.md) src/forensics/config/compat_analysis.pysrc/forensics/config/analysis_settings.pysrc/forensics/utils/provenance.py