ProofOfWork class
Per-run "proof of work" artifact persisted under
.spectra/runs/<run_id>/proof.md.
Captures the diff summary, changed files, retry history, and final status in a stable Markdown shape that operators can review without leaving the dashboard.
Constructors
-
ProofOfWork({required String runId, required String issueIdentifier, required String workspacePath, required int attempt, required DateTime startedAt, required DateTime endedAt, required bool succeeded, required List<
String> changedFiles, required Map<String, String> hookStatuses, required List<String> retryHistory, String? recommendation, String? diffSummary}) -
Creates a proof-of-work record.
const
Properties
- attempt → int
-
1-based attempt count (1 for first run).
final
-
changedFiles
→ List<
String> -
Files changed by the run, relative to the workspace root.
final
- diffSummary → String?
-
Optional concatenated diff text (already truncated by the caller).
final
- endedAt → DateTime
-
Wall-clock finish time.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hookStatuses
→ Map<
String, String> -
Hooks that ran and their final status (
succeeded,failed, ...).final - issueIdentifier → String
-
Issue identifier the run is for.
final
- recommendation → String?
-
Optional final recommendation (next action operators should take).
final
-
retryHistory
→ List<
String> -
Retry history (most recent first).
final
- runId → String
-
Run identifier (stable across retries).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startedAt → DateTime
-
Wall-clock start time.
final
- succeeded → bool
-
Whether the run succeeded.
final
- workspacePath → String
-
Workspace path where the worker ran.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
persist(
{String runsRoot = '.spectra/runs'}) → Future< String> - Persists the artifact to disk and returns the absolute path.
-
toMarkdown(
) → String - Renders the artifact as Markdown.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited