Skip to content

migration: re-pin #1048 baseline candidate to 27828001 (QA campaign BLOCKED) - #1197

Open
daimon-pymclabs wants to merge 2 commits into
pymc6_and_pymcmarketing1_migrationfrom
migration/1048-repin-baseline-143e823
Open

daimon-pymclabs wants to merge 2 commits into
pymc6_and_pymcmarketing1_migrationfrom
migration/1048-repin-baseline-143e823

Conversation

@daimon-pymclabs

@daimon-pymclabs daimon-pymclabs commented Sep 24, 2026 •

Copy link
Copy Markdown

Summary

Headline result: BLOCKED, not a pass

No v2 evidence exists for either pin. This must not be read as "no regression detected" — no comparison ran.

Root cause (pre-existing in the harness, not introduced by either re-pin in this PR):

_capture_bundle() in scripts/migration_baseline/harness.py does:

bundle = getattr(experiment, "result", None)
return experiment if bundle is None else bundle

At the candidate pin (post-#1175 lazy configure()->fit() lifecycle), BaseExperiment.result is a real property returning a bundle with scenario_counterfactual.prediction. At the reference pin (79c0a870, pre-#1175 eager lifecycle), BaseExperiment has no .result property, so _capture_bundle falls back to the raw experiment — which stores the counterfactual as self.x_pred_counterfactual directly, with no scenario_counterfactual alias. Result:

AttributeError: 'DifferenceInDifferences' object has no attribute 'scenario_counterfactual'. Did you mean: 'x_pred_counterfactual'?
  File ".../PYMC5_ROOT/causalpy/experiments/base.py", line 147, in __getattr__
  File ".../MIGRATION_ROOT/scripts/migration_baseline/harness.py", line 1192, in _capture_difference_in_differences
    bundle.scenario_counterfactual.prediction,

git log on harness.py shows the capture path was written against the new bundle shape in 232b8b37 ("Migrate test suite to the lazy lifecycle API"). The harness's own continuous-verification test only ever runs against whatever CausalPy is installed in its own checkout (always post-#1175), so this gap against the actual pinned pre-#1175 reference commit was never caught. SyntheticControl capture uses the same bundle assumption (bundle.impact_post, bundle.predictions_pre, bundle.predictions_post) and would fail identically once DiD capture is fixed past this point.

Environment (for the record — nothing to compare against yet):

reference (PYMC5_ROOT) candidate (PYMC6_ROOT, first pin attempted)
commit 79c0a87072fd4653bfaed1eb085f965594c7f03a 143e823ad1167da59686d51a11f8e6d97b1d0361
pymc / pytensor / arviz 5.28.5 / 2.38.2 / 0.23.4 6.3.1 / 3.3.2 / 1.3.0
numpy / pandas / xarray 2.5.3 / 3.0.6 / 2026.7.0 (shared) same
python 3.14.7 conda-forge (shared) same

Harness checkout for the capture attempt: 7ffc55cf (superseded by this PR's current head, 2782800194ee6bf49c4ab14d84f5ec7ec66b7f34, after the second re-pin).

What's needed before #1048's QA gate can pass

_capture_difference_in_differences and _capture_synthetic_control in scripts/migration_baseline/harness.py need a reference-stack (pre-#1175 eager API) adapter branch so both stacks produce the same mu-shaped series regardless of which lifecycle API the pinned commit exposes. That's a harness change with real statistical surface area (it has to reproduce the exact same conditional-mean values the eager API produced) and needs independent review. It was not attempted in this PR; this PR only carries the two re-pins plus the honest record of why capture is currently blocked.

Test plan

  • Re-pin consistency: test_pinned_revisions_are_documented_consistently, test_superseded_pin_is_recorded_as_history_only, test_pinned_revisions_are_distinct_full_shas pass by inspection (documented pin, README, REPORT_TEMPLATE agree; verified by replaying the exact regexes those tests use against the final tree).
  • v2 capture + compare campaign: not completed — blocked by the harness bug described above. No 1048-baseline-comparison.json / 1048-baseline-report.md were produced for either pin.

Full traceback and root-cause writeup are also posted as a comment on #1048 (gist upload was attempted but the available GitHub token is fine-grained and cannot create gists — evidence is inline in the issue comment instead).

Closes/updates #1048 (QA gate still open — see issue comment).

🤖 Generated with Claude Code

@cursor

cursor Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Harness pin and docs only; no runtime or statistical logic changes in the library.

Overview
Re-pins the #1048 PyMC 5→6 migration baseline harness so the PyMC 6 candidate is 2782800194ee6bf49c4ab14d84f5ec7ec66b7f34 instead of c83194a38373b815a90582e7969e995c4db52da2. The PyMC 5 reference (79c0a870…) is unchanged.

The same SHA is updated in scripts/migration_baseline/harness.py (PYMC6_COMMIT), coordinator docs in README.md (PYMC6_ROOT / candidate attribution), and REPORT_TEMPLATE.md. The README re-pinning section is expanded: it now records five historical moves (including 143e823… and the latest bump for #1195 docstring fixes and #1196’s uv/CI-only change).

This is harness and documentation only under scripts/migration_baseline/; it does not change causalpy/ sampling behavior. Any prior v2 captures at the old pin are invalid and must be re-run against the new commit.

Reviewed by Cursor Bugbot for commit c3e88aa. Bugbot is set up for automated code reviews on this repo. Configure here.

root and others added 2 commits September 24, 2026 07:45
`PYMC6_COMMIT` moves from `c83194a38373b815a90582e7969e995c4db52da2` to
`143e823ad1167da59686d51a11f8e6d97b1d0361`. The previous pin predates
further behavioral change on the integration branch: #1175 replaced the
eager constructor with a lazy configure() -> optional prior checks ->
fit() experiment lifecycle, the mypy-zero cleanup programme (#1145,
`causalpy/`, the docs/notebook main-port PRs #1185-#1190 landed, and
open pull request left against the integration branch, so this head is
the tree actually proposed for `main` and the evidence should describe
it.

`PYMC5_COMMIT` is unchanged. This is harness, documentation and tests
only, so it cannot change a sampled posterior and does not make its
own pin stale -- the harness runs from its own checkout, whose `HEAD`
intentionally differs from the sampled candidate. Artifacts recorded
at any earlier pin are rejected by `compare`, so the fresh batch
cannot be contaminated.

Validated the documented-quote-site consistency invariants that
`test_pinned_revisions_are_documented_consistently` and
`test_superseded_pin_is_recorded_as_history_only` check (harness.py,
README.md and REPORT_TEMPLATE.md agree on the new pin, and the
superseded pin is recorded as history only) by loading harness.py
standalone and re-running their assertions directly, since the full
CausalPy dependency stack (pymc/numpy) is not available in this
sandbox; full pytest run deferred to CI.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`PYMC6_COMMIT` moves from `143e823ad1167da59686d51a11f8e6d97b1d0361` to
`2782800194ee6bf49c4ab14d84f5ec7ec66b7f34`. The previous pin predates
further merges to the integration branch: #1195 fixed stale
`post_impact`/`att_event_time` prose in docstrings and error messages left
over from #1175 (`causalpy/reporting.py`,
`causalpy/experiments/synthetic_difference_in_differences.py`) and updated
the `pymc-extras` install hint in `causalpy/pymc_models.py`, and #1196
adopted `uv` as the default dev environment for CI. Both are text-only
changes under `causalpy/` with no numerical effect, but the harness's own
policy is to move the pin on any `causalpy/` change rather than judge
materiality itself.

`PYMC5_COMMIT` is unchanged. This is harness, documentation and tests only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@daimon-pymclabs
daimon-pymclabs force-pushed the migration/1048-repin-baseline-143e823 branch from 7ffc55c to c3e88aa Compare September 24, 2026 07:46
@daimon-pymclabs daimon-pymclabs changed the title migration: re-pin #1048 baseline candidate to 143e823 (QA campaign BLOCKED) migration: re-pin #1048 baseline candidate to 27828001 (QA campaign BLOCKED) Sep 24, 2026
@read-the-docs-community

read-the-docs-community Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 causalpy | 🛠️ Build #34733395 | 📁 Comparing c3e88aa against latest (654313d)

  🔍 Preview build  

395 files changed · + 125 added · ± 250 modified · - 20 deleted

+ Added

± Modified

- Deleted

@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.25%. Comparing base (e347d17) to head (c3e88aa).
⚠️ Report is 5 commits behind head on pymc6_and_pymcmarketing1_migration.

Additional details and impacted files
@@                         Coverage Diff                         @@
##           pymc6_and_pymcmarketing1_migration    #1197   +/-   ##
===================================================================
  Coverage                               97.25%   97.25%           
===================================================================
  Files                                     129      129           
  Lines                                   23688    23688           
  Branches                                 1328     1328           
===================================================================
  Hits                                    23038    23038           
  Misses                                    443      443           
  Partials                                  207      207           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant