BoundedEvidence class
ONE piece of gathered evidence, BOUNDED: a stable identity, where it came from, the clipped snippet, the digest of the COMPLETE text, and how complete the record is.
The digest is over the whole text, so a truncated snippet still identifies the artifact it was cut from; id carries that digest, which is what makes an evidence id stable across rounds for unchanged evidence and different the moment the underlying text moves.
Constructors
- BoundedEvidence({required String id, required String source, required String snippet, required String digest, required EvidenceState state, String error = ''})
-
Creates a record. Prefer boundDiscoveryEvidence, which derives the
digest, the id and the truncation state from the complete text.
const
Properties
- digest → String
-
The SHA-256 of the COMPLETE text (never of the clipped snippet).
final
- error → String
-
The failure detail — REQUIRED (non-empty) for EvidenceState.failed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The canonical identity —
<kind>:<subject>@sha256:<digest>.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- snippet → String
-
The evidence text — clipped to kMaxDiscoverySnippetChars for foreign
evidence, carried WHOLE for the work bead's own fields.
final
- source → String
-
WHERE the evidence came from (a file path, a bead field, a command).
final
- state → EvidenceState
-
How complete this record is.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
The wire shape (hand-rolled — this pack carries no
json_serializable). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Object? json) → BoundedEvidence? - Decodes one record STRICTLY: a non-map, an empty id/digest, an unknown state, or a EvidenceState.failed record with no error yields null. The caller turns that into a refused artifact, never a silently emptied one.