Skip to content

feat(dcb): make materialized view checkpoint truth explicit - #1117

Merged
tomohisa merged 2 commits into
mainfrom
claude/sek-g26-mv-checkpoint-truth
Aug 10, 2026
Merged

feat(dcb): make materialized view checkpoint truth explicit#1117
tomohisa merged 2 commits into
mainfrom
claude/sek-g26-mv-checkpoint-truth

Conversation

@tomohisa

Copy link
Copy Markdown
Contributor

Closes #1112

Summary

  • Adds provider-neutral Known/Unknown materialized-view checkpoint truth with provenance, deterministic codec, legacy-null compatibility, Known-zero distinction, typed malformed failures, fail-closed comparisons, readiness, and diagnostics.
  • Persists and migrates checkpoint truth across PostgreSQL, MySQL, SQL Server, and SQLite while retaining nullable legacy position fields and public compatibility.
  • Adds common provider, legacy migration, JSON/killing, SQLite replay, Orleans grain readiness, and EN/JA documentation coverage.

Verification

  • dotnet test dcb/Sekiban.Dcb.slnx -c Debug -f net9.0 --no-restore: 1,416 passed, 1 skipped.
  • dotnet test dcb/Sekiban.Dcb.slnx -c Debug -f net10.0 --no-restore: 1,416 passed, 1 skipped.
  • Targeted truth/SQLite and Orleans tests passed on net9/net10.
  • Targeted dotnet format --verify-no-changes and git diff --check passed.
  • SEK-G23-REPAIR.md remains untracked, excluded, and byte-identical (SHA256 b510d75d032480c68dc4b00721d69163c76bea6e848be4ba1ff61916e0b70197).

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

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
14.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@tomohisa
tomohisa marked this pull request as ready for review August 10, 2026 08:07
@tomohisa

Copy link
Copy Markdown
Contributor Author

SEK-G26 semantic review — approved

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

  • MvCheckpointTruth is a provider-neutral two-state contract: Known requires a valid SortableUniqueId and provenance; Unknown has a stable reason. The deterministic codec gives legacy null Unknown(LegacyNull), rejects malformed values with MvCheckpointMalformedException, and makes Unknown != KnownZero with comparisons fail-closed unless both sides are Known.
  • MvExecutorBase ignores nullable legacy positions at decisive read boundaries. Only a successful authoritative empty event-store read records Known-zero; normal applied events record known provenance. Orleans checks every registry entry is Known before it marks Ready, so empty results/G24 observational state cannot promote unknown truth.
  • Postgres, MySQL, SQL Server, and SQLite use additive truth columns, preserve legacy rows, and decode null rather than fabricate a position; common provider migration/row-preservation coverage and the Postgres/SQLite proofs are substantive. The diff is confined to checkpoint contracts, four registries, diagnostics/tests, and EN/JA docs—no cutover, generation coordinator, cloud, or transport widening. Public legacy fields remain additive/compatible. Closes #1112 is correct.
  • Automated S2077 comment triage: resolved at this head. SQLite migration now reads static PRAGMA table_info and emits only fixed ALTER TABLE ... ADD COLUMN current_checkpoint_truth/target_checkpoint_truth statements—no formatted identifier/value SQL remains.
  • Evidence (necessary, not sufficient): exact-head hosted dcbTestsNet9 and dcbTestsNet10 are green (1,416 passed/1 skipped each); local MV truth suite is 35/35 on net9 and net10, Orleans MaterializedViewGrainTests 3/3 on both targets, and provider suite completed. git diff --check is clean. Sonar reports 0 open vulnerabilities and security rating A. Its only failing gate is 14.7% / 194 new duplicated lines, the operator-approved permanent four-provider structural-duplication waiver (v10.9.0/v10.10.0 precedent), not an implementation finding.

@tomohisa tomohisa added the intent-pr-approved PR is approved by intent automation review; ready to merge + close out. label Aug 10, 2026
@tomohisa
tomohisa merged commit ece80eb into main Aug 10, 2026
3 of 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-G26 dcb materialized view: make checkpoint truth explicitly Known or Unknown

2 participants