Skip to content

Pin the index discover() loads itself to the 6.5.0 floor - #199

Merged
MaxGhenis merged 1 commit into
mainfrom
w6/discover-tests-floor
Oct 21, 2026
Merged

MaxGhenis merged 1 commit into
mainfrom
w6/discover-tests-floor

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Pin the index discover() loads itself to the 6.5.0 floor

The first automated results PR, #195 (policyengine.py 6.7.5), failed CI: 55 tests failed. 25 of them are in tests/test_uk_replay_discover.py, and this PR fixes them. They had nothing to do with 6.7.5's results: the floor cases were written when 6.5.0 was the newest certified variant.

#193 pinned the index the tests pass to candidates() (floor_document()). But discover.discover() reads the committed index itself, through variants.load_document() (pipeline/uk_replay_discover.py:535). Once 6.7.5 is in the index, the floor moves to 6.7.5, and the cases expecting 6.5.1, 6.5.2 or 6.5.4 find nothing.

Change

  • An autouse fixture hands discover() the same floor index, so the index as it stood at 6.5.0 reaches every case. A test that needs another index still patches load_document itself; test_discovery_without_a_certified_baseline_requests_nothing does this, and it passes.
  • floor_document() keeps a reference to the real loader, so the patch can't recurse.
  • A new test pins that the patched index ends at 6.5.0, and that it is a prefix of the committed index.

Verified

The other 30 failures on #195 are in tests/test_uk_replay_results_pr.py, which also treats 6.5.0 as the newest certified variant. #196 is rewriting that file now, so that fix follows in its own PR after #196 merges; two sessions never edit the file at once. #195 is then rebuilt by re-dispatching the results workflow on the new main.

axiom: n/a: test fixtures only; no policy encoding.

🤖 Generated with Claude Code

The discovery floor cases were written when 6.5.0 was the newest
certified variant. #193 pinned the index they pass to candidates(), but
discover() reads the committed index through variants.load_document(), so
25 cases failed on the first automated results PR (#195, 6.7.5): with
6.7.5 certified, the floor moved and 6.5.1 and 6.5.2 were no longer
discoverable. An autouse fixture now hands discover() the same floor
index; a test that needs another index still patches it itself.

Checked against #195's index (6.7.5 appended): the old file fails 25
tests, this one passes all 127.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
policyengine-scorecard Ready Ready Preview Oct 19, 2026 3:38pm UTC

Request Review

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Merged on the gates: CI green at the reviewed head; MERGEABLE; no changes requested. Independent review: an Opus 5.5 reviewer, standing in for the GPT-6.1 Sol run, which is queued behind the closed Codex lanes. It found all four stack PRs (#199, #196, #201, #202) MERGE-SAFE, and the full suite passed with #206 on top (2313 passed). Review: ~/reviews/budget-coordinator/scorecard-results-stack/review-out-opus.md. The Sol run stays queued as a second opinion.

This branch was successfully deployed

1 active deployment
Preview — 698a24ab Deployed Oct 19, 2026 by vercel[bot]
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