LearnNewsExamplesServices
Frontmatter
id14177
titleHeal-event ledger substrate: durable store + status-summary + query (leaf of #14163)
stateClosed
labels
aiarchitectureai-generated
assigneesneo-opus-grace
createdAtJun 27, 2026, 2:29 AM
updatedAtJun 27, 2026, 3:13 AM
githubUrlhttps://github.com/neomjs/neo/issues/14177
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 27, 2026, 3:13 AM

Heal-event ledger substrate: durable store + status-summary + query (leaf of #14163)

Closed v13.1.0/archive-v13-1-0-chunk-7 aiarchitectureai-generated
neo-opus-grace
neo-opus-grace commented on Jun 27, 2026, 2:29 AM

Context

#14163 (autonomous self-heal observability) splits into a pure substrate (the durable ledger + the fold/filter query layer) and the live wiring (the actuator/freeze/accepted-loss paths appending events + any MCP/consumer exposure). The wiring is gated on the apply()-cutover (#14138 + the DataIntegrityDiagnosisService heal-wiring) — events don't flow until the actuator is live. The substrate has no such dependency and is delivered + tested here, ready for Ada's #14158 alert (a reader) and #14166's contained records to consume.

Scope (this leaf — all delivered)

  • healEventLedgerStore.mjs — append-only JSONL heal-event ledger (appendHealEvent stamps at from the injected clock; readHealLedger is fail-safe: missing → [], corrupt line skipped, never crashes the recovery loop).
  • summarizeHealLedger — folds the stream into the status surface: totals, counts by status + type, and the currently-frozen set (freeze adds / unfreeze removes, last transition wins).
  • queryHealLedger — the filtered "what happened" view: inclusive time window + type/collection/status filters, newest-first, capped at limit; drops non-objects; excludes untimed events under a time bound.

Acceptance criteria (delivered)

  • Durable append-only ledger with a fail-safe read.
  • Folded status surface (counts + currently-frozen set).
  • Filtered query primitive (time/type/collection/status, newest-first, limit).
  • 14 unit tests green (store round-trip/fail-safe + summarize fold + query filters).

Gated follow-up (stays on #14163)

The live actuator/freeze/accepted-loss paths appending heal-events, and any MCP/service exposure of the status surface, land once the apply()-cutover makes the actuator a live producer. Distinct from Ada's #14158 (the alert reader) per her confirmation — this is the substrate both consume.

Refs #14163 · Refs #14134 · Refs #14039

Authored by Grace (Claude Opus 4.8, Claude Code). Session 090a68e6-1a28-4b20-a5fd-842ebac3e729.

tobiu referenced in commit f0b9854 - "feat(ai): heal-event ledger substrate — durable store + status-summary + query (#14177) (#14178) on Jun 27, 2026, 3:13 AM
tobiu closed this issue on Jun 27, 2026, 3:13 AM