Skip to content

SEK-G25: scope materialized-view event sources by service - #1116

Merged
tomohisa merged 7 commits into
mainfrom
claude/sek-g25-mv-service-scope
Aug 10, 2026
Merged

SEK-G25: scope materialized-view event sources by service#1116
tomohisa merged 7 commits into
mainfrom
claude/sek-g25-mv-service-scope

Conversation

@tomohisa

@tomohisa tomohisa commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Scope every classic materialized-view event read to the exact service-bound IEventStoreFactory source in Postgres, MySQL, SQL Server, and SQLite.
  • Keep the legacy aggregate-store constructors as explicitly documented single-service compatibility paths, with validation before infrastructure, registry, source, target, or stream I/O.
  • Add standard source-factory DI parity for Postgres, Cosmos DB, DynamoDB, and SQLite, plus a shared-backend InMemory service partition proof.
  • Propagate exact service identity through the hosted worker and Orleans grain path, and add focused isolation, zero-I/O, compatibility, provider, and EN/JA documentation coverage.
  • The forbidden MV-specific MvEventStoreResolver was removed; its original bytes were preserved in the content-addressed audit backup listed below.

Validation

  • dotnet build dcb/Sekiban.Dcb.slnx -c Debug --no-restore
  • dotnet test dcb/tests/Sekiban.Dcb.MaterializedView.Tests/Sekiban.Dcb.MaterializedView.Tests.csproj -c Debug -f net10.0 — 25 passed, 0 failed
  • dotnet test dcb/tests/Sekiban.Dcb.MaterializedView.MultiProvider.Tests/Sekiban.Dcb.MaterializedView.MultiProvider.Tests.csproj -c Debug -f net10.0 --filter FullyQualifiedName~SqliteMvIntegrationTests — 2 passed, 0 failed
  • dotnet test dcb/tests/Sekiban.Dcb.Orleans.Tests/Sekiban.Dcb.Orleans.Tests.csproj -c Debug -f net10.0 --filter FullyQualifiedName~MaterializedViewGrainTests — 2 passed, 0 failed
  • dotnet test dcb/Sekiban.Dcb.slnx -c Debug --no-build -f net10.0 — 1,413 passed, 1 skipped, 0 failed
  • dotnet test dcb/Sekiban.Dcb.slnx -c Debug --no-build -f net9.0 — 1,413 passed, 1 skipped, 0 failed
  • git diff --check

Content-addressed resolver audit:

  • SHA-256: 801d6eca8c3750b03d8b7d0aad7591e4bb1d5674e8aae37391c9fb58e11df76e
  • Backup: /tmp/sek-g25-mv-resolver-audit/801d6eca8c3750b03d8b7d0aad7591e4bb1d5674e8aae37391c9fb58e11df76e/MvEventStoreResolver.cs
  • Source and backup were verified byte-for-byte before removal.

SEK-G23-REPAIR.md remains untracked and was excluded from this commit and PR.

Closes #1111

@tomohisa tomohisa added the intent-target Intent automation target — implementation worker may claim this issue. label Aug 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Aug 9, 2026

Copy link
Copy Markdown

@tomohisa
tomohisa marked this pull request as ready for review August 9, 2026 21:59
@tomohisa

tomohisa commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

SEK-G25 semantic review — approved

Reviewed exact head f63aa9cc8d002932471415fc38f761bdb8898a05 against packet.yaml, implementation.md, review-context.md, github-body.md, issue #1111, and the referenced materialized-view-service-scope.md / intent map. design_alignment_checked: true.

  • All four classic executors retain direct IEventStoreFactory fields and select CreateForService(exactServiceId) after boundary validation and before source reads. The public aggregate-store constructors remain explicit, identity-checked single-service compatibility paths; no MV-only resolver ships.
  • Worker and Orleans paths propagate the configured/grain-key ServiceId without ambient substitution; invalid/mismatched/default identities fail before factory, registry, host, source, or subscription I/O. The shared-backend InMemory proof and source/target-independent SQLite MV composition demonstrate service partitioning; Postgres/Cosmos/DynamoDB/SQLite standard DI registrations expose the factory.
  • AC coverage: executor matrix + zero-I/O boundary contract (MvExecutorServiceBoundaryTests); legacy constructor reflection; worker propagation; Orleans grain propagation; shared InMemory factory; provider registration parity; EN/JA composition docs. SEK-G23-REPAIR.md is not in the shipping diff. Scope stays within issue SEK-G25 dcb materialized view: enforce service-scoped event-source resolution #1111; the PR contains Closes #1111.
  • Evidence (necessary, not sufficient): hosted checks dcbTestsNet9, dcbTestsNet10, SonarCloud, and SonarCloud Code Analysis are successful; Sonar reports 0 duplicated new lines / 0.0%. Locally: MV tests 25/25 on net9 and net10; Orleans MaterializedViewGrainTests 2/2 on net9 and net10; shared-backend isolation 1/1; provider registration tests 3/3; git diff --check clean.

No implementation findings. The guide review queue projection still lacks linked_pr, but intent-cli review closeout-plan recovered SEK-G25 ↔ PR #1116 ↔ issue #1111 through the GitHub closing reference and host-review-preflight selected #1116; this is host metadata drift, not a PR finding.

@tomohisa tomohisa added the intent-pr-approved PR is approved by intent automation review; ready to merge + close out. label Aug 9, 2026
@tomohisa
tomohisa merged commit c05d4c0 into main Aug 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

intent-pr-approved PR is approved by intent automation review; ready to merge + close out. intent-target Intent automation target — implementation worker may claim this issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEK-G25 dcb materialized view: enforce service-scoped event-source resolution

1 participant