Repository navigation
docs: input contract for estimator data and objects (IC-01 to IC-16) - #925
Conversation
Adds docs/input-contract.md: numbered clauses stating which inputs the estimators guarantee, which they refuse, and which are out of contract. Each clause is marked enforced, partial or intended, and a gap table lists where main falls short, with the probe evidence and its limits. The document is an engineering boundary, not methodology, so it lives beside the other internal docs rather than in the methodology registry. It is excluded from the Sphinx build like its peers. Docs only; no estimator behavior changes. The gaps are tracked as rows in TODO.md (Methodology / correctness), to be closed through one shared input boundary rather than per-estimator guards. The key reference files table gains a row for the contract.
Overall assessment✅ Looks good. The highest severity is P2. Executive summary
Methodology
Code QualityNo findings. PerformanceNo findings. Maintainability
Tech Debt
SecurityNo findings. Documentation/Tests
|
…gression with IC-15 IC-09 applies to fit paths whose input grain is one observation per unit and period, which excludes estimators that aggregate cells. IC-16 excepts the documented 3.x pickle migration. The label-0 regression in TODO.md now keeps 0 reserved, and the uneven-spacing gap notes the narrower check StackedDiD already has.
…e requirement, narrow IC-01 and IC-04 wording
… the registry in IC-14
… of IC-14; track the PT-Post registry wording
…tion The implemented baseline is g - 1 - anticipation in label units; g-1 is the anticipation=0 case the paper derives. The tracking row now covers only the generic missing-baseline error.
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment✅ Looks good. All four prior P2 findings are resolved. One P2 documentation clarification remains. Executive summary
Methodology
The prior cohort-zero finding is resolved. The backlog specifies separate fixtures for rejecting an ambiguous Code QualityNo findings. PerformanceNo findings. MaintainabilityThe prior duplicate-row finding is resolved. The clause and backlog both scope rejection to fits that require one row per unit and calendar period, with explicit exceptions for post indicators and within-cell aggregation. Tech Debt
SecurityNo findings. Documentation/TestsThe prior pickle and spacing findings are resolved. IC-16 preserves documented migrations, and the spacing inventory distinguishes the proposed general advisory from
|
…n-shifted PT-Post baseline
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment✅ Looks good. The prior findings are resolved. One P2 documentation clarification remains. Executive summary
Methodology
Code QualityNo findings. PerformanceNo findings. MaintainabilityNo open findings. IC-09 scopes duplicate-row rejection to fits that require one observation per unit and calendar period, preserving post-indicator and within-cell aggregation paths. Tech Debt
SecurityNo findings. Documentation/Tests
The prior pickle and spacing findings remain resolved. IC-16 preserves documented migrations, and the spacing inventory accounts for Patch applicability, added-line whitespace, clause numbering, backlog table structure, and the Sphinx exclusion passed static checks. The targeted suites could not run because |
…1 magnitude, span and offset
…ding, the band coverage of IC-06 and the CallawaySantAnna non-finite gap
…missing upfront check, with examples
…he missing check and one observed example
…ted cohort-time effect
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment✅ Looks good. The prior findings are resolved. One P2 documentation issue remains. Executive summary
Methodology
Code QualityNo findings. PerformanceNo findings. MaintainabilityNo findings. Tech Debt
SecurityNo findings. Documentation/Tests
The duplicate-row, period-spacing, and documented pickle migration fixes remain in place. The diff requires no changelog fragment. Static checks passed for Markdown tables, clause numbering, the Sphinx exclusion, and changelog conventions. The targeted suites could not run because |
…bel arithmetic IC-10 to IC-14 do not apply to paths that only sort and match calendar labels against caller-named periods, such as the TwoWayFixedEffects event-study mode, which keeps its datetime, Period and string label support. Probe counts for the label gaps now refer to the 7 cohort-based estimators, since the static DiD and TWFE paths do not read the time column.
…ath supports; state the IC-14 probe coverage
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment✅ Looks good. The prior findings are resolved. One P2 documentation issue remains. Executive summary
Methodology
Code QualityNo findings. PerformanceNo findings. MaintainabilityNo findings. Tech Debt
SecurityNo findings. Documentation/Tests
The prior calendar-label finding is resolved. TWFE sorts and matches the supplied labels, and its existing Conley regression test checks that datetime and integer encodings give the same standard errors. Static checks passed for Markdown tables, clause numbering, and the Sphinx exclusion. |
…tion probes covered
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment✅ Looks good. All prior findings are resolved. No P0 or P1 findings remain. Executive summary
Methodology
Code QualityNo findings. PerformanceNo findings. MaintainabilityNo findings. Tech Debt
SecurityNo findings. Documentation/Tests
Static checks passed for clause numbering, Markdown table shapes, the IC-14 evidence qualifiers, and the Sphinx exclusion. |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment✅ Looks good. All prior findings are resolved. No unmitigated P0 or P1 findings remain. Executive summary
Methodology
Code QualityNo findings. PerformanceNo findings. MaintainabilityNo findings. Tech Debt
SecurityNo findings. Documentation/TestsNo findings. |
Summary
docs/input-contract.md: 16 numbered clauses (IC-01 to IC-16) stating which inputs the estimators guarantee correct results for, which they refuse, and which are out of contract. It covers the outcome column (dtypes, non-finite values, unit and level changes, noiseless data), unit identifiers and rows, time and cohort labels (dtype, magnitude and span, date-typed and string labels, spacing, the never-treated marker), and object integrity.TODO.mdunder Methodology / correctness, to be closed through one shared input boundary rather than per-estimator guards.EfficientDiDsection ofdocs/methodology/REGISTRY.md(see below).Methodology references (required if estimator / math changes)
EfficientDiD, PT-Post baseline (documentation only; no code change)g-1under no anticipation); Callaway & Sant'Anna (2021), limited anticipationg-1without qualification; the implementation has usedg - 1 - anticipationin label units, and the added Note states that, withg-1as theanticipation=0case.Validation
tests/test_tracking_files.py,tests/test_docs_ia.pyandtests/test_doc_deps_integrity.pypass locally.Security / privacy
Changelog