feat(provenance): suite/dataset content hashing for reproducibility (#11)#19
Merged
Conversation
) A deterministic content hash of an EvalSuite (cases + name/agent/defaults), so a run records EXACTLY which suite version produced it (EU AI Act Art.10 reproducibility) and CI can detect dataset drift between approved runs. - provenance.py: suite_content_hash(suite) -> "sha256:..." over sorted-key canonical JSON (reproducible; order-sensitive over cases). - runner.py: run_suite stamps config["suite_hash"]; flows into the run and, via run.config, into the EU AI Act evidence module (#8). - commands/suite-hash: `agenteval suite-hash SUITE_FILE` prints the hash. Tests: test_provenance.py (5) + runner suite 32/32, mypy + ruff clean (venv); verified suite_hash lands in run.config. Closes #11. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019tXZpN29akdmG8AEjgSZwk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11.
What: a deterministic content hash of an
EvalSuite(its cases + name/agent/defaults), so a run records exactly which suite version produced it (EU AI Act Art.10 reproducibility) and CI can detect dataset drift between approved runs.How:
provenance.py—suite_content_hash(suite) -> "sha256:…"over sorted-key canonical JSON (reproducible across machines; order-sensitive over cases).runner.py—run_suitestampsconfig["suite_hash"]; it flows into the run and, viarun.config, into the EU AI Act evidence module (EU AI Act testing-evidence MODULE (Art.11/Annex IV slice, hash-chained + identity-bound) — not "the conformity pack" #8) automatically — no EU AI Act testing-evidence MODULE (Art.11/Annex IV slice, hash-chained + identity-bound) — not "the conformity pack" #8 change.commands/suite-hash—agenteval suite-hash SUITE_FILEprints the hash (pin in CI).Tests:
test_provenance.py(sha256-prefixed + reproducible; changes on case edit / reorder / name / agent / defaults; command registered). pytest 5/5 + runner suite 32/32, mypy + ruff clean; verifiedsuite_hashlands inrun.config.Additive; the only behavior change is an extra
suite_hashkey inrun.config.