Skip to content

feat(mlb): provenance sidecars for new outputs - #7

Merged
tdub29 merged 2 commits into
mainfrom
mlb-repro-audit
Oct 21, 2026
Merged

tdub29 merged 2 commits into
mainfrom
mlb-repro-audit

Conversation

@tdub29

@tdub29 tdub29 commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Adds research/r/mlb/provenance.R, the recipe record the 2026-10 review's reproducibility contract asks for (item 3).

  • write_provenance() writes <output>.provenance.json: git commit and dirty files, R and package versions, platform, command, named env vars, sha256 of inputs and outputs.
  • check_provenance() stops when a named env var or input hash differs from the run that built the output.

Frozen scripts are not touched: matchup_build.R, matchup_model.R and the forward scorer stay as scored, and they are in the review's hash snapshot. New experiments source this file.

Verified: Rscript research/r/mlb/provenance.R self-check passes (round trip, env change caught, input change caught). CI runs Python and dbt parse only; this file adds no dependency beyond jsonlite and openssl, both already used.

write_provenance() records git commit and dirty files, R and package
versions, platform, command, named env vars and sha256 of inputs and
outputs next to each output; check_provenance() refuses a cached artifact
built under a different recipe. Frozen scripts are untouched; new
experiments call it. Rscript research/r/mlb/provenance.R runs a self-check.
@tdub29
tdub29 merged commit 05c43b4 into main Oct 21, 2026
3 checks passed
@tdub29
tdub29 deleted the mlb-repro-audit branch October 21, 2026 15:50
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