Harden: CI, uniform selector contract, property tests, provenance - #2
Open
DanielSprockett wants to merge 1 commit into
Open
DanielSprockett wants to merge 1 commit into
DanielSprockett wants to merge 1 commit into
Conversation
- GitHub Actions CI (.github/workflows/ci.yml): ruff + pytest on push/PR. - Uniform selector contract: RandomSelector now seeds the query's own assembly first like every other selector, so the random baseline is a fair control (same guaranteed anchor; differs only in the remaining k-1). - Shared contract property tests (test_contract.py) parametrized over every registry selector: returns <= k, unique, candidates clear the threshold, query included first, unknown query raises, fewer-than-k warns. - Run provenance: RefRoverPipeline writes params.json (selector, k, threshold, binners, threads, sample count, version, timestamp) before running, so config survives a mid-pipeline failure. - Repo-wide ruff cleanup so CI is green: removed dead `sig_list` in sketch.py, unused imports, lambda assignments, and a multi-statement line in tests; excluded data/ research scripts from lint via pyproject. 134 tests pass (was 102): +30 contract tests, +2 provenance, +random change.
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.
Stacked on #1 (base is
containment-selector-integration, notmain). Review/merge after #1.Infrastructure and correctness hardening:
.github/workflows/ci.yml): ruff + pytest on push and PR.RandomSelectornow seeds the query's own assembly first like every other selector — making the random baseline a fair control (every selector gets the same guaranteed-mappable anchor and differs only in the remaining k-1). Resolves the inconsistency flagged in the code review (§1.3).test_contract.py), parametrized over every registry selector: returns ≤ k, unique results, all candidates clear the threshold, query included first, unknown query raises, fewer-than-k warns. A new selector that breaks the contract now fails here.RefRoverPipelinewritesparams.json(selector, k, threshold, binners, threads, sample count, version, UTC timestamp) before running, so a run's config survives a mid-pipeline failure.sig_listinsketch.py, unused imports, lambda assignments; excludeddata/research scripts from lint.134 tests pass (was 102).