feat(core): replace 80% size threshold with count-first chain-to-full fallback#531
Merged
Conversation
… fallback Swap the single 80%-of-full-size heuristic for a two-condition strategy: 1. Chain count exceeds MaxChainBeforeFallback (default 8) → full package 2. Combined chain size >= full size → full package Add MaxChainBeforeFallback to UpdateConfiguration (default 8), plumb it through DownloadPlanBuilder.Build() and ClientStrategy. The new logic stops switching to full when the chain total is only marginally below the full size — the runtime fallback (FallbackFull) already handles chain application failures, so an overly eager size threshold is unnecessary. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d-AppType tests Code review fixes: - Extract duplicated 'switch to full' code block into local function SwitchToFull - Add missing MaxChainBeforeFallback mapping in ConfigurationMapper - Add 3 mixed-AppType test cases (Client+Upgrade split scenarios) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11c4919 to
0a8c4a2
Compare
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.
Closes #530
Summary
Replaces the single 80%-of-full-size threshold in
DownloadPlanBuilderwith a count-first heuristic for choosing between chain packages and a full replacement package.Before
After
Why
FallbackFull— a failed patch falls back automatically. We don't need an eager 80% threshold at download time.MaxChainBeforeFallbackdefaults to 8 inUpdateConfiguration, set to 0 to disable count-based fallback.Changes
UpdateConfiguration.csMaxChainBeforeFallbackproperty (default 8)DownloadPlanBuilder.csClientStrategy.csMaxChainBeforeFallbackto BuildDownloadPlanBuilderTests.cs🤖 Generated with Claude Code