perStableIdTier property

Map<String, EvidenceTier>? perStableIdTier
final

Per-family evidence-tier overrides (since v0.18.3). Lets a detector honestly declare a mixed-tier ledger: e.g. NetworkMonitor covers 5 stable IDs (slow_request, large_response, request_frequency, http_error_spike, high_frequency_same_path) of which only slow_request.warning is backed by on-device captures. Without this field the metadata model forced an all-or-nothing choice: either over-claim by tagging the whole detector runtimeVerified, or under-claim by holding the whole detector at reproducerOnly.

Semantics:

  • The detector's tier field is the base (minimum) tier — every covered family is at least at tier.
  • Each entry in perStableIdTier raises a specific family above the base. Effective per-family tier = perStableIdTier[id] ?? tier.
  • The audit gate's tier-specific field requirements (profileCapturePaths, bracketThreshold, bracketStableId, etc.) trigger off the effective max tier across all declared families, so a detector that raises one family to runtimeVerified still has to provide its capture triad.

Audit invariants enforced when non-null:

  • Every key must be present in coveredStableIds (parametric family declarations are not eligible for per-family raises since they describe a literal-prefix family, not a single stableId).
  • Every value must be >= tier — entries are raises only, never downgrades. A downgrade would conflict with the base-as-minimum semantics and is rejected at audit time.
  • When bracket fields are set, the bracketStableId must have an effective tier of runtimeVerified or stronger; otherwise the bracket evidence is unmoored from any family it claims to validate.
  • The map must be non-empty when non-null. An empty map is functionally a no-op and rejected as misconfiguration (signals an in-progress edit or copy-paste error).

Convention for single-family detectors: a detector that emits exactly one family does NOT need perStableIdTier. Set tier to the family's true evidence level directly. The pattern exists for detectors with multiple families where a single base tier would over- or under-claim. Single-family detectors using base-tier raises (e.g. tier: EvidenceTier.runtimeVerified covering one stableId) are correct and audit-clean — no perStableIdTier indirection required.

Implementation

final Map<String, EvidenceTier>? perStableIdTier;