ComponentMetadata class

Metadata describing how a non-detector component's reliability claim was validated.

Sleuth's reliability ledger covers two populations:

  1. Detectors (23 shipped) — each carries a DetectorMetadata and is walked by detector_metadata_audit_test.dart via SleuthController.detectorsForAudit.
  2. Non-detector components — helpers, heuristic registries, const rule lists, and lifecycle machinery that make per-test threshold claims without being detectors themselves (e.g. IssueRanker, CausalGraphRule, VM reconnect ladder, _frameworkWidgetDenyList). These cannot be walked through a controller; they publish ComponentMetadata via ValidatedComponentRegistry and are walked by component_metadata_audit_test.dart.

The two frameworks are intentionally parallel in shape so contributors can transfer intuition. The only deliberate divergence is componentName — detectors are named by their runtimeType; components are const or utility classes with no uniform naming source.

Prefer constructing instances as const so components can expose them from a static const field and register once at program start without per-scan allocation.

Annotations
  • @experimental

Constructors

ComponentMetadata({required String componentName, required EvidenceTier tier, required String rationale, String? citationUrl, String? reproducerPath, List<String>? profileCapturePaths, num? bracketThreshold, String? bracketUnit, Set<String>? coveredClaimIds})
const

Properties

bracketThreshold → num?
Numeric threshold the three captures bracket, in bracketUnit. Parallels DetectorMetadata.bracketThreshold; same audit-gate semantics. Required when tier is EvidenceTier.runtimeVerified or stronger.
final
bracketUnit → String?
Unit label for bracketThreshold (e.g. 'ms', 'bytes', 'frames'). Required alongside bracketThreshold.
final
citationUrl → String?
For EvidenceTier.externallyCited, a URL pointing at the source of truth (Flutter SDK constant, dart-lang issue, published benchmark). Null for tiers below EvidenceTier.externallyCited.
final
componentName → String
Canonical human-readable name for the component. Used as the registry dedupe key — registering two ComponentMetadata instances with the same componentName is idempotent (first write wins).
final
coveredClaimIds → Set<String>?
The set of per-claim identifiers this tier claim covers, for components whose evidence may cover only a subset of the claims they make. Parallels DetectorMetadata.coveredStableIds.
final
hashCode → int
The hash code for this object.
no setteroverride
profileCapturePaths → List<String>?
For EvidenceTier.runtimeVerified and above, repo-relative paths to the checked-in profile-mode captures that back the claim.
final
rationale → String
Human-readable summary of what was validated and how. One or two sentences — full methodology lives in the validation-sprint spec.
final
reproducerPath → String?
For EvidenceTier.reproducerOnly and above, a repo-relative path to the test or demo that exercises the component deterministically.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tier → EvidenceTier
Strongest evidence tier that applies to this component's numbers or heuristic.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override