Skip to content

CI: fail PRs that edit or delete a published model run - #29

Open
nflechner wants to merge 1 commit into
forecastingresearch:mainfrom
nflechner:main
Open

nflechner wants to merge 1 commit into
forecastingresearch:mainfrom
nflechner:main

Conversation

@nflechner

Copy link
Copy Markdown
Contributor

model_run_key is the immutable benchmark identity of one model plus one option set; benchmark files and the warehouse's dim_model_run key on it. Add a PR check that dumps (model_run_key, model_key, options) for every run on the base branch and on the PR head and fails when a base run is missing or has a different model_key or options. Adding runs stays allowed; slug, release dates, Models.dev metadata and active are not compared.

scripts/check_model_run_immutability.py has two subcommands: dump (NDJSON of the immutable fields, sorted, with a fingerprint) and check (compare two dumps, print a report, exit 1 on violation). The workflow installs the base and PR versions of the package into separate venvs and runs the PR's copy of the script by file path against each, so the check does not depend on the base branch already carrying the script.

Document the freeze rule in AGENTS.md.

Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01XSAqY76fnCZj5zFnM7gHFL

model_run_key is the immutable benchmark identity of one model plus one
option set; benchmark files and the warehouse's dim_model_run key on it.
Add a PR check that dumps (model_run_key, model_key, options) for every
run on the base branch and on the PR head and fails when a base run is
missing or has a different model_key or options. Adding runs stays
allowed; slug, release dates, Models.dev metadata and `active` are not
compared.

scripts/check_model_run_immutability.py has two subcommands: `dump`
(NDJSON of the immutable fields, sorted, with a fingerprint) and `check`
(compare two dumps, print a report, exit 1 on violation). The workflow
installs the base and PR versions of the package into separate venvs and
runs the PR's copy of the script by file path against each, so the check
does not depend on the base branch already carrying the script.

Document the freeze rule in AGENTS.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XSAqY76fnCZj5zFnM7gHFL

Co-authored-by: nflechner <60731786+nflechner@users.noreply.github.com>
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.

2 participants