Skip to content

Reject derived evidence built from an older headline result - #517

Merged
godofecht merged 1 commit into
mainfrom
fix/493-evidence-drift
Nov 20, 2026
Merged

godofecht merged 1 commit into
mainfrom
fix/493-evidence-drift

Conversation

@godofecht

Copy link
Copy Markdown
Owner

Part of #493. Part of #478.

Cause

The architecture-map job in remaining-issues.yml builds the roadmap, hotspot audit and architecture map from the headline_result_v2.json committed on main. The freeze-results job then promotes the new canonical result over it. So every freeze commit pairs a new headline result with derived files built from the previous one.

Reproduced on main at f1ed528: python benchmarks/rank_optimization_opportunities.py && python benchmarks/architecture_performance_report.py changes 22 of 23 flow_speedup values in the architecture map (LogisticRegression iris 20.14 committed, 18.33 in the result) and the roadmap.

Change

  • benchmarks/evidence_provenance.py: the roadmap, hotspot audit, architecture map and whole-estimator file now carry provenance with the sha256 of the exact headline_result_v2.json bytes, its environment_id, and the commit the generator ran at.
  • benchmarks/check_evidence_drift.py (stdlib only) fails on: a stale digest or environment id; architecture map rows or substrate means that differ from values recomputed from the result; a rendered map table that differs from the JSON; headline rows embedded in whole_estimator_experiments.json that differ from the result; a disparity report from another environment; a docs/*.json Pages copy that differs from its source.
  • benchmarks/refresh_derived_evidence.py: one command that rebuilds those artifacts in a staging directory, moves them into place together, then runs the check.
  • Workflow lines only, in existing steps: flow.yml validate step runs the test and the check; remaining-issues.yml promote step runs the refresh right after cp, which removes the cause; pages.yml publish step runs the check before publishing. No new workflow.
  • docs/architecture.html and docs/benchmarks.html show environment, short digest and commit.
  • Generated files in this PR were rebuilt with the refresh command at f1ed528 and will be regenerated by the next freeze.

Not covered

  • disparity_history.json snapshots are appended per freeze and are not recomputed by the check. Only the disparity report environment id is compared.
  • source_commit is recorded but not compared. The canonical result does not record its own commit.
  • README prose is still handled by validate_published_claims.py.

Tests

Before, on main: python benchmarks/check_evidence_drift.py exits 1 with 29 findings (no provenance, 22 stale speedups, stale embedded rows).
After: python benchmarks/check_evidence_drift.py exits 0.
python benchmarks/test_check_evidence_drift.py exits 0. It refreshes a scratch copy, then requires a rejection for each of 8 mutations and requires a refresh to repair a changed result.
python tools/run_all.py (pinned Flow 88aac509, macOS, FLOW_OPT_LEVEL=0): passed 119/119.

Every artifact joined against headline_result_v2.json now records the sha256
of the result it was built from and that result's environment_id.
check_evidence_drift.py fails when a derived artifact disagrees with the
committed result: stale digest or environment, recomputed architecture map
rows and substrate means, the rendered map table, the headline rows embedded
in whole_estimator_experiments.json, the disparity report environment, and
Pages copies that differ from their source.

refresh_derived_evidence.py rebuilds the roadmap, hotspot audit, architecture
map and embedded rows together and stages them before moving them into place.
The freeze job runs it right after the canonical result is promoted, which was
the cause of the drift: the architecture job joined against the previous
freeze's result. Pages shows the environment, digest and commit.
@godofecht
godofecht merged commit 35a49cf into main Nov 20, 2026
11 checks passed
@godofecht
godofecht deleted the fix/493-evidence-drift branch November 20, 2026 00:57
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