Catalog/P family/P14
Proposed specificationSource-located exemplarH1H3

Event-sourced conversation engine

Reconstruct state from recorded events.

JOIN POINTconversation_state_projectionRECORD STATUSCandidate · v0.1.0
UML class view for Event-sourced conversation engine, showing participant roles, received calls, and analytical dependencies
FIG. P14 / UML CLASS VIEW
Object interaction diagram for Event-sourced conversation engine, showing role collaboration and a numbered message sequence
FIG. P14 / OBJECT INTERACTIONS
Context
Conversation state is derived from recorded events.
Trigger
A new event is appended or history is loaded.
Structure
Event schema, sequence or identity rules, and a projector.
Effect
The current view is reproducible from the event history.
Requires
Events are immutable enough to replay and schema versions are identifiable.
Ensures
Applying the same ordered events yields the same semantic state.
Invariant
Projection never mutates historical event identity.
Violation
Missing, incompatible, or corrupt events produce recoverable migration or rejection.

Negative control

A mutable message array without projection semantics is insufficient.

Permitted variation

Event type unions, snapshots, migrations, local or remote persistence.

Test obligation

Test full replay, snapshot-plus-tail replay, schema evolution, and partial history.

Evolution question

Did conversation state move behind an append-and-project boundary?

PROMPT SKETCH
Project conversation state from immutable events. Replaying the same ordered events must produce the same semantic state, even when snapshots or schema migrations are used.
CODE DESIGN / PYTHON
def project(events, initial_state):
    state = initial_state
    for event in sorted(events, key=lambda item: item.seq):
        handler = HANDLERS.get(event.kind)
        if handler is None:
            raise UnknownEvent(event.kind)
        state = handler(state, event)
    return state

Illustrative design sketch. State is a projection; an event with no handler is a contract violation, not a no-op. This example is a teaching aid, not implementation evidence or a conformance claim.

Join point
conversation_state_projection
Source locator
See the source record.
Lexical cue
(?i)\b(?:event[_-]?sourc(?:e|ed|ing)|conversation[_-]?events|append[_-]?event|projection)\bFrozen expression, v0.1.0. A match is a retrieval cue, not a confirmed implementation.
Aliases
None
Canonical exemplar
OpenHands/software-agent-sdkopenhands-sdk/openhands/sdk/conversation/state.py:342Support: tests/sdk/conversation/local/test_state_serialization.py:234
Negative control
A mutable message array without projection semantics is insufficient.

Scope-anchored review. pohe-agent analyze <repo> --pattern P14 anchors the cue to its enclosing declaration and checks a separate operational signature for all four pointcut dimensions. Missing roles and negative-control risks remain visible; a structural match is not E2/E3. Calibration report ↗

Source-located exemplar

A concrete source anchor is available for this proposed record. It is one exemplar, not evidence that all repositories—or every contract field—conform.

Review boundary: this candidate and its specification come from an AI-assisted study. Independent human validation remains open.

ANY-EVIDENCE FAMILY COVERAGE31/36

86.1% of repository families in the frozen panel have at least one current cue, historical cue, or canonical source layer. This is not confirmed prevalence.

Current lexical-cue repositories: 34 / 41
Canonical source anchorOpenHands/software-agent-sdk 5c524ad65d81openhands-sdk/openhands/sdk/conversation/state.py:342

State updated by appending events and rebuilding a view.

Exploratory retrieval cue Regex / v0.1.0
(?i)\b(?:event[_-]?sourc(?:e|ed|ing)|conversation[_-]?events|append[_-]?event|projection)\b

This expression is a discovery instrument only. A match is a retrieval cue—not a confirmed implementation, pointcut match, or contract proof.