Skip to content

Results say what their run was against - #83

Merged
ptescher merged 2 commits into
mainfrom
provenance
Nov 12, 2026
Merged

ptescher merged 2 commits into
mainfrom
provenance

Conversation

@ptescher

Copy link
Copy Markdown
Owner

Closes #79.

A test's fingerprint says the test hasn't changed, and nothing about the program, so a pass saved for one build could be read as evidence about the next.

What changes

  • Provenance: an application revision, a data mode and a fixture name. Each is given by the caller or is unknown. Nothing is collected from the environment.
  • Saving it: RunOptions::provenance, or expectation-run --app-revision REV --data-mode MODE --fixture NAME. The results file gets a provenance line per part after the run line. Older files have none and still load, as unknown. Run ids, timestamps, fingerprints and stale handling are untouched.
  • Merged reports keep each result's own run, so a manual of several runs shows per-result origins. Each test's page (HTML and Markdown) says what its result was run against.
  • Expected provenance: Acceptance::with_expected, or expectation docs --expect-app-revision REV --expect-data-mode MODE --expect-fixture NAME. Each test page then says matching, something else, or unknown, and the test report's first page counts them. No verdict changes, and nothing is hidden.
  • expectation-run --docs writes its manual for what it was run against.

Tests

  • crates/harness/tests/provenance.rs: save/load round trip, partial and absent provenance, legacy files, an unknown future part, a manual merged from two builds, and the matching / unknown / nothing-expected pages.
  • crates/remote/tests/provenance.rs: the real expectation-run and expectation docs binaries with the new flags.
  • cargo test --workspace and cargo clippy --workspace --all-targets -- -D warnings pass locally.

Not in this PR: merging still picks a result by status rank, not by whether it matches the expected provenance.

🤖 Generated with Claude Code

ptescher and others added 2 commits November 12, 2026 07:44
A test's fingerprint says the test hasn't changed, and nothing about the
program, so a pass saved for one build read as evidence about the next.

- Provenance: an application revision, a data mode and a fixture name, each
  given by the caller or unknown. Nothing is collected from the environment.
- RunOptions::provenance and expectation-run --app-revision, --data-mode and
  --fixture keep it with the run, as provenance lines after the run's line in
  the results. Older files have none and still load, as unknown.
- A merged report keeps each result's own run, and each test's page says what
  its result was run against.
- Acceptance::with_expected and expectation docs --expect-app-revision,
  --expect-data-mode and --expect-fixture say what the manual is for: each
  page then says matching, something else, or unknown, and the test report
  counts them. No verdict changes because of it.

Closes #79

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@ptescher
ptescher merged commit c0e67bc into main Nov 12, 2026
3 checks passed
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.

Evidence: persist application revision and fixture provenance with results

1 participant