Skip to content

Harden: CI, uniform selector contract, property tests, provenance - #2

Open
DanielSprockett wants to merge 1 commit into
containment-selector-integrationfrom
pipeline-hardening
Open

DanielSprockett wants to merge 1 commit into
containment-selector-integrationfrom
pipeline-hardening

Conversation

@DanielSprockett

Copy link
Copy Markdown
Contributor

Stacked on #1 (base is containment-selector-integration, not main). Review/merge after #1.

Infrastructure and correctness hardening:

  • CI (.github/workflows/ci.yml): ruff + pytest on push and PR.
  • Uniform selector contract: RandomSelector now 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).
  • Shared contract property tests (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.
  • Run provenance: RefRoverPipeline writes params.json (selector, k, threshold, binners, threads, sample count, version, UTC timestamp) before running, so a run's 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; excluded data/ research scripts from lint.

134 tests pass (was 102).

- 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.
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