8000 feat(agentcore): add chatlog projections and materialization by Fodesu · Pull Request #86 · felinics/twilight · GitHub
[go: up one dir, main page]

Skip to content

feat(agentcore): add chatlog projections and materialization - #86

Merged
Fodesu merged 1 commit into
feat/agent-runtime-core-12-session-run-storefrom
feat/agent-runtime-core-13-chatlog
Oct 3, 2026
Merged

Fodesu merged 1 commit into
feat/agent-runtime-core-12-session-run-storefrom
feat/agent-runtime-core-13-chatlog

Conversation

@Fodesu
@Fodesu Fodesu commented Oct 3, 2026 •
Copy link
Copy Markdown
Member

Summary

Adds the agentcore/chatlog module 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 of agentcore/run and 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. Materializer resolves 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.

@Fodesu
Fodesu added this pull request to stack #105 October 3, 2026 12:27
@Fodesu Fodesu changed the title feat/agent runtime core 13 chatlog feat(agentcore): add chatlog projections and materialization Oct 3, 2026
@Fodesu
Fodesu marked this pull request as ready for review October 3, 2026 14:30
@Fodesu
Fodesu force-pushed the feat/agent-runtime-core-13-chatlog branch from d97d1cb to 112d678 Compare October 3, 2026 14:43
@Fodesu
Fodesu removed this pull request from stack #105 October 3, 2026 16:13
@Fodesu
Fodesu added this pull request to stack #107 October 3, 2026 16:16
@Fodesu
Fodesu removed this pull request from stack #107 October 3, 2026 16:34
@Fodesu
Fodesu added this pull request to stack #108 October 3, 2026 16:37
@Fodesu
Fodesu removed this pull request from stack #108 October 3, 2026 16:51
@Fodesu
Fodesu added this pull request to stack #110 October 3, 2026 16:55
@Fodesu
Fodesu force-pushed the feat/agent-runtime-core-13-chatlog branch from 112d678 to e18bc77 Compare October 3, 2026 17:04
@Fodesu
Fodesu force-pushed the feat/agent-runtime-core-13-chatlog branch from e18bc77 to 9c9b75f Compare October 3, 2026 17:11
@Fodesu
Fodesu merged commit ff6a0a1 into main Oct 3, 2026
8 checks passed
@Fodesu
Fodesu deleted the feat/agent-runtime-core-13-chatlog branch October 5, 2026 07:35
Sign up for free to 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

0