Documentation
¶
Overview ¶
Package journal is the append-only, observability-only record of every event applied to a run: events.jsonl. It is never the source of truth for a run's current state (internal/sdlc/ledger's run.json is authoritative, per the plan's ledger-authoritative/journal-observability-only split) — engine.Apply's own determinism is what makes replaying this log a valid way to double-check or rebuild state, not something normal resume needs to do. journal deliberately knows nothing about internal/sdlc/engine's Effect or Event types: a caller encodes whatever it resolved into an Entry, so this package stays a plain, decoupled JSONL log.
Index ¶
Constants ¶
const FileName = "events.jsonl"
FileName is the journal's file name within a run's directory.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct {
Timestamp string `json:"timestamp"`
RunID string `json:"runId"`
NodeID string `json:"nodeId"`
// Kind names the event's shape (e.g. "WorkCompleted", "JevDecided"); the
// caller's own vocabulary, not one journal defines or validates.
Kind string `json:"kind"`
// Detail is the event, encoded as JSON however the caller chooses.
Detail json.RawMessage `json:"detail,omitempty"`
}
Entry is one events.jsonl line.
func ReadAll ¶
ReadAll returns every parseable entry in dir's events.jsonl, in file order. A missing file yields none; a blank or malformed line is skipped rather than failing the read, mirroring usage.ReadRecords — the journal is observability, so a single corrupt line must never make the rest of the history unreadable.