Skip to content

feat(sonnetdb): integrate 5.0 through provider extension contracts - #105

Open
maikebing wants to merge 4 commits into
NewLifeX:masterfrom
maikebing:codex/sonnetdb5-provider-overrides-20261106
Open

maikebing wants to merge 4 commits into
NewLifeX:masterfrom
maikebing:codex/sonnetdb5-provider-overrides-20261106

Conversation

@maikebing

@maikebing maikebing commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

SonnetDB 5.0 exposes native relational types, exact temporal/decimal values and schema metadata. This Provider maps XCode to the official SonnetDB 5.0.0 ADO.NET package, keeps ordinary NULL reads in SonnetDBSession.OnFill/QueryAsync overrides, and uses an explicit SonnetDBPackage for exact NULL migration. It depends on the generic opt-in extension contracts in #104; no database-specific DbSession/DAL/ModelHelper/DbPackage branch is added.

New models use DATETIME2/DURATION while reverse metadata also accepts legacy DATETIME/TIME. Reverse-engineered native temporal CAST defaults are preserved without double wrapping, so unchanged models produce no column ALTER. Literal conversion, string-default case semantics, storage/wire formats and the dependency on public SonnetDB/Core/Protocol 5.0.0 stay unchanged.

Current source is 9fc590a. Both late review regressions were reproduced before the fix (2 discovered/2 FAIL/0 skipped) and pass unchanged afterward. The legacy test checks actual RawType/CLR metadata and preferred new-table types; the default test checks the actual read-only DDL plan, repeated SetTables and real ticks/offset/Duration defaults.

Validation on this source:

  • Six Core targets build: net45/net461/netstandard2.0/netstandard2.1/net8/net10; 856 repository warnings remain visible, zero errors. A new old-reference nullable warning was fixed with an explicit guard, without suppression.
  • Fresh source suite 66/66 PASS, and separate PackageReference-only candidate suite 66/66 PASS, both zero failed/skipped with actual REST/HTTP2 connections and the matching public NativeAOT Server.
  • Local candidates 12.3.2026.1107-pr404.2, NewLife.XCode plus XCode.SonnetDB meta-package, both nuspec commits match the current source. Independent cache/source/DLL fingerprints are recorded; SonnetDB dependencies are public 5.0.0/source84433f9e, not repacked local 5.0 binaries.
  • Three package journeys preserve every 18+14+14 check per protocol: embedded/REST/frame-http2, nine app processes and six actual Server lifecycles/reopens, all PASS.
  • Current CI is 13 SUCCESS / 3 FAILURE. Original logs identify unavailable NuGet OIDC; .NET iOS27.1 requiring Xcode27.1 while the runner has26.6; and s390x NovaDb string decode failure. These remain failures, not skipped or relabelled green. Four test platforms, solution/localization, AOT analyzer and remaining platform jobs retain their actual successful results.

Both late review threads are replied/resolved with precise evidence. Full acceptance report and machine identities/checks distinguish working-tree, new candidate, public dependencies and CI. Raw failures/TRX/process receipts are retained.

The acceptance order remains #104 reviewed/merged → rebase this Provider onto the new master with only Provider differences → #105 reviewed/merged → matching public Core/Provider packages → fully public fresh-cache consumers. Architecture head d53442b is unchanged. Related IoTSharp/SonnetDB#404 stays OPEN; no formal package/tag, secret or production operation is performed here.

@maikebing
maikebing marked this pull request as ready for review November 6, 2026 09:32
Copilot AI balanced review requested due to automatic review settings November 6, 2026 09:32
@maikebing

Copy link
Copy Markdown
Contributor Author

The provider implementation is now ready for maintainer review. All source changes are committed and pushed at a224144c95865d5ae6f10c7f6db5eb8e6c816c9e; architecture PR #104 is at d53442b65dc8bf80a3b16e095fe74225f7537c55. Both branch/PR heads are reconciled and the working trees are clean. There are currently no unresolved review threads.

Please review the provider-independent contracts in #104 first; #105 remains dependent on their acceptance and should not be merged ahead of them. Marking this PR ready removes the draft state from completed implementation work; it does not imply architecture approval.

The exact provider head's installed local candidate passes all 64 tests with no failed/skipped cases and embedded/REST/Frame HTTP/2 independent-process journeys (18 exercise + 14 first-reopen + 14 second-reopen checks per protocol). Package/runtime DLL and public SonnetDB 5.0.0 Server identities are in the PR description. CI remains 13 successful / 3 failed checks: the OIDC fork-PR, iOS toolchain and s390x NovaDb failures have raw links and causes in the description. We have kept those separate from the provider change; please advise if you require them to be addressed through separate upstream changes before merging.

SonnetDB issue #404 stays open for architecture/provider review and merge, a matching public XCode Core/Provider release, and a fresh-cache consumer using only public packages. No formal package has been published by this work.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Legacy DateTime and TimeSpan columns can now fail metadata loading and automatic schema initialization, while double-wrapped temporal defaults trigger unnecessary ALTER statements on unchanged columns.

2 open issues
What changed in this PR

Updates XCode’s SonnetDB provider for 5.0 using provider-local overrides and the opt-in extension contracts from PR #104. The changes preserve numeric SQL NULL values while keeping other providers’ default behavior unchanged.

Changes:

  • Adds native temporal and decimal mappings, persistent metadata, Serializable transactions, REPLACE, and expanded pagination/delete support.
  • Introduces explicit NULL-preserving migration and exact XML naming options.
  • Expands regression tests and updates provider documentation, dependencies, and localized messages.
File Description
XUnitTest.XCode/​DataAccessLayer/​SonnetDBTests.cs Tests native 5.0 capabilities and NULL preservation.
XUnitTest.XCode/​DataAccessLayer/​SonnetDBRemoteTests.cs Tests sync/async NULL reads across remote protocols.
XUnitTest.XCode/​DataAccessLayer/​SonnetDBMigrationTests.cs Tests migration, temporal precision, and extractor ownership.
XUnitTest.XCode/​DataAccessLayer/​PackageExtensionTests.cs Tests generic page callbacks and exact XML names.
XCode/​Transform/​TimeExtracter.cs Adds optional time-extraction page queries.
XCode/​Transform/​PagingExtracter.cs Adds optional offset-based page queries.
XCode/​Transform/​IdExtracter.cs Adds optional ID-based page queries.
XCode/​Locales/​zh-Hant.yml Updates Traditional Chinese SonnetDB messages.
XCode/​Locales/​zh-Hans.yml Updates Simplified Chinese SonnetDB messages.
XCode/​Locales/​vi.yml Updates Vietnamese SonnetDB messages.
XCode/​Locales/​uk.yml Updates Ukrainian SonnetDB messages.
XCode/​Locales/​tr.yml Updates Turkish SonnetDB messages.
XCode/​Locales/​th.yml Updates Thai SonnetDB messages.
XCode/​Locales/​sv.yml Updates Swedish SonnetDB messages.
XCode/​Locales/​ru.yml Updates Russian SonnetDB messages.
XCode/​Locales/​ro.yml Updates Romanian SonnetDB messages.
XCode/​Locales/​pt.yml Updates Portuguese SonnetDB messages.
XCode/​Locales/​pl.yml Updates Polish SonnetDB messages.
XCode/​Locales/​nl.yml Updates Dutch SonnetDB messages.
XCode/​Locales/​nb.yml Updates Norwegian Bokmål SonnetDB messages.
XCode/​Locales/​ms.yml Updates Malay SonnetDB messages.
XCode/​Locales/​ko.yml Updates Korean SonnetDB messages.
XCode/​Locales/​ja.yml Updates Japanese SonnetDB messages.
XCode/​Locales/​it.yml Updates Italian SonnetDB messages.
XCode/​Locales/​id.yml Updates Indonesian SonnetDB messages.
XCode/​Locales/​hu.yml Updates Hungarian SonnetDB messages.
XCode/​Locales/​hi.yml Updates Hindi SonnetDB messages.
XCode/​Locales/​he.yml Updates Hebrew SonnetDB messages.
XCode/​Locales/​fr.yml Updates French SonnetDB messages.
XCode/​Locales/​fi.yml Updates Finnish SonnetDB messages.
XCode/​Locales/​fa.yml Updates Persian SonnetDB messages.
XCode/​Locales/​es.yml Updates Spanish SonnetDB messages.
XCode/​Locales/​el.yml Updates Greek SonnetDB messages.
XCode/​Locales/​de.yml Updates German SonnetDB messages.
XCode/​Locales/​da.yml Updates Danish SonnetDB messages.
XCode/​Locales/​cs.yml Updates Czech SonnetDB messages.
XCode/​Locales/​bn.yml Updates Bengali SonnetDB messages.
XCode/​Locales/​ar.yml Updates Arabic SonnetDB messages.
XCode/​DataAccessLayer/​Model/​ModelHelper.cs Adds opt-in preservation of physical-name casing.
XCode/​DataAccessLayer/​DbPackage.cs Wires page callbacks into exact built-in extractors.
XCode/​DataAccessLayer/​Database/​SonnetDBPackage.cs Adds explicit NULL-preserving migration reads.
XCode/​DataAccessLayer/​Database/​SonnetDB.cs Implements 5.0 mappings, SQL capabilities, and reader overrides.
XCode/​DataAccessLayer/​Common/​IDatabase.cs Adds NameFormats.Exact.
XCode.SonnetDB/​XCode.SonnetDB.csproj Upgrades SonnetDB dependency and release notes.
HANDOFF.md Records architecture dependency and validation handoff.
Doc/​SonnetDB.md Documents 5.0 usage, capabilities, and boundaries.
Doc/​ProviderExtensionContracts.md Documents optional migration and XML contracts.
ChangeLog.md Records unreleased provider and extension changes.

Review effort: Balanced

@maikebing maikebing changed the title feat: support SonnetDB 5.0 through provider overrides feat(sonnetdb): integrate 5.0 through provider extension contracts Nov 6, 2026
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.

2 participants