feat(storage): scaffold Caliber.Webhooks.EntityFrameworkCore (DbContext + schema) (S1 of #37)#57
Merged
Merged
Conversation
…xt + schema) Foundation for the durable SQLite store: sub-task 1 of 3 for #37, under M2 epic #8. A new multi-target (net8.0;net10.0) provider project maps the M1 domain (WebhookMessage/Endpoint) to the messages/endpoints schema via EF Core, created with ensure-created. No store logic yet — no IMessageStore/IEndpointStore impls (those are #46 and #47). - New src/Caliber.Webhooks.EntityFrameworkCore wired into the solution; the core package stays dependency-free (EF deps isolated to the provider). - Durable snake_case schema contract: a UNIQUE (event_id, endpoint_id) index for idempotent fan-out, a (status, next_attempt_at) index for the due-message claim query, and EventTypes stored as JSON (null = subscribe-all). - EF Core Sqlite pinned via CPM to 8.0.28 — the net8 floor, same policy as the Extensions packages; its transitive Microsoft.Extensions.* stay at 8.0.x so CentralPackageTransitivePinningEnabled stays conflict-free (EF 10 would drag them to 10.x and trip NU1109). - Fix two latent CPM issues the provider surfaced: raise the *.Abstractions floor to 8.0.2 (the graph's real transitive minimum via Http; the core masked it with direct references) and pin SQLitePCLRaw.bundle_e_sqlite3 to 2.1.11. - Accept CVE-2025-6965 (GHSA-2m69-gcr7-jv3q) via a documented, narrow NuGet audit suppression: a native-SQLite bug with no fixed release, reachable only via attacker-controlled SQL — which this store never runs (EF-generated SQL, bound parameters only). - Schema-contract smoke test creates the schema on a real SQLite file and pins the column + unique-index contract. 155 tests green on net8.0 + net10.0, zero warnings. Closes #45. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
williamdewitt
added a commit
that referenced
this pull request
Jun 27, 2026
…#58) isCore only matched `src/Caliber.Webhooks/` (trailing slash), so sibling provider projects (e.g. src/Caliber.Webhooks.EntityFrameworkCore/, added in #57) and the root build infra (Directory.Build.props/Directory.Packages.props — repo-wide deps and analyzers) fell through to risk:low. PR #57 had to be relabelled core by hand, and every M2 storage-provider PR would mis-classify the same way. Broaden isCore to the whole src/ tree plus the root build-props files. Critical still wins by precedence (public API / migrations / security source), and .github/workflows/** stays core. No behaviour change for the existing core lib or trivial-docs auto-merge. Co-authored-by: Claude Opus 4.8 <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.
What
Foundation for the durable SQLite store — sub-task 1 of 3 for #37, under the M2 epic (#8). A new multi-target provider project,
Caliber.Webhooks.EntityFrameworkCore, maps the M1 domain (WebhookMessage/Endpoint) to themessages/endpointsschema via EF Core and creates it with ensure-created. No store logic yet — noIMessageStore/IEndpointStoreimplementations (those are #46 and #47).Highlights
src/Caliber.Webhooks.EntityFrameworkCore(net8.0;net10.0), in the solution. The core package stays dependency-free — EF deps are isolated to the provider.UNIQUE (event_id, endpoint_id)for idempotent fan-out,(status, next_attempt_at)for the due-message claim query,subscribed_event_typesstored as JSON (null= subscribe-all).Dependency decisions (the non-obvious bits)
8.0.28via CPM — the net8 floor, same policy as the Extensions packages. Its transitiveMicrosoft.Extensions.*sit at 8.0.x, soCentralPackageTransitivePinningEnabledstays conflict-free. EF Core 10 would drag those transitives to 10.x and trip NU1109 against the 8.0.0 pins.*.Abstractionsfloor to8.0.2— the graph's real transitive minimum (Http 8.0.0 → Logging 8.0.1 → *.Abstractions >= 8.0.2). The core project masked this by referencing them directly (authoritative); a provider that pulls them only transitively trips NU1109 without this.SQLitePCLRaw.bundle_e_sqlite3to2.1.11and accepted CVE-2025-6965 (GHSA-2m69-gcr7-jv3q, High) via a documented, narrowNuGetAuditSuppress. It's a native-SQLite bug (< 3.50.2) with no fixed SQLitePCLRaw release, reachable only via attacker-controlled SQL — which this store never runs (EF-generated SQL, bound parameters only). Rationale + a "remove when upstream patches" trigger are inDirectory.Build.props.Verification
dotnet build -c Release— green on net8.0 + net10.0, zero warnings (warnings-as-errors + Meziantou + analyzers).dotnet test— 155 passed on both TFMs.dotnet pack—.nupkg+.snupkgproduced.risk:core— for human review + merge.Closes #45.