Add Created timestamp to StreamEvent#515
Conversation
Expose the event creation timestamp through StreamEvent so consumers can access it when reading streams. All store implementations already had this data available but were not passing it through. Also update the serialisation docs to document the source generator and EVTC001 analyzer for type registration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review Summary by QodoAdd Created timestamp to StreamEvent across all stores
WalkthroughsDescription• Add Created timestamp field to StreamEvent record struct • Populate timestamp from all store implementations (KurrentDB, PostgreSQL, SQL Server, SQLite, Redis, ElasticSearch, InMemory) • Update serialization docs to recommend source generator approach • Include diagnostic analyzer (EVTC001) documentation for type registration Diagramflowchart LR
StreamEvent["StreamEvent record"]
Created["Created DateTime field"]
Stores["Store implementations"]
KurrentDB["KurrentDB"]
SQL["SQL variants"]
Redis["Redis"]
ES["ElasticSearch"]
InMemory["InMemory"]
StreamEvent -- "adds field" --> Created
Stores -- "populate timestamp" --> KurrentDB
Stores -- "populate timestamp" --> SQL
Stores -- "populate timestamp" --> Redis
Stores -- "populate timestamp" --> ES
Stores -- "populate timestamp" --> InMemory
File Changes1. src/Core/src/Eventuous.Persistence/StreamEvent.cs
|
Code Review by Qodo
1.
|
Deploying eventuous-main with
|
| Latest commit: |
1fc19de
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://198ebb30.eventuous-main.pages.dev |
| Branch Preview URL: | https://feat-stream-event-created.eventuous-main.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fc19de286
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Metadata Metadata, | ||
| string ContentType, | ||
| long Revision, | ||
| DateTime Created = default, |
There was a problem hiding this comment.
Preserve StreamEvent constructor ABI compatibility
Avoid changing the primary constructor signature of this public record struct in-place: adding Created here changes the generated .ctor from 6 to 7 parameters, so binaries compiled against previous versions will still call the old signature and can fail with MissingMethodException at runtime until they are rebuilt. This is especially problematic for package consumers who upgrade the library without recompiling all dependent assemblies, and it contradicts the “no breaking change” intent.
Useful? React with 👍 / 👎.
Test Results 59 files + 39 59 suites +39 38m 6s ⏱️ + 22m 52s For more details on these failures, see this check. Results for commit 86fc4be. ± Comparison against base commit 71036e9. ♻️ This comment has been updated with latest results. |
All other stores use UTC timestamps; ElasticSearch was using local time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
Summary
DateTime Createdfield to theStreamEventrecord struct, populated from the underlying store's timestamp dataStreamEventEVTC001diagnostic analyzerTest plan
Createddefaults todefault)StreamEvent.Createdis populated when reading from each store🤖 Generated with Claude Code