Skip to content

GH-5162 ServiceCapabilities: isolate each store, record FailedSections - #5175

Merged
jeremydmiller merged 1 commit into
mainfrom
gh-5162-capabilities-failed-sections
Oct 23, 2026
Merged

jeremydmiller merged 1 commit into
mainfrom
gh-5162-capabilities-failed-sections

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

What changed

  • ServiceCapabilities.readEventStores / readDocumentStores (and the identically shaped readDbContexts / readHttpGraphs) now read each store on its own. A store whose TryCreateUsage throws is logged, recorded and skipped, so its healthy siblings still appear in the snapshot.
  • New additive property ServiceCapabilities.FailedSections (List<CapabilitySectionFailure>, defaults to []). Each entry has Section (property name, e.g. EventStores), Subject (store subject URI where known, null for a whole-section failure) and ExceptionType (full type name). A consumer can now tell "empty" from "failed" and ask again.
  • Whole-section failures (readSection / readSectionAsync) and the existing per-transport / per-endpoint guards record there too.
  • Cancellation still propagates and is not recorded as a failure.

Additive only: an older payload without FailedSections deserializes to an empty list (covered by a test). The exception message is deliberately left out of the snapshot (it is still in the logged warning) so connection details don't travel to a monitoring console.

Tests run locally (net9.0, Release)

  • New CoreTests.Acceptance.service_capabilities_failed_sections_5162: 6/6 passed (failing event store drops only itself, failing document store drops only itself, empty-without-failures, cancellation, JSON round trip, old payload deserializes).
  • Nearby capability classes (service_capabilities*, exporting_service_capabilities, exporting_saga_capabilities, recurring_schedules_in_capabilities*, system_message_type_filtering, service_tags_3240): 37/37 passed.
  • dotnet build src/Testing/CoreTests -c Release -f net9.0: 0 warnings, 0 errors.

Note for CritterWatch: the new property changes the serialized payload, so if CritterWatch hashes the whole document it may want to include or exclude FailedSections deliberately (JasperFx/CritterWatch#1443).

Closes #5162

🤖 Generated with Claude Code

https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U

…tions

One store whose TryCreateUsage threw used to empty its whole EventStores /
DocumentStores section, and the snapshot then reported the section as empty
rather than failed. Each store (event stores, document stores, DbContexts,
HTTP graphs) is now read on its own, and every failed section or store is
listed on the new ServiceCapabilities.FailedSections (section, subject where
known, exception type). Whole-section failures and the existing per-transport
and per-endpoint guards record there too. Cancellation still propagates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U
@jeremydmiller
jeremydmiller merged commit bf22db2 into main Oct 23, 2026
@jeremydmiller jeremydmiller mentioned this pull request Oct 23, 2026
This was referenced Oct 25, 2026
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.

ServiceCapabilities: one failing event store empties the whole EventStores section, and a failed section is indistinguishable from an empty one

1 participant