Evaluate occurrence policies with named criteria and retained audit evidence - #449
Merged
Merged
Conversation
iskandr
marked this pull request as ready for review
October 1, 2026 17:09
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.
Vaxrank needs to evaluate each peptide occurrence before selecting a representative or vaccine window. Add
evaluate_selection_policywith full retained evidence, explicit occurrence grouping and per-occurrence genotypes, source-local model choices, raw/effective scores, and a separate minimum-score gate. Replay materializes runtime choices without storing callbacks or invoking predictors; representative selection links every alternative without adding RNA support.Add optional named eligibility/score/ranking criteria using explicit DSL references and composition. Audit records distinguish observed pass/fail, unknown evidence, numeric zero, not-applicable and not-evaluated criteria, including scoring skipped after filtering. Schema 2 saves expanded definitions, ordered tie-breaks and unknown handling; existing schema-1 definitions keep their digests and direct-expression callers retain legacy behavior.
The real Vaxrank 3.35.0 consumer fixture covers VCF/BAM-derived evidence plus normalized/LENS/pVACseq tables, frozen score parity, window selection, peptide and mRNA construction, and criterion-specific exclusion reasons through native dataset reload. A changed criterion changes the selected window. Vaxrank adoption/configuration remains its own integration change under openvax/vaxrank#497.
Validation: lint passes; 108 focused policy/context regression cases and 19 real Vaxrank consumer cases pass. Full CI is green on the final commit: Python 3.10–3.12, Isovar minimum/latest, PirlyGenes, coverage, packaging, and documentation. The master CI matrix also passed. The PyPI release gate passed 4,976 tests with zero skips or warnings in 671.38 seconds using one worker. Topiary 5.90.0 is live on PyPI; tag
v5.90.0points to merge commit8333dd382983074d12ca557ddd1b8d788c8d412f. Both PyPI artifact SHA256 hashes match the local release builds.Fixes #444. Fixes #445. Fixes #447.
Additional findings: #448 tracks the existing lossy DSL display representation; policy expansion preserves original lexical grouping rather than relying on display text. openvax/vaxrank#559 tracks the downstream codec's unsupported PeptideConstruct class; this test compares assembled peptide dataclasses directly and exercises native reload of the supported dataset and RNAConstruct objects. No new scientific recipe, protease weighting, or inference is introduced.