Repository navigation
feat(agentcore): add chatlog projections and materialization - #86
Merged
Fodesu merged 1 commit intoOct 3, 2026
Conversation
Fodesu
marked this pull request as ready for review
October 3, 2026 14:30
Fodesu
force-pushed
the
feat/agent-runtime-core-13-chatlog
branch
from
October 3, 2026 14:43
d97d1cb to
112d678
Compare
Fodesu
force-pushed
the
feat/agent-runtime-core-13-chatlog
branch
from
October 3, 2026 17:04
112d678 to
e18bc77
Compare
Fodesu
force-pushed
the
feat/agent-runtime-core-13-chatlog
branch
from
October 3, 2026 17:11
e18bc77 to
9c9b75f
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Adds the
agentcore/chatlogmodule as the conversation-owned event and projection boundary. Chatlog records input lifecycle facts, summaries, compactions, and explicit tool-result supersession; model and tool outcomes remain facts ofagentcore/runand are projected into chatlog rather than copied into a second event stream.Design
The Surface projection preserves the full readable history, including input status, assistants, tool results, summaries, compactions, superseded results, and ledger-position ordering. The Context projection maintains only the active model-facing sequence, pending inputs, active Run ownership, and compaction restoration state. Assistant entries name frozen model results by digest, while successful tool results name frozen output or response bodies.
Materializerresolves those references lazily and caches each digest within a read.Compaction commits a summary and compaction record together. It hashes the exact ordered base context, requires retained entries to be an ordered subset, and enforces pair closure between assistants and their tool results—including unsettled calls. Invalidation restores the archived prefix and removes the compaction summary. Copy-on-write tables preserve prior projection snapshots while using overlay merging to avoid copying every map on each fold.
Testing
Coverage includes discriminated-part codecs, structural Run-fact projection, lifecycle invariants, compaction and invalidation, supersession rejection, materialization, service commands, golden wire/digest fixtures, and a fold benchmark.