You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(core): replace 80% size threshold with count-first chain-to-full fallback (#531)
* feat(core): replace 80% size threshold with count-first chain-to-full 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>
* fix(core): deduplicate switch-to-full logic, add missing mapper, mixed-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>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
// Local helper: build a "switch to full" plan that replaces same-AppType
196
+
// chain packages with bestFull, while keeping chains for other AppTypes
197
+
// (and any same-AppType chains whose version exceeds the full's version).
198
+
DownloadPlanSwitchToFull(stringreason)
187
199
{
188
-
GeneralTracer.Info($"DownloadPlanBuilder: chain total {chainTotal} >= 80% of full size{bestFull.Size}, switching to full package{bestFull.Name}");
189
-
varbestFullSv=Lookup(bestFull);
200
+
GeneralTracer.Info($"DownloadPlanBuilder: {reason}, switching to full package{bestFull.Name} (chain count {chainCount}, chain total {chainTotal}, full size{bestFull.Size})");
0 commit comments