Repository navigation
Conversation
woksin
left a comment
There was a problem hiding this comment.
One blocking finding in src/cratis_chronicle/event_sources/routing.py (resolve_routing, lines 51-54):
The stream-without-source check looks at the per-event stream argument, not the resolved stream_name. When the stream comes only from the call-level default_stream and no source resolves, the stream is silently dropped instead of rejected:
resolve_routing({}, None, default_stream="Transactions")
# returns ResolvedRouting(event_source=None, event_stream=None, concurrency=None)
# expected: ConflictingEventSourceRoutingError("Stream 'Transactions' was given without an event source")The docstring says "Without a source nothing is resolved and a stream is rejected", so a defaulted stream should be rejected the same way as a per-event one. Suggested fix: check stream_name is not None (and use it in the message), plus a regression spec for the defaulted-stream case.
Non-blocking: wire registration, append and metadata are still deferred in this PR, so parity with the other clients is partial for now.
Added
cratis_chronicle.event_sources:EventSourceDefinition/EventStreamDefinitionwithConcurrencyDimensions(wire-matching flag values), name/duplicate validation, andresolve_routingfor source/stream routing with explicit-concurrency > stream > source precedence, per-event override and unset source for legacy appends.Part of #36 (Cratis/Chronicle#4516). Partial — draft: wire registration, definition-aware append and EventContext/observer metadata are blocked, see below. No existing API changed (the package previously exposed only
__version__).Blocker
cratis-chronicle-contracts16.38.2 has noeventsourcesmodule, Chronicle v19.30.0 has no Python contracts asset (publish-python-clientisif: falseupstream), and the client has no connection/append API yet (#4).