8000 feat(session): add session writer by Fodesu · Pull Request #80 · felinics/twilight · GitHub
[go: up one dir, main page]

Skip to content

feat(session): add session writer - #80

Merged
Fodesu merged 1 commit into
feat/agent-runtime-core-06-filestorefrom
feat/agent-runtime-core-07-writer
Oct 3, 2026
Merged

Fodesu merged 1 commit into
feat/agent-runtime-core-06-filestorefrom
feat/agent-runtime-core-07-writer

Conversation

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

Summary

Add the session Writer on top of the session kernel.

Responsibilities

The Writer is the single in-process write entry for a Session. It coordinates:

  • typed event encoding and module validation
  • commit idempotency checks
  • artifact admission and retention claims
  • authoritative and derived projection folding
  • projection cache refresh
  • ordered observer notifications
  • lease renewal and ownership-loss handling

The session kernel remains responsible for lineage, storage, append ordering,
and epoch fencing.

Commit flow

View
→ build SemanticGroup
→ encode and validate
→ admit artifacts
→ pre-fold projections
→ append through the session handle
→ advance projection state
→ refresh cache and notify observers

Authoritative projection failures reject the commit before persistence.
Derived projection failures mark the projection unhealthy after the commit is
durable.

Unknown append outcomes fail the Writer closed until it is reopened and
reconciled. Cache writes and observer notifications happen outside the Writer
lock while preserving commit order.

Cost model

Commit cost grows with the number of events, artifact references, and registered
projections. Writer startup replays only the history not covered by valid
projection cache entries.

@Fodesu
Fodesu added this pull request to stack #105 October 3, 2026 12:27
@Fodesu Fodesu changed the title feat/agent runtime core 07 writer feat(agentcore): add session writer Oct 3, 2026
@Fodesu
Fodesu marked this pull request as ready for review October 3, 2026 13:12
@Fodesu Fodesu changed the title feat(agentcore): add session writer feat(session): add session writer Oct 3, 2026
@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 merged commit 3f27b2a into main Oct 3, 2026
16 checks passed
@Fodesu
Fodesu deleted the feat/agent-runtime-core-07-writer 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