You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make SessionManager.getMessages() and listTurns() prefer RuntimeEvent-projected session views when durable per-run runtime ledgers are usable.
Route retry/regenerate turn lookup, user-message lookup, and branch copy through the same RuntimeEvent-primary read view.
Expand RuntimeEvent read projection for assistant thinking, abort source metadata, and multi-run lineage.
Keep external IPC/preload/gateway/renderer contracts unchanged: callers still receive StoredMessage[] and TurnRecord[].
Rive
Workflow: wfrun_65d83dede37f4a8bb7af4375ab5fbb89
Scheduler: sched_715dace105ce4c7399692dafcfa46ff4
Final verdict: pass_with_risks
Fallback policy
RuntimeEvent reads fall back to legacy SessionStore for no runStore, no runs, active/non-terminal runs, missing/empty runtime ledgers, missing terminal RuntimeEvents, hard projection diagnostics, run-store read failures, or hard compatibility gaps.
MAKA_RUNTIME_READ_SOURCE=legacy forces legacy reads as an emergency rollback.
Known risks
AgentRunStore.readRuntimeEvents() still skips corrupt RuntimeEvent JSONL lines silently, so semantic compatibility remains the current safety boundary until storage exposes corruption diagnostics.
The runtime view sorts RuntimeEvents chronologically with deterministic tiebreakers; the initial contract mentioned listSessionRuns/per-run concatenation. Tests pass with the chronological policy, but this should stay visible in review.
Verification
npm run build --workspace packages/core
npm run typecheck --workspace packages/runtime
npm run test --workspace packages/runtime -- --runInBand (427 tests, 0 failures)
git diff --check
Rive stress node also ran npm run test --workspaces --if-present successfully, including desktop 1399 tests / 0 failures.
Follow-up risk cleanup is pushed in 6a27af44 Harden RuntimeEvent read cutover.
What changed:
AgentRunStore.readRuntimeEvents() now rejects durable corrupt RuntimeEvent JSONL rows instead of silently shortening the canonical ledger. Unterminated partial tails are still ignored as incomplete writes.
SessionManager.readSessionView() now treats runtime-ledger read failure as an explicit legacy fallback path and carries the read error in diagnostics.
Multi-run RuntimeEvent read ordering is locked to session chronology by RuntimeEvent.ts, with stable run/ledger/id tiebreakers and a regression test.
MAKA_RUNTIME_READ_SOURCE=legacy now has an explicit rollback test.
Verification:
npm run test --workspace packages/storage -- --runInBand: 80 tests / 10 suites / 0 failures
npm run test --workspace packages/runtime -- --runInBand: 430 tests / 86 suites / 0 failures
npm run build --workspace packages/core: pass
npm run typecheck --workspace packages/runtime: pass
git diff --check: pass
npm run test --workspaces --if-present: core 614, storage 80, runtime 430, desktop 1399, all 0 failures
All current dependencies (React Native, keychain, sqlite, AppCompat,
Hermes) are hosted on google() and mavenCentral(); no dependency pulls
from JitPack. The extra repository only slows resolution and adds a
supply-chain surface, so drop it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SessionManager.getMessages()andlistTurns()prefer RuntimeEvent-projected session views when durable per-run runtime ledgers are usable.StoredMessage[]andTurnRecord[].Rive
wfrun_65d83dede37f4a8bb7af4375ab5fbb89sched_715dace105ce4c7399692dafcfa46ff4pass_with_risksFallback policy
RuntimeEvent reads fall back to legacy
SessionStorefor no runStore, no runs, active/non-terminal runs, missing/empty runtime ledgers, missing terminal RuntimeEvents, hard projection diagnostics, run-store read failures, or hard compatibility gaps.MAKA_RUNTIME_READ_SOURCE=legacyforces legacy reads as an emergency rollback.Known risks
AgentRunStore.readRuntimeEvents()still skips corrupt RuntimeEvent JSONL lines silently, so semantic compatibility remains the current safety boundary until storage exposes corruption diagnostics.Verification
npm run build --workspace packages/corenpm run typecheck --workspace packages/runtimenpm run test --workspace packages/runtime -- --runInBand(427 tests, 0 failures)git diff --checknpm run test --workspaces --if-presentsuccessfully, including desktop 1399 tests / 0 failures.