Repository navigation
Take the JasperFx 2.100 compliance additions (fisher#519) - #520
Merged
Merged
Conversation
Bump JasperFx pins to 2.100.0, tombstoning a stream now retires its natural key rows, enroll session tenant switching, and add the compliance suite inventory test. In-flight append seam left off: SQLite's single writer lock makes the fact's state unreachable. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Conflict in EventAuxiliaryOperationsForSqlite.cs: main's #523 and this branch each added the natural-key delete to TombstoneStreamOperation, the same fix (same stream column, same conjoined tenant term, same set of tables). Kept main's as the one implementation. Also dropped this branch's EventGraph.QuotedNaturalKeyTableNames(), which nothing uses now; main's NaturalKeyDefinitions() is the one that stays. Directory.Packages.props / Directory.Build.props merged cleanly to main's: Fisher 1.28.0, JasperFx.* 2.100.0, Weasel.* 9.49.0. Kept this branch's smoke/aot-consumer pin of JasperFx.Events.SourceGenerator 2.100.0, since main still pins 2.98.0 there, behind its own Directory.Packages.props. Kept as they were: SupportsSessionTenantSwitching => true with the ForTenant override, SupportsHoldingAnAppendOpen => false with its reason, and the compliance_suite_inventory enrollment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…te (fisher#519) check_scoreboard.py counts every test class in Fisher.Tests.Compliance as an enrolled compliance suite, so compliance_suite_inventory read as a 64th enrolled suite of the 64 that JasperFx.Events.ComplianceTests 2.100.0 ships. Updating the docs to 64/785 would have made them false: one suite (SingleTenantedEventSlicingCompliance) is still not enrolled, and that is the excuse the inventory test itself asserts. The class now lives in Fisher.Tests, with a comment saying why, so the compliance counts stay 63 suites / 783 tests. The counts that really moved are the two new tests: HANDOFF's header (2994 -> 2996 total, 2923 -> 2925 in Fisher.Tests) and README's Fisher.Tests count. check_scoreboard.py agrees with Release runs on net10.0 and net9.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #519. Everything is done except one seam, left off on purpose (below).
Merged with
mainafter #521 (1.28.0 release prep) and #523 (the natural-key fix) landed, so this PR is now only the compliance additions.Done
NaturalKeyCompliance's two tombstone facts failed withDuplicateNaturalKeyException, becauseTombstoneStreamOperationleft the natural-key lookup rows behind (they have no FK). This PR had its own fix for that. Tombstoning a stream frees its natural key (fisher#522) #523 landed the same fix onmain(same column choice, same tenant term under conjoined tenancy, same set of tables), so the merge keptmain's and dropped this PR's copy, including itsEventGraph.QuotedNaturalKeyTableNames()helper, which nothing uses any more.main(Fisher 1.28.0: release prep #521: Fisher 1.28.0,JasperFx.*2.100.0,Weasel.*9.49.0). The one pin this PR still changes issmoke/aot-consumer/AotConsumer.csproj:JasperFx.Events.SourceGeneratorgoes from 2.98.0 to 2.100.0, to matchDirectory.Packages.props(main had not bumped it).SupportsSessionTenantSwitching => truewith aForTenantoverride. Fisher's session is not anITenantedQuerySession<>, andsession.ForTenantreturns a realFisherSession. The in-one-save fact passes.compliance_suite_inventory:ComplianceSuiteInventory.AssertEnrolledfor the event fixture (the only excuse isSingleTenantedEventSlicingCompliance, jasperfx#727) and for the document fixture. The class lives in namespaceFisher.Tests, notFisher.Tests.Compliance, on purpose:scripts/check_scoreboard.pycounts every test class in that namespace as an enrolled suite. In that namespace this audit would read as a 64th enrolled suite of the 64 that 2.100.0 ships, while it exists to prove that exactly one of them is not enrolled. The compliance scoreboard therefore stays at 63 suites and 783 tests. HANDOFF's header (2996 total, 2925 inFisher.Tests) and README'sFisher.Testscount take the two new tests.Left out
SupportsHoldingAnAppendOpenstays false. I implementedHoldAppendOpenAsync(an enlisted session on aBEGIN IMMEDIATE) and the fact failed after 3 minutes. SQLite allows one writer per file, so the held write transaction blocks the later committed append the fact needs. The state the fact needs, an uncommitted lower sequence under a committed higher one, cannot exist on SQLite. The reason is written at the flag, andhigh_water_contiguity_auditpins the property.Local verification after the merge (CI is off)
dotnet build fisher.slnx: 0 errors../build.sh CI --framework net10.0and--framework net9.0both pass, andpython3 scripts/check_scoreboard.py --configuration Releaseagrees with both runs: 2996 tests, 783 compliance across 63 suites (49 event / 14 document).dotnet test src/Fisher.Tests/Fisher.Tests.csproj -f net10.0dotnet test src/Fisher.Tests/Fisher.Tests.csproj -f net9.0The same counts on both frameworks, by class:
*natural_key*36/0/0,natural_keys17/0/0,compliance_suite_inventory2/0/0,conjoined_event_tenancy_compliance20 passed and 2 skipped, 0 failed. The session-switching facttwo_tenants_starting_one_stream_id_in_a_single_save_get_two_streamspasses. The 2 skips are the default-tenant-disabled facts, which were skipped before this PR.🤖 Generated with Claude Code