LibCapabilities (SeqFeatureState, FragmentFeatureState, IsotopeStrategy, DecoyStrategy) is deliberately runtime, so a library that is missing something degrades rather than failing: skip FDR when there are no decoys, skip sequence-dependent scores when sequences are unavailable. Only some scores need sequence features, so the gate is per-score, not per-run.
Today callers read the enums ad hoc and nothing reports what was degraded, so a run that silently skipped FDR looks like a run that computed it.
Two steps, in order
1. Queryable + reported. caps.supports(Feature::X) returning a reason when unavailable, plus one load-time log listing every degradation in force. Centralises the vocabulary without touching scoring.
2. Declared per score block. Each block declares the capabilities it needs; the pipeline skips and reports automatically instead of each call site remembering to check. This is the real goal, but it means teaching the ScoreBlock derive about capabilities — different risk profile, own PR.
Keep it runtime. The point is explicit graceful degradation, and a type-level encoding would turn a degradation decision into a compile error.
Deferred during the target/library modelling discussion.
LibCapabilities(SeqFeatureState,FragmentFeatureState,IsotopeStrategy,DecoyStrategy) is deliberately runtime, so a library that is missing something degrades rather than failing: skip FDR when there are no decoys, skip sequence-dependent scores when sequences are unavailable. Only some scores need sequence features, so the gate is per-score, not per-run.Today callers read the enums ad hoc and nothing reports what was degraded, so a run that silently skipped FDR looks like a run that computed it.
Two steps, in order
1. Queryable + reported.
caps.supports(Feature::X)returning a reason when unavailable, plus one load-time log listing every degradation in force. Centralises the vocabulary without touching scoring.2. Declared per score block. Each block declares the capabilities it needs; the pipeline skips and reports automatically instead of each call site remembering to check. This is the real goal, but it means teaching the
ScoreBlockderive about capabilities — different risk profile, own PR.Keep it runtime. The point is explicit graceful degradation, and a type-level encoding would turn a degradation decision into a compile error.
Deferred during the target/library modelling discussion.