Repository navigation
refactor(core): own the host storage contract - #1866
Merged
Merged
Conversation
This was referenced Nov 22, 2026
Collaborator
Author
houko
enabled auto-merge (rebase)
November 22, 2026 04:20
houko
force-pushed
the
refactor/storage-contract-181
branch
from
November 22, 2026 04:34
4ec93d6 to
ad5693b
Compare
houko
force-pushed
the
refactor/storage-contract-181
branch
2 times, most recently
from
November 22, 2026 08:56
5cf34cc to
013d88b
Compare
houko
force-pushed
the
refactor/storage-contract-181
branch
from
November 22, 2026 09:39
013d88b to
bdea123
Compare
houko
force-pushed
the
refactor/storage-contract-181
branch
from
November 22, 2026 23:28
bdea123 to
8993c2a
Compare
houko
added a commit
that referenced
this pull request
Nov 22, 2026
The App Clip storage test built core.NewStore directly on fileStorage, which writes driver.StorageChange since core took over the host storage contract (#1866), so internal/engine's tests no longer compiled on any target. NewStorage adapts the backend as OpenFileStorage does.
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.
Summary
Give hosts an owned
core.StorageBackendcontract forcore.NewStore, withcore.StorageChange,core.StorageOpand operation constants defined incore. A host can implement persistence without depending on the private driver protocol. The engine adapts the owned changes to existing file, browser and mini-program persistence backends.Remove the two storage protocol records from the public API allowlist and check
core.NewStoreas an app-facing API. Update public English/Chinese guides, the skill and the storage architecture. The existing app-facingImageSamplingvalue is also classified in the API guard.Refs #181. This is independent of #1862 and #1811.
Targets
Screenshots
None.
Verification
go tool nsgo test ./core -- -p 1 -run 'TestStorage|TestAccess.*Storage|Test.*Partition' -count=1: 7 passed, including storage partitions.go tool nsgo test ./internal/engine -- -p 1 -run 'TestStorage|TestFileStorage|TestAppDirs|TestEngineMakesAppDirs' -count=1: 4 passed, including the new platform adapter regression for load, set, remove, clear and in-memory stores.go tool nsgo test ./nsgotest -- -p 1 -count=1: 158 passed, one skipped.go tool nsgo check -target macos,ios,windows,linux,android_arm64,web -jobs 1passed on the remote Mac builder, including both desktop architectures, iOS and Android arm64. CI Build and vet also passed.TestMinimalAppLinks: macOS linksnet/http,crypto/tls,crypto/x509; Linux linksnet/http. The same two subtests reproduce with the same package lists on clean main091984681603d03095e491025b499e3cc11d00df, so this predates the storage contract change.git diff --checkpassed.Checklist