Skip to content

Add RuntimeEvent read model projection - #12

Merged
likun666661 merged 1 commit into
apache:mainfrom
likun666661:runtime-v2-runtimeevent-read-model
Jun 15, 2026
Merged

Add RuntimeEvent read model projection#12
likun666661 merged 1 commit into
apache:mainfrom
likun666661:runtime-v2-runtimeevent-read-model

Conversation

@likun666661

Copy link
Copy Markdown
Member

Summary

  • add a side-by-side RuntimeEvent to StoredMessage read-model projection helper
  • add semantic compatibility comparison between projected and legacy StoredMessage rows
  • cover user/model text, tool calls/results, permission decisions, token usage, terminal turn state, partial skipping, and legacy read-path preservation

Verification

  • npm run build --workspace packages/core
  • npm run typecheck --workspace packages/runtime
  • npm run test --workspace packages/runtime -- --runInBand
  • git diff --check

@likun666661
likun666661 merged commit 5182bab into apache:mainJun 15, 2026
jackwener pushed a commit that referenced this pull request Jun 21, 2026
jackwener pushed a commit that referenced this pull request Jun 21, 2026
jackwener pushed a commit that referenced this pull request Jun 21, 2026
jackwener pushed a commit that referenced this pull request Jun 21, 2026
liuxiaocs7 added a commit to liuxiaocs7/maka that referenced this pull request Aug 29, 2026
Replaces the legacy usage:pricing:{list,put,reset} path (and the
UsageStats.pricing read model) — which the review flagged for bypassing
CAS and writing to the default Host — with the production adapter path
from spec apache#2015.
- IPC: new usage:pricing:load / usage:pricing:mutate over the existing
DesktopRuntimeHostClient adapter. The renderer round-trips the exact
snapshot it loaded back as the CAS base, so a save carries the revision
the user was viewing instead of a freshly reloaded latest; the three
legacy handlers are removed and a test fences them (Acceptance apache#12).
- Shared DesktopPricing* types move to src/shared with a boundary
decoder; preload exposes settings.pricing.{load,mutate} scoped to the
Settings-selected Host (fixes the wrong-Host write).
- Renderer: a controller / pure view-model / presentational panel split
(mirrors the Memory page) bound to the selected Host via context. The
tab lists the full built-in ∪ overrides table with a Source column,
resetEffect-aware reset-vs-delete copy, and "Not set" vs explicit $0
cache rates; it drops the range/summary so pricing no longer reads as
time-scoped; field-level validation and every mutation outcome
(committed, synchronized, revision_conflict, saved-refresh-failed,
uncertain) are handled per spec.
- Removes UsageStats.pricing and its now-dead read path.
- Tests: view-model, adapter IPC (base pass-through + legacy-fence gate),
and a linkedom renderer interaction test; Storybook variants (loading,
read-error, built-in-only, mixed, custom-only, narrow).
Interaction states (validation / conflict / uncertain) are covered by the
renderer tests rather than autoplay-disabled stories, per stories/FIDELITY.md.
Refs apache#2015
Generated-by: Claude Code
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@likun666661