Skip to content

Preview#348

Draft
SayliS wants to merge 21 commits into
masterfrom
preview
Draft

Preview#348
SayliS wants to merge 21 commits into
masterfrom
preview

Conversation

@SayliS
Copy link
Copy Markdown
Member

@SayliS SayliS commented Apr 29, 2026

Title

Related Issue

Description

Test Methods

SayliS added 17 commits April 28, 2026 18:19
- CommunityToolkit.HighPerformance 8.4.0 -> 8.4.2
- Cronus.DomainModeling 11.0.0 -> 11.0.2
- Machine.Specifications 1.1.2 -> 1.1.3
- Rewrites ~25 framework doc pages to match Cronus 11.x (handlers, messages, extensibility, event store, projections, configuration, workflows, quick-start)

- Refines per audit: rewrites stale snapshots.md as honest stub, fixes ports.md DI sample, corrects workflows.md logging-scope key constants, dash-form anchors, ~70 cross-tree links rewritten as GitHub URLs

- Cleans up orphan trees (docs/message-handlers/), folds duplicate signals.md into messages/signals.md, redirects stale events.md, adds async-IPublisher caveat to fault-handling.md, fixes TaskId ctor in versioning.md
…ing, multi-process topology, projection markers, integrity validation)

- atomic-actions.md: documents IAggregateRootAtomicAction + ILock, Redis/Consul/Missing implementations, configuration anchors and failure modes.
- aspire-cronus-wiring.md: documents the AppHost/worker wiring contract, env-var-to-config mapping and cross-links to multi-process topology.
- multi-process-topology.md: documents the Cronus:*Enabled toggle pattern and four common topologies (all-in-one, API+worker, read-only, migration).
- projections/projection-markers.md: documents INonVersionableProjection and INonRebuildableProjection, including their interaction with MarkupInterfaceProjectionVersioningPolicy and ProjectionHasher.
- integrity-validation-and-dangerzone.md: documents IIntegrityPolicy and the EventStreamIntegrityPolicy default rules; explicitly notes that no DangerZone bypass is shipped.
- SUMMARY.md: adds entries for all five new pages.
- versioning.md: adds a "see also" cross-link to projection-markers.md (existing INonVersionableProjection mention preserved).
- Collapses the dotnet 8 + dotnet 9 test stages into a single net10 test stage
- Bumps the UseDotNet task to version 10.x (with includePreviewVersions=false)
- Updates dotnet test --framework to net10.0
- Updates DeployStage UseDotNet to 10.x and dependsOn to RunTestsDotnet10
SayliS added 4 commits May 11, 2026 10:13
…ersion

Fixes a bootstrap-ordering race that left non-system projections stuck in
JobExecutionStatus.Running indefinitely.

Chain:
- RebuildProjection_Job returns Running while ProjectionVersionHelper.ShouldBeRetriedAsync is true.
- ShouldBeRetriedAsync returns true while EventStoreIndexStatus reads come back NotPresent.
- EventStoreIndexStatus state is updated through ProjectionRepository.SaveAsync(Type, IEvent)
  via ProjectionIndex.IndexAsync, which goes through GetProjectionVersionsAsync.
- During bootstrap the ProjectionVersionsHandler stream for a projection is empty, so
  RestoreFromHistoryAsync returns default(T) and the read collapses to NotFound. The save
  loop then iterates zero versions and silently no-ops, so EventStoreIndexStatus is never
  populated and IndexStatus.IsNotPresent() stays true forever.

Fix: when GetProjectionVersionsAsync sees a NotFound (no error, no data), synthesize a
discovery-time version (Status=New, Revision=1, hash from ProjectionHasher) so the write
path in SaveAsync(Type, IEvent) has a writable version to persist into. The synthesized
version matches what ProjectionVersionManager produces at first registration, so once the
canonical lifecycle eventually transitions the version to Live, reads find the events at
the same (name, revision) coordinates the writes used. Status flip alone does not change
the storage key in either the Cassandra or Postgres adapters.

Considered alternatives:
1. Bootstrap ordering (await ProjectionVersionsHandler rebuild before publishing
   RegisterProjection for everything else): architecturally cleaner but adds startup
   latency and still does not handle late-arriving projections.
2. Saga retry tuning: masks the symptom without fixing the lost write.

Adds ProjectionRepositoryBootstrapRaceTests covering the regression.
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.

1 participant