Skip to content

refactor(projection): clarify inheritance overrides and commit requirements - #132

Merged
Fodesu merged 2 commits into
felinics:mainfrom
Fodesu:refactor/projection-definition
Oct 18, 2026
Merged

Fodesu merged 2 commits into
felinics:mainfrom
Fodesu:refactor/projection-definition

Conversation

@Fodesu

@Fodesu Fodesu commented Oct 18, 2026

Copy link
Copy Markdown
Member

Context

Projection definitions currently use Inherits and Authoritative, which make two separate contracts difficult to distinguish:

  • how a projection reads inherited history after a fork;
  • whether a projection must successfully fold before a commit can be persisted.

This makes the lifecycle semantics of conversation history, execution state, and maintenance state harder to review.

Changes

  • Rename Inherits to InheritanceOverride.
  • Rename InheritPolicy to InheritancePolicy.
  • Keep nil as the default, so the projection follows the owning stream domain's StreamDefinition.Inheritance.
  • Replace InheritStreams with the explicit InheritNone policy while retaining InheritAll.
  • Rename Authoritative to RequiredForCommit.
  • Update registry validation, checkpoint handling, session writers, and built-in projections.
  • Use domain defaults for conversation history and explicit InheritNone for execution and compaction state.
  • Add a focused fold-level test covering default, all, and none inheritance behavior.

Validation

  • go test ./agentcore/...

@Fodesu
Fodesu merged commit d0617be into felinics:main Oct 18, 2026
1 check passed
@Fodesu
Fodesu deleted the refactor/projection-definition branch October 18, 2026 10:51
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