Skip to content

Archived in composite projections: regression tests + docs (#4093)#4264

Merged
jeremydmiller merged 2 commits intomasterfrom
fix/4093-archived-composite-projections
Apr 19, 2026
Merged

Archived in composite projections: regression tests + docs (#4093)#4264
jeremydmiller merged 2 commits intomasterfrom
fix/4093-archived-composite-projections

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Closes #4093.

Summary

Adds end-to-end regression tests and documentation for the new behavior in JasperFx/jasperfx#185, which gates `Archived` handling on single-stream projection ownership so siblings in a composite group no longer interfere with each other.

What ships in this PR

  • `src/DaemonTests/Composites/Bug_4093_archived_in_composite_projections.cs` — two scenarios that now pass:
    1. `archived_does_not_create_phantom_docs_in_other_children_of_composite` — a contrived `Bug4093BarProjection` with `Create(Archived)` no longer materializes a phantom `Bug4093BarDoc` under another child's stream id.
    2. `owning_child_archives_stream_non_owning_child_is_a_noop` — an owning child still archives its stream; a non-owning child is a no-op.
  • `docs/events/archiving.md` gains an "Archived in Composite Projections" section explaining the ownership rule and the two symmetric guards (evolve-time + archive-time).
  • `Directory.Packages.props`:
    • `JasperFx.Events` bumped to `1.28.0` (the release containing the fix)
    • `JasperFx` bumped to `1.24.1` (transitive requirement from JasperFx.Events 1.28.0)

Dependency

Blocks on `JasperFx.Events 1.28.0` — currently on the JasperFx PR branch. CI on this PR will fail until that package is published. Local verification on all three TFMs: 2/2 `Bug_4093` tests pass, full archiving + aggregation suite (300 tests) pass, `Bug_3874_able_to_read_archived_and_tombstone_from_older_names` passes (so `Apply(Archived, current)` on existing snapshots still works).

Test plan

  • `Bug_4093_archived_in_composite_projections` passes on net8.0 / net9.0 / net10.0
  • `Bug_3874_able_to_read_archived_and_tombstone_from_older_names` passes (Apply(Archived) regression)
  • Full archiving + aggregation test sweep passes (300/300)
  • docs/events/archiving.md is markdownlint-clean with the repo's config

🤖 Generated with Claude Code

jeremydmiller and others added 2 commits April 18, 2026 06:56
Adds end-to-end tests that prove Archived is now safely scoped to the
single-stream projection that owns the stream when multiple single-stream
children run in the same composite group. The underlying behavior change
lives in JasperFx.Events 1.28.0 (PR JasperFx/jasperfx#185) — both guards
are keyed on snapshot presence so sibling projections that do not own the
stream no longer create phantom documents or issue redundant mt_archive_stream
operations.

  * Bug_4093_archived_in_composite_projections.cs exercises both scenarios:
    phantom Create(Archived) prevention and owning/non-owning archival.
  * docs/events/archiving.md gains a new section explaining the composite
    semantics and the snapshot-ownership rule.
  * JasperFx.Events bumped to 1.28.0; transitively requires JasperFx 1.24.1.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit 41bbf6d into master Apr 19, 2026
5 of 6 checks passed
@jeremydmiller jeremydmiller deleted the fix/4093-archived-composite-projections branch April 19, 2026 22:58
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.

Archived and Composite Projections

1 participant