Repository navigation
Delta client - #6589
Delta client#6589JohnMcPMS wants to merge 36 commits into
Conversation
This reverts commit 1c33f93.
ranm-msft
left a comment
There was a problem hiding this comment.
Thanks for this. I read the delta index form, the source factory update path, and the existing unit coverage (including the malformed-data, differing-baseline-version and baseline-repair cases), so this is one question rather than a list.
A newly persisted but unusable delta causes update failure before the documented full-index fallback, even when a valid full index remains available.
In DeltaIndexForm::Update the delta is acquired and persisted first, and the baseline is validated afterwards. If the locator is missing or the baseline does not match, the result is UpdateResult::Unusable. In PreIndexedPackageSourceFactory::UpdateBase that surfaces as APPINSTALLER_CLI_ERROR_SOURCE_DATA_INTEGRITY_FAILURE, which returns out of the update rather than falling back. Open then also locks onto the delta form, so the already-persisted bad delta is what the next call sees.
That reads as if it contradicts the intent stated in the source comments, which describe the delta as an optimization and not a correctness dependency. If a valid full index is still on disk and reachable, I would expect a delta that fails validation to be discarded and the full index used, rather than the update failing.
I may be misreading the ordering, so I am asking rather than asserting - is the persist-then-validate order deliberate, and is the full-index fallback expected to be reachable from this state?
If the fallback is meant to be reachable, a regression test that persists a delta whose baseline does not match and then asserts a successful update from the full index would pin the behaviour down nicely.
Separately, and not a finding on the change itself: the x64 and x86 release test legs are currently failing on this head, so I would want those green before signing off regardless of the above.
There was a problem hiding this comment.
🟡 Changes recommended
Delta updates can leave partial state, one E2E scenario contradicts the implementation, and temporary baseline files may leak.
3 open findings
What changed in this PR
Adds experimental delta-plus-baseline support for pre-indexed package sources.
Changes:
- Adds delta source creation, metadata, acquisition, and merged SQLite access.
- Adds deployment downgrade support and delta feature configuration.
- Adds unit and E2E coverage for delta sources and package stores.
| File | Description |
|---|---|
src/WinGetSourceCreator/WinGetLocalSource.cs |
Builds delta, baseline, and full packages. |
src/WinGetSourceCreator/Model/LocalSource.cs |
Adds delta configuration. |
src/WinGetSourceCreator/Model/DeltaSettings.cs |
Defines delta source settings. |
src/WinGetSourceCreator/Helpers.cs |
Supports identity and version overrides. |
src/AppInstallerSharedLib/Runtime.cpp |
Adds an interactive-user test hook. |
src/AppInstallerRepositoryCore/SourceList.cpp |
Configures the built-in delta identity. |
src/AppInstallerRepositoryCore/Microsoft/SQLiteIndex.h |
Exposes combined delta/baseline indexes. |
src/AppInstallerRepositoryCore/Microsoft/SQLiteIndex.cpp |
Implements combined index opening. |
src/AppInstallerRepositoryCore/Microsoft/Schema/ISQLiteIndex.h |
Defines baseline locator APIs. |
src/AppInstallerRepositoryCore/Microsoft/Schema/ISQLiteIndex.cpp |
Adds default locator behavior. |
src/AppInstallerRepositoryCore/Microsoft/Schema/2_1/Interface.h |
Exposes schema 2.1 locator reads. |
src/AppInstallerRepositoryCore/Microsoft/Schema/2_1/Interface_2_1.cpp |
Implements schema locator access. |
src/AppInstallerRepositoryCore/Microsoft/Schema/2_1/DeltaGeneration.h |
Updates delta metadata contracts. |
src/AppInstallerRepositoryCore/Microsoft/Schema/2_1/DeltaGeneration.cpp |
Reads and writes baseline locators. |
src/AppInstallerRepositoryCore/Microsoft/PreIndexedPackageSourceFactory.cpp |
Selects and updates delta forms. |
src/AppInstallerRepositoryCore/Microsoft/PreIndexed/SourceData.h |
Defines structured source identities. |
src/AppInstallerRepositoryCore/Microsoft/PreIndexed/SourceData.cpp |
Parses and serializes source identities. |
src/AppInstallerRepositoryCore/Microsoft/PreIndexed/PackageStore.cpp |
Extends package-store selection and hooks. |
src/AppInstallerRepositoryCore/Microsoft/PreIndexed/IndexForm.h |
Adds delta form and usability APIs. |
src/AppInstallerRepositoryCore/Microsoft/PreIndexed/FullIndexForm.cpp |
Adapts full indexes to structured data. |
src/AppInstallerRepositoryCore/Microsoft/PreIndexed/DeployedPackageStore.cpp |
Allows baseline downgrades. |
src/AppInstallerRepositoryCore/Microsoft/PreIndexed/DeltaIndexForm.cpp |
Implements delta acquisition and opening. |
src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj.filters |
Registers new source files. |
src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj |
Builds new delta components. |
src/AppInstallerCommonCore/UserSettings.cpp |
Validates the delta setting. |
src/AppInstallerCommonCore/Public/winget/UserSettings.h |
Maps the delta setting. |
src/AppInstallerCommonCore/Public/winget/ExperimentalFeature.h |
Defines the delta feature flag. |
src/AppInstallerCommonCore/Public/AppInstallerDeployment.h |
Adds deployment downgrade options. |
src/AppInstallerCommonCore/ExperimentalFeature.cpp |
Registers the delta feature. |
src/AppInstallerCommonCore/Deployment.cpp |
Applies downgrade deployment flags. |
src/AppInstallerCLITests/TestMsixPackage.h |
Declares test package creation. |
src/AppInstallerCLITests/TestMsixPackage.cpp |
Builds test MSIX packages. |
src/AppInstallerCLITests/TestHooks.h |
Adds package-store test hooks. |
src/AppInstallerCLITests/PreIndexedPackageSource.cpp |
Tests delta and store behavior. |
src/AppInstallerCLITests/ExperimentalFeature.cpp |
Tests feature registration. |
src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters |
Organizes new test files. |
src/AppInstallerCLITests/AppInstallerCLITests.vcxproj |
Builds the new test utility. |
src/AppInstallerCLIE2ETests/Helpers/TestIndex.cs |
Publishes an E2E delta source. |
src/AppInstallerCLIE2ETests/DeltaSourceCommand.cs |
Adds deployed delta E2E tests. |
src/AppInstallerCLIE2ETests/Constants.cs |
Defines delta test constants. |
schemas/JSON/settings/settings.schema.0.2.json |
Documents the delta setting schema. |
doc/Settings.md |
Documents the experimental feature. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ranm-msft
left a comment
There was a problem hiding this comment.
One additional feature-disable correctness gap inline. I checked the current head and existing discussions; this is distinct from the earlier adoption and failed-delta fallback concerns. Waiting on this and the current test/review gates before approval.
While this feature is experimental, I want failures like this to be exposed. When we move it to enabled by default we can consider the fallback. |
ranm-msft
left a comment
There was a problem hiding this comment.
One source-lifecycle regression remains before I can sign off.
ranm-msft
left a comment
There was a problem hiding this comment.
The custom-source identity fix and regression coverage address my earlier concern, and CI is green at 50bff7b. I'm still waiting for a focused delta/source-owner review at this head before I clear my changes-requested review.


📖 Description
Adds experimental
deltaIndexfeature that enables the client to use delta+baseline when it is available from the source.During add, we attempt to find the delta package at a fixed name, then the baseline it references. If this is all successful, the source data has a new JSON representation to record the multiple pieces of information.
When updating or opening the source, if we believe that delta is available (because we have both the delta and baseline identities), only the delta is acceptable. Any failure should escape to be reported and fixed.
We may consider fallback in the future, but it is much more complex than it would first appear due to the baseline sharing identity with the full index.
🔍 Validation
Added unit and E2E tests targeting the delta source update and opening.
Microsoft Reviewers: Open in CodeFlow