Populate usage.Events and return an empty StreamMetadata.Tags (#411, #412) - #413
Merged
Merged
Conversation
…412) Both found by a new cross-store compliance suite (EventStoreExplorerCompliance, JasperFx/jasperfx#633) rather than by Polecat's own tests -- which is the point of the shared suite. #411: EventStoreUsage carries the event registry twice, as Events (List<EventDescriptor>) and RegisteredEventTypes (List<EventTypeDescriptor>). Marten fills both; Polecat filled only RegisteredEventTypes, so usage.Events came back empty. This descriptor is read out of repo by CritterWatch, where an empty Events list reads as "this store has no event types configured" rather than "this store describes them under a different key". Now populated from the same AllKnownEventTypes() loop that already fed RegisteredEventTypes. #412: GetStreamMetadataAsync returned Tags: null!, but StreamMetadata.Tags is declared as a non-nullable IReadOnlyDictionary<string, string>. "No tags" is spelled with an empty dictionary; null forces every consumer that trusts the declaration into a NullReferenceException instead of an empty loop. The `null!` silenced the compiler's warning rather than answering it. Now a shared static empty dictionary, so there is no per-stream allocation. Deliberately product-only: the compliance enrollment that proves these lands separately, once the JasperFx release carrying the suite is out. Closes #411 Closes #412 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VpDCvJcBDZerieJB4JEHde
jeremydmiller
force-pushed
the
fix/411-412-explorer-descriptors
branch
from
August 4, 2026 22:50
750c733 to
44a45a3
Compare
jeremydmiller
added a commit
that referenced
this pull request
Aug 4, 2026
Enrolls the three shared suites that shipped in 2.39.4 (JasperFx/jasperfx#633): fetch_latest_compliance (7), stream_archiving_compliance (6) and event_store_explorer_compliance (6). Polecat's compliance coverage goes from 105 to 124 tests with zero capability gates. No gates are needed because #413 already fixed what they would have covered: the explorer suite found an empty usage.Events collection (#411) and a null StreamMetadata.Tags (#412) while it was being written, and those landed separately so they did not have to wait on a JasperFx release. The two temporary gates were removed from the compliance library before it shipped, so these assertions run unmodified here. The version jump also picks up 2.39.2 and 2.39.3, which had not been adopted yet. Verified on net9.0 against the published packages: 124/124 compliance. Claude-Session: https://claude.ai/code/session_01VpDCvJcBDZerieJB4JEHde Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two explorer-surface defects, both found by a new cross-store compliance suite (
EventStoreExplorerCompliance, JasperFx/jasperfx#633) rather than by Polecat's own tests.#411 —
usage.Eventswas emptyEventStoreUsagecarries the event registry twice:Events(List<EventDescriptor>) andRegisteredEventTypes(List<EventTypeDescriptor>). Marten fills both. Polecat filled onlyRegisteredEventTypes, sousage.Eventscame back empty.That matters because this descriptor is read out of repo by CritterWatch, where an empty
Eventslist reads as "this store has no event types configured" rather than "this store describes them under a different key" — the tooling degrades silently instead of failing.Now populated from the same
AllKnownEventTypes()loop that already fedRegisteredEventTypes.#412 —
StreamMetadata.Tagswas nullGetStreamMetadataAsyncreturnedTags: null!, but the record declares it non-nullable:"No tags" is spelled with an empty dictionary. A null forces every consumer that trusts the declaration into a
NullReferenceExceptioninstead of an empty loop. Thenull!had silenced the compiler's warning rather than answering it.Now a shared
static readonlyempty dictionary, so there is no per-stream allocation. Polecat does not persist DCB stream tags yet, so every row legitimately reports the same empty set.Scope
Deliberately product-only. The compliance enrollment that proves both fixes needs a JasperFx release carrying the new suite, so it lands separately — at which point the two temporary capability gates come out and the suite runs ungated. Verified locally against that suite: explorer suite 6/6, compliance 124/124 with no gates, full Polecat.Tests 1722/0/3.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VpDCvJcBDZerieJB4JEHde