Commit 5b90559
Address CI R1 P3 on PR-C: provenance fail-closed + fixture-3 clarification
CI R1 codex review verdict: ✅ no P0/P1. Two P3 findings addressed:
- P3 (Maintainability): the R generator hardcoded
`pretrends_commit = "122731d082"` into the JSON but only verified
`packageVersion("pretrends") >= "0.1.0"`. A future rerun could
silently regenerate goldens from a drifted revision while still
stamping the artifact with the original commit. Fix: replace the
loose version gate with an exact `packageVersion == "0.1.0"` check
plus a `startsWith(packageDescription("pretrends")$RemoteSha,
PRETRENDS_COMMIT)` provenance assertion that fails closed with a
reinstall instruction if the installed revision drifts. Verified
via positive (RemoteSha = `122731d082a5990e274f57fd9af0968e44977e7a`)
and negative (synthetic `deadbeef` prefix) checks.
- P3 (Documentation/Tests): the `anticipation_shifted` fixture's
comment described it as validating anticipation-window filtering,
but the fixture omits the `t=-1` anticipation window and the parity
assertions consume prefiltered `Sigma_22` / weights directly — the
CS/SA-level `_extract_pre_period_params` anticipation filter
(`if t < _pre_cutoff` in `pretrends.py`) is NOT R-parity-locked by
this fixture. Fix: rename the comment / R `cat()` print / JSON
meta.description to "K=4 shifted-grid case", and document the
non-coverage explicitly in the file-header comment with a forward
reference to the existing PR-B MC-based and full-VCV coverage in
`TestPretrendsPropositions` / `TestPretrendsCovarianceSource`,
plus a deferred follow-up for a CS/SA-level
`anticipation=1 + R-parity` test (would need a synthetic
`CallawaySantAnnaResults` with a t=-1 entry that gets filtered
before reaching `_compute_power_nis`). Test class docstring
tolerance-rationale prose flipped "K=4 anticipation fixture" →
"K=4 shifted-grid fixture" to match.
The fixture's JSON key (`anticipation_shifted`) is unchanged to
preserve the test-side reference; only the prose contract is
clarified.
All 4 parity tests still pass; black + ruff clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 50a0882 commit 5b90559
3 files changed
Lines changed: 44 additions & 14 deletions
File tree
- benchmarks
- R
- data
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
48 | 59 | | |
49 | 60 | | |
50 | 61 | | |
| |||
58 | 69 | | |
59 | 70 | | |
60 | 71 | | |
61 | | - | |
62 | | - | |
63 | 72 | | |
64 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
65 | 92 | | |
66 | 93 | | |
67 | 94 | | |
| |||
186 | 213 | | |
187 | 214 | | |
188 | 215 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
193 | 223 | | |
194 | 224 | | |
195 | 225 | | |
| |||
230 | 260 | | |
231 | 261 | | |
232 | 262 | | |
233 | | - | |
| 263 | + | |
234 | 264 | | |
235 | 265 | | |
236 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1120 | 1120 | | |
1121 | 1121 | | |
1122 | 1122 | | |
1123 | | - | |
| 1123 | + | |
1124 | 1124 | | |
1125 | 1125 | | |
1126 | 1126 | | |
| |||
0 commit comments